summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2013-05-28 05:05:22 +0000
committerRick Farina <zerochaos@gentoo.org>2013-05-28 05:05:22 +0000
commit5893a9fe8141f6145b67bfc81191f0b5bbd5d7d0 (patch)
treeade3e4100d7cfdd4537bd925deafea5908e764c8 /net-wireless/lorcon/lorcon-9999.ebuild
parentUse python-single-r1.eclass instead of python.eclass. Remove deprecated optio... (diff)
downloadgentoo-2-5893a9fe8141f6145b67bfc81191f0b5bbd5d7d0.tar.gz
gentoo-2-5893a9fe8141f6145b67bfc81191f0b5bbd5d7d0.tar.bz2
gentoo-2-5893a9fe8141f6145b67bfc81191f0b5bbd5d7d0.zip
fix to build right, thanks to bonsaikitten for reading my error to me and my wife for letting me work on this for 2 hours
(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)
Diffstat (limited to 'net-wireless/lorcon/lorcon-9999.ebuild')
-rw-r--r--net-wireless/lorcon/lorcon-9999.ebuild39
1 files changed, 24 insertions, 15 deletions
diff --git a/net-wireless/lorcon/lorcon-9999.ebuild b/net-wireless/lorcon/lorcon-9999.ebuild
index 88f9b56c6fe3..def1016af7b2 100644
--- a/net-wireless/lorcon/lorcon-9999.ebuild
+++ b/net-wireless/lorcon/lorcon-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/lorcon/lorcon-9999.ebuild,v 1.2 2013/04/19 13:34:39 zerochaos Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/lorcon/lorcon-9999.ebuild,v 1.3 2013/05/28 05:05:22 zerochaos Exp $
EAPI=5
@@ -11,15 +11,22 @@ RESTRICT_PYTHON_ABIS="3.*"
USE_RUBY="ruby18 ruby19"
RUBY_OPTIONAL=yes
-inherit git-2 distutils ruby-ng
+inherit distutils ruby-ng
DESCRIPTION="A generic library for injecting 802.11 frames"
HOMEPAGE="http://802.11ninja.net/lorcon"
-EGIT_REPO_URI="https://code.google.com/p/lorcon/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://code.google.com/p/lorcon/"
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="http://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"
-KEYWORDS=""
IUSE="python ruby"
DEPEND="ruby? ( $(ruby_implementations_depend) )
@@ -27,7 +34,7 @@ DEPEND="ruby? ( $(ruby_implementations_depend) )
net-libs/libpcap"
RDEPEND="${DEPEND}"
-S="${WORKDIR}"/all
+S="${WORKDIR}"/${P}
pkg_setup() {
if use python; then
@@ -38,31 +45,34 @@ pkg_setup() {
}
src_unpack() {
- git-2_src_unpack
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ cp -R "${S}/" "${WORKDIR}/all"
+ fi
+ default_src_unpack
+ #ruby-ng_src_unpack doesn't seem to like mixing with git so we just copy things above
use ruby && ruby-ng_src_unpack
}
src_prepare() {
- use python && distutils_src_prepare
sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' pylorcon2/PyLorcon2.c
sed -i 's#find_library("orcon2", "lorcon_list_drivers", "lorcon2/lorcon.h") and ##' ruby-lorcon/extconf.rb
- sed -i "s#-I/usr/include/lorcon2#-I${WORKDIR}/all#" ruby-lorcon/extconf.rb
sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' ruby-lorcon/Lorcon2.h
+ use python && distutils_src_prepare
use ruby && ruby-ng_src_prepare
}
src_configure() {
default_src_configure
- use ruby && ruby-ng_src_configure
}
src_compile() {
default_src_compile
+ use ruby && ruby-ng_src_compile
if use python; then
LDFLAGS+=" -L${S}/.libs/"
distutils_src_compile
fi
- use ruby && ruby-ng_src_compile
}
src_install() {
@@ -82,12 +92,11 @@ pkg_postrm() {
use python && distutils_pkg_postrm
}
-each_ruby_configure() {
- ${RUBY} -C "ruby-lorcon" extconf.rb
- sed -i "s#-L\.#-L. -L${WORKDIR}/all/.libs -lorcon2 #g" ruby-lorcon/Makefile
-}
-
each_ruby_compile() {
+ sed -i "s#-I/usr/include/lorcon2#-I${WORKDIR}/${P}/ruby-lorcon -L${WORKDIR}/${P}/.libs#" ruby-lorcon/extconf.rb
+ "${RUBY}" -C ruby-lorcon extconf.rb || die
+ sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' ruby-lorcon/Lorcon2.h
+ sed -i "s#-L\.#-L. -L${WORKDIR}/${P}/.libs -lorcon2 #g" ruby-lorcon/Makefile || die
emake -C ruby-lorcon
}