diff options
-rw-r--r-- | meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in | 24 | ||||
-rw-r--r-- | meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | 16 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in new file mode 100644 index 0000000000..4fc9b0a4a7 --- /dev/null +++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in | |||
@@ -0,0 +1,24 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | # Orignal pkg-config-native action when called as pkg-config-native | ||
4 | # NO Change here | ||
5 | if [ "pkg-config-native" = "`basename $0`" ] ; then | ||
6 | PKG_CONFIG_PATH="@PATH_NATIVE@" | ||
7 | PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" | ||
8 | unset PKG_CONFIG_SYSROOT_DIR | ||
9 | else | ||
10 | # in this case check if we are in the esdk | ||
11 | if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then | ||
12 | parentpid=`ps -o ppid= -p $$` | ||
13 | parentpid_info=`ps -wo comm= -o args= -p $parentpid` | ||
14 | |||
15 | # check if we are being called from the kernel's make menuconfig | ||
16 | if ( echo $parentpid_info | grep -q check-lxdialog ) ; then | ||
17 | PKG_CONFIG_PATH="@PATH_NATIVE@" | ||
18 | PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" | ||
19 | unset PKG_CONFIG_SYSROOT_DIR | ||
20 | fi | ||
21 | fi | ||
22 | fi | ||
23 | |||
24 | pkg-config.real "$@" | ||
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb index e6340218e0..52ef2a9779 100644 --- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | |||
@@ -12,6 +12,7 @@ SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b" | |||
12 | PV = "0.29.2+git${SRCPV}" | 12 | PV = "0.29.2+git${SRCPV}" |
13 | 13 | ||
14 | SRC_URI = "git://anongit.freedesktop.org/pkg-config \ | 14 | SRC_URI = "git://anongit.freedesktop.org/pkg-config \ |
15 | file://pkg-config-esdk.in \ | ||
15 | file://pkg-config-native.in \ | 16 | file://pkg-config-native.in \ |
16 | file://fix-glib-configure-libtool-usage.patch \ | 17 | file://fix-glib-configure-libtool-usage.patch \ |
17 | file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ | 18 | file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ |
@@ -54,4 +55,19 @@ do_install_append_class-native () { | |||
54 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ | 55 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ |
55 | < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native | 56 | < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native |
56 | install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native | 57 | install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native |
58 | sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ | ||
59 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ | ||
60 | < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk | ||
61 | install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk | ||
57 | } | 62 | } |
63 | |||
64 | pkgconfig_sstate_fixup_esdk () { | ||
65 | if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then | ||
66 | pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" | ||
67 | mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real | ||
68 | lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config | ||
69 | sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native | ||
70 | fi | ||
71 | } | ||
72 | |||
73 | SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk" | ||