[Libreoffice-commits] .: 5 commits - boost/boost.4510.warnings.patch boost/UnpackedTarball_boost.mk config_host.mk.in configure.ac curl/makefile.mk expat/expat-2.1.0.patch expat/ExternalPackage_expat.mk expat/ExternalProject_expat.mk expat/Makefile expat/makefile.mk expat/Module_expat.mk expat/prj expat/StaticLibrary_ascii_expat_xmlparse.mk expat/StaticLibrary_expat_x64.mk expat/StaticLibrary_expat_xmlparse.mk expat/StaticLibrary_expat_xmltok.mk expat/UnpackedTarball_expat.mk Makefile.top ooo.lst.in RepositoryExternal.mk shell/Library_ooofilt_x64.mk shell/Library_propertyhdl_x64.mk shell/Library_shlxthdl_x64.mk shell/StaticLibrary_xmlparser_x64.mk solenv/gbuild

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 25 08:41:25 PDT 2012


 Makefile.top                                |    2 
 RepositoryExternal.mk                       |   16 +++-
 boost/UnpackedTarball_boost.mk              |    1 
 boost/boost.4510.warnings.patch             |   26 ++++++
 config_host.mk.in                           |    1 
 configure.ac                                |    2 
 curl/makefile.mk                            |   11 +-
 expat/ExternalPackage_expat.mk              |   17 ++++
 expat/ExternalProject_expat.mk              |   24 ++++++
 expat/Makefile                              |    7 +
 expat/Module_expat.mk                       |   47 ++++++++++++
 expat/StaticLibrary_ascii_expat_xmlparse.mk |   49 ++++++++++++
 expat/StaticLibrary_expat_x64.mk            |   34 ++++++++
 expat/StaticLibrary_expat_xmlparse.mk       |   53 +++++++++++++
 expat/StaticLibrary_expat_xmltok.mk         |   50 +++++++++++++
 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 ---
 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                 |   28 +++----
 solenv/gbuild/StaticLibrary.mk              |    2 
 solenv/gbuild/platform/WNT_INTEL_MSC.mk     |    3 
 28 files changed, 402 insertions(+), 208 deletions(-)

New commits:
commit 5adb2fb940c79f44ee03a14842cf96dc054cd904
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 25 17:32:19 2012 +0200

    boost: disable MSVC warnings C4510, C4610 for ...
    
    boost::detail::multi_array::ConstMultiArrayConcept
    
    Change-Id: I8937079337eb3c4cfd29c03c6602b99b28f5c59e

diff --git a/boost/UnpackedTarball_boost.mk b/boost/UnpackedTarball_boost.mk
index 7dab6c0..d482077 100644
--- a/boost/UnpackedTarball_boost.mk
+++ b/boost/UnpackedTarball_boost.mk
@@ -27,6 +27,7 @@ boost_patches += boost.mipsbackport.patch
 #https://svn.boost.org/trac/boost/ticket/7551
 boost_patches += boost.7551.unusedvars.patch
 boost_patches += boost.4100.warnings.patch
+boost_patches += boost.4510.warnings.patch
 
 boost_patches += boost.windows.patch
 boost_patches += boost.vc2012.patch
diff --git a/boost/boost.4510.warnings.patch b/boost/boost.4510.warnings.patch
new file mode 100644
index 0000000..a13d365
--- /dev/null
+++ b/boost/boost.4510.warnings.patch
@@ -0,0 +1,26 @@
+--- misc/boost_1_44_0/boost/multi_array/concept_checks.hpp
++++ misc/build/boost_1_44_0/boost/multi_array/concept_checks.hpp
+@@ -56,6 +56,13 @@
+     }
+   };
+ 
++// MSVC 2008 produces 2 warnings "default constructor could not be generated"
++// here that run over ~100 lines :(
++#ifdef _MSC_VER
++#pragma warning(push,1)
++#pragma warning(disable: 4510)
++#pragma warning(disable: 4610)
++#endif
+ 
+   template <typename Array, std::size_t NumDims >
+   struct ConstMultiArrayConcept
+@@ -117,6 +124,9 @@
+     index_range range;
+   };
+ 
++#ifdef _MSC_VER
++#pragma warning(pop)
++#endif
+ 
+   template <typename Array, std::size_t NumDims >
+   struct MutableMultiArrayConcept
commit 6fb13dd1aaf27ba7494cf65a11404339ef0e7754
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 25 14:26:22 2012 +0200

    curl: disable use of debug configuration (needs msvcr90d.dll)
    
    Change-Id: I7c22869028a78f48836741a4eb4cd5bbff16e884

