summaryrefslogtreecommitdiff
path: root/libxml2
diff options
context:
space:
mode:
Diffstat (limited to 'libxml2')
-rw-r--r--libxml2/libxml2-configure.patch118
-rw-r--r--libxml2/libxml2-global-symbols.patch59
-rw-r--r--libxml2/libxml2-gnome599717.patch20
-rw-r--r--libxml2/libxml2-mingw.patch48
-rw-r--r--libxml2/makefile.mk140
-rw-r--r--libxml2/prj/build.lst3
-rw-r--r--libxml2/prj/d.lst9
7 files changed, 397 insertions, 0 deletions
diff --git a/libxml2/libxml2-configure.patch b/libxml2/libxml2-configure.patch
new file mode 100644
index 000000000000..4158c38ef47f
--- /dev/null
+++ b/libxml2/libxml2-configure.patch
@@ -0,0 +1,118 @@
+--- misc/libxml2-2.7.6/ltmain.sh 2009-10-06 17:39:54.000000000 +0100
++++ misc/build/libxml2-2.7.6/ltmain.sh 2009-12-17 11:43:56.000000000 +0000
+@@ -6271,8 +6271,8 @@
+ ;;
+
+ freebsd-elf)
+- major=".$current"
+- versuffix=".$current"
++ major=.`expr $current - $age`
++ versuffix=".$major.$age.$revision";
+ ;;
+
+ irix | nonstopux)
+--- misc/libxml2-2.7.6/include/libxml/xmlversion.h 2009-12-17 11:45:19.000000000 +0000
++++ misc/build/libxml2-2.7.6/include/libxml/xmlversion.h 2009-12-17 11:45:36.000000000 +0000
+@@ -264,7 +264,7 @@
+ *
+ * Whether iconv support is available
+ */
+-#if 1
++#if 0
+ #define LIBXML_ICONV_ENABLED
+ #endif
+
+@@ -282,7 +282,7 @@
+ *
+ * Whether Debugging module is configured in
+ */
+-#if 1
++#if 0
+ #define LIBXML_DEBUG_ENABLED
+ #endif
+
+@@ -291,7 +291,7 @@
+ *
+ * Whether the memory debugging is configured in
+ */
+-#if 1
++#if 0
+ #define DEBUG_MEMORY_LOCATION
+ #endif
+
+@@ -300,7 +300,7 @@
+ *
+ * Whether the runtime debugging is configured in
+ */
+-#if 1
++#if 0
+ #define LIBXML_DEBUG_RUNTIME
+ #endif
+
+--- misc/libxml2-2.7.6/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
++++ misc/build/libxml2-2.7.6/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
+@@ -1,9 +1,14 @@
+ #! /bin/sh
+
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-includedir=@includedir@
+-libdir=@libdir@
++#prefix=@prefix@
++#exec_prefix=@exec_prefix@
++#includedir=@includedir@
++#libdir=@libdir@
++
++prefix=${SOLARVERSION}/${INPATH}
++exec_prefix=${SOLARVERSION}/${INPATH}
++includedir=${SOLARVERSION}/${INPATH}/inc${UPDMINOREXT}/external
++libdir=${SOLARVERSION}/${INPATH}/lib${UPDMINOREXT}
+
+ usage()
+ {
+@@ -67,7 +72,8 @@
+ ;;
+
+ --cflags)
+- echo @XML_INCLUDEDIR@ @XML_CFLAGS@
++ echo -I${includedir}
++# echo @XML_INCLUDEDIR@ @XML_CFLAGS@
+ ;;
+
+ --libtool-libs)
+@@ -82,19 +88,24 @@
+ ;;
+
+ --libs)
+- if [ "`uname`" = "Linux" ]
+- then
+- if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
+- then
+- echo @XML_LIBS@
+- else
+- echo @XML_LIBDIR@ @XML_LIBS@
+- fi
+- else
+- echo @XML_LIBDIR@ @XML_LIBS@ @WIN32_EXTRA_LIBADD@
+- fi
++ echo -L${libdir} ${LIBXML2LIB} -lm
++# if [ "`uname`" = "Linux" ]
++# then
++# if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
++# then
++# echo @XML_LIBS@
++# else
++# echo @XML_LIBDIR@ @XML_LIBS@
++# fi
++# else
++# echo @XML_LIBDIR@ @XML_LIBS@ @WIN32_EXTRA_LIBADD@
++# fi
+ ;;
+
++ print) # ugly configure hack
++ exit 0
++ ;;
++
+ *)
+ usage
+ exit 1
diff --git a/libxml2/libxml2-global-symbols.patch b/libxml2/libxml2-global-symbols.patch
new file mode 100644
index 000000000000..20cd273d745c
--- /dev/null
+++ b/libxml2/libxml2-global-symbols.patch
@@ -0,0 +1,59 @@
+--- misc/libxml2-2.7.6/libxml2.syms Tue Oct 6 18:31:35 2009
++++ misc/build/libxml2-2.7.6/libxml2.syms Wed Jul 7 15:43:17 2010
+@@ -2184,10 +2184,10 @@
+ } LIBXML2_2.6.27;
+
+ LIBXML2_2.6.29 {
+- global:
++# global:
+
+ # threads
+- xmlDllMain;
++#WIN32 only! xmlDllMain;
+ } LIBXML2_2.6.28;
+
+ LIBXML2_2.6.32 {
+@@ -2231,3 +2231,43 @@
+ xmlXIncludeProcessTreeFlagsData;
+ } LIBXML2_2.7.3;
+
++# HACK: export global variable accessor functions (globals.h)
++LIBXML2_GLOBAL_VARIABLES {
++ global:
++# __xmlMalloc;
++# __xmlMallocAtomic;
++# __xmlRealloc;
++# __xmlFree;
++# __xmlMemStrdup;
++ __docbDefaultSAXHandler;
++ __htmlDefaultSAXHandler;
++ __xmlLastError;
++ __oldXMLWDcompatibility;
++ __xmlBufferAllocScheme;
++ __xmlDefaultBufferSize;
++ __xmlDefaultSAXHandler;
++ __xmlDefaultSAXLocator;
++ __xmlDoValidityCheckingDefaultValue;
++ __xmlGenericError;
++ __xmlStructuredError;
++ __xmlGenericErrorContext;
++ __xmlStructuredErrorContext;
++ __xmlGetWarningsDefaultValue;
++ __xmlIndentTreeOutput;
++ __xmlTreeIndentString;
++ __xmlKeepBlanksDefaultValue;
++ __xmlLineNumbersDefaultValue;
++ __xmlLoadExtDtdDefaultValue;
++ __xmlParserDebugEntities;
++ __xmlParserVersion;
++ __xmlPedanticParserDefaultValue;
++ __xmlSaveNoEmptyTags;
++ __xmlSubstituteEntitiesDefaultValue;
++ __xmlRegisterNodeDefaultValue;
++ __xmlDeregisterNodeDefaultValue;
++ __xmlParserInputBufferCreateFilenameValue;
++ __xmlOutputBufferCreateFilenameValue;
++# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local")
++ local:
++ *;
++} LIBXML2_2.7.4;
diff --git a/libxml2/libxml2-gnome599717.patch b/libxml2/libxml2-gnome599717.patch
new file mode 100644
index 000000000000..cc6617d0e699
--- /dev/null
+++ b/libxml2/libxml2-gnome599717.patch
@@ -0,0 +1,20 @@
+--- misc/libxml2-2.7.6/relaxng.c 2009-12-17 11:53:12.000000000 +0000
++++ misc/build/libxml2-2.7.6/relaxng.c 2009-12-17 16:30:43.000000000 +0000
+@@ -5369,7 +5369,7 @@
+ } else {
+ xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT,
+ "expecting name, anyName, nsName or choice : got %s\n",
+- (node == NULL ? "nothing" : node->name), NULL);
++ (node == NULL ? BAD_CAST "nothing" : node->name), NULL);
+ return (NULL);
+ }
+ if (ret != def) {
+@@ -9459,7 +9459,7 @@
+ ctxt->states = NULL;
+ if (found == 0) {
+ if (cur == NULL) {
+- VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, "noname");
++ VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, BAD_CAST "noname");
+ } else {
+ VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name);
+ }
diff --git a/libxml2/libxml2-mingw.patch b/libxml2/libxml2-mingw.patch
new file mode 100644
index 000000000000..651b0c13f1bb
--- /dev/null
+++ b/libxml2/libxml2-mingw.patch
@@ -0,0 +1,48 @@
+--- misc/libxml2-2.7.6/configure 2008-01-11 17:01:56.000000000 +0900
++++ misc/build/libxml2-2.7.6/configure 2009-09-07 20:48:47.656250000 +0900
+@@ -19914,6 +19914,8 @@
+
+ if test "$with_modules" != "no" ; then
+ case "$host" in
++ *-*-mingw*)
++ ;;
+ *-*-cygwin*)
+ MODULE_EXTENSION=".dll"
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -lcygwin" >&5
+@@ -20632,11 +20636,10 @@
+
+ fi
+ case $host_os in
+- *mingw32*) if test "$THREAD_LIBS" != "-lpthread"; then
++ *mingw32*)
+ WITH_THREADS="1"
+ THREADS_W32="Win32"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
+- fi
+ ;;
+ *cygwin*) THREAD_LIBS=""
+ ;;
+--- misc/libxml2-2.7.6/libxml.h 2007-11-23 19:47:23.000000000 +0900
++++ misc/build/libxml2-2.7.6/libxml.h 2009-07-10 14:37:34.988250000 +0900
+@@ -30,6 +30,10 @@
+ #include <libxml/xmlversion.h>
+ #else
+ #include "config.h"
++#ifdef __MINGW32__
++#undef HAVE_LIBPTHREAD
++#undef HAVE_PTHREAD_H
++#endif
+ #include <libxml/xmlversion.h>
+ #endif
+
+--- misc/libxml2-2.7.6/include/libxml/xmlexports.h 2009-09-25 00:31:59.000000000 +0900
++++ misc/build/libxml2-2.7.6/include/libxml/xmlexports.h 2010-06-06 11:15:54.160750000 +0900
+@@ -113,7 +113,7 @@
+ * _imp__xmlFree listed as missing. Try to workaround the problem
+ * by also making that declaration when compiling client code.
+ */
+- #if !defined(LIBXML_STATIC)
++ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
new file mode 100644
index 000000000000..bef2d43aa6e3
--- /dev/null
+++ b/libxml2/makefile.mk
@@ -0,0 +1,140 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=.
+
+PRJNAME=libxml2
+TARGET=so_libxml2
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+.IF "$(SYSTEM_LIBXML)" == "YES"
+all:
+ @echo "An already available installation of libxml should exist on your system."
+ @echo "Therefore the version provided here does not need to be built in addition."
+.ENDIF
+
+# --- Files --------------------------------------------------------
+
+LIBXML2VERSION=2.7.6
+
+TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
+TARFILE_MD5=7740a8ec23878a2f50120e1faa2730f2
+
+# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
+PATCH_FILES=libxml2-configure.patch \
+ libxml2-mingw.patch \
+ libxml2-gnome599717.patch \
+ libxml2-global-symbols.patch \
+
+
+# This is only for UNX environment now
+
+.IF "$(OS)"=="WNT"
+.IF "$(COM)"=="GCC"
+xml2_CC=$(CC) -mthreads
+.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
+xml2_CC+=-shared-libgcc
+.ENDIF
+xml2_LIBS=-lws2_32
+.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
+xml2_LIBS+=-lstdc++_s
+.ENDIF
+CONFIGURE_DIR=
+CONFIGURE_ACTION=.$/configure
+CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --without-debug --build=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" CC="$(xml2_CC)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 -L$(ILIB:s/;/ -L/)" LIBS="$(xml2_LIBS)" OBJDUMP=objdump
+BUILD_ACTION=$(GNUMAKE)
+BUILD_DIR=$(CONFIGURE_DIR)
+.ELSE
+CONFIGURE_DIR=win32
+CONFIGURE_ACTION=cscript configure.js
+CONFIGURE_FLAGS=iconv=no sax1=yes
+.IF "$(debug)"!=""
+CONFIGURE_FLAGS+=debug=yes
+.ENDIF
+BUILD_ACTION=nmake
+BUILD_DIR=$(CONFIGURE_DIR)
+.ENDIF
+.ELSE
+.IF "$(SYSBASE)"!=""
+xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
+.IF "$(COMNAME)"=="sunpro5"
+xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
+.ENDIF # "$(COMNAME)"=="sunpro5"
+xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
+.ENDIF # "$(SYSBASE)"!=""
+
+.IF "$(OS)$(COM)"=="LINUXGCC"
+xml2_LDFLAGS+=-Wl,-z,noexecstack
+.ENDIF
+
+CONFIGURE_DIR=
+.IF "$(OS)"=="OS2"
+CONFIGURE_ACTION=sh .$/configure
+CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=yes --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
+.ELSE
+CONFIGURE_ACTION=.$/configure
+CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
+.ENDIF
+BUILD_ACTION=$(GNUMAKE)
+BUILD_FLAGS+= -j$(EXTMAXPROCESS)
+BUILD_DIR=$(CONFIGURE_DIR)
+.ENDIF
+
+
+OUTDIR2INC=include$/libxml
+
+.IF "$(OS)"=="MACOSX"
+EXTRPATH=URELIB
+OUT2LIB+=.libs$/libxml2.*.dylib
+OUT2BIN+=.libs$/xmllint
+OUT2BIN+=xml2-config
+.ELIF "$(OS)"=="WNT"
+.IF "$(COM)"=="GCC"
+OUT2LIB+=.libs$/libxml2*.a
+OUT2BIN+=.libs$/libxml2*.dll
+OUT2BIN+=.libs$/xmllint.exe
+OUT2BIN+=xml2-config
+.ELSE
+OUT2LIB+=win32$/bin.msvc$/*.lib
+OUT2BIN+=win32$/bin.msvc$/*.dll
+OUT2BIN+=win32$/bin.msvc$/xmllint.exe
+.ENDIF
+.ELSE
+OUT2LIB+=.libs$/libxml2.so*
+OUT2BIN+=.libs$/xmllint
+OUT2BIN+=xml2-config
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
+
diff --git a/libxml2/prj/build.lst b/libxml2/prj/build.lst
new file mode 100644
index 000000000000..01d9b3fdee1b
--- /dev/null
+++ b/libxml2/prj/build.lst
@@ -0,0 +1,3 @@
+lx libxml2 : soltools NULL
+lx libxml2 usr1 - all lx_mkout NULL
+lx libxml2 nmake - all lx_libxml2 NULL
diff --git a/libxml2/prj/d.lst b/libxml2/prj/d.lst
new file mode 100644
index 000000000000..25be27ae947d
--- /dev/null
+++ b/libxml2/prj/d.lst
@@ -0,0 +1,9 @@
+mkdir: %_DEST%\inc%_EXT%\external\libxml
+..\%__SRC%\inc\libxml\*.h %_DEST%\inc%_EXT%\external\libxml\*.h
+..\%__SRC%\lib\libxml2.so.2 %_DEST%\lib%_EXT%\libxml2.so.2
+symlink: %_DEST%\lib%_EXT%\libxml2.so.2 %_DEST%\lib%_EXT%\libxml2.so
+..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%
+..\%__SRC%\lib\libxml2.dll.a %_DEST%\lib%_EXT%\libxml2.a
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%
+..\%__SRC%\bin\xmllint* %_DEST%\bin%_EXT%
+..\%__SRC%\bin\xml2-config* %_DEST%\bin%_EXT%