From 2ffde7b17192f76f815ab451f08164519f69887e Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 12 Oct 2012 12:28:11 -0700 Subject: gbuildification of expat Two different xmlparse libraries are created: ascii_expat_xmlparse and expat_xmlparse. One without -DXML_UNICODE and one with. Source file are duplicated and renamed with gb_UnpackedTarball_set_post_action function to be able to add artifacts twice to gbuild machinery. On windows 64 bit additional two librares are created: expat_xmlparse_x64 and expat_xmltok_x64. That is due the problem with shell/shlxthandler (comment): ------------------------------------------------------ use UNICODE only because shell/shlxthandler doesn't link against ascii_expat_xmlparse ------------------------------------------------------ Include files are delivered to $(OUTDIR)/inc/external/expat now and not to $(OUTDIR)/inc/external any more. set_include call is added in RepositoryExternal.mk. To define dependency between StaticLibrary and ExternalProject new function was introduced: gb_StaticLibrary_use_external_project. Change-Id: I3b3aa40f39ef82c70f6f28790b582c83e48bdf76 --- Makefile.top | 2 +- RepositoryExternal.mk | 18 ++++- config_host.mk.in | 1 + configure.ac | 2 + expat/ExternalPackage_expat.mk | 17 +++++ expat/ExternalProject_expat.mk | 24 +++++++ expat/Makefile | 7 ++ expat/Module_expat.mk | 48 +++++++++++++ expat/StaticLibrary_ascii_expat_xmlparse.mk | 49 +++++++++++++ expat/StaticLibrary_expat_xmlparse.mk | 53 ++++++++++++++ expat/StaticLibrary_expat_xmlparse_x64.mk | 32 +++++++++ expat/StaticLibrary_expat_xmltok.mk | 50 +++++++++++++ expat/StaticLibrary_expat_xmltok_x64.mk | 33 +++++++++ expat/UnpackedTarball_expat.mk | 33 +++++++++ expat/expat-2.1.0.patch | 107 ++++------------------------ expat/makefile.mk | 69 ------------------ expat/prj/build.lst | 3 +- expat/prj/d.lst | 15 ---- expat/prj/dmake | 0 ooo.lst.in | 2 +- shell/Library_ooofilt_x64.mk | 2 +- shell/Library_propertyhdl_x64.mk | 2 +- shell/Library_shlxthdl_x64.mk | 2 +- shell/StaticLibrary_xmlparser_x64.mk | 2 +- solenv/gbuild/LinkTarget.mk | 14 ++++ solenv/gbuild/StaticLibrary.mk | 2 + solenv/gbuild/platform/WNT_INTEL_MSC.mk | 3 +- 27 files changed, 402 insertions(+), 190 deletions(-) create mode 100644 expat/ExternalPackage_expat.mk create mode 100644 expat/ExternalProject_expat.mk create mode 100644 expat/Makefile create mode 100644 expat/Module_expat.mk create mode 100644 expat/StaticLibrary_ascii_expat_xmlparse.mk create mode 100644 expat/StaticLibrary_expat_xmlparse.mk create mode 100644 expat/StaticLibrary_expat_xmlparse_x64.mk create mode 100644 expat/StaticLibrary_expat_xmltok.mk create mode 100644 expat/StaticLibrary_expat_xmltok_x64.mk create mode 100644 expat/UnpackedTarball_expat.mk delete mode 100644 expat/makefile.mk delete mode 100644 expat/prj/dmake diff --git a/Makefile.top b/Makefile.top index aa1e25f515cd..68bbbd1bc8fb 100644 --- a/Makefile.top +++ b/Makefile.top @@ -73,6 +73,7 @@ editeng\ embeddedobj\ embedserv\ eventattacher\ +expat\ extensions\ extras\ fileaccess\ @@ -210,7 +211,6 @@ cppunit\ crashrep\ curl\ epm\ -expat\ external\ gdk-pixbuf\ gettext\ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 11440feabc7d..5847c4672ee1 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -237,11 +237,18 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ ascii_expat_xmlparse \ expat_xmlparse \ expat_xmltok \ + expat_xmlparse_x64 \ + expat_xmltok_x64 \ )) define gb_LinkTarget__use_expat $(if $(2),,$(error gb_LinkTarget__use_expat needs additional parameter)) +$(call gb_LinkTarget_set_include,$(1),\ + -I$(OUTDIR)/inc/external/expat \ + $$(INCLUDE) \ +) + $(if $(filter-out ascii_expat_xmlparse,$(2)),\ $(call gb_LinkTarget_add_defs,$(1),\ -DXML_UNICODE \ @@ -249,7 +256,7 @@ $(if $(filter-out ascii_expat_xmlparse,$(2)),\ $(call gb_LinkTarget_use_static_libraries,$(1),\ $(2) \ - expat_xmltok \ + $(3)\ ) endef @@ -258,12 +265,17 @@ endif # SYSTEM_EXPAT # now define 2 wrappers that select which internal static library to use... define gb_LinkTarget__use_expat_utf8 -$(call gb_LinkTarget__use_expat,$(1),ascii_expat_xmlparse) +$(call gb_LinkTarget__use_expat,$(1),ascii_expat_xmlparse,expat_xmltok) endef define gb_LinkTarget__use_expat_utf16 -$(call gb_LinkTarget__use_expat,$(1),expat_xmlparse) +$(call gb_LinkTarget__use_expat,$(1),expat_xmlparse,expat_xmltok) + +endef + +define gb_LinkTarget__use_expat_utf16_x64 +$(call gb_LinkTarget__use_expat,$(1),expat_xmlparse_x64,expat_xmltok_x64) endef diff --git a/config_host.mk.in b/config_host.mk.in index 5a2317247590..ad5f8f98ee5a 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -523,6 +523,7 @@ export JFREEREPORT_LIBREPOSITORY_TARBALL=@JFREEREPORT_LIBREPOSITORY_TARBALL@ export JFREEREPORT_LIBSERIALIZER_TARBALL=@JFREEREPORT_LIBSERIALIZER_TARBALL@ export JFREEREPORT_FLOW_ENGINE_TARBALL=@JFREEREPORT_FLOW_ENGINE_TARBALL@ export JFREEREPORT_LIBLAYOUT_TARBALL=@JFREEREPORT_LIBLAYOUT_TARBALL@ +export EXPAT_TARBALL=@EXPAT_TARBALL@ export SAL_ENABLE_FILE_LOCKING=1 export SCPDEFS=@SCPDEFS@ export SERVLETAPI_JAR=@SERVLETAPI_JAR@ diff --git a/configure.ac b/configure.ac index e67a81727d0d..6fc40f38b470 100644 --- a/configure.ac +++ b/configure.ac @@ -6926,9 +6926,11 @@ if test "$with_system_expat" = "yes"; then else AC_MSG_RESULT([internal]) SYSTEM_EXPAT=NO + EXPAT_TARBALL="dd7dab7a5fea97d2a6a43f511449b7cd-expat-2.1.0.tar.gz" BUILD_TYPE="$BUILD_TYPE EXPAT" fi AC_SUBST(SYSTEM_EXPAT) +AC_SUBST(EXPAT_TARBALL) AC_SUBST([MINGW_EXPAT_DLL]) dnl =================================================================== diff --git a/expat/ExternalPackage_expat.mk b/expat/ExternalPackage_expat.mk new file mode 100644 index 000000000000..d969cb4c5d3e --- /dev/null +++ b/expat/ExternalPackage_expat.mk @@ -0,0 +1,17 @@ +# -*- 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,expat_inc,expat)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,expat_inc,inc/external/expat,\ + lib/expat.h \ + lib/expat_external.h \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/ExternalProject_expat.mk b/expat/ExternalProject_expat.mk new file mode 100644 index 000000000000..d02e2013d673 --- /dev/null +++ b/expat/ExternalProject_expat.mk @@ -0,0 +1,24 @@ +# -*- 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,expat)) + +$(eval $(call gb_ExternalProject_use_unpacked,expat,expat)) + +$(eval $(call gb_ExternalProject_register_targets,expat,\ + configure \ +)) + +$(call gb_ExternalProject_get_state_target,expat,configure) : + cd $(EXTERNAL_WORKDIR) \ + && ./configure \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + && touch $@ + +# vim: set noet sw=4 ts=4: diff --git a/expat/Makefile b/expat/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/expat/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/expat/Module_expat.mk b/expat/Module_expat.mk new file mode 100644 index 000000000000..bc68fcb7c6b3 --- /dev/null +++ b/expat/Module_expat.mk @@ -0,0 +1,48 @@ +# -*- 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,expat)) + +ifeq ($(SYSTEM_EXPAT),NO) + +$(eval $(call gb_Module_add_targets,expat,\ + ExternalPackage_expat \ + UnpackedTarball_expat \ + StaticLibrary_ascii_expat_xmlparse \ + StaticLibrary_expat_xmlparse \ + StaticLibrary_expat_xmltok \ +)) + +# Actually it wasn't that clear if we should +# run configure step on mingw or not: +# CONFIGURATION_ACTION wasn't set, but +# CROSS_COMPILE case was handled in original makefile + +# tested it on mingw and it doesn't hurt ;-) +#ifneq ($(OS),WNT) +ifneq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_Module_add_targets,expat,\ + ExternalProject_expat \ +)) +endif + +# ---------------- X64 stuff special --------------------- +# use UNICODE only because shell/shlxthandler +# doesn't link against ascii_expat_xmlparse +#--------------------------------------------------------- +ifeq ($(BUILD_X64),TRUE) +$(eval $(call gb_Module_add_targets,expat,\ + StaticLibrary_expat_xmlparse_x64 \ + StaticLibrary_expat_xmltok_x64 \ +)) +endif + +endif + +# vim: set noet sw=4 ts=4: diff --git a/expat/StaticLibrary_ascii_expat_xmlparse.mk b/expat/StaticLibrary_ascii_expat_xmlparse.mk new file mode 100644 index 000000000000..c0eb92410059 --- /dev/null +++ b/expat/StaticLibrary_ascii_expat_xmlparse.mk @@ -0,0 +1,49 @@ +# -*- 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_StaticLibrary_StaticLibrary,ascii_expat_xmlparse)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,ascii_expat_xmlparse)) + +$(eval $(call gb_StaticLibrary_use_unpacked,ascii_expat_xmlparse,expat)) + +# no configure step on windows, no dependency +ifneq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_StaticLibrary_use_external_project,ascii_expat_xmlparse,expat)) +endif + +$(eval $(call gb_StaticLibrary_set_include,ascii_expat_xmlparse,\ + -I$(call gb_UnpackedTarball_get_dir,expat) \ + $$(INCLUDE) \ +)) + +ifeq ($(OS),MACOSX) +ifneq ($(strip $(SYSBASE)),) +$(eval $(call gb_StaticLibrary_add_defs,ascii_expat_xmlparse,\ + -DHAVE_MEMMOVE \ + -DHAVE_BCOPY \ +)) +endif +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_StaticLibrary_add_defs,ascii_expat_xmlparse,\ + -DCOMPILED_FROM_DSP \ +)) +else +$(eval $(call gb_StaticLibrary_add_defs,ascii_expat_xmlparse,\ + -DHAVE_EXPAT_CONFIG_H \ +)) +endif + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,ascii_expat_xmlparse,\ + UnpackedTarball/expat/lib/xmlparse \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/StaticLibrary_expat_xmlparse.mk b/expat/StaticLibrary_expat_xmlparse.mk new file mode 100644 index 000000000000..39f79d0378d7 --- /dev/null +++ b/expat/StaticLibrary_expat_xmlparse.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_StaticLibrary_StaticLibrary,expat_xmlparse)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat_xmlparse)) + +$(eval $(call gb_StaticLibrary_use_unpacked,expat_xmlparse,expat)) + +# no configure step on windows, no dependency +ifneq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_StaticLibrary_use_external_project,expat_xmlparse,expat)) +endif + +$(eval $(call gb_StaticLibrary_add_defs,expat_xmlparse,\ + -DXML_UNICODE \ +)) + +$(eval $(call gb_StaticLibrary_set_include,expat_xmlparse,\ + -I$(call gb_UnpackedTarball_get_dir,expat) \ + $$(INCLUDE) \ +)) + +ifeq ($(OS),MACOSX) +ifneq ($(strip $(SYSBASE)),) +$(eval $(call gb_StaticLibrary_add_defs,expat_xmlparse,\ + -DHAVE_MEMMOVE \ + -DHAVE_BCOPY \ +)) +endif +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_StaticLibrary_add_defs,expat_xmlparse,\ + -DCOMPILED_FROM_DSP \ +)) +else +$(eval $(call gb_StaticLibrary_add_defs,expat_xmlparse,\ + -DHAVE_EXPAT_CONFIG_H \ +)) +endif + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat_xmlparse,\ + UnpackedTarball/expat/lib/unicode_xmlparse \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/StaticLibrary_expat_xmlparse_x64.mk b/expat/StaticLibrary_expat_xmlparse_x64.mk new file mode 100644 index 000000000000..97cf472eb5ee --- /dev/null +++ b/expat/StaticLibrary_expat_xmlparse_x64.mk @@ -0,0 +1,32 @@ +# -*- 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_StaticLibrary_StaticLibrary,expat_xmlparse_x64)) + +$(eval $(call gb_StaticLibrary_set_x64,expat_xmlparse_x64,YES)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat_xmlparse_x64)) + +$(eval $(call gb_StaticLibrary_use_unpacked,expat_xmlparse_x64,expat)) + +$(eval $(call gb_StaticLibrary_set_include,expat_xmlparse_x64,\ + -I$(call gb_UnpackedTarball_get_dir,expat) \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,expat_xmlparse_x64,\ + -DCOMPILED_FROM_DSP \ + -DXML_UNICODE \ +)) + +$(eval $(call gb_StaticLibrary_add_x64_generated_cobjects,expat_xmlparse_x64,\ + UnpackedTarball/expat/lib/xmlparse_x64 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/StaticLibrary_expat_xmltok.mk b/expat/StaticLibrary_expat_xmltok.mk new file mode 100644 index 000000000000..616884474e1c --- /dev/null +++ b/expat/StaticLibrary_expat_xmltok.mk @@ -0,0 +1,50 @@ +# -*- 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_StaticLibrary_StaticLibrary,expat_xmltok)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat_xmltok)) + +$(eval $(call gb_StaticLibrary_use_unpacked,expat_xmltok,expat)) + +# no configure step on windows, no dependency +ifneq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_StaticLibrary_use_external_project,expat_xmltok,expat)) +endif + +$(eval $(call gb_StaticLibrary_set_include,expat_xmltok,\ + -I$(call gb_UnpackedTarball_get_dir,expat) \ + $$(INCLUDE) \ +)) + +ifeq ($(OS),MACOSX) +ifneq ($(strip $(SYSBASE)),) +$(eval $(call gb_StaticLibrary_add_defs,expat_xmltok,\ + -DHAVE_MEMMOVE \ + -DHAVE_BCOPY \ +)) +endif +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_StaticLibrary_add_defs,expat_xmltok,\ + -DCOMPILED_FROM_DSP \ +)) +else +$(eval $(call gb_StaticLibrary_add_defs,expat_xmltok,\ + -DHAVE_EXPAT_CONFIG_H \ +)) +endif + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat_xmltok,\ + UnpackedTarball/expat/lib/xmltok \ + UnpackedTarball/expat/lib/xmlrole \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/StaticLibrary_expat_xmltok_x64.mk b/expat/StaticLibrary_expat_xmltok_x64.mk new file mode 100644 index 000000000000..e6415340aba5 --- /dev/null +++ b/expat/StaticLibrary_expat_xmltok_x64.mk @@ -0,0 +1,33 @@ +# -*- 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_StaticLibrary_StaticLibrary,expat_xmltok_x64)) + +$(eval $(call gb_StaticLibrary_set_x64,expat_xmltok_x64,YES)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat_xmltok_x64)) + +$(eval $(call gb_StaticLibrary_use_unpacked,expat_xmltok_x64,expat)) + +$(eval $(call gb_StaticLibrary_set_include,expat_xmltok_x64,\ + -I$(call gb_UnpackedTarball_get_dir,expat) \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,expat_xmltok_x64,\ + -DXML_UNICODE \ + -DCOMPILED_FROM_DSP \ +)) + +$(eval $(call gb_StaticLibrary_add_x64_generated_cobjects,expat_xmltok_x64,\ + UnpackedTarball/expat/lib/xmltok_x64 \ + UnpackedTarball/expat/lib/xmlrole_x64 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/UnpackedTarball_expat.mk b/expat/UnpackedTarball_expat.mk new file mode 100644 index 000000000000..ea9d41f125db --- /dev/null +++ b/expat/UnpackedTarball_expat.mk @@ -0,0 +1,33 @@ +# -*- 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,expat)) + +$(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_patches,expat,\ + expat/expat-2.1.0.patch \ +)) + +# This is a bit hackish +# we need to compile it twice: +# with -DXML_UNICODE and without. + +# This is a bit hackish too ;-) +# on windows 64 bit platform we need to link it twice: +# with $(LINK_X64_BINARY) and with $(gb_LINK). +$(eval $(call gb_UnpackedTarball_set_post_action,expat,\ + $(GNUCOPY) lib/xmlparse.c lib/unicode_xmlparse.c \ + $(if $(filter $(BUILD_X64),TRUE), && \ + $(GNUCOPY) lib/xmlparse.c lib/xmlparse_x64.c && \ + $(GNUCOPY) lib/xmltok.c lib/xmltok_x64.c && \ + $(GNUCOPY) lib/xmlrole.c lib/xmlrole_x64.c)\ +)) + +# vim: set noet sw=4 ts=4: diff --git a/expat/expat-2.1.0.patch b/expat/expat-2.1.0.patch index 28d6322d3299..cb85ec5cbe2a 100644 --- a/expat/expat-2.1.0.patch +++ b/expat/expat-2.1.0.patch @@ -1,97 +1,3 @@ ---- misc/expat-2.1.0/lib/makefile.mk Wed Aug 20 14:33:55 2008 -+++ misc/build/expat-2.1.0/lib/makefile.mk Wed Aug 20 14:26:42 2008 -@@ -1 +1,90 @@ --dummy -+#************************************************************************* -+# -+# 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 -+# -+# for a copy of the LGPLv3 License. -+# -+#************************************************************************* -+PRJ=../../../../.. -+ -+PRJNAME=expat -+TARGET=expat -+LIBTARGET=NO -+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE -+VISIBILITY_HIDDEN=TRUE -+ -+# --- Settings ----------------------------------------------------- -+.INCLUDE : settings.mk -+# --- Files -------------------------------------------------------- -+ -+CFLAGS+=-I.. -+ -+.IF "$(OS)"=="WNT" -+CDEFS+=-DCOMPILED_FROM_DSP -+.ELSE -+CDEFS+=-DHAVE_EXPAT_CONFIG_H -+.ENDIF -+ -+.IF "$(OS)"=="MACOSX" && "$(SYSBASE)"!="" -+CDEFS+=-DHAVE_MEMMOVE -DHAVE_BCOPY -+.ENDIF # "$(OS)"=="MACOSX" -+ -+SLOFILES=$(SLO)/xmlparse.obj \ -+ $(SLO)/xmlrole.obj \ -+ $(SLO)/xmltok.obj -+ -+SECOND_BUILD=UNICODE -+UNICODE_SLOFILES=$(SLO)/xmlparse.obj -+UNICODECDEFS+=-DXML_UNICODE -+ -+LIB1ARCHIV=$(LB)/libascii_$(TARGET)_xmlparse.a -+LIB1TARGET=$(SLB)/ascii_$(TARGET)_xmlparse.lib -+LIB1OBJFILES=$(SLO)/xmlparse.obj -+ -+LIB2ARCHIV=$(LB)/lib$(TARGET)_xmlparse.a -+LIB2TARGET=$(SLB)/$(TARGET)_xmlparse.lib -+LIB2OBJFILES =$(REAL_UNICODE_SLOFILES) -+ -+LIB3ARCHIV=$(LB)/lib$(TARGET)_xmltok.a -+LIB3TARGET=$(SLB)/$(TARGET)_xmltok.lib -+LIB3OBJFILES=$(SLO)/xmlrole.obj $(SLO)/xmltok.obj -+ -+.IF "$(BUILD_X64)"!="" -+# ---------------- X64 stuff special --------------------- -+# use UNICODE only because shell/shlxthandler -+# doesn't link against ascii_expat_xmlparse -+#--------------------------------------------------------- -+SLOFILES_X64=$(SLO_X64)/xmlparse.obj \ -+ $(SLO_X64)/xmlrole.obj \ -+ $(SLO_X64)/xmltok.obj -+CDEFS_X64+=-DXML_UNICODE -DCOMPILED_FROM_DSP -+CFLAGS_X64+=-I.. -+LIB1TARGET_X64=$(SLB_X64)/$(TARGET)_xmlparse.lib -+LIB1OBJFILES_X64=$(SLO_X64)/xmlparse.obj -+LIB2TARGET_X64=$(SLB_X64)/$(TARGET)_xmltok.lib -+LIB2OBJFILES_X64=$(SLO_X64)/xmlrole.obj $(SLO_X64)/xmltok.obj -+.ENDIF # "$(BUILD_X64)"!="" -+ -+# --- Targets ------------------------------------------------------ -+.INCLUDE : set_wntx64.mk -+.INCLUDE : target.mk -+.INCLUDE : tg_wntx64.mk --- misc/expat-2.1.0/lib/expat_external.h +++ misc/build/expat-2.1.0/lib/expat_external.h @@ -86,9 +86,11 @@ @@ -182,3 +88,16 @@ #ifdef __cplusplus extern "C" { #endif +--- misc/expat-2.1.0/lib/expat_external.h 2009-11-16 08:53:17.375000000 +0000 ++++ misc/build/expat-2.1.0/lib/expat_external.h 2009-11-16 08:53:34.703125000 +0000 +@@ -7,10 +7,6 @@ + + /* External API definitions */ + +-#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) +-#define XML_USE_MSC_EXTENSIONS 1 +-#endif +- + /* Expat tries very hard to make the API boundary very specifically + defined. There are two macros defined to control this boundary; + each of these can be defined before including this header to diff --git a/expat/makefile.mk b/expat/makefile.mk deleted file mode 100644 index 7deffd66eeab..000000000000 --- a/expat/makefile.mk +++ /dev/null @@ -1,69 +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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=. - -PRJNAME=so_expat -TARGET=so_expat - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(SYSTEM_EXPAT)" == "YES" -all: - @echo "An already available installation of expat should exist on your system." - @echo "Therefore the version provided here does not need to be built in addition." -.ENDIF - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=expat-2.1.0 -TARFILE_MD5=dd7dab7a5fea97d2a6a43f511449b7cd -ADDITIONAL_FILES=lib/makefile.mk -PATCH_FILES=expat-2.1.0.patch \ - expat-winapi.patch - -CONFIGURE_DIR= -.IF "$(OS)"=="WNT" -CONFIGURE_ACTION= -.ELSE -CONFIGURE_ACTION=./configure -.ENDIF - -.IF "$(CROSS_COMPILING)"=="YES" -CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ENDIF - -BUILD_DIR=lib -BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk diff --git a/expat/prj/build.lst b/expat/prj/build.lst index 9ae28720b763..af79e63e5b65 100644 --- a/expat/prj/build.lst +++ b/expat/prj/build.lst @@ -1,3 +1,2 @@ ep expat : soltools NULL -ep expat usr1 - all ep_mkout NULL -ep expat nmake - all ep_expat NULL +ep expat\prj nmake - all ep_expat NULL diff --git a/expat/prj/d.lst b/expat/prj/d.lst index 9b6aa344cf1d..e69de29bb2d1 100644 --- a/expat/prj/d.lst +++ b/expat/prj/d.lst @@ -1,15 +0,0 @@ -mkdir: %_DEST%\inc\external\expat -mkdir: %_DEST%\lib\x64 -..\%__SRC%\misc\build\expat-2.1.0\lib\expat.h %_DEST%\inc\external\expat.h -..\%__SRC%\misc\build\expat-2.1.0\lib\expat_external.h %_DEST%\inc\external\expat_external.h -..\%__SRC%\slb\expat_xmltok.lib %_DEST%\lib\expat_xmltok.lib -..\%__SRC%\slb\expat_xmlparse.lib %_DEST%\lib\expat_xmlparse.lib -..\%__SRC%\slb\ascii_expat_xmlparse.lib %_DEST%\lib\ascii_expat_xmlparse.lib -..\%__SRC%\lib\libexpat_xmltok.a %_DEST%\lib\libexpat_xmltok.a -..\%__SRC%\lib\libexpat_xmlparse.a %_DEST%\lib\libexpat_xmlparse.a -..\%__SRC%\lib\libascii_expat_xmlparse.a %_DEST%\lib\libascii_expat_xmlparse.a -..\%__SRC%\misc\_ooo_st_expat_xmltok.pdb %_DEST%\lib\_ooo_st_expat_xmltok.pdb -..\%__SRC%\misc\_ooo_st_expat_xmlparse.pdb %_DEST%\lib\_ooo_st_expat_xmlparse.pdb -..\%__SRC%\slb\x64\expat_xmltok.lib %_DEST%\lib\x64\expat_xmltok.lib -..\%__SRC%\slb\x64\expat_xmlparse.lib %_DEST%\lib\x64\expat_xmlparse.lib - diff --git a/expat/prj/dmake b/expat/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/ooo.lst.in b/ooo.lst.in index b2fd401847c6..b9143488ad60 100644 --- a/ooo.lst.in +++ b/ooo.lst.in @@ -25,7 +25,7 @@ d70951c80dabecc2892c919ff5d07172-db-4.7.25.NC-custom.tar.gz e0707ff896045731ff99e99799606441-README_db-4.7.25.NC-custom.txt e81c2f0953aa60f8062c05a4673f2be0-Python-2.6.1.tar.bz2 e61d0364a30146aaa3001296f853b2b9-libxslt-1.1.26.tar.gz -dd7dab7a5fea97d2a6a43f511449b7cd-expat-2.1.0.tar.gz +@EXPAT_TARBALL@ fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz @POSTGRESQL_TARBALL@ diff --git a/shell/Library_ooofilt_x64.mk b/shell/Library_ooofilt_x64.mk index 9c3cb655758d..7ea310914c8b 100644 --- a/shell/Library_ooofilt_x64.mk +++ b/shell/Library_ooofilt_x64.mk @@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_defs,ooofilt_x64,\ )) $(eval $(call gb_Library_use_externals,ooofilt_x64,\ - expat_utf16 \ + expat_utf16_x64 \ zlib \ )) diff --git a/shell/Library_propertyhdl_x64.mk b/shell/Library_propertyhdl_x64.mk index f12ba0c29af6..5b07b4c4ee36 100644 --- a/shell/Library_propertyhdl_x64.mk +++ b/shell/Library_propertyhdl_x64.mk @@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_defs,propertyhdl_x64,\ )) $(eval $(call gb_Library_use_externals,propertyhdl_x64,\ - expat_utf16 \ + expat_utf16_x64 \ zlib \ )) diff --git a/shell/Library_shlxthdl_x64.mk b/shell/Library_shlxthdl_x64.mk index e5deaa9cc46e..0d70683044c6 100644 --- a/shell/Library_shlxthdl_x64.mk +++ b/shell/Library_shlxthdl_x64.mk @@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_defs,shlxthdl_x64,\ )) $(eval $(call gb_Library_use_externals,shlxthdl_x64,\ - expat_utf16 \ + expat_utf16_x64 \ zlib \ )) diff --git a/shell/StaticLibrary_xmlparser_x64.mk b/shell/StaticLibrary_xmlparser_x64.mk index 2f5f510bdd94..bbf7a4a40207 100644 --- a/shell/StaticLibrary_xmlparser_x64.mk +++ b/shell/StaticLibrary_xmlparser_x64.mk @@ -35,7 +35,7 @@ $(eval $(call gb_StaticLibrary_set_include,shell_xmlparser_x64,\ )) $(eval $(call gb_StaticLibrary_use_externals,shell_xmlparser_x64,\ - expat_utf16 \ + expat_utf16_x64 \ )) $(eval $(call gb_StaticLibrary_add_x64_generated_exception_objects,shell_xmlparser_x64,\ diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 57b3a70d1e25..ba91d4ae4ff6 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -1047,6 +1047,12 @@ define gb_LinkTarget_add_generated_cobjects $(foreach obj,$(2),$(call gb_LinkTarget_add_generated_c_object,$(1),$(obj),$(3),$(4))) endef +#only useful for building x64 libraries on windows +define gb_LinkTarget_add_x64_generated_cobjects +$(foreach obj,$(2),$(call gb_LinkTarget_add_generated_c_object,$(1),$(obj),$(3),$(4))) +$(foreach obj,$(2),$(eval $(call gb_GenCObject_get_target,$(obj)) : COBJECT_X64 := YES)) +endef + define gb_LinkTarget_add_generated_cxxobjects $(foreach obj,$(2),$(call gb_LinkTarget_add_generated_cxx_object,$(1),$(obj),$(3))) endef @@ -1155,6 +1161,14 @@ $(call gb_LinkTarget_get_external_headers_target,$(1)) :| $(call gb_UnpackedTarb endef +# Use artifacts from ExternalProject (i. e. configure) of an external project +# example in expat: StaticLibrary depends on ExternalProject outcome +define gb_LinkTarget_use_external_project +$(call gb_LinkTarget_get_external_headers_target,$(1)) :| $(call gb_ExternalProject_get_target,$(2)) + +endef + + # this forwards to functions that must be defined in RepositoryExternal.mk. # $(eval $(call gb_LinkTarget_use_external,library,external)) define gb_LinkTarget_use_external diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk index e1e0fc51e066..4c68af6e82e5 100644 --- a/solenv/gbuild/StaticLibrary.mk +++ b/solenv/gbuild/StaticLibrary.mk @@ -82,6 +82,7 @@ $(eval $(foreach method,\ add_x64_generated_exception_objects \ add_noexception_objects \ add_generated_cobjects \ + add_x64_generated_cobjects \ add_generated_cxxobjects \ add_generated_exception_objects \ add_cflags \ @@ -114,6 +115,7 @@ $(eval $(foreach method,\ use_package \ use_packages \ use_unpacked \ + use_external_project \ use_static_libraries \ add_sdi_headers \ set_warnings_not_errors \ diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk index 1b618aa326b3..c8f99025c88a 100644 --- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk @@ -267,7 +267,7 @@ $(call gb_Output_announce,$(2).c,$(true),C ,3) $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) $(dir $(4)) && \ unset INCLUDE && \ - $(gb_CC) \ + $(if $(filter YES,$(COBJECT_X64)), $(CXX_X64_BINARY), $(gb_CC)) \ $(DEFS) \ $(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \ $(T_CFLAGS) \ @@ -276,6 +276,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(gb_COMPILERDEPFLAGS) \ -I$(dir $(3)) \ $(INCLUDE) \ + $(if $(filter YES,$(COBJECT_X64)), -U_X86_ -D_AMD64_,) \ -c $(3) \ -Fo$(1)) $(call gb_create_deps,$(4),$(1),$(3)) endef -- cgit