public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/dahdi/
Date: Fri, 12 May 2023 03:53:55 +0000 (UTC)	[thread overview]
Message-ID: <1683863601.069bd8848f9792e74c67268e9302e84d2acceabf.sam@gentoo> (raw)

commit:     069bd8848f9792e74c67268e9302e84d2acceabf
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Thu May 11 14:18:34 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 12 03:53:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=069bd884

net-misc/dahdi: add 3.2.0

Closes: https://bugs.gentoo.org/896396
Closes: https://bugs.gentoo.org/855554
Closes: https://bugs.gentoo.org/871363
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/dahdi/Manifest           |   3 +
 net-misc/dahdi/dahdi-3.2.0.ebuild | 120 ++++++++++++++++++++++++++++++++++++++
 net-misc/dahdi/metadata.xml       |   3 +
 3 files changed, 126 insertions(+)

diff --git a/net-misc/dahdi/Manifest b/net-misc/dahdi/Manifest
index 716cde8c9cc2..856dd7fb9c7e 100644
--- a/net-misc/dahdi/Manifest
+++ b/net-misc/dahdi/Manifest
@@ -16,7 +16,10 @@ DIST dahdi-fw-te820-1.76.tar.gz 54303 BLAKE2B 16a70f103f890275595c1c066d05992b43
 DIST dahdi-fw-vpmoct032-1.12.0.tar.gz 443985 BLAKE2B f7f1b5240dafeea42c25c19e3bd62a60398e29848d53a24d7cb3263922fc43dbdf0f9b66ba8324e9d7f37047803fd474e90102d4af876169f5597e545b98d529 SHA512 3ee8c56a7075d13a6457a5249fcffc04b2da59da94a622cb66810babf46260235492810c867479fccf343e84424c9bcc12c2d05389a52c0a56c62b138f23aeb3
 DIST dahdi-fwload-vpmadt032-1.25.0.tar.gz 149360 BLAKE2B bb754b1abf794d918d1c457792a0432adc57dabf73e67868dd7a72995f2e9240a528a357427ae8602b10907c813cc50da4c35b8c060bdc7ece399f096ce6519b SHA512 3534f0bab0e142ae94b9b5c401a5c314bab43bc1ca9283600ca82b1746afa514eff6a965ccc6b48774d577beaddb12d165f66221b3b6457df68ccbcede812047
 DIST dahdi-linux-3.1.0.tar.gz 1645832 BLAKE2B 27ea6b68318750639fd90f2061e2e9e128e3faa8cc195b368f7157947f5b522f86b871a3b793016945c9faaed20b38a185adafa29b2fc04019063257f578169e SHA512 440f5e44c933c609f2b3cfcf013c84bcd0c37929a43d69aac0276b11484cb890cd5939c5ac5950cad54d934d27ee6ff0b18f2bdd58477ed9be8055de107727b4
+DIST dahdi-linux-3.2.0.tar.gz 1617958 BLAKE2B 1a35ba69719e7cebf7cf471f901a3280e1558b8e8e4f615fcc974a08a83f62e71ee653b47f3a09e85e96a0447e4516996ef254497746492fe50eebef5515e217 SHA512 cb4b06d5a83aae7ce54049137d989fa6275367debc77a1df64cc36ba1bda08a058ea92f01bb873bcd83c3c7d58ff4c5da42c67bbbe8a02b8f4f0e12348c4a072
 DIST gentoo-dahdi-patches-3.1.0-r4.tar.bz2 8631 BLAKE2B 683cfac178bb2d15053396d45ed6c4b0511952165b3bf4907f8f95737d1b36eab2d7cd7c288924602539779d4251d9ef5d7c369c8c600fa27862c173f4aa1506 SHA512 7b4bca16bd0cb9ee9f1d44fedb1077436cd951c3c92693c5b8187e0d2292dc236db89cb2304f80cc287c83ffbf4bd1c8a413c4d508b0493a6be1e3051f2af157
+DIST gentoo-dahdi-patches-3.2.0.tar.bz2 6947 BLAKE2B 8e4d2245d966a14c6eec7045c74788decc52c5dec562e7d09670766f169e6890a7fae2bf245ab198276780210564e891fe5d16b6e0d44ff5be876f218c23f2fb SHA512 c47a092d17abb0070cebfae540363a01bb8a9927e05524c3d50e76d69249115b3caf83d436469153b7a519e6c6952baab14d6bf898a440373f90d02359fbb4ae
 DIST gentoo-dahdi-patchset-3.1.0-r3.tar.bz2 107738 BLAKE2B 9c6a846f744753ae133c24425224675fdbeab5c1b1bc70dd621c615af2f13eec6eb4981ec160c813be62d9d69cd8af6b2cd517005399e24f78fa30da5e20c464 SHA512 75d6562783adc5584966cba38d92a7d1aba3f448cac486be454f9810bb8380009a71a56261a0820a5eb5e13a2c0b49768c1d6adc2310f0be2133140e9e9ae3de
 DIST gentoo-dahdi-sources-3.1.0-r4.tar.bz2 87720 BLAKE2B 676a8332b0d68155dc2b24a49f01abd21521c9aeecdc930b2fbf1fcbcda568b8162d9d34a5876b0dcd5510abc72e933a112598863df745a44b54a9bc928c6cb8 SHA512 d7f77dcb636e1346bbe18ed780a3df3cab064d12e50f01528a102f9fbadb11661218b8e00e73792003cb7d8440fab58011900244d7555e33a4c26c8164f61762
+DIST gentoo-dahdi-sources-3.2.0.tar.bz2 87595 BLAKE2B 18a2f007581ac653e0a1a50c77b36b0b2065e1dfd5c32ffe754cbb66b7aaf6df52dc4f856f8a9e0440f6ecf193c56e7506db24ab2b0ede43d9a1185ef84e0036 SHA512 4f13597914427f2e6cea08c6dce9e9bedf5d35a62c8d5dc545e8fb1268ffeb5dece84a27c2a50a8d55a7b8eda1d4fe2bfe18465b0492b45a3684170c5a600072
 DIST jnet-dahdi-drivers-1.0.14.tar.gz 64860 BLAKE2B c8bbb007cd1a76d02b758af35d1d6a26d5617018ad1de8c69dd9bdf7d781d66b85031706efe55edb32eec1d00f3877fe8a2edd4f9899f367824875cd5fe93984 SHA512 419352897d39bae6b51ee302723de6ca3c8041546a1273fa0691cf169e16f37fc730f3033fed4e5f564dce6dcc097e93f609208af8c38d03b9aee96b95037d66

diff --git a/net-misc/dahdi/dahdi-3.2.0.ebuild b/net-misc/dahdi/dahdi-3.2.0.ebuild
new file mode 100644
index 000000000000..8b59341edcee
--- /dev/null
+++ b/net-misc/dahdi/dahdi-3.2.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic linux-mod toolchain-funcs
+
+MY_P="${P/dahdi/dahdi-linux}"
+JNET=1.0.14
+GENTOO_PATCHVERSION=3.2.0
+GENTOO_SOURCEVERSION=3.2.0
+S="${WORKDIR}/${MY_P}"
+
+JNET_DRIVERS="cwain qozap ztgsm"
+
+DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
+HOMEPAGE="https://www.asterisk.org"
+SRC_URI="https://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
+	https://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz
+	https://downloads.uls.co.za/gentoo/dahdi/gentoo-dahdi-patches-${GENTOO_PATCHVERSION}.tar.bz2
+	https://downloads.uls.co.za/gentoo/dahdi/gentoo-dahdi-sources-${GENTOO_SOURCEVERSION}.tar.bz2
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-d001e.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1f001e.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-7a001e.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-13001e.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
+	https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="flash oslec"
+
+PATCHES=( "${WORKDIR}/gentoo-dahdi-patches-${GENTOO_PATCHVERSION}" )
+
+CONFIG_CHECK="MODULES PCI ~CRC_CCITT"
+
+pkg_setup() {
+	use oslec && CONFIG_CHECK+=" ECHO"
+	linux-mod_pkg_setup
+}
+
+src_unpack() {
+	local file drv
+
+	unpack ${A}
+	# Copy the firmware tarballs over, the makefile will try and download them otherwise
+	for file in ${A} ; do
+		[[ "${file}" = dahdi-fw* ]] || continue
+		cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/ ||
+			die "Error copying ${file} to ${S}/${MY_P}/drivers/dahdi/firmware/"
+	done
+	# But without the .bin's it'll still fall over and die, so copy those too.
+	mv *.bin "${MY_P}"/drivers/dahdi/firmware/ ||
+		die "Error moving firmware files into the right folders."
+
+	for drv in ${JNET_DRIVERS}; do
+		ln "${WORKDIR}/jnet-dahdi-drivers-${JNET}/${drv}/${drv}.c" "${MY_P}/drivers/dahdi/" ||
+			die "Error linking ${drv}.c from jnet to DAHDI."
+		ln "${WORKDIR}/jnet-dahdi-drivers-${JNET}/${drv}/${drv}.h" "${MY_P}/drivers/dahdi/" ||
+			die "Error linking ${drv}.h from jnet to DAHDI."
+	done
+
+	# Find the stuff from gentoo-sources (ie, modules that has been removed by
+	# upstream and we're re-adding).
+	DAHDI_GENTOO_MODULES=""
+	for file in "${WORKDIR}/gentoo-dahdi-sources-${GENTOO_SOURCEVERSION}"/*; do
+		[[ -d "${file}" ]] && DAHDI_GENTOO_MODULES+=" $(basename "${file}")/"
+		[[ -f "${file}" && "${file}" = *.c ]] && DAHDI_GENTOO_MODULES+=" $(basename "${file}" .c).o"
+		mv -n "${file}" "${MY_P}/drivers/dahdi/" || die "Move of ${file} into dahdi-drivers failed."
+	done
+}
+
+src_prepare() {
+	if use flash; then
+		sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h ||
+			die "Failed to define FXSFLASH"
+		sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" \
+			include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
+	fi
+	if use oslec; then
+		sed -i -e 's:^#include .*oslec[.]h:#include "/usr/src/linux/drivers/misc/echo/oslec.h:' \
+			drivers/dahdi/dahdi_echocan_oslec.c || die "Failed to prepare oslec source files."
+	fi
+	default
+}
+
+src_compile() {
+	unset ARCH
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" KSRC="${KV_OUT_DIR}" \
+		DAHDI_MODULES_EXTRA="${JNET_DRIVERS// /.o }.o$(usex oslec " dahdi_echocan_oslec.o" "")" \
+		LDFLAGS="$(raw-ldflags)" all
+}
+
+src_install() {
+	einfo "Installing kernel module"
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" KSRC="${KV_OUT_DIR}" DESTDIR="${D}" \
+		DAHDI_MODULES_EXTRA="${JNET_DRIVERS// /.o }.o$(usex oslec " dahdi_echocan_oslec.o" "")${DAHDI_GENTOO_MODULES}" \
+		LDFLAGS="$(raw-ldflags)" install
+
+	# Remove the blank "version" files (these files are all empty, and root owned).
+	find "${ED}/lib/firmware" -name ".*" -delete || die "Error removing empty firmware version files"
+
+	# If the kernel sources have a System.map, and there a suitable depmod
+	# available (seemingly when we're not cross-compiling), then the kernel
+	# sources depmod kicks in.  Remove the files caused by that.
+	find "${ED}/lib/modules" -name "modules.*" -delete || die "Error deleting bogus modules.* files"
+}

diff --git a/net-misc/dahdi/metadata.xml b/net-misc/dahdi/metadata.xml
index 55eff7ad9e4b..2bd89c9cbc5a 100644
--- a/net-misc/dahdi/metadata.xml
+++ b/net-misc/dahdi/metadata.xml
@@ -13,4 +13,7 @@
     <flag name="flash">Support (short) flash on FXS</flag>
     <flag name="oslec">Enable OSLEC (software) echo canceller (require ECHO in kernel)</flag>
   </use>
+  <upstream>
+    <remote-id type="github">asterisk/dahdi-linux</remote-id>
+  </upstream>
 </pkgmetadata>


             reply	other threads:[~2023-05-12  3:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12  3:53 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-30 21:47 [gentoo-commits] repo/gentoo:master commit in: net-misc/dahdi/ Sam James
2022-06-30 21:47 Sam James
2021-03-26  7:50 Agostino Sarubbo
2021-03-12 18:35 Sam James
2021-01-22  6:35 Joonas Niilola
2020-08-08 12:18 Mikle Kolyada
2020-07-20 12:24 Sam James
2020-07-16 17:45 Sam James
2020-07-15 17:42 Sam James
2020-06-25 11:18 Joonas Niilola
2020-04-16  8:11 Joonas Niilola
2020-04-13 14:53 Agostino Sarubbo
2020-04-13 10:14 Agostino Sarubbo
2020-04-09 12:38 Joonas Niilola
2020-03-15 17:52 Joonas Niilola
2020-01-10  5:43 Joonas Niilola
2020-01-10  5:43 Joonas Niilola
2018-06-08 12:36 Tony Vroon
2017-02-22 22:05 Michael Weber
2017-02-22 22:03 Michael Weber
2017-02-22 21:02 Michael Weber
2016-03-31 10:54 Tony Vroon
2015-11-01 13:47 Mikle Kolyada
2015-10-27 12:18 Agostino Sarubbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1683863601.069bd8848f9792e74c67268e9302e84d2acceabf.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox