net-wireless/lorcon: Add 9999 - parlay - yet another gentoo overlay
HTML git clone https://git.parazyd.org/parlay
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 93bfbaf2b65d590045928d775a1a1eebfe7f812b
DIR parent 75ff7a95301c1b7fb419d48a30a4e508cd3a441d
HTML Author: parazyd <parazyd@dyne.org>
Date: Sun, 14 Jan 2018 10:23:53 +0100
net-wireless/lorcon: Add 9999
Diffstat:
A net-wireless/lorcon/files/musl-add… | 13 +++++++++++++
A net-wireless/lorcon/lorcon-9999.eb… | 74 +++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+), 0 deletions(-)
---
DIR diff --git a/net-wireless/lorcon/files/musl-add-systypes.h.patch b/net-wireless/lorcon/files/musl-add-systypes.h.patch
@@ -0,0 +1,13 @@
+diff --git a/lorcon_packasm.c b/lorcon_packasm.c
+index 767d8ef..56b8689 100644
+--- a/lorcon_packasm.c
++++ b/lorcon_packasm.c
+@@ -21,6 +21,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+
DIR diff --git a/net-wireless/lorcon/lorcon-9999.ebuild b/net-wireless/lorcon/lorcon-9999.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A generic library for injecting 802.11 frames"
+HOMEPAGE="https://github.com/kismetwireless/lorcon"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/kismetwireless/lorcon"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="python"
+
+DEPEND="
+ python? ( ${PYTHON_DEPS} )
+ dev-libs/libnl:3=
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}"/${P}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ cp -R "${S}/" "${WORKDIR}/all"
+ fi
+ default_src_unpack
+}
+
+src_prepare() {
+ sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' pylorcon2/PyLorcon2.c
+ epatch "${FILESDIR}"/musl-add-systypes.h.patch
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ default_src_configure
+}
+
+src_compile() {
+ default_src_compile
+ if use python; then
+ LDFLAGS+=" -L${S}/.libs/"
+ cd pylorcon2 || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ if use python; then
+ cd pylorcon2 || die
+ distutils-r1_src_install
+ fi
+}
+
+src_test() {
+ :
+}