net-firewall/ebtables: add USE=perl to control perl dep

The ebtables-save script is written in perl, so make sure we RDEPEND
on it.  Since that's a big dep for little gain, make it optional.
Some systems (like Chromium OS) have no use for it.
This commit is contained in:
Mike Frysinger
2015-09-29 15:53:33 -04:00
parent f77f4fa3bb
commit bc4edfef3f
2 changed files with 11 additions and 2 deletions
@@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -16,7 +16,10 @@ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
IUSE="static"
IUSE="+perl static"
# The ebtables-save script is written in perl.
RDEPEND="perl? ( dev-lang/perl )"
S=${WORKDIR}/${MY_P}
@@ -54,6 +57,9 @@ src_install() {
keepdir /var/lib/ebtables/
newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables
newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables
if ! use perl; then
rm "${ED}"/sbin/ebtables-save || die
fi
else
into /
newsbin static ebtables
+3
View File
@@ -2,6 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
<use>
<flag name='perl'>Install the ebtables-save script which uses perl</flag>
</use>
<upstream>
<remote-id type="sourceforge">ebtables</remote-id>
</upstream>