From e454b19bcd0761633fdb5d4e3c963f5657bdf085 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 8 Nov 2012 16:40:45 +0000 Subject: Use the correct pkg-config when cross-compiling #442354 by Bertrand Jacquin. (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key FB7C4156) --- sys-apps/iproute2/ChangeLog | 6 +- .../iproute2/files/iproute2-3.6.0-pkg-config.patch | 67 ++++++++++++++++++++++ sys-apps/iproute2/iproute2-3.6.0.ebuild | 3 +- 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch (limited to 'sys-apps/iproute2') diff --git a/sys-apps/iproute2/ChangeLog b/sys-apps/iproute2/ChangeLog index c027d42627b6..c52b98597315 100644 --- a/sys-apps/iproute2/ChangeLog +++ b/sys-apps/iproute2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/iproute2 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.202 2012/10/09 04:30:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.203 2012/11/08 16:40:45 vapier Exp $ + + 08 Nov 2012; Mike Frysinger + +files/iproute2-3.6.0-pkg-config.patch, iproute2-3.6.0.ebuild: + Use the correct pkg-config when cross-compiling #442354 by Bertrand Jacquin. *iproute2-3.6.0 (09 Oct 2012) diff --git a/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch b/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch new file mode 100644 index 000000000000..fcfee292994b --- /dev/null +++ b/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch @@ -0,0 +1,67 @@ +From 99762cbc216bb818e9fcbe37e1abf9b313968615 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Thu, 8 Nov 2012 11:31:26 -0500 +Subject: [PATCH] allow pkg-config to be customized + +Rather than hard coding `pkg-config`, use ${PKG_CONFIG} so people can +override it to their specific version (like when cross-compiling). + +This is the same way the upstream pkg-config code works. + +Signed-off-by: Mike Frysinger +--- + configure | 6 ++++-- + tc/Makefile | 4 ++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 2c2d1c4..0bfedf9 100755 +--- a/configure ++++ b/configure +@@ -2,6 +2,8 @@ + # This is not an autconf generated configure + # + INCLUDE=${1:-"$PWD/include"} ++: ${PKG_CONFIG:=pkg-config} ++echo "PKG_CONFIG:=${PKG_CONFIG}" >>Config + + # Make a temp directory in build tree. + TMPDIR=$(mktemp -d config.XXXXXX) +@@ -51,7 +53,7 @@ int main(int argc, char **argv) + + EOF + +-if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1 ++if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(${PKG_CONFIG} xtables --cflags --libs) -ldl >/dev/null 2>&1 + then + echo "TC_CONFIG_XT:=y" >>Config + echo "using xtables" +@@ -148,7 +150,7 @@ check_ipt() + + check_ipt_lib_dir() + { +- IPT_LIB_DIR=$(pkg-config --variable=xtlibdir xtables) ++ IPT_LIB_DIR=$(${PKG_CONFIG} --variable=xtlibdir xtables) + if [ -n "$IPT_LIB_DIR" ]; then + echo $IPT_LIB_DIR + echo "IPT_LIB_DIR:=$IPT_LIB_DIR" >> Config +diff --git a/tc/Makefile b/tc/Makefile +index 389029d..696f891 100644 +--- a/tc/Makefile ++++ b/tc/Makefile +@@ -135,10 +135,10 @@ q_atm.so: q_atm.c + $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm + + m_xt.so: m_xt.c +- $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$(pkg-config xtables --cflags --libs) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$($(PKG_CONFIG) xtables --cflags --libs) + + m_xt_old.so: m_xt_old.c +- $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$(pkg-config xtables --cflags --libs) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$($(PKG_CONFIG) xtables --cflags --libs) + + %.yacc.c: %.y + $(YACC) $(YACCFLAGS) -o $@ $< +-- +1.7.12.4 + diff --git a/sys-apps/iproute2/iproute2-3.6.0.ebuild b/sys-apps/iproute2/iproute2-3.6.0.ebuild index 158c676e1c35..ad8d6ff05aca 100644 --- a/sys-apps/iproute2/iproute2-3.6.0.ebuild +++ b/sys-apps/iproute2/iproute2-3.6.0.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/iproute2/iproute2-3.6.0.ebuild,v 1.1 2012/10/09 04:30:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.6.0.ebuild,v 1.2 2012/11/08 16:40:45 vapier Exp $ EAPI="4" @@ -37,6 +37,7 @@ DEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907 + epatch "${FILESDIR}"/${PN}-3.6.0-pkg-config.patch #442354 use ipv6 || epatch "${FILESDIR}"/${PN}-3.1.0-no-ipv6.patch #326849 sed -i \ -- cgit v1.2.3-65-gdbad