diff --git a/curl/makefile.mk b/curl/makefile.mk
index d3da8b3..7a8d784 100644
--- a/curl/makefile.mk
+++ b/curl/makefile.mk
@@ -153,11 +153,14 @@ MACHINE=X86
 MACHINE=X64
 .ENDIF
 
-.IF "$(debug)"==""
+# that debug configuration is disabled for now because it needs msvcr90d.dll
+# (the debug MSVC runtime) and that is not copied into the solver currently,
+# causing unit tests to fail
+#.IF "$(debug)"==""
 BUILD_ACTION=nmake -f Makefile.vc9 cfg=release-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(MACHINE)
-.ELSE
-BUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(MACHINE)
-.ENDIF
+#.ELSE
+#BUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(MACHINE)
+#.ENDIF
 
 OUT2BIN=$(BUILD_DIR)$/libcurl.dll
 OUT2LIB=$(BUILD_DIR)$/libcurl.lib
commit abc873feb3c805fd1f7c0a4b9b4a236617ec9ff7
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 25 13:02:55 2012 +0200

    expat: for 64bit 1 static library is enough, only utf16 variant used
    
    Change-Id: I98a3428578b52c6d9d7210a8fb0211876d6f7cae

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 5847c46..f6f3214 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -237,8 +237,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 	ascii_expat_xmlparse \
 	expat_xmlparse \
 	expat_xmltok \
-	expat_xmlparse_x64 \
-	expat_xmltok_x64 \
+	expat_x64 \
 ))
 
 define gb_LinkTarget__use_expat
@@ -256,7 +255,6 @@ $(if $(filter-out ascii_expat_xmlparse,$(2)),\
 
 $(call gb_LinkTarget_use_static_libraries,$(1),\
 	$(2) \
-	$(3)\
 )
 
 endef
@@ -265,17 +263,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,expat_xmltok)
+$(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,expat_xmltok)
+$(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)
+$(call gb_LinkTarget__use_expat,$(1),expat_x64)
 
 endef
 
diff --git a/expat/Module_expat.mk b/expat/Module_expat.mk
index bc68fcb..3770474 100644
--- a/expat/Module_expat.mk
+++ b/expat/Module_expat.mk
@@ -38,8 +38,7 @@ endif
 #---------------------------------------------------------
 ifeq ($(BUILD_X64),TRUE)
 $(eval $(call gb_Module_add_targets,expat,\
-	StaticLibrary_expat_xmlparse_x64 \
-	StaticLibrary_expat_xmltok_x64 \
+	StaticLibrary_expat_x64 \
 ))
 endif
 
