libxml2: Post process xml2-config file to actually work and bump version
authorDaniel Laird <danieljlaird@hotmail.com>
Thu, 28 Aug 2008 10:56:38 +0000 (10:56 -0000)
committerDaniel Laird <danieljlaird@hotmail.com>
Thu, 28 Aug 2008 10:56:38 +0000 (10:56 -0000)
Version bumped to 2.6.31
(2.6.32 has .rej files so patch target fails - upstream need to be informed).

The xml2-config file in staging dir needs to have prefix / exec-prefix setup
to understand the staging directory location.

This then means that packages that call xml2-config to get include paths/cflags
and libs etc work properly.

This is very similar to what freetype does to freetype-config.

package/libxml2/libxml2.mk

index f01b21f002c50751b80fccf7463ab81db8b988c6..5dceb2faa0ae05475ebb64d847406482caa3e811 100644 (file)
@@ -3,11 +3,9 @@
 # libxml2
 #
 #############################################################
-
-LIBXML2_VERSION = 2.6.29
+LIBXML2_VERSION = 2.6.31
 LIBXML2_SOURCE = libxml2-sources-$(LIBXML2_VERSION).tar.gz
 LIBXML2_SITE = ftp://xmlsoft.org/libxml2
-LIBXML2_AUTORECONF = NO
 LIBXML2_INSTALL_STAGING = YES
 LIBXML2_INSTALL_TARGET = YES
 LIBXML2_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR) install-strip
@@ -26,6 +24,8 @@ LIBXML2_DEPENDENCIES = uclibc
 $(eval $(call AUTOTARGETS,package,libxml2))
 
 $(LIBXML2_HOOK_POST_INSTALL):
+       $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config
+       $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config
        rm -rf $(TARGET_DIR)/usr/share/aclocal \
               $(TARGET_DIR)/usr/share/doc/libxml2-$(LIBXML2_VERSION) \
               $(TARGET_DIR)/usr/share/gtk-doc