summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-01-31 16:20:26 +0000
committerPeter Volkov <pva@gentoo.org>2009-01-31 16:20:26 +0000
commit974ca990e7832b86e7e09dfb7055d51dd6ae765e (patch)
treeeb4ce363bfb14c0d8b107aaeb5e182c54692d889 /net-firewall/ipset
parentFixed build problem with gcc-4.3, bug #256669, thank cilly for report and fix. (diff)
downloadgentoo-2-974ca990e7832b86e7e09dfb7055d51dd6ae765e.tar.gz
gentoo-2-974ca990e7832b86e7e09dfb7055d51dd6ae765e.tar.bz2
gentoo-2-974ca990e7832b86e7e09dfb7055d51dd6ae765e.zip
Version bump. Respect LDFLAGS, #246016, thank Olivier Huber. Probably fixes compatibility issue with 2.6.28, #254207, thank Jochen Schlick.
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'net-firewall/ipset')
-rw-r--r--net-firewall/ipset/ChangeLog11
-rw-r--r--net-firewall/ipset/files/ipset-2.4.7-LDFLAGS.patch21
-rw-r--r--net-firewall/ipset/ipset-2.4.7.ebuild92
3 files changed, 122 insertions, 2 deletions
diff --git a/net-firewall/ipset/ChangeLog b/net-firewall/ipset/ChangeLog
index 251213ad5a59..673935bc6103 100644
--- a/net-firewall/ipset/ChangeLog
+++ b/net-firewall/ipset/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-firewall/ipset
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.19 2008/10/24 21:28:25 robbat2 Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.20 2009/01/31 16:20:25 pva Exp $
+
+*ipset-2.4.7 (31 Jan 2009)
+
+ 31 Jan 2009; Peter Volkov <pva@gentoo.org>
+ +files/ipset-2.4.7-LDFLAGS.patch, +ipset-2.4.7.ebuild:
+ Version bump. Respect LDFLAGS, #246016, thank Olivier Huber. Probably
+ fixes compatibility issue with 2.6.28, #254207, thank Jochen Schlick.
*ipset-2.4.2 (24 Oct 2008)
diff --git a/net-firewall/ipset/files/ipset-2.4.7-LDFLAGS.patch b/net-firewall/ipset/files/ipset-2.4.7-LDFLAGS.patch
new file mode 100644
index 000000000000..9f8bcaf9e22f
--- /dev/null
+++ b/net-firewall/ipset/files/ipset-2.4.7-LDFLAGS.patch
@@ -0,0 +1,21 @@
+=== modified file 'Makefile'
+--- Makefile 2009-01-30 16:53:06 +0000
++++ Makefile 2009-01-30 20:13:44 +0000
+@@ -105,14 +105,14 @@
+ $(CC) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $<
+
+ ipset: ipset.o
+- $(CC) $(CFLAGS) -rdynamic -o $@ $^ -ldl
++ $(CC) $(CFLAGS) $(LDFLAGS) -rdynamic -o $@ $^ -ldl
+
+ #Pooltypes
+ ipset_%.o: ipset_%.c ipset.h
+ $(CC) $(SH_CFLAGS) -o $@ -c $<
+
+ libipset_%.so: ipset_%.o
+- $(CC) -shared -o $@ $<
++ $(CC) -shared $(LDFLAGS) -o $@ $<
+
+ $(DESTDIR)$(LIBDIR)/ipset/libipset_%.so: libipset_%.so
+ @[ -d $(DESTDIR)$(LIBDIR)/ipset ] || mkdir -p $(DESTDIR)$(LIBDIR)/ipset
+
diff --git a/net-firewall/ipset/ipset-2.4.7.ebuild b/net-firewall/ipset/ipset-2.4.7.ebuild
new file mode 100644
index 000000000000..f29fe219fb8f
--- /dev/null
+++ b/net-firewall/ipset/ipset-2.4.7.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.4.7.ebuild,v 1.1 2009/01/31 16:20:25 pva Exp $
+
+inherit eutils versionator toolchain-funcs linux-mod linux-info
+
+DESCRIPTION="IPset tool for iptables, successor to ippool."
+HOMEPAGE="http://ipset.netfilter.org/"
+SRC_URI="http://ipset.netfilter.org/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+RDEPEND=">=net-firewall/iptables-1.4.1"
+DEPEND="${RDEPEND}"
+
+# configurable from outside
+[ -z "${IP_NF_SET_MAX}" ] && IP_NF_SET_MAX=256
+[ -z "${IP_NF_SET_HASHSIZE}" ] && IP_NF_SET_HASHSIZE=1024
+BUILD_PARAMS="IP_NF_SET_MAX=$IP_NF_SET_MAX IP_NF_SET_HASHSIZE=${IP_NF_SET_HASHSIZE}"
+# module fun
+BUILD_TARGETS="all"
+MODULE_NAMES_ARG="kernel/net/ipv4/netfilter:${S}/kernel"
+MODULE_NAMES=""
+for i in ip_set{,_{{ip,port,macip}map,{ip,net,ipport}hash,iptree{,map}}} \
+ ipt_{SET,set}; do
+ MODULE_NAMES="${MODULE_NAMES} ${i}(${MODULE_NAMES_ARG})"
+done
+# sanity
+CONFIG_CHECK="NETFILTER"
+ERROR_CFG="ipset needs netfilter support in your kernel."
+
+src_unpack() {
+ unpack ${A}
+ sed -i \
+ -e 's/KERNELDIR/(KERNELDIR)/g' \
+ -e 's/^(\?KERNEL_\?DIR.*/KERNELDIR ?= /' \
+ -e '/^all::/iV ?= 0' \
+ -e '/^all::/iKBUILD_OUTPUT ?=' \
+ -e '/$(MAKE)/{s/$@/ V=$(V) KBUILD_OUTPUT=$(KBUILD_OUTPUT) modules/}' \
+ "${S}"/kernel/Makefile
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-LDFLAGS.patch"
+}
+
+pkg_setup() {
+ get_version
+
+ modules=0
+ msg=''
+ if linux_chkconfig_builtin "MODULES" ; then
+ modules=1
+ msg="Modular kernel detected, will build kernel modules"
+ else
+ msg="Nonmodular kernel detected, will not build kernel modules"
+ fi
+ einfo "${msg}"
+
+ [[ $modules -eq 1 ]] && \
+ linux-mod_pkg_setup
+ myconf="${myconf} PREFIX="
+ myconf="${myconf} LIBDIR=/$(get_libdir)"
+ myconf="${myconf} BINDIR=/sbin"
+ myconf="${myconf} MANDIR=/usr/share/man"
+ myconf="${myconf} INCDIR=/usr/include"
+ export myconf
+}
+
+src_compile() {
+ einfo "Building userspace"
+ emake CC="$(tc-getCC)" COPT_FLAGS="${CFLAGS}" ${myconf} binaries || die "failed to build"
+
+ if [[ $modules -eq 1 ]]; then
+ einfo "Building kernel modules"
+ cd "${S}/kernel"
+ export KERNELDIR="${KERNEL_DIR}"
+ linux-mod_src_compile || die "failed to build modules"
+ fi
+}
+
+src_install() {
+ einfo "Installing userspace"
+ emake DESTDIR="${D}" ${myconf} binaries_install || die "failed to package"
+
+ if [[ $modules -eq 1 ]]; then
+ einfo "Installing kernel modules"
+ cd "${S}/kernel"
+ export KERNELDIR="${KERNEL_DIR}"
+ linux-mod_src_install
+ fi
+}