summaryrefslogtreecommitdiff
path: root/net-wireless/crda/crda-3.18-r3.ebuild
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2016-11-01 22:02:29 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2016-11-02 05:37:28 -0500
commitfc42e192508508b2c49434fd700f833c15eabbb0 (patch)
treea57e0bf02df139d194588414c8042f01fe88fa1b /net-wireless/crda/crda-3.18-r3.ebuild
parentea0c23ff8553b9da77fae8ee3c84459a926c40d7 (diff)
downloadpackages-fc42e192508508b2c49434fd700f833c15eabbb0.tar.gz
packages-fc42e192508508b2c49434fd700f833c15eabbb0.tar.bz2
packages-fc42e192508508b2c49434fd700f833c15eabbb0.tar.xz
packages-fc42e192508508b2c49434fd700f833c15eabbb0.zip
net-wireless/crda: Py3, and keyword pycrypto dep
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> Signed-off-by: Elizabeth Myers <elizabeth@interlinked.me> Signed-off-by: Horst Burkhardt <horst@adelielinux.org>
Diffstat (limited to 'net-wireless/crda/crda-3.18-r3.ebuild')
-rw-r--r--net-wireless/crda/crda-3.18-r3.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/net-wireless/crda/crda-3.18-r3.ebuild b/net-wireless/crda/crda-3.18-r3.ebuild
new file mode 100644
index 000000000..38f34c57e
--- /dev/null
+++ b/net-wireless/crda/crda-3.18-r3.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{3,4,5}} )
+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="http://linuxwireless.org/download/crda/${P}.tar.xz
+ mirror://kernel/software/network/crda/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~ia64 ~mips ppc ~ppc64 ~sparc x86"
+IUSE="gcrypt libressl"
+
+RDEPEND="!gcrypt? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ gcrypt? ( dev-libs/libgcrypt:0 )
+ dev-libs/libnl:3
+ net-wireless/wireless-regdb"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/pycrypto[${PYTHON_USEDEP}]')
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.18-no-ldconfig.patch
+ "${FILESDIR}"/${PN}-3.18-no-werror.patch
+ "${FILESDIR}"/${PN}-3.18-openssl.patch
+ "${FILESDIR}"/${PN}-3.18-cflags.patch
+ "${FILESDIR}"/${PN}-3.18-libreg-link.patch
+ "${FILESDIR}"/${PN}-3.18-python3.patch
+)
+
+python_check_deps() {
+ has_version --host-root "dev-python/pycrypto[${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
+}