From c61fc95d2deb7924357f73ef1cd4b42bba956376 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 2 Jun 2008 08:56:39 +0000 Subject: pkgconfig: sync with poky * pkgconfig 0.23 added, disabled by default * fiddled with 0.22 SRC_URI to to keep the .inc sane --- .../pkgconfig/pkgconfig-0.22/sysroot-support.patch | 102 --------------------- packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch | 102 +++++++++++++++++++++ packages/pkgconfig/pkgconfig-native_0.23.bb | 8 ++ packages/pkgconfig/pkgconfig-sdk_0.23.bb | 5 - packages/pkgconfig/pkgconfig.inc | 5 +- packages/pkgconfig/pkgconfig_0.22.bb | 1 - packages/pkgconfig/pkgconfig_0.23.bb | 6 ++ 7 files changed, 119 insertions(+), 110 deletions(-) delete mode 100644 packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch create mode 100644 packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch create mode 100644 packages/pkgconfig/pkgconfig-native_0.23.bb create mode 100644 packages/pkgconfig/pkgconfig_0.23.bb (limited to 'packages/pkgconfig') diff --git a/packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch b/packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch deleted file mode 100644 index 2e4f796cc9..0000000000 --- a/packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch +++ /dev/null @@ -1,102 +0,0 @@ -Add support for PKG_CONFIG_SYSROOT_DIR to pkgconfig - ---- - main.c | 5 ++++- - pkg-config.1 | 9 +++++++++ - pkg.c | 14 +++++++++++++- - pkg.h | 3 +++ - 4 files changed, 29 insertions(+), 2 deletions(-) - -Index: pkg-config-0.22/main.c -=================================================================== ---- pkg-config-0.22.orig/main.c 2007-09-14 10:20:15.000000000 +0100 -+++ pkg-config-0.22/main.c 2007-09-14 10:22:41.000000000 +0100 -@@ -46,6 +46,8 @@ - static int want_debug_spew = 0; - static int want_verbose_errors = 0; - static int want_stdout_errors = 0; -+char *pcsysrootdir = NULL; -+ - - void - debug_spew (const char *format, ...) -@@ -196,7 +198,7 @@ main (int argc, char **argv) - GString *str; - GSList *packages = NULL; - char *search_path; -- char *pcbuilddir; -+ char *pcbuilddir; - const char *pkglibdir; - char **search_dirs; - char **iter; -@@ -345,6 +347,7 @@ main (int argc, char **argv) - } - } - #endif -+ pcsysrootdir = getenv ("PKG_CONFIG_SYSROOT_DIR"); - - pcbuilddir = getenv ("PKG_CONFIG_TOP_BUILD_DIR"); - if (pcbuilddir) -Index: pkg-config-0.22/pkg.c -=================================================================== ---- pkg-config-0.22.orig/pkg.c 2007-09-14 10:20:15.000000000 +0100 -+++ pkg-config-0.22/pkg.c 2007-09-14 10:22:41.000000000 +0100 -@@ -479,11 +479,23 @@ string_list_to_string (GSList *list) - GSList *tmp; - GString *str = g_string_new (""); - char *retval; -+ int offset=0; - - tmp = list; - while (tmp != NULL) - { -- g_string_append (str, tmp->data); -+ if (pcsysrootdir != NULL) -+ { -+ if (!strncmp(tmp->data,"-I",2) || -+ !strncmp(tmp->data,"-L",2)) -+ { -+ offset=2; -+ g_string_append_c (str,((char*)tmp->data)[0]); -+ g_string_append_c (str,((char*)tmp->data)[1]); -+ g_string_append (str,pcsysrootdir); -+ } -+ } -+ g_string_append (str, tmp->data+offset); - g_string_append_c (str, ' '); - - tmp = g_slist_next (tmp); -Index: pkg-config-0.22/pkg-config.1 -=================================================================== ---- pkg-config-0.22.orig/pkg-config.1 2007-09-14 10:20:15.000000000 +0100 -+++ pkg-config-0.22/pkg-config.1 2007-09-14 10:23:08.000000000 +0100 -@@ -260,6 +260,15 @@ Don't strip -I/usr/include out of cflags - Don't strip -L/usr/lib out of libs - - .TP -+.I "PKG_CONFIG_SYSROOT_DIR" -+Modify -I and -L to use the directories located in target sysroot. -+this option is usefull when crosscompiling package that use pkg-config -+to determine CFLAGS anf LDFLAGS. -I and -L are modified to point to -+the new system root. this means that a -I/usr/include/libfoo will -+become -I/var/target/usr/include/libfoo with a PKG_CONFIG_SYSROOT_DIR -+equal to /var/target (same rule apply to -L) -+ -+.TP - .I "PKG_CONFIG_LIBDIR" - Replaces the default \fIpkg-config\fP search directory. - -Index: pkg-config-0.22/pkg.h -=================================================================== ---- pkg-config-0.22.orig/pkg.h 2007-09-14 10:20:15.000000000 +0100 -+++ pkg-config-0.22/pkg.h 2007-09-14 10:22:41.000000000 +0100 -@@ -123,6 +123,9 @@ void disable_private_libs(void); - /* If TRUE, do not automatically prefer uninstalled versions */ - extern gboolean disable_uninstalled; - -+/* string that contain environment */ -+extern char* pcsysrootdir; -+ - #ifdef G_OS_WIN32 - /* If TRUE, do not automatically define "prefix" while - * parsing each .pc file */ diff --git a/packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch b/packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch new file mode 100644 index 0000000000..2e4f796cc9 --- /dev/null +++ b/packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch @@ -0,0 +1,102 @@ +Add support for PKG_CONFIG_SYSROOT_DIR to pkgconfig + +--- + main.c | 5 ++++- + pkg-config.1 | 9 +++++++++ + pkg.c | 14 +++++++++++++- + pkg.h | 3 +++ + 4 files changed, 29 insertions(+), 2 deletions(-) + +Index: pkg-config-0.22/main.c +=================================================================== +--- pkg-config-0.22.orig/main.c 2007-09-14 10:20:15.000000000 +0100 ++++ pkg-config-0.22/main.c 2007-09-14 10:22:41.000000000 +0100 +@@ -46,6 +46,8 @@ + static int want_debug_spew = 0; + static int want_verbose_errors = 0; + static int want_stdout_errors = 0; ++char *pcsysrootdir = NULL; ++ + + void + debug_spew (const char *format, ...) +@@ -196,7 +198,7 @@ main (int argc, char **argv) + GString *str; + GSList *packages = NULL; + char *search_path; +- char *pcbuilddir; ++ char *pcbuilddir; + const char *pkglibdir; + char **search_dirs; + char **iter; +@@ -345,6 +347,7 @@ main (int argc, char **argv) + } + } + #endif ++ pcsysrootdir = getenv ("PKG_CONFIG_SYSROOT_DIR"); + + pcbuilddir = getenv ("PKG_CONFIG_TOP_BUILD_DIR"); + if (pcbuilddir) +Index: pkg-config-0.22/pkg.c +=================================================================== +--- pkg-config-0.22.orig/pkg.c 2007-09-14 10:20:15.000000000 +0100 ++++ pkg-config-0.22/pkg.c 2007-09-14 10:22:41.000000000 +0100 +@@ -479,11 +479,23 @@ string_list_to_string (GSList *list) + GSList *tmp; + GString *str = g_string_new (""); + char *retval; ++ int offset=0; + + tmp = list; + while (tmp != NULL) + { +- g_string_append (str, tmp->data); ++ if (pcsysrootdir != NULL) ++ { ++ if (!strncmp(tmp->data,"-I",2) || ++ !strncmp(tmp->data,"-L",2)) ++ { ++ offset=2; ++ g_string_append_c (str,((char*)tmp->data)[0]); ++ g_string_append_c (str,((char*)tmp->data)[1]); ++ g_string_append (str,pcsysrootdir); ++ } ++ } ++ g_string_append (str, tmp->data+offset); + g_string_append_c (str, ' '); + + tmp = g_slist_next (tmp); +Index: pkg-config-0.22/pkg-config.1 +=================================================================== +--- pkg-config-0.22.orig/pkg-config.1 2007-09-14 10:20:15.000000000 +0100 ++++ pkg-config-0.22/pkg-config.1 2007-09-14 10:23:08.000000000 +0100 +@@ -260,6 +260,15 @@ Don't strip -I/usr/include out of cflags + Don't strip -L/usr/lib out of libs + + .TP ++.I "PKG_CONFIG_SYSROOT_DIR" ++Modify -I and -L to use the directories located in target sysroot. ++this option is usefull when crosscompiling package that use pkg-config ++to determine CFLAGS anf LDFLAGS. -I and -L are modified to point to ++the new system root. this means that a -I/usr/include/libfoo will ++become -I/var/target/usr/include/libfoo with a PKG_CONFIG_SYSROOT_DIR ++equal to /var/target (same rule apply to -L) ++ ++.TP + .I "PKG_CONFIG_LIBDIR" + Replaces the default \fIpkg-config\fP search directory. + +Index: pkg-config-0.22/pkg.h +=================================================================== +--- pkg-config-0.22.orig/pkg.h 2007-09-14 10:20:15.000000000 +0100 ++++ pkg-config-0.22/pkg.h 2007-09-14 10:22:41.000000000 +0100 +@@ -123,6 +123,9 @@ void disable_private_libs(void); + /* If TRUE, do not automatically prefer uninstalled versions */ + extern gboolean disable_uninstalled; + ++/* string that contain environment */ ++extern char* pcsysrootdir; ++ + #ifdef G_OS_WIN32 + /* If TRUE, do not automatically define "prefix" while + * parsing each .pc file */ diff --git a/packages/pkgconfig/pkgconfig-native_0.23.bb b/packages/pkgconfig/pkgconfig-native_0.23.bb new file mode 100644 index 0000000000..c4028ab43c --- /dev/null +++ b/packages/pkgconfig/pkgconfig-native_0.23.bb @@ -0,0 +1,8 @@ +require pkgconfig.inc +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}" + +DEFAULT_PREFERENCE = "-1" + +S = "${WORKDIR}/pkg-config-${PV}/" +inherit native +DEPENDS = "" diff --git a/packages/pkgconfig/pkgconfig-sdk_0.23.bb b/packages/pkgconfig/pkgconfig-sdk_0.23.bb index 8c40f04e10..3b20371777 100644 --- a/packages/pkgconfig/pkgconfig-sdk_0.23.bb +++ b/packages/pkgconfig/pkgconfig-sdk_0.23.bb @@ -1,11 +1,6 @@ require pkgconfig.inc FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}" -SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \ - file://autofoo.patch;patch=1 \ - file://sysrootfix.patch;patch=1 \ - file://glibconfig-sysdefs.h" - S = "${WORKDIR}/pkg-config-${PV}/" inherit sdk DEPENDS = "" diff --git a/packages/pkgconfig/pkgconfig.inc b/packages/pkgconfig/pkgconfig.inc index 77c9e1c5a5..939199bc37 100644 --- a/packages/pkgconfig/pkgconfig.inc +++ b/packages/pkgconfig/pkgconfig.inc @@ -5,10 +5,11 @@ It replaces the ubiquitous *-config scripts you may have \ seen with a single tool." HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/" LICENSE = "GPL" -PR = "r2" +PR = "r7" SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \ - file://sysroot-support.patch;patch=1 \ + file://autofoo.patch;patch=1 \ + file://sysrootfix.patch;patch=1 \ file://glibconfig-sysdefs.h" S = "${WORKDIR}/pkg-config-${PV}/" diff --git a/packages/pkgconfig/pkgconfig_0.22.bb b/packages/pkgconfig/pkgconfig_0.22.bb index 599e1c815e..a0f5241a12 100644 --- a/packages/pkgconfig/pkgconfig_0.22.bb +++ b/packages/pkgconfig/pkgconfig_0.22.bb @@ -1,3 +1,2 @@ require pkgconfig.inc -SRC_URI += "file://autofoo.patch;patch=1" diff --git a/packages/pkgconfig/pkgconfig_0.23.bb b/packages/pkgconfig/pkgconfig_0.23.bb new file mode 100644 index 0000000000..154e302844 --- /dev/null +++ b/packages/pkgconfig/pkgconfig_0.23.bb @@ -0,0 +1,6 @@ +require pkgconfig.inc + +DEFAULT_PREFERENCE = "-1" + +DEPENDS += "glib-2.0" +EXTRA_OECONF = "--with-installed-glib" -- cgit v1.2.3