summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-01-08 15:23:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-10 23:43:11 +0000
commit4bb69608bb81c44853729d7bb8fc9ddf75bf32c4 (patch)
treeea4592a8747fd78eee79ab886a4d1728d435de51 /meta
parentb5fbf48b62e48c849cc09d952d2cdbd066089aaf (diff)
downloadpoky-4bb69608bb81c44853729d7bb8fc9ddf75bf32c4.tar.gz
pkgconfig: add -native script that uses the native sysroot instead of target
pkg-config-native is useful when building a package for the target that needs to compile a build-time tool, to avoid having to hard-code many paths. (From OE-Core rev: b15e22beed948f79b6ae953df7b889f3e70588b9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig.inc10
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in7
2 files changed, 17 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
index c54e325ec7..c4fa456e92 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
@@ -15,6 +15,7 @@ DEPENDS_class-nativesdk = ""
15SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \ 15SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \
16 file://autofoo.patch \ 16 file://autofoo.patch \
17 file://glibconfig-sysdefs.h \ 17 file://glibconfig-sysdefs.h \
18 file://pkg-config-native.in \
18 file://disable-legacy.patch" 19 file://disable-legacy.patch"
19 20
20S = "${WORKDIR}/pkg-config-${PV}/" 21S = "${WORKDIR}/pkg-config-${PV}/"
@@ -43,3 +44,12 @@ FILES_${PN} += "${datadir}/aclocal/pkg.m4"
43# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by 44# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
44# specifying an appropriate provide. 45# specifying an appropriate provide.
45RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})" 46RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})"
47
48# Install a pkg-config-native wrapper that will use the native sysroot instead
49# of the MACHINE sysroot, for using pkg-config when building native tools.
50do_install_append_class-native () {
51 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
52 -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
53 < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
54 install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
55}
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
new file mode 100644
index 0000000000..5e44bb435c
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
@@ -0,0 +1,7 @@
1#! /bin/sh
2
3PKG_CONFIG_PATH="@PATH_NATIVE@"
4PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
5unset PKG_CONFIG_SYSROOT_DIR
6
7pkg-config "$@"