* [gentoo-commits] repo/gentoo:master commit in: net-misc/dahdi-tools/, net-misc/dahdi-tools/files/
@ 2020-04-10 14:58 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2020-04-10 14:58 UTC (permalink / raw
To: gentoo-commits
commit: 3b7a6e57d34d8c19a5ff2df7879180f8830cabc7
Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Sat Mar 28 20:47:35 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Apr 10 14:57:44 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b7a6e57
net-misc/dahdi-tools: musl compile fixes.
Closes: https://bugs.gentoo.org/713668
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/15155
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
net-misc/dahdi-tools/dahdi-tools-3.1.0.ebuild | 2 ++
.../files/dahdi-tools-3.1.0-cplusplusexternc.patch | 26 ++++++++++++++
.../files/dahdi-tools-3.1.0-execinfo.patch | 40 ++++++++++++++++++++++
3 files changed, 68 insertions(+)
diff --git a/net-misc/dahdi-tools/dahdi-tools-3.1.0.ebuild b/net-misc/dahdi-tools/dahdi-tools-3.1.0.ebuild
index eb1951f384c..3d949497d09 100644
--- a/net-misc/dahdi-tools/dahdi-tools-3.1.0.ebuild
+++ b/net-misc/dahdi-tools/dahdi-tools-3.1.0.ebuild
@@ -17,6 +17,8 @@ PATCHES=(
"${FILESDIR}/dahdi-nondigium-blacklist.patch"
"${FILESDIR}/dahdi-tools-3.1.0-parallel-make-no-config.patch"
"${FILESDIR}/dahdi-tools-3.1.0-fno-common.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-execinfo.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-cplusplusexternc.patch"
)
DEPEND="dev-libs/newt
diff --git a/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-cplusplusexternc.patch b/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-cplusplusexternc.patch
new file mode 100644
index 00000000000..37d1402c404
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-cplusplusexternc.patch
@@ -0,0 +1,26 @@
+diff --git a/./dahdi-tools-3.1.0/xpp/hexfile.h.o b/./dahdi-tools-3.1.0/xpp/hexfile.h
+index 33ff50d..3d03f98 100644
+--- a/xpp/hexfile.h
++++ b/xpp/hexfile.h
+@@ -70,7 +70,9 @@ struct hexdata {
+ };
+
+
+-__BEGIN_DECLS
++#ifdef __cpluplus
++extern "C" {
++#endif
+
+ typedef void (*parse_hexfile_report_func_t)(int level, const char *msg, ...)
+ #ifdef __GNUC__
+@@ -86,6 +88,9 @@ int dump_hexfile2(struct hexdata *hexdata, const char *outfile, uint8_t maxwidth
+ void dump_binary(struct hexdata *hexdata, const char *outfile);
+ void gen_hexline(const uint8_t *data, uint16_t addr, size_t len, FILE *output);
+ int bsd_checksum(struct hexdata *hexdata);
+-__END_DECLS
++
++#ifdef __cpluplus
++}
++#endif
+
+ #endif
diff --git a/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-execinfo.patch b/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-execinfo.patch
new file mode 100644
index 00000000000..b222a85d8cb
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-execinfo.patch
@@ -0,0 +1,40 @@
+--- a/configure.ac 2020-03-28 22:28:35.614340050 +0200
++++ b/configure.ac 2020-03-28 22:28:55.084181570 +0200
+@@ -161,6 +161,7 @@
+ # Checks for header files.
+ AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h])
+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
++AC_CHECK_HEADERS([execinfo.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_INLINE
+--- a/xpp/xtalk/debug.c 2020-03-28 22:41:43.507810560 +0200
++++ b/xpp/xtalk/debug.c 2020-03-28 22:41:10.538087608 +0200
+@@ -27,8 +27,10 @@
+ #include <stdarg.h>
+ #include <syslog.h>
+-#include <execinfo.h>
+ #include <xtalk/debug.h>
+ #include <autoconfig.h>
++#ifdef HAVE_EXECINFO_H
++#include <execinfo.h>
++#endif
+
+ int verbose = LOG_INFO;
+ int debug_mask;
+@@ -61,6 +63,7 @@
+ /* from glibc info(1) */
+ void print_backtrace(FILE *fp)
+ {
++#ifdef HAVE_EXECINFO_H
+ void *array[10];
+ size_t size;
+ char **strings;
+@@ -71,4 +74,7 @@
+ for (i = 0; i < size; i++)
+ fprintf(fp, "%s\n", strings[i]);
+ free(strings);
++#else
++ fprintf(fp, "backtrace information only available if execinfo.h is available.\n");
++#endif
+ }
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/dahdi-tools/, net-misc/dahdi-tools/files/
@ 2022-06-30 21:47 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2022-06-30 21:47 UTC (permalink / raw
To: gentoo-commits
commit: 927a9ab6f7f379ad727928be6d7174cd62cce398
Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Wed Jun 15 13:06:51 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 21:46:42 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=927a9ab6
net-misc/dahdi-tools: revbump to fix bugs.
No major changes.
Biggest was to add T1 support into dahdi-autoconf.
Closes: https://bugs.gentoo.org/841428
Closes: https://bugs.gentoo.org/852779
Closes: https://bugs.gentoo.org/852785
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/25852
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/dahdi-tools/dahdi-tools-3.1.0-r3.ebuild | 70 ++++++
.../dahdi-tools/files/dahdi-autoconf.init-3.1.0-r3 | 271 +++++++++++++++++++++
2 files changed, 341 insertions(+)
diff --git a/net-misc/dahdi-tools/dahdi-tools-3.1.0-r3.ebuild b/net-misc/dahdi-tools/dahdi-tools-3.1.0-r3.ebuild
new file mode 100644
index 000000000000..4cdea940512c
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-3.1.0-r3.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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-fno-common.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-execinfo.patch"
+ "${FILESDIR}/dahdi-tools-3.1.0-cplusplusexternc.patch"
+)
+
+DEPEND="dev-libs/newt
+ net-misc/dahdi
+ sys-kernel/linux-headers
+ virtual/libusb:0
+ 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-r3 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")
+
+ rm "${ED}"/usr/$(get_libdir)/libtonezone.a || die "Unable to remove static libs from install."
+ # Delete *if* the libtool file exists, bug #778380
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ udev_reload
+}
diff --git a/net-misc/dahdi-tools/files/dahdi-autoconf.init-3.1.0-r3 b/net-misc/dahdi-tools/files/dahdi-autoconf.init-3.1.0-r3
new file mode 100644
index 000000000000..3841aca8d18a
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-autoconf.init-3.1.0-r3
@@ -0,0 +1,271 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Ultimate Linux Solutions CC
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before dahdi
+}
+
+dahdi_load_modules() {
+ local hwlist loc status mod mod_vname pciid desc
+
+ hwlist=$(/usr/sbin/dahdi_hardware)
+
+ if [ -z "${hwlist}" ]; then
+ einfo "No digium hardware found."
+ ebegin "Loading module dahdi_dummy"
+ /sbin/modprobe dahdi_dummy
+ eend $?
+ return
+ fi
+
+ echo "${hwlist}" | while read loc mod pciid desc; do
+ status="${mod:${#mod}-1:1}"
+ mod="${mod%[+-]}"
+ mod_vname="mod_${mod}"
+
+ einfo "Found $desc at $loc (module: $mod)"
+
+ if [ "${status}" = "-" -a "${!mod_vname-notloaded}" = "notloaded" ]; then
+ ebegin "Loading module $mod"
+ /sbin/modprobe $mod
+ eend
+
+ [ $? -eq 0 ] && eval "$mod_vname=loaded"
+ fi
+ done
+}
+
+dahdi_module_unload() {
+ local mod=$1 s
+ [ -d /sys/module/${mod} ] || return 0
+
+ for s in $(find /sys/module/${mod}/holders -type l); do
+ dahdi_module_unload $(basename $s)
+ done
+
+ ebegin "Removing dahdi module: $mod"
+ /sbin/rmmod $mod
+ eend $?
+}
+
+dahdi_gen_fxo_config() {
+ local port=$1
+
+ echo "fxs${DAHDI_FXO_SIGNALLING-ks}=${port}"
+ [ "${DAHDI_FXO_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${port}"
+}
+
+dahdi_gen_fxs_config() {
+ local port=$1
+
+ echo "fxo${DAHDI_FXO_SIGNALLING-ks}=${port}"
+ [ "${DAHDI_FXS_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${port}"
+}
+
+dahdi_gen_bri_te_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_BRI_FRAMING-CSS},${DAHDI_BRI_CODING-AMI}"
+ echo "bchan=${basechan}-$(( basechan + 1 ))"
+ echo "hardhdlc=$(( basechan + 2 ))"
+ [ "${DAHDI_BRI_TE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${basechan}-$(( basechan + 1 ))"
+}
+
+dahdi_gen_bri_nt_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_BRI_FRAMING-CSS},${DAHDI_BRI_CODING-AMI}"
+ echo "bchan=${basechan}-$(( basechan + 1 ))"
+ echo "hardhdlc=$(( basechan + 2 ))"
+ [ "${DAHDI_BRI_NT_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${basechan}-$(( basechan + 1 ))"
+}
+
+dahdi_gen_e1_cpe_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_E1_FRAMING-CCS},${DAHDI_E1_CODING-HDB3,CRC4}"
+ bchans="${basechan}-$(( basechan + 14 )),$(( basechan + 16 ))-$(( basechan + 30 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 15 ))"
+ [ "${DAHDI_E1_CPE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_gen_e1_net_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_E1_FRAMING-CCS},${DAHDI_E1_CODING-HDB3,CRC4}"
+ bchans="${basechan}-$(( basechan + 14 )),$(( basechan + 16 ))-$(( basechan + 30 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 15 ))"
+ [ "${DAHDI_E1_NET_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_gen_t1_cpe_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_T1_FRAMING-ESF},${DAHDI_T1_CODING-B8ZS}"
+ bchans="${basechan}-$(( basechan + 22 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 23 ))"
+ [ "${DAHDI_T1_CPE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_gen_t1_net_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_T1_FRAMING-ESF},${DAHDI_T1_CODING-B8ZS}"
+ bchans="${basechan}-$(( basechan + 22 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 23 ))"
+ [ "${DAHDI_T1_NET_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_conf_span() {
+ local span=$1
+ local type=$2
+ local desc=$3
+ local port=$4
+ local basechan=$5
+ local vname="PRI_SPAN_${span}_NET"
+ local cfunc="dahdi_gen_"
+
+ # Analog we need to deal with on a port-by-port basis.
+ [ "${type}" = "analog" ] && return 0
+
+ echo ""
+ echo "# ${desc}"
+
+ case "${type}" in
+ digital-TE)
+ cfunc+="bri_te"
+ ;;
+ digital-NT)
+ cfunc+="bri_nt"
+ ;;
+ digital-[TE]1)
+ cfunc+="$(echo "${type##*-}" | tr 'TE' 'te')"
+ # Use CPE by default. Unfortunately there is no easy
+ # way to detect CPE vs NET as far as I know and specifying
+ # in a config that you want NET mode seems the sanest way.
+ if yesno "${vname}"; then
+ cfunc+="_net"
+ else
+ cfunc+="_cpe"
+ fi
+ ;;
+ *)
+ echo "# Don't know how to configure this (type=${type})."
+ echo "# Please file a bug on bugs.gentoo.org and add jaco@uls.co.za as CC."
+ return 1
+ ;;
+ esac
+
+ "${cfunc}_config" "${span}" "${port}" "${basechan}"
+}
+
+dahdi_gen_config() {
+ local type manufacturer devicetype basechan aport atype
+ local span=
+ local tfile="$(mktemp)"
+ local sfile="$(mktemp)"
+ local plocation=""
+ local isdnport=0
+
+ /usr/sbin/dahdi_scan > "${sfile}"
+ exec 3<"${sfile}"
+ exec 4>"${tfile}"
+
+ echo "# Automatically dahdi-autoconf generated file ($(date))." >&4
+ echo "# This file WILL get regenerated whenever you restart dahdi-autoconf." >&4
+
+ while read LINE <&3; do
+ case "$LINE" in
+ \[*\])
+ if [ -n "${span}" ]; then
+ ebegin "Configuring ${manufacturer} ${devicetype} (${name})"
+ dahdi_conf_span "${span}" "${type}" "${manufacturer} ${devicetype} (${name})" "${isdnport}" "${basechan}" >&4
+ eend $?
+ fi
+ span="${LINE%?}"
+ span="${span#?}"
+ ;;
+ type=*|manufacturer=*|devicetype=*|basechan=*|name=*)
+ eval "${LINE%%=*}='${LINE#*=}'"
+ ;;
+ location=*)
+ eval "${LINE%%=*}='${LINE#*=}'"
+ if [ "${location}" = "${plocation}" ]; then
+ isdnport=$(( isdnport + 1 ))
+ else
+ plocation="${location}"
+ isdnport=1
+ fi
+ ;;
+ port=*)
+ # For analog cards only.
+ aport="${LINE#*=}"; aport="${aport%,*}"
+ atype="${LINE#*,}"
+ if [ "${aport}" -eq "${basechan}" ]; then
+ echo "" >&4
+ echo "# ${manufacturer} ${devicetype} (${name})" >&4
+ fi
+ case "${atype}" in
+ FXO)
+ dahdi_gen_fxo_config $aport >&4
+ ;;
+ FXS)
+ dahdi_gen_fxs_config $aport >&4
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ if [ -n "${span}" ]; then
+ ebegin "Configuring ${manufacturer} ${devicetype} (${name})"
+ dahdi_conf_span "${span}" "${type}" "${manufacturer} ${devicetype} (${name})" "${isdnport}" "${basechan}" >&4
+ eend $?
+ fi
+
+ echo "" >&4
+ echo "loadzone = ${DAHDI_ZONE}" >&4
+ echo "defaultzone = ${DAHDI_ZONE}" >&4
+ echo "## END OF AUTOCONFIGURED FILE ##" >&4
+
+ exec 3<&-
+ exec 4<&-
+
+ rm -f "${sfile}"
+ [ -r /etc/dahdi/system.conf ] && mv /etc/dahdi/system.conf /etc/dahdi/system.conf.bck
+ mv "${tfile}" /etc/dahdi/system.conf
+}
+
+start() {
+ dahdi_load_modules
+
+ if [ ! -r /dev/dahdi/ctl ]; then
+ eerror "No DAHDI compatible cards detected."
+ return 1
+ fi
+
+ ebegin "Generating DAHDI Configuration"
+ dahdi_gen_config
+ eend $?
+}
+
+stop() {
+ dahdi_module_unload dahdi
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/dahdi-tools/, net-misc/dahdi-tools/files/
@ 2023-05-12 3:53 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-05-12 3:53 UTC (permalink / raw
To: gentoo-commits
commit: 84ba723adca728dfcaa2cb0f19112e51cbb22518
Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Thu May 11 15:37:09 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 12 03:53:42 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84ba723a
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 <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/30996
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/dahdi-tools/Manifest | 1 +
net-misc/dahdi-tools/dahdi-tools-3.2.0.ebuild | 73 ++++++++++++++++++++++
.../dahdi-tools/files/dahdi-tools-3.2.0-lto.patch | 61 ++++++++++++++++++
net-misc/dahdi-tools/metadata.xml | 3 +
4 files changed, 138 insertions(+)
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>
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-12 3:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-30 21:47 [gentoo-commits] repo/gentoo:master commit in: net-misc/dahdi-tools/, net-misc/dahdi-tools/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-05-12 3:53 Sam James
2020-04-10 14:58 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox