diff options
author | Robert Buchholz <rbu@gentoo.org> | 2009-03-12 17:59:10 +0000 |
---|---|---|
committer | Robert Buchholz <rbu@gentoo.org> | 2009-03-12 17:59:10 +0000 |
commit | 579ca1ec392de3232022122cddb08ef34aa80200 (patch) | |
tree | b6b46cd8a4cdab98a3cd721a5e142efe303143aa /net-wireless/aircrack-ng | |
parent | Version bump (diff) | |
download | gentoo-2-579ca1ec392de3232022122cddb08ef34aa80200.tar.gz gentoo-2-579ca1ec392de3232022122cddb08ef34aa80200.tar.bz2 gentoo-2-579ca1ec392de3232022122cddb08ef34aa80200.zip |
Reintroduce iw as a dep on Linux that got dropped in the bump (bug # 260177),
Improve support for current FreeBSD (bug #253803): applied some patches and
remove airmon-ng application.
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'net-wireless/aircrack-ng')
-rw-r--r-- | net-wireless/aircrack-ng/ChangeLog | 11 | ||||
-rw-r--r-- | net-wireless/aircrack-ng/aircrack-ng-1.0_rc2-r1.ebuild (renamed from net-wireless/aircrack-ng/aircrack-ng-1.0_rc2.ebuild) | 33 | ||||
-rw-r--r-- | net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch | 108 |
3 files changed, 144 insertions, 8 deletions
diff --git a/net-wireless/aircrack-ng/ChangeLog b/net-wireless/aircrack-ng/ChangeLog index 9944a86694cc..1ed8797337d8 100644 --- a/net-wireless/aircrack-ng/ChangeLog +++ b/net-wireless/aircrack-ng/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-wireless/aircrack-ng # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/ChangeLog,v 1.37 2009/03/01 16:57:50 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/ChangeLog,v 1.38 2009/03/12 17:59:10 rbu Exp $ + +*aircrack-ng-1.0_rc2-r1 (12 Mar 2009) + + 12 Mar 2009; Robert Buchholz <rbu@gentoo.org> + +files/aircrack-ng-1.0_rc2-freebsd.patch, -aircrack-ng-1.0_rc2.ebuild, + +aircrack-ng-1.0_rc2-r1.ebuild: + Reintroduce iw as a dep on Linux that got dropped in the bump (bug # 260177), + Improve support for current FreeBSD (bug #253803): applied some patches and + remove airmon-ng application. *aircrack-ng-1.0_rc2 (01 Mar 2009) diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.0_rc2.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.0_rc2-r1.ebuild index d1fe1b3204b9..ac030802e2f0 100644 --- a/net-wireless/aircrack-ng/aircrack-ng-1.0_rc2.ebuild +++ b/net-wireless/aircrack-ng/aircrack-ng-1.0_rc2-r1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/aircrack-ng-1.0_rc2.ebuild,v 1.1 2009/03/01 16:57:50 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/aircrack-ng-1.0_rc2-r1.ebuild,v 1.1 2009/03/12 17:59:10 rbu Exp $ -EAPI=1 +EAPI=2 inherit versionator eutils toolchain-funcs MY_PV=$(replace_version_separator 2 '-') @@ -14,11 +14,12 @@ SRC_URI="http://download.aircrack-ng.org/${PN}-${MY_PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="+sqlite" +IUSE="+sqlite kernel_linux kernel_FreeBSD" DEPEND="dev-libs/openssl sqlite? ( >=dev-db/sqlite-3.4 )" -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + kernel_linux? ( net-wireless/iw )" S="${WORKDIR}/${PN}-${MY_PV}" @@ -26,10 +27,13 @@ have_sqlite() { use sqlite && echo "true" || echo "false" } -src_unpack() { - unpack ${A} - cd "${S}" +src_prepare() { epatch "${FILESDIR}/sha-compile-fix-64bit.patch" + if use kernel_FreeBSD ; then + epatch "${FILESDIR}/${P}-freebsd.patch" + sed -i -e "s:^\(SCRIPTS.*\)airmon-ng:\1:g" Makefile + sed -i -e "s:airmon-ng.1::g" manpages/Makefile + fi } src_compile() { @@ -47,3 +51,18 @@ src_install() { dodoc AUTHORS ChangeLog README } + +pkg_postinst() { + # Message is (c) FreeBSD + # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5 + if use kernel_FreeBSD ; then + einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor" + einfo "mode of your wireless card. So do not care about what the manpages say about" + einfo "airmon-ng, airodump-ng sets monitor mode automatically." + echo + einfo "To return from monitor mode, issue the following command:" + einfo " ifconfig \${INTERFACE} -mediaopt monitor" + einfo + einfo "For aireplay-ng you need FreeBSD >= 7.0." + fi +} diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch new file mode 100644 index 000000000000..e3e0ebabd7bf --- /dev/null +++ b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch @@ -0,0 +1,108 @@ +http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/patch-src_airserv-ng.c?rev=1.1 +--- src/airserv-ng.c.orig 2008-06-10 02:55:09.000000000 +0700 ++++ src/airserv-ng.c 2008-08-11 13:39:46.000000000 +0700 +@@ -37,6 +37,15 @@ + + #ifdef __MACH__ + #include <libkern/OSByteOrder.h> ++#elif defined(__FreeBSD__) ++#include <machine/endian.h> ++#if BYTE_ORDER == BIG_ENDIAN ++# define __cpu_to_be32(x) (x) ++# define __cpu_to_be64(x) (x) ++#elif BYTE_ORDER == LITTLE_ENDIAN ++# define __cpu_to_be32(x) __bswap32(x) ++# define __cpu_to_be64(x) __bswap64(x) ++#endif + #else + #include <asm/byteorder.h> + #endif /* __MACH__ */ + + +http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/patch-src_osdep_network.c?rev=1.1 +--- src/osdep/network.c.orig 2008-06-10 02:55:09.000000000 +0700 ++++ src/osdep/network.c 2008-08-11 13:29:42.000000000 +0700 +@@ -32,6 +32,15 @@ + + #ifdef __MACH__ + #include <libkern/OSByteOrder.h> ++#elif defined(__FreeBSD__) ++#include <machine/endian.h> ++#if BYTE_ORDER == BIG_ENDIAN ++# define __be32_to_cpu(x) (x) ++# define __be64_to_cpu(x) (x) ++#elif BYTE_ORDER == LITTLE_ENDIAN ++# define __be32_to_cpu(x) __bswap32(x) ++# define __be64_to_cpu(x) __bswap64(x) ++#endif + #elif defined (__sun) && defined (__sparc) /* Solaris SPARC, not Solaris x86 */ + #include <sys/byteorder.h> + #else + + +http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c?rev=1.1 +--- src/osdep/freebsd.c.orig 2008-06-10 02:55:09.000000000 +0700 ++++ src/osdep/freebsd.c 2008-08-11 20:01:53.000000000 +0700 +@@ -53,7 +53,9 @@ + unsigned char pf_buf[4096]; + unsigned char *pf_next; + int pf_totlen; ++#if __FreeBSD_version > 700018 + struct ieee80211_bpf_params pf_txparams; ++#endif + + /* setchan */ + int pf_s; +@@ -280,13 +282,16 @@ + static int fbsd_write(struct wif *wi, unsigned char *h80211, int len, + struct tx_info *ti) + { ++#if __FreeBSD_version > 700018 + struct iovec iov[2]; ++#endif + struct priv_fbsd *pf = wi_priv(wi); + int rc; + + /* XXX make use of ti */ + if (ti) {} + ++#if __FreeBSD_version > 700018 + iov[0].iov_base = &pf->pf_txparams; + iov[0].iov_len = pf->pf_txparams.ibp_len; + +@@ -294,12 +299,19 @@ + iov[1].iov_len = len; + + rc = writev(pf->pf_fd, iov, 2); ++#else ++ rc = write(pf->pf_fd, h80211, len); ++#endif + if (rc == -1) + return rc; ++#if __FreeBSD_version > 700018 + if (rc < (int) iov[0].iov_len) + return 0; + + return rc - iov[0].iov_len; ++#else ++ return 0; ++#endif + } + + static int fbsd_set_channel(struct wif *wi, int chan) +@@ -542,6 +554,7 @@ + /* setup private state */ + pf = wi_priv(wi); + pf->pf_fd = fd; ++#if __FreeBSD_version > 700018 + pf->pf_txparams.ibp_vers = IEEE80211_BPF_VERSION; + pf->pf_txparams.ibp_len = sizeof(struct ieee80211_bpf_params) - 6; + pf->pf_txparams.ibp_rate1 = 2; /* 1 MB/s XXX */ +@@ -549,6 +562,7 @@ + pf->pf_txparams.ibp_flags = IEEE80211_BPF_NOACK; + pf->pf_txparams.ibp_power = 100; /* nominal max */ + pf->pf_txparams.ibp_pri = WME_AC_VO; /* high priority */ ++#endif + + return wi; + } |