summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-03-07 12:43:52 -0500
committerMike Gilbert <floppym@gentoo.org>2018-03-07 14:26:35 -0500
commitca9ad0c216ce9301b176b362168aac8926922452 (patch)
tree35bafe08b99b570172ecd42d56f5827aae0b6308 /net-firewall
parentnet-firewall/ebtables: shorten DESCRIPTION (diff)
downloadgentoo-ca9ad0c216ce9301b176b362168aac8926922452.tar.gz
gentoo-ca9ad0c216ce9301b176b362168aac8926922452.tar.bz2
gentoo-ca9ad0c216ce9301b176b362168aac8926922452.zip
net-firewall/ebtables: drop /etc/ethertypes
Bug: https://bugs.gentoo.org/647458 Package-Manager: Portage-2.3.24_p18, Repoman-2.3.6_p99
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ebtables/ebtables-2.0.10.4-r1.ebuild5
-rw-r--r--net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild72
-rw-r--r--net-firewall/ebtables/ebtables-2.0.10.4.ebuild5
3 files changed, 81 insertions, 1 deletions
diff --git a/net-firewall/ebtables/ebtables-2.0.10.4-r1.ebuild b/net-firewall/ebtables/ebtables-2.0.10.4-r1.ebuild
index 83e49e5a63cd..c506fa3d0bfc 100644
--- a/net-firewall/ebtables/ebtables-2.0.10.4-r1.ebuild
+++ b/net-firewall/ebtables/ebtables-2.0.10.4-r1.ebuild
@@ -18,7 +18,10 @@ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
IUSE="+perl static"
# The ebtables-save script is written in perl.
-RDEPEND="perl? ( dev-lang/perl )"
+RDEPEND="perl? ( dev-lang/perl )
+ !<net-firewall/iptables-1.6.2-r2[nftables(-)]
+ !net-misc/ethertypes
+"
S=${WORKDIR}/${MY_P}
diff --git a/net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild b/net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild
new file mode 100644
index 000000000000..4fe72ef29094
--- /dev/null
+++ b/net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit versionator toolchain-funcs flag-o-matic
+
+MY_PV=$(replace_version_separator 3 '-' )
+MY_P=${PN}-v${MY_PV}
+
+DESCRIPTION="Controls Ethernet frame filtering on a Linux bridge, MAC NAT and brouting"
+HOMEPAGE="http://ebtables.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="+perl static"
+
+# The ebtables-save script is written in perl.
+RDEPEND="perl? ( dev-lang/perl )
+ net-misc/ethertypes"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if use static; then
+ ewarn "You've chosen static build which is useful for embedded devices."
+ ewarn "It has no init script. Make sure that's really what you want."
+ fi
+}
+
+src_prepare() {
+ # Enhance ebtables-save to take table names as parameters bug #189315
+ local PATCHES=( "${FILESDIR}/${PN}-2.0.8.1-ebt-save.diff" )
+
+ default
+
+ sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \
+ -e "s,^BINDIR:=.*,BINDIR:=/sbin," \
+ -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PF}," \
+ -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PF}," \
+ -e "s,^LIBDIR:=.*,LIBDIR:=/$(get_libdir)/\$(PROGNAME)," Makefile
+}
+
+src_compile() {
+ # This package uses _init functions to initialise extensions. With
+ # --as-needed this will not work.
+ append-ldflags $(no-as-needed)
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ $(use static && echo static)
+}
+
+src_install() {
+ if ! use static; then
+ emake DESTDIR="${D}" 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
+ # Bug 647458
+ rm "${ED%/}"/etc/ethertypes || die
+ else
+ into /
+ newsbin static ebtables
+ fi
+ dodoc ChangeLog THANKS
+}
diff --git a/net-firewall/ebtables/ebtables-2.0.10.4.ebuild b/net-firewall/ebtables/ebtables-2.0.10.4.ebuild
index d4f1785a01fa..10bbd3d6985e 100644
--- a/net-firewall/ebtables/ebtables-2.0.10.4.ebuild
+++ b/net-firewall/ebtables/ebtables-2.0.10.4.ebuild
@@ -17,6 +17,11 @@ IUSE="static"
LICENSE="GPL-2"
SLOT="0"
+RDEPEND="
+ !<net-firewall/iptables-1.6.2-r2[nftables(-)]
+ !net-misc/ethertypes
+"
+
S=${WORKDIR}/${MY_P}
pkg_setup() {