summaryrefslogtreecommitdiffstats
path: root/patches/libxslt-1.1.24/libxslt-1.1.24-pkgconfig.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/libxslt-1.1.24/libxslt-1.1.24-pkgconfig.diff')
-rw-r--r--patches/libxslt-1.1.24/libxslt-1.1.24-pkgconfig.diff277
1 files changed, 277 insertions, 0 deletions
diff --git a/patches/libxslt-1.1.24/libxslt-1.1.24-pkgconfig.diff b/patches/libxslt-1.1.24/libxslt-1.1.24-pkgconfig.diff
new file mode 100644
index 000000000..1266ac338
--- /dev/null
+++ b/patches/libxslt-1.1.24/libxslt-1.1.24-pkgconfig.diff
@@ -0,0 +1,277 @@
+#
+# Submitted-By: Robert Schwebel, 2005-12-25
+# Committed-By: Robert Schwebel
+#
+# Adapted for 1.1.24 Enrik Berkhan
+#
+# Error:
+#
+# libxslt has a self-built xml2-config mechanism. This patch replaces
+# all the libxml2 detection stuff by proper use of pkg-config. In result
+# this does also work in SYSROOTed environments, with
+# pkg-config-wrapper.
+#
+# Description:
+#
+# -
+#
+# State:
+#
+# discuss with upstream
+#
+
+---
+ configure.in | 124 ++++------------------------------------------
+ libexslt/Makefile.am | 2
+ libxslt/Makefile.am | 2
+ python/Makefile.am | 2
+ tests/plugins/Makefile.am | 4 -
+ xsltproc/Makefile.am | 6 +-
+ 6 files changed, 19 insertions(+), 121 deletions(-)
+
+Index: configure.in
+===================================================================
+--- configure.in.orig 2008-05-13 17:40:31.000000000 +0200
++++ configure.in 2008-12-05 22:35:28.000000000 +0100
+@@ -75,7 +75,7 @@ VERSION=${LIBXSLT_VERSION}
+
+ AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+-# AM_MAINTAINER_MODE
++AM_MAINTAINER_MODE
+
+ AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
+
+@@ -338,115 +338,15 @@ else
+ fi
+ AC_SUBST(WITH_DEBUGGER)
+
++dnl Check for libxml2
+ dnl
+-dnl The following new parameters were added to offer
+-dnl the ability to specify the location of the libxml
+-dnl library during linking and compilation.
+-dnl
+-dnl original work - Mathieu Lacage 30/03/2000
+-dnl some tweaking - David Härdeman 30/10/2001
+-dnl
+-
+-LIBXML_CONFIG_PREFIX=""
+-LIBXML_SRC=""
+-
+-AC_ARG_WITH(libxml-prefix,
+- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
+- LIBXML_CONFIG_PREFIX=$withval
+-)
+-
+-AC_ARG_WITH(libxml-include-prefix,
+- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
+- LIBXML_CFLAGS="-I$withval"
+-)
+-
+-AC_ARG_WITH(libxml-libs-prefix,
+- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
+- LIBXML_LIBS="-L$withval"
+-)
+-
+-AC_ARG_WITH(libxml-src,
+- [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
+- LIBXML_SRC="$withval"
+-)
+-AC_SUBST(LIBXML_SRC)
+-
+-dnl
+-dnl where is xml2-config
+-dnl
+-
+-AC_SUBST(LIBXML_REQUIRED_VERSION)
+-AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
+-if test "x$LIBXML_CONFIG_PREFIX" != "x"
+-then
+- XML_CONFIG=${LIBXML_CONFIG_PREFIX}/bin/xml2-config
+-else
+- XML_CONFIG=xml2-config
+-fi
+-
+-dnl
+-dnl imported from libxml2, c.f. #77827
+-dnl
+-if test "${GCC}" != "yes" ; then
+- case "${host}" in
+- *-*-hpux* )
+- CFLAGS="${CFLAGS} -Wp,-H30000"
+- ;;
+- *-dec-osf* )
+- CFLAGS="${CFLAGS} -ieee"
+- ;;
+- esac
+-else
+- CFLAGS="${CFLAGS} -Wall"
+- case "${host}" in
+- alpha*-*-linux* )
+- CFLAGS="${CFLAGS} -mieee"
+- ;;
+- alpha*-*-osf* )
+- CFLAGS="${CFLAGS} -mieee"
+- ;;
+- esac
+-fi
+-
+-dnl
+-dnl Override other variables if LIBXML_SRC is set
+-dnl
+-
+-if test "x$LIBXML_SRC" != "x"
+-then
+- CWD=`pwd`
+- if cd $LIBXML_SRC
+- then
+- SRC_DIR=`pwd`
+- XML_CONFIG=${SRC_DIR}/xml2-config
+- LIBXML_CFLAGS="-I${SRC_DIR}/include"
+- LIBXML_LIBS="-L${SRC_DIR}"
+- cd $CWD
+- else
+- AC_MSG_ERROR([libxml source dir not found (${LIBXML_SRC}), typo?])
+- fi
+-fi
+-
+-dnl
+-dnl make sure xml2-config is executable,
+-dnl test version and init our variables
+-dnl
+-
+-if ${XML_CONFIG} --libs print > /dev/null 2>&1
+-then
+- XMLVERS=`$XML_CONFIG --version`
+- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
+- then
+- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
+- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
+- AC_MSG_RESULT($XMLVERS found)
+- else
+- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
+- fi
+-else
+- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
+-fi
+-
++PKG_CHECK_MODULES([LIBXML2],
++ [libxml-2.0 >= 2.6.27],
++ [],
++ [AC_MSG_ERROR([*** libxml2 not found by pkg-config on your system])]
++ )
++AC_SUBST(LIBXML2_CFLAGS)
++AC_SUBST(LIBXML2_LIBS)
+
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CPPFLAGS)
+@@ -525,8 +425,6 @@ AC_SUBST(WIN32_EXTRA_LDFLAGS)
+ AC_SUBST(XSLTPROCDV)
+ AC_SUBST(PYTHONSODV)
+ AC_SUBST(XML_CONFIG)
+-AC_SUBST(LIBXML_LIBS)
+-AC_SUBST(LIBXML_CFLAGS)
+ AC_SUBST(PYTHON)
+ AC_SUBST(PYTHON_VERSION)
+ AC_SUBST(PYTHON_INCLUDES)
+@@ -534,7 +432,7 @@ AC_SUBST(PYTHON_SITE_PACKAGES)
+
+ XSLT_LIBDIR='-L${libdir}'
+ XSLT_INCLUDEDIR='-I${includedir}'
+-XSLT_LIBS="-lxslt $LIBXML_LIBS $M_LIBS"
++XSLT_LIBS="-lxslt $LIBXML2_LIBS $M_LIBS"
+ AC_SUBST(XSLT_LIBDIR)
+ AC_SUBST(XSLT_INCLUDEDIR)
+ AC_SUBST(XSLT_LIBS)
+@@ -546,7 +444,7 @@ AC_SUBST(EXSLT_LIBDIR)
+ AC_SUBST(EXSLT_INCLUDEDIR)
+ AC_SUBST(EXSLT_LIBS)
+
+-EXTRA_LIBS="$EXTRA_LIBS $LIBXML_LIBS $M_LIBS"
++EXTRA_LIBS="$EXTRA_LIBS $LIBXML2_LIBS $M_LIBS"
+ AC_SUBST(EXTRA_LIBS)
+
+ AC_SUBST(M_LIBS)
+Index: libexslt/Makefile.am
+===================================================================
+--- libexslt/Makefile.am.orig 2007-01-03 16:11:57.000000000 +0100
++++ libexslt/Makefile.am 2008-12-05 22:35:28.000000000 +0100
+@@ -1,6 +1,6 @@
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libxslt -I$(top_srcdir)/libexslt \
+ -I$(top_builddir) -I$(top_builddir)/libxslt \
+- -I$(top_builddir)/libexslt $(LIBXML_CFLAGS) $(CFLAGS)
++ -I$(top_builddir)/libexslt $(LIBXML2_CFLAGS) $(CFLAGS)
+
+ AM_CFLAGS = $(LIBGCRYPT_CFLAGS)
+
+Index: libxslt/Makefile.am
+===================================================================
+--- libxslt/Makefile.am.orig 2007-01-03 16:11:57.000000000 +0100
++++ libxslt/Makefile.am 2008-12-05 22:41:12.000000000 +0100
+@@ -1,4 +1,4 @@
+-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libxslt $(LIBXML_CFLAGS)
++INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libxslt $(LIBXML2_CFLAGS)
+
+ lib_LTLIBRARIES = libxslt.la
+
+Index: python/Makefile.am
+===================================================================
+--- python/Makefile.am.orig 2007-01-03 16:11:42.000000000 +0100
++++ python/Makefile.am 2008-12-05 22:35:28.000000000 +0100
+@@ -5,7 +5,7 @@ SUBDIRS= . tests
+
+ INCLUDES = \
+ -I$(PYTHON_INCLUDES) \
+- $(LIBXML_CFLAGS) \
++ $(LIBXML2_CFLAGS) \
+ -I$(top_srcdir)/libxslt \
+ -I$(top_srcdir) \
+ -I../libexslt
+Index: tests/plugins/Makefile.am
+===================================================================
+--- tests/plugins/Makefile.am.orig 2007-01-03 16:11:47.000000000 +0100
++++ tests/plugins/Makefile.am 2008-12-05 22:35:28.000000000 +0100
+@@ -5,7 +5,7 @@ $(top_builddir)/xsltproc/xsltproc:
+
+ EXTRA_DIST = plugin.out plugin.xml plugin.xsl
+
+-INCLUDES = -I$(top_srcdir) -I../../libxslt $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
++INCLUDES = -I$(top_srcdir) -I../../libxslt $(LIBXML2_CFLAGS) $(LIBXSLT_CFLAGS)
+
+ EXTRA_LTLIBRARIES = xmlsoft_org_xslt_testplugin.la
+
+@@ -14,7 +14,7 @@ EXTRA_LTLIBRARIES = xmlsoft_org_xslt_tes
+
+ plugindir=$(shell pwd)/.libs/
+
+-xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
++xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML2_CFLAGS) $(LIBXSLT_CFLAGS)
+ xmlsoft_org_xslt_testplugin_la_SOURCES = testplugin.c
+ xmlsoft_org_xslt_testplugin_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
+ xmlsoft_org_xslt_testplugin_la_LDFLAGS = -module -avoid-version -rpath $(plugindir)
+Index: xsltproc/Makefile.am
+===================================================================
+--- xsltproc/Makefile.am.orig 2007-01-03 16:11:56.000000000 +0100
++++ xsltproc/Makefile.am 2008-12-05 22:35:28.000000000 +0100
+@@ -1,6 +1,6 @@
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libxslt -I$(top_srcdir)/libexslt \
+ -I$(top_builddir) -I$(top_builddir)/libxslt \
+- -I$(top_builddir)/libexslt $(LIBXML_CFLAGS) $(CFLAGS)
++ -I$(top_builddir)/libexslt $(LIBXML2_CFLAGS) $(CFLAGS)
+
+ EXTRA_PROGRAMS=
+ bin_PROGRAMS = xsltproc $(XSLTPROCDV)
+@@ -17,10 +17,10 @@ DEPS = $(top_builddir)/libxslt/libxslt.l
+ LDADDS = @STATIC_BINARIES@ \
+ $(top_builddir)/libxslt/libxslt.la \
+ $(top_builddir)/libexslt/libexslt.la \
+- @LIBXML_LIBS@ $(EXTRA_LIBS) @WIN32_EXTRA_LIBADD@
++ @LIBXML2_LIBS@ $(EXTRA_LIBS) @WIN32_EXTRA_LIBADD@
+
+ xsltproc_LDADD = $(LIBGCRYPT_LIBS) $(LDADDS)
+
+ xsltproc.dv: xsltproc.o
+- $(CC) $(CFLAGS) -o xsltproc xsltproc.o ../libexslt/.libs/libexslt.a ../libxslt/.libs/libxslt.a @LIBXML_LIBS@ $(EXTRA_LIBS) $(LIBGCRYPT_LIBS)
++ $(CC) $(CFLAGS) -o xsltproc xsltproc.o ../libexslt/.libs/libexslt.a ../libxslt/.libs/libxslt.a @LIBXML2_LIBS@ $(EXTRA_LIBS) $(LIBGCRYPT_LIBS)
+