summaryrefslogtreecommitdiff
path: root/expat/UnpackedTarball_expat.mk
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2012-10-12 12:28:11 -0700
committerMichael Stahl <mstahl@redhat.com>2012-10-25 17:37:34 +0200
commit2ffde7b17192f76f815ab451f08164519f69887e (patch)
tree9ea5145c64e94170e1baf7b1a1e4adb92e772cf7 /expat/UnpackedTarball_expat.mk
parent7f96cec269edabaf26f5e518d632cbfde95320ca (diff)
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
Diffstat (limited to 'expat/UnpackedTarball_expat.mk')
-rw-r--r--expat/UnpackedTarball_expat.mk33
1 files changed, 33 insertions, 0 deletions
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: