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-wireless/crda/files/, net-wireless/crda/
Date: Sat, 17 Jun 2023 15:26:25 +0000 (UTC)	[thread overview]
Message-ID: <1687015576.3cd17b0e90642bccc9d47d24ad2df1cdc42b4bd0.sam@gentoo> (raw)

commit:     3cd17b0e90642bccc9d47d24ad2df1cdc42b4bd0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 17 15:25:40 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 17 15:26:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cd17b0e

net-wireless/crda: add 4.15

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-wireless/crda/Manifest                         |  1 +
 net-wireless/crda/crda-4.15.ebuild                 | 86 ++++++++++++++++++++++
 net-wireless/crda/files/crda-4.15-ldflags.patch    | 14 ++++
 .../crda/files/crda-4.15-libreg-link.patch         | 21 ++++++
 .../crda/files/crda-4.15-no-ldconfig.patch         | 19 +++++
 5 files changed, 141 insertions(+)

diff --git a/net-wireless/crda/Manifest b/net-wireless/crda/Manifest
index ea5835025eb5..69432c917fcf 100644
--- a/net-wireless/crda/Manifest
+++ b/net-wireless/crda/Manifest
@@ -1 +1,2 @@
 DIST crda-4.14.tar.gz 72753 BLAKE2B 79e96bc41103eb221d841c74081c2abf507c46ae7790d5d8201dbc49260bc833630b95f74da5500817e07f1b4108713867071bd82ecc4c46d202d1e0ea865675 SHA512 0d52cf62589ec2debfd66de95b82b03a1c15048d8425cf5ef43c3e1f51ce1311a6d898fd5f69badcceb3181d35c836db197c6f070654dab351b01e96a1dd1053
+DIST crda-4.15.tar.gz 72907 BLAKE2B c5fe2a625e37a92447a52a477214fe8279201cb729fdb4af9f26e4174923179edf53e35484a34f76707e6801b2b636e38fe043c2a54038b7dd7f14ab97532d45 SHA512 5a5a2c6914529383ae84895a70d2455dbc94939f0bd0f8ee3f7158e768ab4a0123053abf5d87b050dc4104397f246ec2f1c1b97e9b6a7043c65b7aef568af539

diff --git a/net-wireless/crda/crda-4.15.ebuild b/net-wireless/crda/crda-4.15.ebuild
new file mode 100644
index 000000000000..5a6481317949
--- /dev/null
+++ b/net-wireless/crda/crda-4.15.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit toolchain-funcs python-any-r1 udev
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
+HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/crda"
+SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="gcrypt"
+
+RDEPEND="
+	dev-libs/libnl:3
+	net-wireless/wireless-regdb
+	!gcrypt? (
+		dev-libs/openssl:=
+	)
+	gcrypt? ( dev-libs/libgcrypt:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	${PYTHON_DEPS}
+	$(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]')
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-no-werror.patch
+	"${FILESDIR}"/${PN}-cflags.patch
+	"${FILESDIR}"/${PN}-4.14-python-3.patch
+	"${FILESDIR}"/${PN}-4.14-openssl-1.1.0-compatibility.patch # bug #652428
+	"${FILESDIR}"/${PN}-4.14-do-not-compress-doc.patch
+	"${FILESDIR}"/${PN}-4.15-no-ldconfig.patch
+	"${FILESDIR}"/${PN}-4.15-libreg-link.patch # bug #542436
+	"${FILESDIR}"/${PN}-4.15-ldflags.patch
+)
+
+python_check_deps() {
+	python_has_version "dev-python/m2crypto[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+	default
+	sed -i \
+		-e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+		Makefile || die
+}
+
+_emake() {
+	# The source hardcodes /usr/lib/crda/ paths (ignoring all make vars
+	# that look like it should change it).  We want to use /usr/lib/
+	# anyways as this file is not ABI specific and we want to share it
+	# among all ABIs rather than pointlessly duplicate it.
+	#
+	# The trailing slash on SBINDIR is required by the source.
+	emake \
+		PREFIX="${EPREFIX}/usr" \
+		SBINDIR='$(PREFIX)/sbin/' \
+		LIBDIR='$(PREFIX)/'"$(get_libdir)" \
+		UDEV_RULE_DIR="$(get_udevdir)/rules.d" \
+		REG_BIN="${SYSROOT}"/usr/lib/crda/regulatory.bin \
+		USE_OPENSSL=$(usex gcrypt 0 1) \
+		CC="$(tc-getCC)" \
+		V=1 \
+		WERROR= \
+		"$@"
+}
+
+src_compile() {
+	_emake all_noverify
+}
+
+src_test() {
+	_emake verify
+}
+
+src_install() {
+	_emake DESTDIR="${D}" install
+	keepdir /etc/wireless-regdb/pubkeys
+}

diff --git a/net-wireless/crda/files/crda-4.15-ldflags.patch b/net-wireless/crda/files/crda-4.15-ldflags.patch
new file mode 100644
index 000000000000..af5de2d1c0af
--- /dev/null
+++ b/net-wireless/crda/files/crda-4.15-ldflags.patch
@@ -0,0 +1,14 @@
+# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/patch/?id=9856751feaf7b102547cea678a5da6c94252d83d
+# https://bugs.gentoo.org/678450
+# https://bugs.gentoo.org/596352
+--- a/Makefile
++++ b/Makefile
+@@ -115,7 +115,7 @@ keys.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+ 
+ $(LIBREG): reglib.c regdb.h reglib.h
+ 	$(NQ) '  CC  ' $@
+-	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< $(filter-out -lreg,$(LDLIBS))
++	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< $(filter-out -lreg,$(LDLIBS))
+ 
+ install-libreg-headers:
+ 	$(NQ) '  INSTALL  libreg-headers'

diff --git a/net-wireless/crda/files/crda-4.15-libreg-link.patch b/net-wireless/crda/files/crda-4.15-libreg-link.patch
new file mode 100644
index 000000000000..b32626edb6cc
--- /dev/null
+++ b/net-wireless/crda/files/crda-4.15-libreg-link.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/542436
+
+From f56ab87b25f2228a67ac592a1c18793c72dd03eb Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 7 Mar 2015 22:29:33 -0500
+Subject: [PATCH crda] libreg: link against crypto libs
+
+Since libreg uses funcs from the crypto lib, make sure we link them.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+--- a/Makefile
++++ b/Makefile
+@@ -115,7 +115,7 @@ keys.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+ 
+ $(LIBREG): reglib.c regdb.h reglib.h
+ 	$(NQ) '  CC  ' $@
+-	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $<
++	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< $(filter-out -lreg,$(LDLIBS))
+ 
+ install-libreg-headers:
+ 	$(NQ) '  INSTALL  libreg-headers'

diff --git a/net-wireless/crda/files/crda-4.15-no-ldconfig.patch b/net-wireless/crda/files/crda-4.15-no-ldconfig.patch
new file mode 100644
index 000000000000..a7e744fe8d70
--- /dev/null
+++ b/net-wireless/crda/files/crda-4.15-no-ldconfig.patch
@@ -0,0 +1,19 @@
+From b11d83df189670defe4a29c624f2930351c13df2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 4 Mar 2015 13:56:36 -0500
+Subject: [PATCH] do not run ldconfig
+
+Let the distro/user deal with ldconfig updating.  Running it blindly like
+this breaks DESTDIR installs as `ldconfig` only operates on system paths.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+--- a/Makefile
++++ b/Makefile
+@@ -127,7 +127,6 @@ install-libreg:
+ 	$(NQ) '  INSTALL  libreg'
+ 	$(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
+ 	$(Q)$(INSTALL) -m 644 $(LIBREG) $(DESTDIR)/$(LIBDIR)/
+-	$(Q)ldconfig
+ 
+ %.o: %.c regdb.h $(LIBREG)
+ 	$(NQ) '  CC  ' $@


             reply	other threads:[~2023-06-17 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17 15:26 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-17 19:35 [gentoo-commits] repo/gentoo:master commit in: net-wireless/crda/files/, net-wireless/crda/ Mike Gilbert

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=1687015576.3cd17b0e90642bccc9d47d24ad2df1cdc42b4bd0.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