diff options
Diffstat (limited to 'external/libxml2')
-rw-r--r-- | external/libxml2/ExternalPackage_libxml2.mk | 28 | ||||
-rw-r--r-- | external/libxml2/ExternalProject_libxml2.mk | 53 | ||||
-rw-r--r-- | external/libxml2/Makefile | 7 | ||||
-rw-r--r-- | external/libxml2/Module_libxml2.mk | 18 | ||||
-rw-r--r-- | external/libxml2/README | 1 | ||||
-rw-r--r-- | external/libxml2/UnpackedTarball_libxml2.mk | 27 | ||||
-rw-r--r-- | external/libxml2/libxml2-android.patch | 11 | ||||
-rw-r--r-- | external/libxml2/libxml2-global-symbols.patch | 59 | ||||
-rw-r--r-- | external/libxml2/libxml2-icu-sym.patch.0 | 37 | ||||
-rw-r--r-- | external/libxml2/libxml2-icu.patch.0 | 33 | ||||
-rw-r--r-- | external/libxml2/libxml2-vc10.patch | 12 | ||||
-rw-r--r-- | external/libxml2/xml2-config.in | 28 |
12 files changed, 314 insertions, 0 deletions
diff --git a/external/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk new file mode 100644 index 000000000..6338fb20b --- /dev/null +++ b/external/libxml2/ExternalPackage_libxml2.mk @@ -0,0 +1,28 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,libxml2,libxml2)) + +$(eval $(call gb_ExternalPackage_use_external_project,libxml2,libxml2)) + +ifneq ($(DISABLE_DYNLOADING),TRUE) +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.2.dylib,.libs/libxml2.2.dylib)) +else ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,.libs/libxml2.dll)) +else # COM=MSC +$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll)) +endif +else # OS!=WNT +$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.10.$(LIBXML_VERSION_MICRO))) +endif +endif # DISABLE_DYNLOADING + +# vim: set noet sw=4 ts=4: diff --git a/external/libxml2/ExternalProject_libxml2.mk b/external/libxml2/ExternalProject_libxml2.mk new file mode 100644 index 000000000..7bb2b5895 --- /dev/null +++ b/external/libxml2/ExternalProject_libxml2.mk @@ -0,0 +1,53 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,libxml2)) + +$(eval $(call gb_ExternalProject_register_targets,libxml2,\ + build \ +)) + +ifeq ($(OS),EMSCRIPTEN) +$(call gb_ExternalProject_use_external_project,libxml2,icu) +endif + +ifeq ($(OS),WNT) +$(call gb_ExternalProject_use_external_project,libxml2,icu) + +$(eval $(call gb_ExternalProject_use_nmake,libxml2,build)) + +$(call gb_ExternalProject_get_state_target,libxml2,build): + $(call gb_Trace_StartRange,libxml2,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + cscript /e:javascript configure.js \ + iconv=no icu=yes sax1=yes $(if $(MSVC_USE_DEBUG_RUNTIME),run_debug=yes cruntime=/MDd) \ + $(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes) \ + && nmake \ + ,win32) + $(call gb_Trace_EndRange,libxml2,EXTERNAL) +else # OS!=WNT +$(call gb_ExternalProject_get_state_target,libxml2,build): + $(call gb_Trace_StartRange,libxml2,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(gb_RUN_CONFIGURE) ./configure --disable-ipv6 --without-python --without-zlib --with-sax1 \ + --without-lzma \ + $(if $(debug),--with-run-debug) \ + $(gb_CONFIGURE_PLATFORMS) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \ + LDFLAGS="$(call gb_ExternalProject_get_link_flags,libxml2) $(if $(SYSBASE),-L$(SYSBASE)/usr/lib)" \ + CFLAGS="$(CFLAGS) \ + $(if $(SYSBASE),-I$(SYSBASE)/usr/include) \ + $(call gb_ExternalProject_get_build_flags,libxml2)" \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ + && $(MAKE) \ + ) + $(call gb_Trace_EndRange,libxml2,EXTERNAL) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libxml2/Makefile b/external/libxml2/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/libxml2/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/libxml2/Module_libxml2.mk b/external/libxml2/Module_libxml2.mk new file mode 100644 index 000000000..31a90fadd --- /dev/null +++ b/external/libxml2/Module_libxml2.mk @@ -0,0 +1,18 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,libxml2)) + +$(eval $(call gb_Module_add_targets,libxml2,\ + ExternalPackage_libxml2 \ + ExternalProject_libxml2 \ + UnpackedTarball_libxml2 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libxml2/README b/external/libxml2/README new file mode 100644 index 000000000..12d96977c --- /dev/null +++ b/external/libxml2/README @@ -0,0 +1 @@ +Gnome xml parser library written in C, from [http://xmlsoft.org/] diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk new file mode 100644 index 000000000..8c81c3d26 --- /dev/null +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -0,0 +1,27 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,libxml2)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) + +$(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ + external/libxml2/libxml2-global-symbols.patch \ + external/libxml2/libxml2-vc10.patch \ + $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \ + $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \ + external/libxml2/libxml2-icu-sym.patch.0, \ + external/libxml2/libxml2-icu.patch.0) \ +)) + +$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libxml2/libxml2-android.patch b/external/libxml2/libxml2-android.patch new file mode 100644 index 000000000..acf9b17e0 --- /dev/null +++ b/external/libxml2/libxml2-android.patch @@ -0,0 +1,11 @@ +--- misc/libxml2-2.7.6/Makefile.in ++++ misc/build/libxml2-2.7.6/Makefile.in +@@ -1635,7 +1635,7 @@ + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-local + check: check-recursive +-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \ ++all-am: Makefile $(LTLIBRARIES) \ + config.h + install-binPROGRAMS: install-libLTLIBRARIES + diff --git a/external/libxml2/libxml2-global-symbols.patch b/external/libxml2/libxml2-global-symbols.patch new file mode 100644 index 000000000..cfec9c530 --- /dev/null +++ b/external/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 @@ + xmlPopOutputCallbacks; + } LIBXML2_2.9.8; + ++# 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/external/libxml2/libxml2-icu-sym.patch.0 b/external/libxml2/libxml2-icu-sym.patch.0 new file mode 100644 index 000000000..aac9d09ef --- /dev/null +++ b/external/libxml2/libxml2-icu-sym.patch.0 @@ -0,0 +1,37 @@ +Find bundled ICU in workdir and use debug .libs when needed + +diff -up win32/Makefile.msvc.dt win32/Makefile.msvc +--- win32/Makefile.msvc.dt 2014-07-18 19:00:23.372103963 +0200 ++++ win32/Makefile.msvc 2014-07-18 19:01:39.347982929 +0200 +@@ -46,6 +46,7 @@ CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT" + CC = cl.exe + CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W3 /wd4244 /wd4267 $(CRUNTIME) + CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX) ++CFLAGS = $(CFLAGS) /I$(WORKDIR)/UnpackedTarball/icu/source/i18n /I$(WORKDIR)/UnpackedTarball/icu/source/common + !if "$(WITH_THREADS)" != "no" + CFLAGS = $(CFLAGS) /D "_REENTRANT" + !endif +@@ -62,7 +63,9 @@ + # The linker and its options. + LD = link.exe + LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION) ++LDFLAGS = $(LDFLAGS) /LIBPATH:$(WORKDIR)/UnpackedTarball/icu/source/lib + LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) ++LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF + LIBS = + !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1" + LIBS = $(LIBS) wsock32.lib ws2_32.lib +@@ -74,9 +77,13 @@ + !if "$(STATIC)" == "1" + LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib + !else ++!if "$(WITH_RUN_DEBUG)" == "1" ++LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib ++!else + LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib + !endif + !endif ++!endif + !if "$(WITH_ZLIB)" == "1" + # could be named differently zdll or zlib + # LIBS = $(LIBS) zdll.lib diff --git a/external/libxml2/libxml2-icu.patch.0 b/external/libxml2/libxml2-icu.patch.0 new file mode 100644 index 000000000..b390b03d8 --- /dev/null +++ b/external/libxml2/libxml2-icu.patch.0 @@ -0,0 +1,33 @@ +Find bundled ICU in workdir and use debug .libs when needed + +diff -up win32/Makefile.msvc.dt win32/Makefile.msvc +--- win32/Makefile.msvc.dt 2014-07-18 19:00:23.372103963 +0200 ++++ win32/Makefile.msvc 2014-07-18 19:01:39.347982929 +0200 +@@ -45,6 +45,7 @@ CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT" + CC = cl.exe + CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W3 /wd4244 /wd4267 $(CRUNTIME) + CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX) ++CFLAGS = $(CFLAGS) /I$(WORKDIR)/UnpackedTarball/icu/source/i18n /I$(WORKDIR)/UnpackedTarball/icu/source/common + !if "$(WITH_THREADS)" != "no" + CFLAGS = $(CFLAGS) /D "_REENTRANT" + !endif +@@ -67,6 +68,7 @@ CFLAGS = $(CFLAGS) $(SOLARINC) + # The linker and its options. + LD = link.exe + LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION) ++LDFLAGS = $(LDFLAGS) /LIBPATH:$(WORKDIR)/UnpackedTarball/icu/source/lib + LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) + LIBS = + !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1" +@@ -78,7 +78,11 @@ LIBS = $(LIBS) wsock32.lib ws2_32.lib + !if "$(STATIC)" == "1" + LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib + !else ++!if "$(WITH_RUN_DEBUG)" == "1" ++LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib ++!else + LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib ++!endif + !endif + !endif + !if "$(WITH_ZLIB)" == "1" diff --git a/external/libxml2/libxml2-vc10.patch b/external/libxml2/libxml2-vc10.patch new file mode 100644 index 000000000..15bc4d973 --- /dev/null +++ b/external/libxml2/libxml2-vc10.patch @@ -0,0 +1,12 @@ +Add SOLARINC, and disable SSE2 default for MSVC2012 + +--- build/libxml2-2.7.6/win32/Makefile.msvc.old 2010-09-20 20:22:41.500000000 +0200 ++++ build/libxml2-2.7.6/win32/Makefile.msvc 2010-09-20 20:23:00.250000000 +0200 +@@ -59,6 +59,7 @@ + CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H" + !endif + CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE ++CFLAGS = $(CFLAGS) $(SOLARINC) + + # The linker and its options. + LD = link.exe diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in new file mode 100644 index 000000000..164508e47 --- /dev/null +++ b/external/libxml2/xml2-config.in @@ -0,0 +1,28 @@ +#! /bin/sh + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case "$1" in + --version) + echo @VERSION@ + exit 0 + ;; + --cflags) + cflags="$LIBXML_CFLAGS" + ;; + --libs) + libs="$LIBXML_LIBS" + ;; + esac + shift +done + +if test -n "$cflags$libs"; then + echo $cflags $libs +fi + +exit 0 |