From f03395527ef657d411375a51f9ad536f160507e3 Mon Sep 17 00:00:00 2001 From: Rick Farina Date: Tue, 25 Apr 2023 15:10:30 -0400 Subject: net-wireless/aircrack-ng: modernize, fix qa removed a bunch of unneeded code and further modernized ebuild Thanks to significant help from mgorny and Arfrever Signed-off-by: Rick Farina --- net-wireless/aircrack-ng/aircrack-ng-1.7-r2.ebuild | 112 --------------------- net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild | 108 ++++++++++++++++++++ net-wireless/aircrack-ng/aircrack-ng-9999.ebuild | 38 ++++--- 3 files changed, 125 insertions(+), 133 deletions(-) delete mode 100644 net-wireless/aircrack-ng/aircrack-ng-1.7-r2.ebuild create mode 100644 net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild (limited to 'net-wireless/aircrack-ng') diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.7-r2.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.7-r2.ebuild deleted file mode 100644 index a4fe5c4ec493..000000000000 --- a/net-wireless/aircrack-ng/aircrack-ng-1.7-r2.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -#this doesn't work because of multiple calls to distutils-r1_src_compile -#DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} ) -DISTUTILS_OPTIONAL=1 - -inherit toolchain-funcs distutils-r1 flag-o-matic autotools - -DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys" -HOMEPAGE="http://www.aircrack-ng.org" - -if [[ ${PV} == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/aircrack-ng/aircrack-ng.git" -else - MY_PV=${PV/_/-} - SRC_URI="https://github.com/aircrack-ng/aircrack-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="amd64 arm ~arm64 ~ppc x86 ~amd64-linux ~x86-linux" -fi - -LICENSE="GPL-2" -SLOT="0" - -IUSE="+airdrop-ng +airgraph-ng +experimental +netlink +pcre +sqlite test" - -CDEPEND="net-libs/libpcap - sys-apps/hwloc:0= - dev-libs/libbsd - dev-libs/openssl:0= - netlink? ( dev-libs/libnl:3 ) - pcre? ( dev-libs/libpcre ) - airdrop-ng? ( ${PYTHON_DEPS} ) - airgraph-ng? ( ${PYTHON_DEPS} ) - experimental? ( sys-libs/zlib ) - sqlite? ( >=dev-db/sqlite-3.4:3 ) - " -DEPEND="${CDEPEND} - test? ( dev-tcltk/expect ) - " -RDEPEND="${CDEPEND} - kernel_linux? ( - net-wireless/iw - net-wireless/wireless-tools - sys-apps/ethtool - sys-apps/usbutils - sys-apps/pciutils ) - sys-apps/hwdata - airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )" -#BDEPEND="airdrop-ng? ( ${DISTUTILS_DEPS} ) -# airgraph-ng? ( ${DISTUTILS_DEPS} )" - -REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} ) - airgraph-ng? ( ${PYTHON_REQUIRED_USE} )" - -RESTRICT="!test? ( test )" - -src_prepare() { - default - eautoreconf -} - -src_configure() { - econf \ - STATIC_LIBDIR_NAME="$(get_libdir)" \ - --disable-asan \ - --enable-shared \ - --disable-static \ - --without-opt \ - --with-duma=no \ - $(use_enable netlink libnl) \ - $(use_with experimental) \ - $(use_with sqlite sqlite3) -} - -src_compile() { - if [[ $($(tc-getCC) --version) == clang* ]] ; then - #https://bugs.gentoo.org/show_bug.cgi?id=472890 - filter-flags -frecord-gcc-switches - fi - - default - - if use airgraph-ng; then - cd "${S}/scripts/airgraph-ng" || die - distutils-r1_src_compile - fi - if use airdrop-ng; then - cd "${S}/scripts/airdrop-ng" || die - distutils-r1_src_compile - fi -} - -src_install() { - default - - if use airgraph-ng; then - cd "${S}/scripts/airgraph-ng" || die - distutils-r1_src_install - fi - if use airdrop-ng; then - cd "${S}/scripts/airdrop-ng" || die - distutils-r1_src_install - fi - - # we don't need aircrack-ng's oui updater, we have our own - rm "${ED}"/usr/sbin/airodump-ng-oui-update || die - find "${D}" -xtype f -name '*.la' -delete || die -} diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild new file mode 100644 index 000000000000..6020f6024964 --- /dev/null +++ b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 autotools + +DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys" +HOMEPAGE="http://www.aircrack-ng.org" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/aircrack-ng/aircrack-ng.git" +else + MY_PV=${PV/_/-} + SRC_URI="https://github.com/aircrack-ng/aircrack-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 arm ~arm64 ~ppc x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-2" +SLOT="0" + +IUSE="+airdrop-ng +airgraph-ng +experimental +netlink +pcre +sqlite test" + +CDEPEND="net-libs/libpcap + sys-apps/hwloc:0= + dev-libs/libbsd + dev-libs/openssl:0= + netlink? ( dev-libs/libnl:3 ) + pcre? ( dev-libs/libpcre ) + airdrop-ng? ( ${PYTHON_DEPS} ) + airgraph-ng? ( ${PYTHON_DEPS} ) + experimental? ( sys-libs/zlib ) + sqlite? ( >=dev-db/sqlite-3.4:3 ) + " +DEPEND="${CDEPEND} + test? ( dev-tcltk/expect ) + " +RDEPEND="${CDEPEND} + kernel_linux? ( + net-wireless/iw + net-wireless/wireless-tools + sys-apps/ethtool + sys-apps/usbutils + sys-apps/pciutils ) + sys-apps/hwdata + airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )" +BDEPEND="airdrop-ng? ( ${DISTUTILS_DEPS} ) + airgraph-ng? ( ${DISTUTILS_DEPS} )" + +REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} ) + airgraph-ng? ( ${PYTHON_REQUIRED_USE} )" + +RESTRICT="!test? ( test )" + +src_prepare() { + default + eautoreconf + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_prepare + fi +} + +src_configure() { + econf \ + STATIC_LIBDIR_NAME="$(get_libdir)" \ + --disable-asan \ + --enable-shared \ + --disable-static \ + --without-opt \ + --with-duma=no \ + $(use_enable netlink libnl) \ + $(use_with experimental) \ + $(use_with sqlite sqlite3) +} + +python_compile() { + if use airgraph-ng; then + cd "${S}/scripts/airgraph-ng" || die + distutils-r1_python_compile + fi + if use airdrop-ng; then + cd "${S}/scripts/airdrop-ng" || die + distutils-r1_python_compile + fi +} + +src_compile() { + default + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_compile + fi +} + +src_install() { + default + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_install + fi + + # we don't need aircrack-ng's oui updater, we have our own + rm "${ED}"/usr/sbin/airodump-ng-oui-update || die + find "${D}" -xtype f -name '*.la' -delete || die +} diff --git a/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild index 41428d7587ed..b66df597673b 100644 --- a/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild +++ b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild @@ -3,12 +3,11 @@ EAPI=8 -#this doesn't work because of multiple calls to distutils-r1_src_compile -#DISTUTILS_USE_PEP517=setuptools +DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{9..11} ) DISTUTILS_OPTIONAL=1 -inherit toolchain-funcs distutils-r1 flag-o-matic autotools +inherit distutils-r1 autotools DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys" HOMEPAGE="http://www.aircrack-ng.org" @@ -50,8 +49,8 @@ RDEPEND="${CDEPEND} sys-apps/pciutils ) sys-apps/hwdata airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )" -#BDEPEND="airdrop-ng? ( ${DISTUTILS_DEPS} ) -# airgraph-ng? ( ${DISTUTILS_DEPS} )" +BDEPEND="airdrop-ng? ( ${DISTUTILS_DEPS} ) + airgraph-ng? ( ${DISTUTILS_DEPS} )" REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} ) airgraph-ng? ( ${PYTHON_REQUIRED_USE} )" @@ -61,6 +60,9 @@ RESTRICT="!test? ( test )" src_prepare() { default eautoreconf + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_prepare + fi } src_configure() { @@ -76,33 +78,27 @@ src_configure() { $(use_with sqlite sqlite3) } -src_compile() { - if [[ $($(tc-getCC) --version) == clang* ]] ; then - #https://bugs.gentoo.org/show_bug.cgi?id=472890 - filter-flags -frecord-gcc-switches - fi - - default - +python_compile() { if use airgraph-ng; then cd "${S}/scripts/airgraph-ng" || die - distutils-r1_src_compile + distutils-r1_python_compile fi if use airdrop-ng; then cd "${S}/scripts/airdrop-ng" || die + distutils-r1_python_compile + fi +} + +src_compile() { + default + if use airgraph-ng || use airdrop-ng; then distutils-r1_src_compile fi } src_install() { default - - if use airgraph-ng; then - cd "${S}/scripts/airgraph-ng" || die - distutils-r1_src_install - fi - if use airdrop-ng; then - cd "${S}/scripts/airdrop-ng" || die + if use airgraph-ng || use airdrop-ng; then distutils-r1_src_install fi -- cgit v1.2.3-65-gdbad