summaryrefslogtreecommitdiffstats
path: root/external/expat
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-10-17 19:38:07 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-18 06:52:15 +0000
commit3c61695a8235eec183de1470c42ce5d112ddaa49 (patch)
treea5c6588930e701ae7b4b16a0f8871c7815f34d11 /external/expat
parentfdo#70393: move epm to a subdir of external (diff)
downloadcore-3c61695a8235eec183de1470c42ce5d112ddaa49.tar.gz
core-3c61695a8235eec183de1470c42ce5d112ddaa49.zip
fdo#70393: move expat to a subdir of external
Change-Id: I4735c3b10081ac62b4620ff5180f12c30b077627 Reviewed-on: https://gerrit.libreoffice.org/6300 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/expat')
-rw-r--r--external/expat/ExternalProject_expat.mk22
-rw-r--r--external/expat/Makefile7
-rw-r--r--external/expat/Module_expat.mk37
-rw-r--r--external/expat/README4
-rw-r--r--external/expat/StaticLibrary_expat.mk56
-rw-r--r--external/expat/StaticLibrary_expat_x64.mk33
-rw-r--r--external/expat/UnpackedTarball_expat.mk32
-rw-r--r--external/expat/expat-2.1.0.patch13
-rw-r--r--external/expat/expat-winapi.patch13
9 files changed, 217 insertions, 0 deletions
diff --git a/external/expat/ExternalProject_expat.mk b/external/expat/ExternalProject_expat.mk
new file mode 100644
index 000000000000..2fdaf5e1a4cb
--- /dev/null
+++ b/external/expat/ExternalProject_expat.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_ExternalProject_ExternalProject,expat))
+
+$(eval $(call gb_ExternalProject_register_targets,expat,\
+ configure \
+))
+
+$(call gb_ExternalProject_get_state_target,expat,configure) :
+ $(call gb_ExternalProject_run,configure,\
+ ./configure \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ ,,expat_configure.log)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/expat/Makefile b/external/expat/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/external/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/external/expat/Module_expat.mk b/external/expat/Module_expat.mk
new file mode 100644
index 000000000000..ab39cdaf8dc5
--- /dev/null
+++ b/external/expat/Module_expat.mk
@@ -0,0 +1,37 @@
+# -*- 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))
+
+$(eval $(call gb_Module_add_targets,expat,\
+ UnpackedTarball_expat \
+ StaticLibrary_expat \
+))
+
+# 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 ---------------------
+ifeq ($(BUILD_X64),TRUE)
+$(eval $(call gb_Module_add_targets,expat,\
+ StaticLibrary_expat_x64 \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/expat/README b/external/expat/README
new file mode 100644
index 000000000000..579d3d3d6bd5
--- /dev/null
+++ b/external/expat/README
@@ -0,0 +1,4 @@
+Simple SAX parser library with added UTF-16 support.
+
+From:
+[http://expat.sourceforge.net/]
diff --git a/external/expat/StaticLibrary_expat.mk b/external/expat/StaticLibrary_expat.mk
new file mode 100644
index 000000000000..2f754526b6e9
--- /dev/null
+++ b/external/expat/StaticLibrary_expat.mk
@@ -0,0 +1,56 @@
+# -*- 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))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,expat,expat))
+
+# no configure step on windows, no dependency
+ifneq ($(OS)$(COM),WNTMSC)
+$(eval $(call gb_StaticLibrary_use_external_project,expat,expat))
+endif
+
+$(eval $(call gb_StaticLibrary_set_include,expat,\
+ -I$(call gb_UnpackedTarball_get_dir,expat) \
+ $$(INCLUDE) \
+))
+
+ifeq ($(OS),MACOSX)
+ifneq ($(strip $(SYSBASE)),)
+$(eval $(call gb_StaticLibrary_add_defs,expat,\
+ -DHAVE_MEMMOVE \
+ -DHAVE_BCOPY \
+))
+endif
+endif
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_defs,expat,\
+ -DCOMPILED_FROM_DSP \
+))
+else
+$(eval $(call gb_StaticLibrary_add_defs,expat,\
+ -DHAVE_EXPAT_CONFIG_H \
+))
+endif
+
+# suppress warning spam
+$(eval $(call gb_StaticLibrary_add_cflags,expat,\
+ -w \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
+ UnpackedTarball/expat/lib/xmlparse \
+ UnpackedTarball/expat/lib/xmlrole \
+ UnpackedTarball/expat/lib/xmltok \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/expat/StaticLibrary_expat_x64.mk b/external/expat/StaticLibrary_expat_x64.mk
new file mode 100644
index 000000000000..a38ba28c80dd
--- /dev/null
+++ b/external/expat/StaticLibrary_expat_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_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,\
+ -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/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
new file mode 100644
index 000000000000..1ea97b584251
--- /dev/null
+++ b/external/expat/UnpackedTarball_expat.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_UnpackedTarball_UnpackedTarball,expat))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,expat,\
+ external/expat/expat-2.1.0.patch \
+))
+
+# This is a bit hackish.
+
+# When building for Windows (as 32-bit) we need to build it twice: as
+# 32- and 64-bit code, to be able to produce a 64-bit Explorer
+# ("shell") extension that is used when the 32-bit LibreOffice is
+# installed on a 64-bit OS.
+
+$(eval $(call gb_UnpackedTarball_set_post_action,expat,\
+ $(if $(filter $(BUILD_X64),TRUE), \
+ cp lib/xmlparse.c lib/xmlparse_x64.c && \
+ cp lib/xmltok.c lib/xmltok_x64.c && \
+ cp lib/xmlrole.c lib/xmlrole_x64.c) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/expat/expat-2.1.0.patch b/external/expat/expat-2.1.0.patch
new file mode 100644
index 000000000000..070dafc0cb0c
--- /dev/null
+++ b/external/expat/expat-2.1.0.patch
@@ -0,0 +1,13 @@
+--- 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/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch
new file mode 100644
index 000000000000..070dafc0cb0c
--- /dev/null
+++ b/external/expat/expat-winapi.patch
@@ -0,0 +1,13 @@
+--- 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