diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-10-20 19:39:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-10-20 19:39:39 +0000 |
commit | 69aa2db177927c9a55b74459b9907510ab1e1ff8 (patch) | |
tree | e3adb7cdb4c08cb71aeb85c12f870188e56ce07c /sys-apps | |
parent | Fix xinetd file. Closes bug #438172. (diff) | |
download | gentoo-2-69aa2db177927c9a55b74459b9907510ab1e1ff8.tar.gz gentoo-2-69aa2db177927c9a55b74459b9907510ab1e1ff8.tar.bz2 gentoo-2-69aa2db177927c9a55b74459b9907510ab1e1ff8.zip |
Use pkg-config to link against libselinux #436752 by Alphat-PC.
(Portage version: 2.2.0_alpha131/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/busybox/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.20.2.ebuild | 3 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch | 67 |
3 files changed, 74 insertions, 2 deletions
diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog index 9fa00aa0e9b6..be425a95398a 100644 --- a/sys-apps/busybox/ChangeLog +++ b/sys-apps/busybox/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/busybox # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.329 2012/10/05 18:03:52 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.330 2012/10/20 19:39:38 vapier Exp $ + + 20 Oct 2012; Mike Frysinger <vapier@gentoo.org> + +files/busybox-1.20.2-selinux-pkg-config.patch, busybox-1.20.2.ebuild: + Use pkg-config to link against libselinux #436752 by Alphat-PC. 05 Oct 2012; Brent Baude <ranger@gentoo.org> busybox-1.20.2.ebuild: Marking busybox-1.20.2 ppc64 for bug 431948 diff --git a/sys-apps/busybox/busybox-1.20.2.ebuild b/sys-apps/busybox/busybox-1.20.2.ebuild index d7db23597902..c355a70e9f73 100644 --- a/sys-apps/busybox/busybox-1.20.2.ebuild +++ b/sys-apps/busybox/busybox-1.20.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.20.2.ebuild,v 1.10 2012/10/05 18:03:52 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.20.2.ebuild,v 1.11 2012/10/20 19:39:38 vapier Exp $ EAPI="4" inherit eutils flag-o-matic savedconfig toolchain-funcs multilib @@ -103,6 +103,7 @@ src_prepare() { -e "/^AR\>/s:=.*:= $(tc-getAR):" \ -e "/^CC\>/s:=.*:= $(tc-getCC):" \ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ + -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ Makefile || die sed -i \ -e 's:-static-libgcc::' \ diff --git a/sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch b/sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch new file mode 100644 index 000000000000..5e9ef26d056e --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch @@ -0,0 +1,67 @@ +From 5694afd72a0a424fcdd2ac85838229a1a86b7e84 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sat, 20 Oct 2012 15:01:26 -0400 +Subject: [PATCH] build system: use pkg-config to look up selinux libs + +Newer versions of libselinux has started linking against more libs. +Rather than continuing hardcoding things, switch to using pkg-config +to query for its dependencies. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 1 + + Makefile.flags | 12 +++++++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index b2e9477..8995ff5 100644 +--- a/Makefile ++++ b/Makefile +@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm + STRIP = $(CROSS_COMPILE)strip + OBJCOPY = $(CROSS_COMPILE)objcopy + OBJDUMP = $(CROSS_COMPILE)objdump ++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config + AWK = awk + GENKSYMS = scripts/genksyms/genksyms + DEPMOD = /sbin/depmod +diff --git a/Makefile.flags b/Makefile.flags +index e77c0e5..307afa7 100644 +--- a/Makefile.flags ++++ b/Makefile.flags +@@ -78,6 +78,12 @@ ARCH_FPIC ?= -fpic + ARCH_FPIE ?= -fpie + ARCH_PIE ?= -pie + ++# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES)) ++define pkg_check_modules ++$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2)) ++$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2)) ++endef ++ + ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y) + # on i386: 14% smaller libbusybox.so + # (code itself is 9% bigger, we save on relocs/PLT/GOT) +@@ -89,6 +95,7 @@ endif + + ifeq ($(CONFIG_STATIC),y) + CFLAGS_busybox += -static ++PKG_CONFIG_FLAGS += --static + endif + + ifeq ($(CONFIG_PIE),y) +@@ -131,7 +138,10 @@ LDLIBS += pam pam_misc pthread + endif + + ifeq ($(CONFIG_SELINUX),y) +-LDLIBS += selinux sepol ++SELINUX_PC_MODULES = libselinux libsepol ++$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) ++CPPFLAGS += $(SELINUX_CFLAGS) ++LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) + endif + + ifeq ($(CONFIG_EFENCE),y) +-- +1.7.12 + |