From 22f72462c66e21dfed43022ba663106b43d5dab6 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sat, 19 Jul 2014 12:18:42 -0700 Subject: [PATCH] crossdev: fix sysroot handling in pkg-config wrapper The pkg-config wrapper re-implemented SYSROOT support because it didn't work correctly in pkg-config before 0.24. That was released years ago so it is time to update, custom code broke when paths were outside of /usr so libraries installed to /lib64 broke things. With this fixed we don't need to generate our own wrappers. Upstream bug: https://bugs.gentoo.org/show_bug.cgi?id=517530 --- .../sys-devel/crossdev/Manifest | 1 + .../crossdev/crossdev-20140118-r1.ebuild | 41 ++++++++++++++ ...-require-0.24-and-use-PKG_CONFIG_SYS.patch | 56 +++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/Manifest create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/crossdev-20140118-r1.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/files/0001-cross-pkg-config-require-0.24-and-use-PKG_CONFIG_SYS.patch diff --git a/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/Manifest new file mode 100644 index 0000000000..8d88372aa9 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/Manifest @@ -0,0 +1 @@ +DIST crossdev-20140118.tar.xz 21384 SHA256 8ba9ddb74022d6e3d481db5b02db21ea545d046e33a47b44e92ae369b4c218ee SHA512 ee27fc55bd8892fa454f6482d1276e0c6520f7987629b92cc7b96572eca51bb752c119f4f818783a579706afe7c9eabdfb8f0536e87cd888f0f76510ae51939d WHIRLPOOL c2018dfb4ab21d4eadbc9f6e4dd0fb532a8b4ac4530821262f28b8b969e3a7d7c14cd83bbd05e2c93eb73928bb8a4dfd074134d3a93700fe937c0fd1c3ef0fbb diff --git a/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/crossdev-20140118-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/crossdev-20140118-r1.ebuild new file mode 100644 index 0000000000..662b546c01 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/crossdev-20140118-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/crossdev-20140118.ebuild,v 1.1 2014/01/18 19:52:02 vapier Exp $ + +EAPI="5" + +inherit eutils + +if [[ ${PV} == "99999999" ]] ; then + EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/crossdev.git" + inherit git-2 + SRC_URI="" + #KEYWORDS="" +else + SRC_URI="mirror://gentoo/${P}.tar.xz + http://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +fi + +DESCRIPTION="Gentoo Cross-toolchain generator" +HOMEPAGE="http://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +RDEPEND=">=sys-apps/portage-2.1 + app-shells/bash + !sys-devel/crossdev-wrappers" +DEPEND="app-arch/xz-utils" + +src_prepare() { + epatch "${FILESDIR}"/*.patch +} + +src_install() { + default + if [[ "${PV}" == "99999999" ]] ; then + sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die + fi +} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/files/0001-cross-pkg-config-require-0.24-and-use-PKG_CONFIG_SYS.patch b/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/files/0001-cross-pkg-config-require-0.24-and-use-PKG_CONFIG_SYS.patch new file mode 100644 index 0000000000..63d850e0f0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-devel/crossdev/files/0001-cross-pkg-config-require-0.24-and-use-PKG_CONFIG_SYS.patch @@ -0,0 +1,56 @@ +From 18a89b529289474263c6dbf642b04e720b8f885b Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Sat, 19 Jul 2014 12:02:52 -0700 +Subject: [PATCH] cross-pkg-config: require 0.24 and use PKG_CONFIG_SYSROOT_DIR + +The bug with PKG_CONFIG_SYSROOT_DIR was fixed long ago and the +replacement code doesn't translate paths outside of /usr, causing the +wrapper to abort when it looks up a library installed in /lib. +--- + wrappers/cross-pkg-config | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) + +diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config +index d124261..67acd9b 100755 +--- a/wrappers/cross-pkg-config ++++ b/wrappers/cross-pkg-config +@@ -23,7 +23,7 @@ error() { + # + # Sanity/distro checks + # +-MIN_VER="0.20" # needs PKG_CONFIG_SYSROOT_DIR ++MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR + if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then + error pkg-config is too old ... upgrade to at least v${MIN_VER} + fi +@@ -81,12 +81,7 @@ export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgc + if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then + PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}" + fi +-# +-# This guy is horribly broken in pkg-config <=0.23: +-# https://bugs.freedesktop.org/show_bug.cgi?id=16905 +-# +-#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" +-unset PKG_CONFIG_SYSROOT_DIR ++export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" + + # + # Sanity check the output to catch common errors that do not +@@ -95,13 +90,6 @@ unset PKG_CONFIG_SYSROOT_DIR + output=$(pkg-config "$@") + ret=$? + +-# +-# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed. +-# We can't mung the .pc files as some of the vars are used at compile +-# time to encode runtime paths. +-# +-output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g') +- + # We turn the output into a newline separate string of options, then use grep + # to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things + # outside the ${SYSROOT}. +-- +1.8.5.5 +