Skip to contentSkip to conversation

svn commit: trunk/buildroot/package: pkgconfig

Buildroot jacmet at uclibc.org 1 participant 1 message Jun 14, 2008

lore
Share & tools
lore
#0 lore raw

Author: jacmet
Date: 2008-06-14 14:00:59 -0700 (Sat, 14 Jun 2008) New Revision: 22339

Log:
pkgconfig: bump version and cleanup

Upgrade to pkgconfig 0.23 which has native sysroot support (buggy, but easily fixable), which allows us to get rid of pkgconfig-filter.sh. At the same time cleanup the makefile.

Added:
trunk/buildroot/package/pkgconfig/pkg-config-0.23-fix-sysroot.patch

Removed:
trunk/buildroot/package/pkgconfig/configure.patch trunk/buildroot/package/pkgconfig/glibconfig-sysdefs.patch trunk/buildroot/package/pkgconfig/pkgconfig-filter.sh

Modified:
trunk/buildroot/package/Makefile.in
trunk/buildroot/package/pkgconfig/pkgconfig.mk

Changeset:
Modified: trunk/buildroot/package/Makefile.in
===================================================================

buildroot/package/Makefile.in +1 -3
@@ -226,11 +226,9 @@
 		NM_FOR_TARGET="$(TARGET_NM)" \
 		DEFAULT_ASSEMBLER="$(TARGET_AS)" \
 		DEFAULT_LINKER="$(TARGET_LD)" \
-		PKG_CONFIG_SYSROOT="$(STAGING_DIR)" \
+		PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
 		PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" \
 		PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
-		PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
-		PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
 		STAGING_DIR="$(STAGING_DIR)"
 
 HOST_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \

Deleted: trunk/buildroot/package/pkgconfig/configure.patch
===================================================================

buildroot/package/pkgconfig/configure.patch +0 -331

331 lines not on this page · raw message

Deleted: trunk/buildroot/package/pkgconfig/glibconfig-sysdefs.patch
===================================================================

buildroot/package/pkgconfig/glibconfig-sysdefs.patch +0 -9
@@ -1,9 +0,0 @@
---- pkgconfig/glib-1.2.8/null	2006-05-22 05:44:12.000000000 -0600
-+++ pkgconfig/glib-1.2.8/glibconfig-sysdefs.h	2006-06-29 11:18:04.000000000 -0600
-@@ -0,0 +1,6 @@
-+#define GLIB_SYSDEF_POLLIN =1
-+#define GLIB_SYSDEF_POLLOUT =4
-+#define GLIB_SYSDEF_POLLPRI =2
-+#define GLIB_SYSDEF_POLLERR =8
-+#define GLIB_SYSDEF_POLLHUP =16
-+#define GLIB_SYSDEF_POLLNVAL =32

Added: trunk/buildroot/package/pkgconfig/pkg-config-0.23-fix-sysroot.patch
===================================================================

