summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaco Kroon <jaco@uls.co.za>2023-05-11 17:37:09 +0200
committerSam James <sam@gentoo.org>2023-05-12 04:53:42 +0100
commit84ba723adca728dfcaa2cb0f19112e51cbb22518 (patch)
tree1607cd1114219db9f86db609c70f2383504cfa9a /net-misc
parentnet-misc/dahdi: add 3.2.0 (diff)
downloadgentoo-84ba723adca728dfcaa2cb0f19112e51cbb22518.tar.gz
gentoo-84ba723adca728dfcaa2cb0f19112e51cbb22518.tar.bz2
gentoo-84ba723adca728dfcaa2cb0f19112e51cbb22518.zip
net-misc/dahdi-tools: add 3.2.0
Closes: https://bugs.gentoo.org/861605 Closes: https://bugs.gentoo.org/873766 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/30996 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dahdi-tools/Manifest1
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-3.2.0.ebuild73
-rw-r--r--net-misc/dahdi-tools/files/dahdi-tools-3.2.0-lto.patch61
-rw-r--r--net-misc/dahdi-tools/metadata.xml3
4 files changed, 138 insertions, 0 deletions
diff --git a/net-misc/dahdi-tools/Manifest b/net-misc/dahdi-tools/Manifest
index 72e63527c043..39bdb6ec81be 100644
--- a/net-misc/dahdi-tools/Manifest
+++ b/net-misc/dahdi-tools/Manifest
@@ -1 +1,2 @@
DIST dahdi-tools-3.1.0.tar.gz 607449 BLAKE2B aa8ef197cbdecf5c892386aa1c25c940ed3f7c24884f588dcca975d34ee7b4c41722d2529fa305d7568d03302e10e6eb4d5df36a899315e05bf243163500b22d SHA512 e0e5bf24e4834ca39ef7dc1af1bb7ef26bd258a8b2cb2406a7e1ffed25b4b1d44a5fce41d97c5ad7fc6ebb66f965759d2b49ffa6d89845786f43eadb89ff4694
+DIST dahdi-tools-3.2.0.tar.gz 729392 BLAKE2B 77667a16fd18fa5b6ffd67d9bd267c4ea5e6ff3841938de64704b7e6f1818b23feff196701c62ceb0a56c677614b4c2a4d4d1f4f533020559e8b3b3c12785bf5 SHA512 29df9a768c6db872bd51926dac11178400a03e2e1d0771ae163433ce300af71691f5c7a60f8756c0e6cef8a43f1331944cb4e44393f04a0ff8dee19bc9e7cf16
diff --git a/net-misc/dahdi-tools/dahdi-tools-3.2.0.ebuild b/net-misc/dahdi-tools/dahdi-tools-3.2.0.ebuild
new file mode 100644
index 000000000000..773d22263bd4
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-3.2.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools bash-completion-r1 perl-functions udev
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="https://www.asterisk.org"
+SRC_URI="https://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="ppp"
+PATCHES=(
+ "${FILESDIR}/dahdi-nondigium-blacklist.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-parallel-make-no-config.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-execinfo.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-cplusplusexternc.patch"
+ "${FILESDIR}/dahdi-tools-3.2.0-lto.patch"
+)
+
+DEPEND="dev-libs/newt
+ net-misc/dahdi
+ sys-kernel/linux-headers
+ virtual/libusb:1
+ ppp? ( net-dialup/ppp:= )"
+RDEPEND="${DEPEND}
+ dev-lang/perl:=
+ dev-perl/CGI"
+BDEPEND="dev-lang/perl
+ sys-apps/file"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with ppp) --with-perllib="$(perl_get_vendorlib)"
+ sed -re 's/ -Werror($|[[:space:]])//' -i xpp/oct612x/Makefile.in || die "sed to eliminate -Werror failed."
+ sed -re '/[[:space:]]*-Werror[[:space:]]*\\$/ d' -i xpp/xtalk/Makefile || die "sed to eliminate -Werror failed."
+}
+
+src_install() {
+ local bashcompdir="$(get_bashcompdir)"
+ local bashcmd bashcmdtarget
+
+ emake DESTDIR="${ED}" bashcompdir="${bashcompdir}" udevrulesdir="$(get_udevdir)/rules.d" install
+ emake DESTDIR="${ED}" install-config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init-3.1.0-r4 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+
+ bashcomp_alias dahdi $(sed -nre 's/^complete -F .* //p' "${ED}${bashcompdir}/dahdi" ||
+ die "Error parsing dahdi bash completion file for commands")
+
+ # Delete *if* the libtool file exists, bug #778380
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/net-misc/dahdi-tools/files/dahdi-tools-3.2.0-lto.patch b/net-misc/dahdi-tools/files/dahdi-tools-3.2.0-lto.patch
new file mode 100644
index 000000000000..75f6c1a93eee
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-tools-3.2.0-lto.patch
@@ -0,0 +1,61 @@
+From bc45d96413902e0ded093908bc3a02410d799e24 Mon Sep 17 00:00:00 2001
+From: Jaco Kroon <jaco@uls.co.za>
+Date: Thu, 11 May 2023 17:28:02 +0200
+Subject: [PATCH] Fix compilation with LTO.
+
+---
+ xpp/echo_loader.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/xpp/echo_loader.c b/xpp/echo_loader.c
+index 827f6ef..adfb1f4 100644
+--- a/xpp/echo_loader.c
++++ b/xpp/echo_loader.c
+@@ -409,7 +409,7 @@ UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)
+ struct timeval tv;
+ unsigned long long total_usecs;
+ unsigned int mask = ~0;
+-
++
+ gettimeofday(&tv, 0);
+ total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) +
+ (((unsigned long long)(tv.tv_usec)));
+@@ -564,7 +564,7 @@ UINT32 Oct6100UserDriverReadBurstApi(tPOCT6100_READ_BURST_PARAMS f_pBurstParams)
+ return cOCT6100_ERR_OK;
+ }
+
+-inline int get_ver(struct astribank *astribank)
++static inline int get_ver(struct astribank *astribank)
+ {
+ return spi_send(astribank, 0, 0, 1, 1);
+ }
+@@ -647,7 +647,7 @@ UINT32 init_octasic(char *filename, struct astribank *astribank, struct span_spe
+ /* General parameters */
+ OpenChip.fEnableChannelRecording = TRUE;
+
+- /* Chip ID.*/
++ /* Chip ID.*/
+ OpenChip.ulUserChipId = 1;
+
+ /* Set the max number of accesses to 1024 to speed things up */
+@@ -775,7 +775,7 @@ UINT32 init_octasic(char *filename, struct astribank *astribank, struct span_spe
+ ChannelOpen.VqeConfig.fRinDcOffsetRemoval = TRUE;
+ ChannelOpen.VqeConfig.fSinDcOffsetRemoval = TRUE;
+
+- ChannelOpen.VqeConfig.ulComfortNoiseMode = cOCT6100_COMFORT_NOISE_NORMAL;
++ ChannelOpen.VqeConfig.ulComfortNoiseMode = cOCT6100_COMFORT_NOISE_NORMAL;
+ /* cOCT6100_COMFORT_NOISE_NORMAL
+ cOCT6100_COMFORT_NOISE_EXTENDED,
+ cOCT6100_COMFORT_NOISE_OFF,
+@@ -824,7 +824,7 @@ UINT32 init_octasic(char *filename, struct astribank *astribank, struct span_spe
+ ChannelOpen.VqeConfig.fRinDcOffsetRemoval = TRUE;
+ ChannelOpen.VqeConfig.fSinDcOffsetRemoval = TRUE;
+
+- ChannelOpen.VqeConfig.ulComfortNoiseMode = cOCT6100_COMFORT_NOISE_NORMAL;
++ ChannelOpen.VqeConfig.ulComfortNoiseMode = cOCT6100_COMFORT_NOISE_NORMAL;
+ /* cOCT6100_COMFORT_NOISE_NORMAL
+ cOCT6100_COMFORT_NOISE_EXTENDED,
+ cOCT6100_COMFORT_NOISE_OFF,
+--
+2.39.3
+
diff --git a/net-misc/dahdi-tools/metadata.xml b/net-misc/dahdi-tools/metadata.xml
index c3fad2fc57e4..41312228e19d 100644
--- a/net-misc/dahdi-tools/metadata.xml
+++ b/net-misc/dahdi-tools/metadata.xml
@@ -12,4 +12,7 @@
<use>
<flag name="ppp">Enables PPP/DAHDIRAS support</flag>
</use>
+ <upstream>
+ <remote-id type="github">asterisk/dahdi-tools</remote-id>
+ </upstream>
</pkgmetadata>