diff options
author | Peter Foley <pefoley2@verizon.net> | 2013-02-05 17:19:11 -0500 |
---|---|---|
committer | Peter Foley <pefoley2@verizon.net> | 2013-02-07 22:33:16 +0000 |
commit | b9d6c7a48cbe3573a2010811d8671d3e5ff30e2a (patch) | |
tree | b08989fd5eeb63691f914e8b393d80151588c0f7 /libxml2 | |
parent | 7e2f34a3172a756a0fd70cae1294250206945a6e (diff) |
convert libxml2 to gbuild and add to tail_build
Change-Id: Ie6ae2150e1f011e17034abcace18c5967b4dacf5
Reviewed-on: https://gerrit.libreoffice.org/2023
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Peter Foley <pefoley2@verizon.net>
Diffstat (limited to 'libxml2')
-rw-r--r-- | libxml2/ExternalPackage_xml2.mk | 43 | ||||
-rw-r--r-- | libxml2/ExternalProject_xml2.mk | 51 | ||||
-rw-r--r-- | libxml2/Makefile | 7 | ||||
-rw-r--r-- | libxml2/Module_libxml2.mk | 22 | ||||
-rw-r--r-- | libxml2/UnpackedTarball_xml2.mk | 27 | ||||
-rw-r--r-- | libxml2/libxml2-configure.patch | 2 | ||||
-rw-r--r-- | libxml2/libxml2-vc10.patch | 12 | ||||
-rw-r--r-- | libxml2/makefile.mk | 178 | ||||
-rw-r--r-- | libxml2/prj/build.lst | 3 | ||||
-rw-r--r-- | libxml2/prj/d.lst | 13 | ||||
-rw-r--r-- | libxml2/prj/dmake | 0 |
11 files changed, 162 insertions, 196 deletions
diff --git a/libxml2/ExternalPackage_xml2.mk b/libxml2/ExternalPackage_xml2.mk new file mode 100644 index 000000000000..7eafa376a107 --- /dev/null +++ b/libxml2/ExternalPackage_xml2.mk @@ -0,0 +1,43 @@ +# -*- 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,xml2,xml2)) + +$(eval $(call gb_ExternalPackage_use_external_project,xml2,xml2)) + +ifneq ($(COM),MSC) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/xml2-config,xml2-config)) +endif + +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.2.dylib,.libs/libxml2.2.7.6.dylib)) +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.dylib,.libs/libxml2.2.7.6.dylib)) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/xmllint,.libs/xmllint)) +else ifeq ($(DISABLE_DYNLOADING),TRUE) +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.a,libxml2/.libs/libxml2.a)) +ifneq ($(CROSS_COMPILING),YES) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/xmllint,.libs/xmllint)) +endif +else ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.dll.a,.libs/libxml2.dll.a)) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/libxml2.dll,.libs/libxml2.dll)) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/xmllint.exe,.libs/xmllint.exe)) +else # COM=MSC +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.lib,win32/bin.msvc/libxml2.lib)) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/libxml2.dll,win32/bin.msvc/libxml2.dll)) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/xmllint.exe,win32/bin.msvc/xmllint.exe)) +endif +else # OS!=WNT +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.so.2.7.6,.libs/libxml2.so.2.7.6)) +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.so.2,.libs/libxml2.so.2.7.6)) +$(eval $(call gb_ExternalPackage_add_file,xml2,lib/libxml2.so,.libs/libxml2.so.2.7.6)) +$(eval $(call gb_ExternalPackage_add_file,xml2,bin/xmllint,.libs/xmllint)) +endif +# vim: set noet sw=4 ts=4: diff --git a/libxml2/ExternalProject_xml2.mk b/libxml2/ExternalProject_xml2.mk new file mode 100644 index 000000000000..cce11cd969d9 --- /dev/null +++ b/libxml2/ExternalProject_xml2.mk @@ -0,0 +1,51 @@ +# -*- 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,xml2)) + +$(eval $(call gb_ExternalProject_use_unpacked,xml2,xml2)) + +$(eval $(call gb_ExternalProject_register_targets,xml2,\ + build \ +)) +ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(call gb_ExternalProject_get_state_target,xml2,build): + cd $(EXTERNAL_WORKDIR) \ + && ./configure --disable-ipv6 --without-python --without-zlib \ + --disable-static --without-debug lt_cv_cc_dll_switch="-shared" \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \ + LIBS="-lws2_32 $(if $(filter YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \ + LDFLAGS="-Wl,--no-undefined -Wl,--enable-runtime-pseudo-reloc-v2" \ + OBJDUMP=objdump \ + && $(MAKE) \ + && touch $@ +else # COM=MSC +$(call gb_ExternalProject_get_state_target,xml2,build): + cd $(EXTERNAL_WORKDIR)/win32 \ + && cscript configure.js iconv=no sax1=yes \ + && unset MAKEFLAGS \ + && LIB="$(ILIB)" nmake \ + && touch $@ +endif +else # OS!=WNT +$(call gb_ExternalProject_get_state_target,xml2,build): + cd $(EXTERNAL_WORKDIR) \ + && ./configure --disable-ipv6 --without-python --without-zlib --with-sax1 \ + $(if $(debug),--with-mem-debug --with-run-debug) \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + LDFLAGS="$(if $(SYSBASE),-L$(SYSBASE)/usr/lib)" \ + CFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(if $(debug),-g)" \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ + && $(MAKE) \ + && touch $@ +endif +# vim: set noet sw=4 ts=4: diff --git a/libxml2/Makefile b/libxml2/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/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/libxml2/Module_libxml2.mk b/libxml2/Module_libxml2.mk new file mode 100644 index 000000000000..b02934dfa1f1 --- /dev/null +++ b/libxml2/Module_libxml2.mk @@ -0,0 +1,22 @@ +# -*- 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)) + +ifeq ($(SYSTEM_LIBXML),NO) + +$(eval $(call gb_Module_add_targets,libxml2,\ + ExternalPackage_xml2 \ + ExternalProject_xml2 \ + UnpackedTarball_xml2 \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/libxml2/UnpackedTarball_xml2.mk b/libxml2/UnpackedTarball_xml2.mk new file mode 100644 index 000000000000..a417111dc84c --- /dev/null +++ b/libxml2/UnpackedTarball_xml2.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,xml2)) + +$(eval $(call gb_UnpackedTarball_set_tarball,xml2,$(LIBXML_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_patches,xml2,\ + libxml2/libxml2-configure.patch \ + libxml2/libxml2-gnome599717.patch \ + libxml2/libxml2-xpath.patch \ + libxml2/libxml2-global-symbols.patch \ + libxml2/libxml2-aix.patch \ + libxml2/libxml2-vc10.patch \ + libxml2/libxml2-latin.patch \ + $(if $(filter ANDROID,$(OS)),libxml2/libxml2-android.patch) \ + $(if $(filter WNT,$(OS)),libxml2/libxml2-long-path.patch \ + $(if $(filter GCC,$(COM)),libxml2/libxml2-mingw.patch)) \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/libxml2/libxml2-configure.patch b/libxml2/libxml2-configure.patch index d13d55e83ce7..125f6c052063 100644 --- a/libxml2/libxml2-configure.patch +++ b/libxml2/libxml2-configure.patch @@ -99,7 +99,7 @@ + +prefix=${SOLARVERSION}/${INPATH} +exec_prefix=${SOLARVERSION}/${INPATH} -+includedir=${SOLARVERSION}/${INPATH}/inc${UPDMINOREXT}/external ++includedir=${WORKDIR}/UnpackedTarball/xml2/include +libdir=${SOLARVERSION}/${INPATH}/lib${UPDMINOREXT} usage() diff --git a/libxml2/libxml2-vc10.patch b/libxml2/libxml2-vc10.patch index 54d12f19c484..f29858029b27 100644 --- a/libxml2/libxml2-vc10.patch +++ b/libxml2/libxml2-vc10.patch @@ -1,5 +1,13 @@ ---- misc/build/libxml2-2.7.6/win32/Makefile.msvc.old 2010-09-20 20:22:41.500000000 +0200 -+++ misc/build/libxml2-2.7.6/win32/Makefile.msvc 2010-09-20 20:23:00.250000000 +0200 +--- 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_ZLIB_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 @@ -91,8 +91,12 @@ LDFLAGS = $(LDFLAGS) /DEBUG !else diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk deleted file mode 100644 index 070d500f6b4b..000000000000 --- a/libxml2/makefile.mk +++ /dev/null @@ -1,178 +0,0 @@ -#************************************************************************* -# -# 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-gnome599717.patch \ - libxml2-xpath.patch \ - libxml2-global-symbols.patch \ - libxml2-aix.patch \ - libxml2-vc10.patch \ - libxml2-latin.patch - -.IF "$(OS)" == "WNT" -PATCH_FILES+= libxml2-long-path.patch -.IF "$(COM)"=="GCC" -PATCH_FILES+= libxml2-mingw.patch -.ENDIF -.ENDIF - -.IF "$(OS)"=="ANDROID" -PATCH_FILES+= libxml2-android.patch -.ENDIF - -# 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+=$(MINGW_SHARED_LIBSTDCPP) -.ENDIF -CONFIGURE_DIR= -CONFIGURE_ACTION=.$/configure -.IF "$(CROSS_COMPILING)"=="YES" -BUILD_AND_HOST=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ELSE -BUILD_AND_HOST=--build=i586-pc-mingw32 --host=i586-pc-mingw32 -.ENDIF -.IF "$(ILIB)" == "" -CONF_ILIB= -.ELSE -CONF_ILIB=-L$(ILIB:s/;/ -L/) -.ENDIF -CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --without-debug $(BUILD_AND_HOST) lt_cv_cc_dll_switch="-shared" CC="$(xml2_CC)" LDFLAGS="-Wl,--no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 $(CONF_ILIB)" LIBS="$(xml2_LIBS)" OBJDUMP=objdump -BUILD_ACTION=$(GNUMAKE) -BUILD_FLAGS+= -j$(EXTMAXPROCESS) -BUILD_DIR=$(CONFIGURE_DIR) -.ELSE -CONFIGURE_DIR=win32 -CONFIGURE_ACTION=cscript configure.js -CONFIGURE_FLAGS=iconv=no sax1=yes -BUILD_ACTION=nmake -BUILD_DIR=$(CONFIGURE_DIR) -.ENDIF -.ELSE - -.IF "$(debug)" != "" -xml2_CFLAGS+=-g -.ELSE -xml2_CFLAGS+=-O -.ENDIF - -xml2_CFLAGS+=$(ARCH_FLAGS) - -.IF "$(SYSBASE)"!="" -xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include -.IF "$(COMNAME)"=="sunpro5" -xml2_CFLAGS+=$(C_RESTRICTIONFLAGS) -.ENDIF # "$(COMNAME)"=="sunpro5" -xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib -.ENDIF # "$(SYSBASE)"!="" - -CONFIGURE_DIR= -CONFIGURE_ACTION=.$/configure -.IF "$(DISABLE_DYNLOADING)" == "TRUE" -CONFIGURE_FLAGS=--disable-shared -.ELSE -CONFIGURE_FLAGS=--disable-static -.ENDIF -CONFIGURE_FLAGS+=--enable-ipv6=no --without-python --without-zlib --with-sax1=yes CFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)" -BUILD_ACTION=$(GNUMAKE) -BUILD_FLAGS+= -j$(EXTMAXPROCESS) -BUILD_DIR=$(CONFIGURE_DIR) -.IF "$(debug)"!="" -CONFIGURE_FLAGS+=--with-mem-debug --with-run-debug -.ENDIF -.IF "$(OS)" == "MACOSX" -CONFIGURE_FLAGS += \ - --prefix=/@.__________________________________________________$(EXTRPATH) -.END -.IF "$(CROSS_COMPILING)"=="YES" -CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ENDIF -.ENDIF - - -OUTDIR2INC=include$/libxml - -.IF "$(OS)"=="MACOSX" -EXTRPATH=URELIB -OUT2LIB+=.libs$/libxml2.*.dylib -OUT2BIN_NONE+=.libs$/xmllint -OUT2BIN+=xml2-config -.ELIF "$(DISABLE_DYNLOADING)" == "TRUE" -OUT2LIB+=.libs$/libxml2.a -OUT2BIN+=xml2-config -.ELIF "$(OS)"=="WNT" -.IF "$(COM)"=="GCC" -OUT2LIB+=.libs$/libxml2*.a -OUT2BIN+=.libs$/xmllint.exe -OUT2BIN+=xml2-config -.ELSE -OUT2LIB+=win32$/bin.msvc$/libxml2.lib -OUT2BIN+=win32$/bin.msvc$/libxml2.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 index 01d9b3fdee1b..18dd671ab066 100644 --- a/libxml2/prj/build.lst +++ b/libxml2/prj/build.lst @@ -1,3 +1,2 @@ lx libxml2 : soltools NULL -lx libxml2 usr1 - all lx_mkout NULL -lx libxml2 nmake - all lx_libxml2 NULL +lx libxml2\prj nmake - all lx_libxml2 NULL diff --git a/libxml2/prj/d.lst b/libxml2/prj/d.lst index d5e98d445ddb..e69de29bb2d1 100644 --- a/libxml2/prj/d.lst +++ b/libxml2/prj/d.lst @@ -1,13 +0,0 @@ -mkdir: %_DEST%\inc\external\libxml -..\%__SRC%\inc\libxml\*.h %_DEST%\inc\external\libxml\*.h -..\%__SRC%\lib\libxml2.so.2 %_DEST%\lib\libxml2.so.2 -symlink: %_DEST%\lib\libxml2.so.2 %_DEST%\lib\libxml2.so -..\%__SRC%\lib\libxml2.2.dylib %_DEST%\lib\libxml2.2.dylib -symlink: %_DEST%\lib\libxml2.2.dylib %_DEST%\lib\libxml2.dylib -..\%__SRC%\lib\libxml2.so %_DEST%\lib\libxml2.so -..\%__SRC%\lib\*.lib %_DEST%\lib -..\%__SRC%\lib\libxml2.dll.a %_DEST%\lib\libxml2.dll.a -..\%__SRC%\lib\libxml2.a %_DEST%\lib\libxml2.a -..\%__SRC%\bin\*.dll %_DEST%\bin -..\%__SRC%\bin\xmllint* %_DEST%\bin -..\%__SRC%\bin\xml2-config* %_DEST%\bin diff --git a/libxml2/prj/dmake b/libxml2/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/libxml2/prj/dmake +++ /dev/null |