From bff4ad7d6f62131a9b91a4063600e6f3edb8843c Mon Sep 17 00:00:00 2001 From: "Maxin B. John" Date: Mon, 19 Feb 2018 10:36:52 +0200 Subject: pkgconf: upgrade to version 1.4.2 pkgconf improved compatibility with freedesktop.org pkg-config. So, we don't need to unset PKG_CONFIG_SYSROOT_DIR in wrappers. Signed-off-by: Maxin B. John Signed-off-by: Ross Burton --- .../pkgconf/pkgconf/pkg-config-esdk.in | 4 +- .../pkgconf/pkgconf/pkg-config-native.in | 1 - .../pkgconf/pkgconf/pkg-config-wrapper | 9 --- meta/recipes-devtools/pkgconf/pkgconf_1.4.0.bb | 71 ---------------------- meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb | 71 ++++++++++++++++++++++ 5 files changed, 72 insertions(+), 84 deletions(-) delete mode 100644 meta/recipes-devtools/pkgconf/pkgconf_1.4.0.bb create mode 100644 meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in index 4fc9b0a4a7..d4ac71dff2 100644 --- a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in +++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in @@ -5,7 +5,6 @@ if [ "pkg-config-native" = "`basename $0`" ] ; then PKG_CONFIG_PATH="@PATH_NATIVE@" PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" - unset PKG_CONFIG_SYSROOT_DIR else # in this case check if we are in the esdk if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then @@ -16,9 +15,8 @@ else if ( echo $parentpid_info | grep -q check-lxdialog ) ; then PKG_CONFIG_PATH="@PATH_NATIVE@" PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" - unset PKG_CONFIG_SYSROOT_DIR fi fi fi -pkg-config.real "$@" +pkg-config "$@" diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in index 9ed30a0d80..c2e86e5ac1 100644 --- a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in +++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in @@ -1,6 +1,5 @@ #! /bin/sh PKG_CONFIG_PATH="@PATH_NATIVE@" -unset PKG_CONFIG_SYSROOT_DIR pkg-config "$@" diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper index 695f349566..fc9b48803f 100755 --- a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper +++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper @@ -4,13 +4,4 @@ # Copyright (C) 2015 Christopher Larson # License: MIT (see COPYING.MIT at the root of the repository for terms) -for arg; do - case "$arg" in - --variable|--variable=*) - # pkg-config doesn't sysroot-prefix user variables - unset PKG_CONFIG_SYSROOT_DIR - ;; - esac -done - exec pkgconf "$@" diff --git a/meta/recipes-devtools/pkgconf/pkgconf_1.4.0.bb b/meta/recipes-devtools/pkgconf/pkgconf_1.4.0.bb deleted file mode 100644 index 48ba5982e3..0000000000 --- a/meta/recipes-devtools/pkgconf/pkgconf_1.4.0.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks." -DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \ -flags for development frameworks. It is similar to pkg-config from \ -freedesktop.org, providing additional functionality while also maintaining \ -compatibility." -HOMEPAGE = "http://pkgconf.org" -BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues" -SECTION = "devel" -PROVIDES += "pkgconfig" -RPROVIDES_${PN} += "pkgconfig" -DEFAULT_PREFERENCE = "-1" - -# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or -# ISC, but has different wording, so needs its own name. -LICENSE = "pkgconf" -LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0" - -SRC_URI = "\ - https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \ - file://pkg-config-wrapper \ - file://pkg-config-native.in \ - file://pkg-config-esdk.in \ -" -SRC_URI[md5sum] = "c509c0dad5a70aa4bc3210557b7eafce" -SRC_URI[sha256sum] = "1d112ff35dad516ffbfbdb013df3a035140618fe7632ec44ffa894a9c713301b" - -inherit autotools update-alternatives - -EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'" - -do_install_append () { - # Install a wrapper which deals, as much as possible with pkgconf vs - # pkg-config compatibility issues. - install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config" -} - -do_install_append_class-native () { - # Install a pkg-config-native wrapper that will use the native sysroot instead - # of the MACHINE sysroot, for using pkg-config when building native tools. - sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ - < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native - install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native - sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ - -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ - < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk - install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk -} - -ALTERNATIVE_${PN} = "pkg-config" - -# When using the RPM generated automatic package dependencies, some packages -# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by -# specifying an appropriate provide. -RPROVIDES_${PN} += "pkgconfig(pkg-config)" - -# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev -FILES_${PN}-dev_remove = "${datadir}/aclocal" -FILES_${PN} += "${datadir}/aclocal" - -BBCLASSEXTEND += "native nativesdk" - -pkgconf_sstate_fixup_esdk () { - if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then - pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" - mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real - lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config - sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native - fi -} - -SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk" diff --git a/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb b/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb new file mode 100644 index 0000000000..ea7b666021 --- /dev/null +++ b/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb @@ -0,0 +1,71 @@ +SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks." +DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \ +flags for development frameworks. It is similar to pkg-config from \ +freedesktop.org, providing additional functionality while also maintaining \ +compatibility." +HOMEPAGE = "http://pkgconf.org" +BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues" +SECTION = "devel" +PROVIDES += "pkgconfig" +RPROVIDES_${PN} += "pkgconfig" +DEFAULT_PREFERENCE = "-1" + +# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or +# ISC, but has different wording, so needs its own name. +LICENSE = "pkgconf" +LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0" + +SRC_URI = "\ + https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \ + file://pkg-config-wrapper \ + file://pkg-config-native.in \ + file://pkg-config-esdk.in \ +" +SRC_URI[md5sum] = "678d242b4eef1754bba6a58642af10bb" +SRC_URI[sha256sum] = "bab39371d4ab972be1d539a8b10b6cc21f8eafc97f617102e667e82bd32eb234" + +inherit autotools update-alternatives + +EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'" + +do_install_append () { + # Install a wrapper which deals, as much as possible with pkgconf vs + # pkg-config compatibility issues. + install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config" +} + +do_install_append_class-native () { + # Install a pkg-config-native wrapper that will use the native sysroot instead + # of the MACHINE sysroot, for using pkg-config when building native tools. + sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ + < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native + install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native + sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ + -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ + < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk + install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk +} + +ALTERNATIVE_${PN} = "pkg-config" + +# When using the RPM generated automatic package dependencies, some packages +# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by +# specifying an appropriate provide. +RPROVIDES_${PN} += "pkgconfig(pkg-config)" + +# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev +FILES_${PN}-dev_remove = "${datadir}/aclocal" +FILES_${PN} += "${datadir}/aclocal" + +BBCLASSEXTEND += "native nativesdk" + +pkgconf_sstate_fixup_esdk () { + if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then + pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" + mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real + lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config + sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native + fi +} + +SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk" -- cgit 1.2.3-korg