buildroot/package/pkgconfig/pkg-config-0.23-fix-sysroot.patch +34 -0
@@ -0,0 +1,34 @@
+[PATCH] fix PKG_CONFIG_SYSROOT_DIR handling
+
+With PKG_CONFIG_SYSROOT_DIR enabled, everything else than -L and -I words
+gets stripped away.
+
+Signed-off-by: Peter Korsgaard <[email protected]>
+---
+ pkg.c |    8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+Index: pkg-config-0.23/pkg.c
+===================================================================
+--- pkg-config-0.23.orig/pkg.c
++++ pkg-config-0.23/pkg.c
+@@ -472,17 +472,13 @@
+   while (tmp != NULL)
+     {
+       char *tmpstr = (char*) tmp->data;
+-      if (pcsysrootdir != NULL)
++      if (pcsysrootdir != NULL && tmpstr[0] == '-' &&
++          (tmpstr[1] == 'I' || tmpstr[1] == 'L'))
+ 	{
+-	  if (tmpstr[0] == '-' &&
+-	      (tmpstr[1] == 'I' ||
+-	       tmpstr[1] == 'L'))
+-	    {
+ 	      g_string_append_c (str, '-');
+ 	      g_string_append_c (str, tmpstr[1]);
+ 	      g_string_append (str, pcsysrootdir);
+ 	      g_string_append (str, tmpstr+2);
+-	    }
+ 	}
+       else 
+ 	{

Deleted: trunk/buildroot/package/pkgconfig/pkgconfig-filter.sh
===================================================================

buildroot/package/pkgconfig/pkgconfig-filter.sh +0 -28
@@ -1,28 +0,0 @@
-#!/bin/bash
-# filter the output from pkg-config (renamed as pkg-config.real)
-# and ensures PKG_CONFIG_SYSROOT is prepended to all paths
-
-set -o pipefail
-
-CMD=$0
-
-if [ ! "$PKG_CONFIG_SYSROOT" ]; then
-	echo "pkg-config-filter: missing \$PKG_CONFIG_SYSROOT environment variable"
-	exit 2
-fi
-
-export PKG_CONFIG_LIBDIR
-export PKG_CONFIG_PATH
-
-if $CMD.real $* |
-	sed -e "s~\-L/*$PKG_CONFIG_SYSROOT/*~-L=/~g; s~\-I/*$PKG_CONFIG_SYSROOT/*~-I=/~g;" |
-	sed -e "s~\-L/~-L=/~g; s~\-I/~-I=/~g;" |
-	sed -e "s~\-L\=~-L$PKG_CONFIG_SYSROOT~g; s~\-I\=~-I$PKG_CONFIG_SYSROOT~g;"
-then
-	#echo "PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >&2
-	#echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >&2
-	#echo "OKAY" >&2;
-	exit 0;
-else
-	exit $?
-fi

Modified: trunk/buildroot/package/pkgconfig/pkgconfig.mk
===================================================================

buildroot/package/pkgconfig/pkgconfig.mk +3 -16
@@ -3,7 +3,7 @@
 # pkgconfig
 #
 #############################################################
-PKGCONFIG_VERSION:=0.21
+PKGCONFIG_VERSION:=0.23
 PKGCONFIG_SOURCE:=pkg-config-$(PKGCONFIG_VERSION).tar.gz
 PKGCONFIG_SITE:=http://pkgconfig.freedesktop.org/releases/
 PKGCONFIG_DIR:=$(BUILD_DIR)/pkg-config-$(PKGCONFIG_VERSION)
@@ -25,17 +25,8 @@
 	(cd $(PKGCONFIG_DIR); rm -rf config.cache; \
 		./configure \
 		--prefix=/usr \
-		--exec-prefix=/usr \
-		--bindir=/usr/bin \
-		--sbindir=/usr/sbin \
-		--libdir=/lib \
-		--libexecdir=/usr/lib \
 		--sysconfdir=/etc \
-		--datadir=/usr/share \
-		--localstatedir=/var \
-		--mandir=/usr/man \
-		--infodir=/usr/info \
-		--with-pc-path="$(STAGING_DIR)/lib/pkgconfig:$(STAGING_DIR)/usr/lib/pkgconfig" \
+		--with-pc-path="$(STAGING_DIR)/usr/lib/pkgconfig" \
 		$(DISABLE_NLS) \
 		$(DISABLE_LARGEFILE) \
 	)
@@ -46,11 +37,7 @@
 
 $(STAGING_DIR)/$(PKGCONFIG_TARGET_BINARY): $(PKGCONFIG_DIR)/$(PKGCONFIG_BINARY)
 	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(PKGCONFIG_DIR) install
-	mv $(STAGING_DIR)/usr/bin/pkg-config $(STAGING_DIR)/usr/bin/pkg-config.real
-	cp package/pkgconfig/pkgconfig-filter.sh $(STAGING_DIR)/usr/bin/pkg-config
-	mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
-	rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
-		$(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc
+	rm -rf $(STAGING_DIR)/usr/share/man
 
 pkgconfig: uclibc $(STAGING_DIR)/$(PKGCONFIG_TARGET_BINARY)