From de46fd3da932b96d6106d2e688918f9119c7fe75 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 14 Oct 2008 07:21:01 +0000 Subject: Bug #236138, allow building with non-modular kernels. (Portage version: 2.2_rc11/cvs/Linux 2.6.27-rc1-10246-gca5de40 x86_64) --- net-firewall/ipset/ChangeLog | 5 ++++- net-firewall/ipset/ipset-2.3.3a.ebuild | 26 +++++++++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) (limited to 'net-firewall') diff --git a/net-firewall/ipset/ChangeLog b/net-firewall/ipset/ChangeLog index 94ab72fc1358..985516c25a03 100644 --- a/net-firewall/ipset/ChangeLog +++ b/net-firewall/ipset/ChangeLog @@ -1,6 +1,9 @@ # 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.17 2008/08/14 00:06:25 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.18 2008/10/14 07:21:01 robbat2 Exp $ + + 14 Oct 2008; Robin H. Johnson ipset-2.3.3a.ebuild: + Bug #236138, allow building with non-modular kernels. *ipset-2.3.3a (14 Aug 2008) diff --git a/net-firewall/ipset/ipset-2.3.3a.ebuild b/net-firewall/ipset/ipset-2.3.3a.ebuild index d97e3cd8f369..fb544835c4ce 100644 --- a/net-firewall/ipset/ipset-2.3.3a.ebuild +++ b/net-firewall/ipset/ipset-2.3.3a.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.3.3a.ebuild,v 1.1 2008/08/14 00:06:25 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.3.3a.ebuild,v 1.2 2008/10/14 07:21:01 robbat2 Exp $ -inherit eutils versionator toolchain-funcs linux-mod +inherit eutils versionator toolchain-funcs linux-mod linux-info DESCRIPTION="IPset tool for iptables, successor to ippool." HOMEPAGE="http://ipset.netfilter.org/" @@ -45,7 +45,19 @@ src_unpack() { } pkg_setup() { - #use modules && \ + 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)" @@ -59,22 +71,22 @@ src_compile() { einfo "Building userspace" emake CC="$(tc-getCC)" COPT_FLAGS="${CFLAGS}" ${myconf} binaries || die "failed to build" - #if use modules; then + 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 + fi } src_install() { einfo "Installing userspace" emake DESTDIR="${D}" ${myconf} binaries_install || die "failed to package" - #if use modules; then + if [[ $modules -eq 1 ]]; then einfo "Installing kernel modules" cd "${S}/kernel" export KERNELDIR="${KERNEL_DIR}" linux-mod_src_install - #fi + fi } -- cgit v1.2.3-65-gdbad