diff --git a/expat/StaticLibrary_expat_x64.mk b/expat/StaticLibrary_expat_x64.mk
new file mode 100644
index 0000000..bc5b641
--- /dev/null
+++ b/expat/StaticLibrary_expat_x64.mk
@@ -0,0 +1,34 @@
+# -*- 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_x64))
+
+$(eval $(call gb_StaticLibrary_set_x64,expat_x64,YES))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat_x64))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,expat_x64,expat))
+
+$(eval $(call gb_StaticLibrary_set_include,expat_x64,\
+    -I$(call gb_UnpackedTarball_get_dir,expat) \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,expat_x64,\
+    -DXML_UNICODE \
+    -DCOMPILED_FROM_DSP \
+))
+
+$(eval $(call gb_StaticLibrary_add_x64_generated_cobjects,expat_x64,\
+	UnpackedTarball/expat/lib/xmlparse_x64 \
+	UnpackedTarball/expat/lib/xmltok_x64 \
+	UnpackedTarball/expat/lib/xmlrole_x64 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/expat/StaticLibrary_expat_xmlparse_x64.mk b/expat/StaticLibrary_expat_xmlparse_x64.mk
deleted file mode 100644
index 97cf472..0000000
--- a/expat/StaticLibrary_expat_xmlparse_x64.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- 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_x64.mk b/expat/StaticLibrary_expat_xmltok_x64.mk
deleted file mode 100644
index e641534..0000000
--- a/expat/StaticLibrary_expat_xmltok_x64.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- 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:
commit 2ffde7b17192f76f815ab451f08164519f69887e
Author: David Ostrovsky <david at ostrovsky.org>
Date:   Fri Oct 12 12:28:11 2012 -0700

    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

diff --git a/Makefile.top b/Makefile.top
index aa1e25f..68bbbd1 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 11440fe..5847c46 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 5a23172..ad5f8f9 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 e67a817..6fc40f3 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 0000000..d969cb4
--- /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 0000000..d02e201
--- /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 0000000..ccb1c85
--- /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 0000000..bc68fcb
--- /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 0000000..c0eb924
--- /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 0000000..39f79d0
--- /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 0000000..97cf472
--- /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 0000000..6168844
--- /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 0000000..e641534
--- /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 0000000..ea9d41f
--- /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 28d6322..cb85ec5 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
-+# <http://www.openoffice.org/license.html>
-+# 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 7deffd6..0000000
--- 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
-# <http://www.openoffice.org/license.html>
-# 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 9ae2872..af79e63 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 9b6aa34..e69de29 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 e69de29..0000000
diff --git a/ooo.lst.in b/ooo.lst.in
index b2fd401..b914348 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
+ at 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 9c3cb65..7ea3109 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 f12ba0c..5b07b4c 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 e5deaa9..0d70683 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 2f5f510..bbf7a4a 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 57b3a70..ba91d4a 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 e1e0fc5..4c68af6 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 1b618aa..c8f9902 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
commit 7f96cec269edabaf26f5e518d632cbfde95320ca
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 25 11:45:27 2012 +0200

    remove accidentally committed garbage
    
    Change-Id: I770cdbb23e9a42308e95505235378d715c1fcd79

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index deb4298..57b3a70 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1098,20 +1098,6 @@ $(foreach aux,$(2),$(call gb_LinkTarget_add_auxtarget,$(1),$(aux)))
 
 endef
 
-#$(2)/$(3) : $(dir $(call gb_LinkTarget_get_target,$(1)/$(3)))/$(notdir $(2))
-#$(dir $(call gb_LinkTarget_get_target,$(1)))/$(notdir $(3)) : $(call gb_LinkTarget_get_target,$(3))
-# CLEAN??? inheritance not a problem here?
-#$(dir $(call gb_LinkTarget_get_target,$(1)))/$(notdir $(2)) : $()
-
-# linktarget-type, outdir-dir, pattern
-# define a dummy touch rule for auxtargets
-# linktarget-type, aux-pattern, linktarget-pattern
-#define gb_LinkTarget__define_auxtarget_rule
-#$(call gb_LinkTarget_get_target,$(1))/$(2) : $(call gb_LinkTarget_get_target,$(1)/$(3))
-#	touch $@
-#
-#endef
-
 define gb_LinkTarget__add_internal_headers
 $(call gb_LinkTarget_get_headers_target,$(1)) : $(2)
 $(2) :|	$(call gb_LinkTarget_get_external_headers_target,$(1))


More information about the Libreoffice-commits mailing list