From ef5f4c172e666054014b75cac45fa8ea2319d0f0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Feb 2015 11:28:47 +0000 Subject: Fix by Paul McClave to respect $PKG_CONFIG. (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key D2E96200) --- net-libs/iojs/ChangeLog | 6 ++- net-libs/iojs/files/iojs-1.2.0-pkgconfig.patch | 56 ++++++++++++++++++++++++++ net-libs/iojs/iojs-1.2.0.ebuild | 6 ++- 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 net-libs/iojs/files/iojs-1.2.0-pkgconfig.patch (limited to 'net-libs/iojs') diff --git a/net-libs/iojs/ChangeLog b/net-libs/iojs/ChangeLog index c156693dda75..ed2333b7666c 100644 --- a/net-libs/iojs/ChangeLog +++ b/net-libs/iojs/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-libs/iojs # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/ChangeLog,v 1.6 2015/02/16 11:26:23 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/ChangeLog,v 1.7 2015/02/16 11:28:47 vapier Exp $ + + 16 Feb 2015; Mike Frysinger + +files/iojs-1.2.0-pkgconfig.patch, iojs-1.2.0.ebuild: + Fix by Paul McClave to respect $PKG_CONFIG. 16 Feb 2015; Mike Frysinger iojs-1.2.0.ebuild: Fix by Paul McClave to drop the v8 -D flag for x86 targets as configure does diff --git a/net-libs/iojs/files/iojs-1.2.0-pkgconfig.patch b/net-libs/iojs/files/iojs-1.2.0-pkgconfig.patch new file mode 100644 index 000000000000..8eaa0236278b --- /dev/null +++ b/net-libs/iojs/files/iojs-1.2.0-pkgconfig.patch @@ -0,0 +1,56 @@ +configure: fix pkg_config usage + +Cross compilation did pick up wrong libraries as it was using the system +pkg-config. + +patch by Paul McClave + +--- a/configure ++++ b/configure +@@ -299,12 +299,13 @@ + + + def pkg_config(pkg): +- cmd = os.popen('pkg-config --libs %s' % pkg, 'r') ++ pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') ++ cmd = os.popen(pkg_config + ' --libs %s' % pkg, 'r') + libs = cmd.readline().strip() + ret = cmd.close() + if (ret): return None + +- cmd = os.popen('pkg-config --cflags %s' % pkg, 'r') ++ cmd = os.popen(pkg_config + ' --cflags %s' % pkg, 'r') + cflags = cmd.readline().strip() + ret = cmd.close() + if (ret): return None +@@ -553,15 +554,21 @@ + def configure_libz(o): + o['variables']['node_shared_zlib'] = b(options.shared_zlib) + +- # assume shared_zlib if one of these is set? +- if options.shared_zlib_libpath: +- o['libraries'] += ['-L%s' % options.shared_zlib_libpath] +- if options.shared_zlib_libname: +- o['libraries'] += ['-l%s' % options.shared_zlib_libname] +- elif options.shared_zlib: +- o['libraries'] += ['-lz'] +- if options.shared_zlib_includes: +- o['include_dirs'] += [options.shared_zlib_includes] ++ if options.shared_zlib: ++ (libs, cflags) = pkg_config('zlib') or ('-lz', '') ++ ++ if options.shared_zlib_libpath: ++ o['libraries'] += ['-L%s' % options.shared_zlib_libpath] ++ ++ if options.shared_zlib_libname: ++ o['libraries'] += ['-l%s' % options.shared_zlib_libname] ++ else: ++ o['libraries'] += libs.split() ++ ++ if options.shared_zlib_includes: ++ o['include_dirs'] += [options.shared_zlib_includes] ++ else: ++ o['cflags'] += cflags.split() + + + def configure_http_parser(o): diff --git a/net-libs/iojs/iojs-1.2.0.ebuild b/net-libs/iojs/iojs-1.2.0.ebuild index 0237bf2bf465..da4b514401e7 100644 --- a/net-libs/iojs/iojs-1.2.0.ebuild +++ b/net-libs/iojs/iojs-1.2.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/iojs-1.2.0.ebuild,v 1.3 2015/02/16 11:26:23 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/iojs-1.2.0.ebuild,v 1.4 2015/02/16 11:28:47 vapier Exp $ EAPI=5 @@ -54,6 +54,8 @@ src_prepare() { sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die + epatch "${FILESDIR}"/${PN}-1.2.0-pkgconfig.patch + # Avoid a test that I've only been able to reproduce from emerge. It doesnt # seem sandbox related either (invoking it from a sandbox works fine). # The issue is that no stdin handle is openened when asked for one. @@ -61,7 +63,7 @@ src_prepare() { # with more gentoo-knowledge than me (jbergstroem) figures it out. rm test/parallel/test-stdout-close-unref.js - tc-export CC CXX + tc-export CC CXX PKG_CONFIG export V=1 } -- cgit v1.2.3-65-gdbad