summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2009-04-06 14:59:27 +0000
committerTony Vroon <chainsaw@gentoo.org>2009-04-06 14:59:27 +0000
commit7ff61353774498ecd7804efcf4d53e6e829b6ba0 (patch)
treec388576d14bc9bafda8e9d29270c579bdd849d29 /net-misc/zaptel
parentAdd ~sh (diff)
downloadgentoo-2-7ff61353774498ecd7804efcf4d53e6e829b6ba0.tar.gz
gentoo-2-7ff61353774498ecd7804efcf4d53e6e829b6ba0.tar.bz2
gentoo-2-7ff61353774498ecd7804efcf4d53e6e829b6ba0.zip
Port 1.4-branch hrtimer build fix to 1.2.27, fixes build against 2.6.28 kernels. Quote a few variables in the 1.2.18 ebuilds.
(Portage version: 2.1.6.11/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/zaptel')
-rw-r--r--net-misc/zaptel/ChangeLog7
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch41
-rw-r--r--net-misc/zaptel/zaptel-1.2.18-r1.ebuild100
-rw-r--r--net-misc/zaptel/zaptel-1.2.18.ebuild76
-rw-r--r--net-misc/zaptel/zaptel-1.2.27.ebuild5
5 files changed, 138 insertions, 91 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog
index d4e9ac2a9834..99c1cf9570f6 100644
--- a/net-misc/zaptel/ChangeLog
+++ b/net-misc/zaptel/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/zaptel
# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.114 2009/04/05 14:20:01 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.115 2009/04/06 14:59:26 chainsaw Exp $
+
+ 06 Apr 2009; <chainsaw@gentoo.org> +files/zaptel-1.2.27-hrtimer.patch,
+ zaptel-1.2.18.ebuild, zaptel-1.2.18-r1.ebuild, zaptel-1.2.27.ebuild:
+ Port 1.4-branch hrtimer build fix to 1.2.27, fixes build against 2.6.28
+ kernels. Quote a few variables in the 1.2.18 ebuilds.
05 Apr 2009; Brent Baude <ranger@gentoo.org> zaptel-1.2.18.ebuild:
Marking zaptel-1.2.18 ppc for bug 237476
diff --git a/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch b/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch
new file mode 100644
index 000000000000..3eada3093186
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch
@@ -0,0 +1,41 @@
+diff -uNr zaptel-1.2.27.ORIG/ztdummy.c zaptel-1.2.27/ztdummy.c
+--- zaptel-1.2.27.ORIG/ztdummy.c 2009-04-06 10:36:51.000000000 +0100
++++ zaptel-1.2.27/ztdummy.c 2009-04-06 10:40:21.000000000 +0100
+@@ -107,6 +107,19 @@
+ # error "This kernel is too old: not supported by this file"
+ #endif
+
++#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) )
++/* compatibility with new hrtimer interface */
++static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer)
++{
++ return timer->expires;
++}
++
++static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
++{
++ timer->expires = time;
++}
++#endif
++
+ static struct ztdummy *ztd;
+
+ static int debug = 0;
+@@ -192,7 +205,7 @@
+ * expired.
+ * We should worry if overrun is 2 or more; then we really missed
+ * a tick */
+- overrun = hrtimer_forward(&zaptimer, htmr->expires,
++ overrun = hrtimer_forward(&zaptimer, hrtimer_get_expires(htmr),
+ ktime_set(0, ZAPTEL_TIME_NS));
+ if(overrun > 1) {
+ if(printk_ratelimit())
+@@ -217,7 +230,7 @@
+ {
+ zt_receive(&ztd->span);
+ zt_transmit(&ztd->span);
+- timer.expires = jiffies + 1;
++ hrtimer_set_expires(timer, jiffies + 1);
+ add_timer(&timer);
+ }
+ #endif
diff --git a/net-misc/zaptel/zaptel-1.2.18-r1.ebuild b/net-misc/zaptel/zaptel-1.2.18-r1.ebuild
index 03e926966759..009e9ff77f5e 100644
--- a/net-misc/zaptel/zaptel-1.2.18-r1.ebuild
+++ b/net-misc/zaptel/zaptel-1.2.18-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.18-r1.ebuild,v 1.2 2007/07/15 23:22:24 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.18-r1.ebuild,v 1.3 2009/04/06 14:59:26 chainsaw Exp $
inherit toolchain-funcs eutils linux-mod
@@ -60,21 +60,21 @@ select_echo_cancel() {
}
zconfig_disable() {
- if grep -q "${1}" ${S}/zconfig.h; then
+ if grep -q "${1}" "${S}/zconfig.h"; then
# match a little more than ${1} so we can use zconfig_disable
# to disable all echo cancellers in zconfig.h w/o calling it several times
sed -i -e "s:^[ \t]*#define[ \t]\+\(${1}[a-zA-Z0-9_-]*\).*:#undef \1:" \
- ${S}/zconfig.h
+ "${S}/zconfig.h"
fi
return $?
}
zconfig_enable() {
- if grep -q "${1}" ${S}/zconfig.h; then
+ if grep -q "${1}" "${S}/zconfig.h"; then
sed -i -e "s:^/\*[ \t]*#define[ \t]\+\(${1}\).*:#define \1:" \
-e "s:^[ \t]*#undef[ \t]\+\(${1}\).*:#define \1:" \
- ${S}/zconfig.h
+ "${S}/zconfig.h"
fi
return $?
@@ -175,29 +175,29 @@ pkg_setup() {
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${P}-2.6.22.diff
- epatch ${FILESDIR}/${P}-gentoo.diff
- epatch ${FILESDIR}/zaptel-1.2.9.1-ar.patch
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-2.6.22.diff"
+ epatch "${FILESDIR}/${P}-gentoo.diff"
+ epatch "${FILESDIR}/zaptel-1.2.9.1-ar.patch"
# try to apply bristuff patch
if use bri; then
# fix for userpriv
- chmod -R a=rwX ${S_BRI}
+ chmod -R a=rwX "${S_BRI}"
einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})"
- epatch ${S_BRI}/patches/zaptel.patch
+ epatch "${S_BRI}"/patches/zaptel.patch
- cd ${S_BRI}
+ cd "${S_BRI}"
if use florz; then
einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc"
# remove as soon as there's a new florz patch available
sed -i -e "s:zaptel-1\.2\.5:zaptel-1.2.6:g" \
- ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+ "${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff"
- epatch ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+ epatch "${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff"
fi
# patch includes
@@ -217,7 +217,7 @@ src_unpack() {
sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \
zaphfc/Makefile
- cd ${S}
+ cd "${S}"
fi
# oslec echo canceller
@@ -287,43 +287,43 @@ src_unpack() {
src_compile() {
# build
- make KVERS=${KV_FULL} \
- KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || die
+ make KVERS="${KV_FULL}" \
+ KSRC="${KV_DIR}" ARCH="$(tc-arch-kernel)" || die
if use astribank; then
- cd ${S}/xpp/utils
+ cd "${S}"/xpp/utils
make || die "make xpp utils failed"
fi
if use bri; then
- cd ${S_BRI}
+ cd "${S_BRI}"
for x in cwain qozap zaphfc; do
einfo "Building ${x}..."
- make KVERS=${KV_FULL} \
+ make KVERS="${KV_FULL}" \
KSRC=/usr/src/linux \
- ARCH=$(tc-arch-kernel) \
- -C ${x} || die "make ${x} failed"
+ ARCH="$(tc-arch-kernel)" \
+ -C "${x}" || die "make ${x} failed"
done
fi
if use ecoslec; then
cd "${S_OSLEC}"
- make KVERS=${KV_FULL} \
+ make KVERS="${KV_FULL}" \
KDIR=/usr/src/linux \
- ARCH=$(tc-arch-kernel) || die "emake oslec failed"
+ ARCH="$(tc-arch-kernel)" || die "emake oslec failed"
fi
}
src_install() {
# Create firmware directory
- mkdir -p ${D}/lib/firmware/
+ mkdir -p "${D}/lib/firmware/"
- kernel_is 2 4 && cp /etc/modules.conf ${D}/etc
- make INSTALL_PREFIX=${D} ARCH=$(tc-arch-kernel) \
- KVERS=${KV_FULL} KSRC=/usr/src/linux install || die
+ kernel_is 2 4 && cp /etc/modules.conf "${D}/etc"
+ make INSTALL_PREFIX="${D}" ARCH="$(tc-arch-kernel)" \
+ KVERS="${KV_FULL}" KSRC=/usr/src/linux install || die
dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init
- dodoc zaptel.conf.sample LICENSE zaptel.sysconfig README.fxotune
+ dodoc zaptel.conf.sample zaptel.sysconfig README.fxotune
# additional tools
dobin ztmonitor ztspeed zttest fxotune
@@ -335,12 +335,12 @@ src_install() {
if use bri; then
einfo "Installing bri"
- cd ${S_BRI}
+ cd "${S_BRI}"
- insinto /lib/modules/${KV_FULL}/misc
- doins qozap/qozap.${KV_OBJ}
- doins zaphfc/zaphfc.${KV_OBJ}
- doins cwain/cwain.${KV_OBJ}
+ insinto "/lib/modules/${KV_FULL}/misc"
+ doins "qozap/qozap.${KV_OBJ}"
+ doins "zaphfc/zaphfc.${KV_OBJ}"
+ doins "cwain/cwain.${KV_OBJ}"
# install example configs for octoBRI and quadBRI
insinto /etc
@@ -365,13 +365,13 @@ src_install() {
docinto bristuff/cwain
dodoc cwain/TODO cwain/LICENSE
- cd ${S}
+ cd "${S}"
fi
if use ecoslec; then
cd "${S_OSLEC}"
- insinto /lib/modules/${KV_FULL}/misc
- doins oslec.${KV_OBJ}
+ insinto "/lib/modules/${KV_FULL}/misc"
+ doins "oslec.${KV_OBJ}"
newsbin oslec-ctrl-panel.sh oslec-ctrl-panel
@@ -382,27 +382,27 @@ src_install() {
fi
# install init script
- newinitd ${FILESDIR}/zaptel.rc6 zaptel
- newconfd ${FILESDIR}/zaptel.confd zaptel
+ newinitd "${FILESDIR}/zaptel.rc6" zaptel
+ newconfd "${FILESDIR}/zaptel.confd" zaptel
# install devfsd rule file
insinto /etc/devfs.d
- newins ${FILESDIR}/zaptel.devfsd zaptel
+ newins "${FILESDIR}/zaptel.devfsd" zaptel
# install udev rule file
insinto /etc/udev/rules.d
- newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules
+ newins "${FILESDIR}/zaptel.udevd" 10-zaptel.rules
# fix permissions if there's no udev / devfs around
- if [[ -d ${D}/dev/zap ]]; then
- chown -R root:dialout ${D}/dev/zap
- chmod -R u=rwX,g=rwX,o= ${D}/dev/zap
+ if [[ -d "${D}/dev/zap" ]]; then
+ chown -R root:dialout "${D}/dev/zap"
+ chmod -R u=rwX,g=rwX,o= "${D}/dev/zap"
fi
if use astribank; then
- cd ${S}/xpp/utils
+ cd "${S}"/xpp/utils
eval `perl '-V:installarchlib'`
- make DESTDIR=${D} PERLLIBDIR=${installarchlib} install \
+ make DESTDIR="${D}" PERLLIBDIR="${installarchlib}" install \
|| die "failed xpp utils install"
dosbin zt_registration xpp_sync lszaptel
fi
@@ -440,8 +440,8 @@ pkg_postinst() {
fi
# fix permissions if there's no udev / devfs around
- if [[ -d ${ROOT}dev/zap ]]; then
- chown -R root:dialout ${ROOT}dev/zap
- chmod -R u=rwX,g=rwX,o= ${ROOT}dev/zap
+ if [[ -d "${ROOT}dev/zap" ]]; then
+ chown -R root:dialout "${ROOT}dev/zap"
+ chmod -R u=rwX,g=rwX,o= "${ROOT}dev/zap"
fi
}
diff --git a/net-misc/zaptel/zaptel-1.2.18.ebuild b/net-misc/zaptel/zaptel-1.2.18.ebuild
index 434ac292623e..bd772b4cbfcd 100644
--- a/net-misc/zaptel/zaptel-1.2.18.ebuild
+++ b/net-misc/zaptel/zaptel-1.2.18.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.18.ebuild,v 1.5 2009/04/05 14:20:01 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.18.ebuild,v 1.6 2009/04/06 14:59:26 chainsaw Exp $
inherit toolchain-funcs eutils linux-mod
@@ -53,21 +53,21 @@ select_echo_cancel() {
}
zconfig_disable() {
- if grep -q "${1}" ${S}/zconfig.h; then
+ if grep -q "${1}" "${S}/zconfig.h"; then
# match a little more than ${1} so we can use zconfig_disable
# to disable all echo cancellers in zconfig.h w/o calling it several times
sed -i -e "s:^[ \t]*#define[ \t]\+\(${1}[a-zA-Z0-9_-]*\).*:#undef \1:" \
- ${S}/zconfig.h
+ "${S}/zconfig.h"
fi
return $?
}
zconfig_enable() {
- if grep -q "${1}" ${S}/zconfig.h; then
+ if grep -q "${1}" "${S}/zconfig.h"; then
sed -i -e "s:^/\*[ \t]*#define[ \t]\+\(${1}\).*:#define \1:" \
-e "s:^[ \t]*#undef[ \t]\+\(${1}\).*:#define \1:" \
- ${S}/zconfig.h
+ "${S}/zconfig.h"
fi
return $?
@@ -168,10 +168,10 @@ pkg_setup() {
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${P}-2.6.22.diff
- epatch ${FILESDIR}/${P}-gentoo.diff
- epatch ${FILESDIR}/zaptel-1.2.9.1-ar.patch
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-2.6.22.diff"
+ epatch "${FILESDIR}/${P}-gentoo.diff"
+ epatch "${FILESDIR}/zaptel-1.2.9.1-ar.patch"
# try to apply bristuff patch
if use bri; then
@@ -181,16 +181,16 @@ src_unpack() {
einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})"
epatch ${S_BRI}/patches/zaptel.patch
- cd ${S_BRI}
+ cd "${S_BRI}"
if use florz; then
einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc"
# remove as soon as there's a new florz patch available
sed -i -e "s:zaptel-1\.2\.5:zaptel-1.2.6:g" \
- ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+ "${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff"
- epatch ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+ epatch "${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff"
fi
# patch includes
@@ -210,7 +210,7 @@ src_unpack() {
sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \
zaphfc/Makefile
- cd ${S}
+ cd "${S}"
fi
### Configuration changes
@@ -254,12 +254,12 @@ src_compile() {
KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || die
if use astribank; then
- cd ${S}/xpp/utils
+ cd "${S}"/xpp/utils
make || die "make xpp utils failed"
fi
if use bri; then
- cd ${S_BRI}
+ cd "${S_BRI}"
for x in cwain qozap zaphfc; do
einfo "Building ${x}..."
make KVERS=${KV_FULL} \
@@ -272,14 +272,14 @@ src_compile() {
src_install() {
# Create firmware directory
- mkdir -p ${D}/lib/firmware/
+ mkdir -p "${D}/lib/firmware/"
- kernel_is 2 4 && cp /etc/modules.conf ${D}/etc
- make INSTALL_PREFIX=${D} ARCH=$(tc-arch-kernel) \
- KVERS=${KV_FULL} KSRC=/usr/src/linux install || die
+ kernel_is 2 4 && cp /etc/modules.conf "${D}/etc"
+ make INSTALL_PREFIX="${D}" ARCH="$(tc-arch-kernel)" \
+ KVERS="${KV_FULL}" KSRC=/usr/src/linux install || die
dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init
- dodoc zaptel.conf.sample LICENSE zaptel.sysconfig README.fxotune
+ dodoc zaptel.conf.sample zaptel.sysconfig README.fxotune
# additional tools
dobin ztmonitor ztspeed zttest fxotune
@@ -291,12 +291,12 @@ src_install() {
if use bri; then
einfo "Installing bri"
- cd ${S_BRI}
+ cd "${S_BRI}"
- insinto /lib/modules/${KV_FULL}/misc
- doins qozap/qozap.${KV_OBJ}
- doins zaphfc/zaphfc.${KV_OBJ}
- doins cwain/cwain.${KV_OBJ}
+ insinto "/lib/modules/${KV_FULL}/misc"
+ doins "qozap/qozap.${KV_OBJ}"
+ doins "zaphfc/zaphfc.${KV_OBJ}"
+ doins "cwain/cwain.${KV_OBJ}"
# install example configs for octoBRI and quadBRI
insinto /etc
@@ -321,31 +321,31 @@ src_install() {
docinto bristuff/cwain
dodoc cwain/TODO cwain/LICENSE
- cd ${S}
+ cd "${S}"
fi
# install init script
- newinitd ${FILESDIR}/zaptel.rc6 zaptel
- newconfd ${FILESDIR}/zaptel.confd zaptel
+ newinitd "${FILESDIR}/zaptel.rc6" zaptel
+ newconfd "${FILESDIR}/zaptel.confd" zaptel
# install devfsd rule file
insinto /etc/devfs.d
- newins ${FILESDIR}/zaptel.devfsd zaptel
+ newins "${FILESDIR}/zaptel.devfsd" zaptel
# install udev rule file
insinto /etc/udev/rules.d
- newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules
+ newins "${FILESDIR}/zaptel.udevd" 10-zaptel.rules
# fix permissions if there's no udev / devfs around
- if [[ -d ${D}/dev/zap ]]; then
- chown -R root:dialout ${D}/dev/zap
- chmod -R u=rwX,g=rwX,o= ${D}/dev/zap
+ if [[ -d "${D}/dev/zap" ]]; then
+ chown -R root:dialout "${D}/dev/zap"
+ chmod -R u=rwX,g=rwX,o= "${D}/dev/zap"
fi
if use astribank; then
- cd ${S}/xpp/utils
+ cd "${S}/xpp/utils"
eval `perl '-V:installarchlib'`
- make DESTDIR=${D} PERLLIBDIR=${installarchlib} install || die "failed xpp utils install"
+ make DESTDIR="${D}" PERLLIBDIR="${installarchlib}" install || die "failed xpp utils install"
dosbin zt_registration xpp_sync lszaptel
fi
}
@@ -373,8 +373,8 @@ pkg_postinst() {
fi
# fix permissions if there's no udev / devfs around
- if [[ -d ${ROOT}dev/zap ]]; then
- chown -R root:dialout ${ROOT}dev/zap
- chmod -R u=rwX,g=rwX,o= ${ROOT}dev/zap
+ if [[ -d "${ROOT}dev/zap" ]]; then
+ chown -R root:dialout "${ROOT}dev/zap"
+ chmod -R u=rwX,g=rwX,o= "${ROOT}dev/zap"
fi
}
diff --git a/net-misc/zaptel/zaptel-1.2.27.ebuild b/net-misc/zaptel/zaptel-1.2.27.ebuild
index 8f46938c2b57..95eb33e4879e 100644
--- a/net-misc/zaptel/zaptel-1.2.27.ebuild
+++ b/net-misc/zaptel/zaptel-1.2.27.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.27.ebuild,v 1.2 2008/12/15 11:26:36 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.27.ebuild,v 1.3 2009/04/06 14:59:26 chainsaw Exp $
inherit toolchain-funcs eutils linux-mod flag-o-matic multilib
@@ -175,6 +175,7 @@ src_unpack() {
epatch "${FILESDIR}"/zaptel-1.2.25-xpputils.diff
epatch "${FILESDIR}"/zaptel-1.2.27-kernel.patch
epatch "${FILESDIR}"/zaptel-1.2.27-semaphore.patch
+ epatch "${FILESDIR}"/zaptel-1.2.27-hrtimer.patch
# try to apply bristuff patch
if use bri; then