diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2012-11-15 17:55:05 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-11-15 18:33:09 +0200 |
commit | d8edf07ed9e7a3e2f2ab43ffd2935b93326f2caa (patch) | |
tree | fcc91844900827238324f8ad93f1dbf64306b13b /expat | |
parent | 42782fddff98eeab5c8249918e9ba000f08c22e8 (diff) |
Bin use of UTF-16 expat variant in the Windows shell extension
Thus we can drop that variant completely.
Change-Id: I11a8e40436921219bd6dd4afad4c7907ccb6b84c
Diffstat (limited to 'expat')
-rw-r--r-- | expat/Module_expat.mk | 4 | ||||
-rw-r--r-- | expat/README | 36 | ||||
-rw-r--r-- | expat/StaticLibrary_expat_utf16.mk | 55 | ||||
-rw-r--r-- | expat/StaticLibrary_expat_x64.mk | 1 | ||||
-rw-r--r-- | expat/UnpackedTarball_expat.mk | 17 |
5 files changed, 7 insertions, 106 deletions
diff --git a/expat/Module_expat.mk b/expat/Module_expat.mk index 9366538cf052..8c7d8d020b91 100644 --- a/expat/Module_expat.mk +++ b/expat/Module_expat.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Module_add_targets,expat,\ ExternalPackage_expat \ UnpackedTarball_expat \ StaticLibrary_expat \ - StaticLibrary_expat_utf16 \ )) # Actually it wasn't that clear if we should @@ -32,9 +31,6 @@ $(eval $(call gb_Module_add_targets,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_x64 \ diff --git a/expat/README b/expat/README index d7ce6824d686..579d3d3d6bd5 100644 --- a/expat/README +++ b/expat/README @@ -1,40 +1,4 @@ Simple SAX parser library with added UTF-16 support. -When we build expat internally ("bundled"), we build two variants: One -that has an "ASCII" (actually UTF-8) API, another that has a "Unicode" -(meaning UTF-16) API. Additionally, expat is split into two parts, -expat_xmlparse and expat_xmltok. It's the former which has the two -variants, ascii_expat_xmlparse (UTF-8) and expat_xmlparse (UTF-16). - -Code that uses expat then declares in its .mk file which one it wants -to use. See the magic in ../RepositoryExternal.mk, where in the -expat_utf16 case -DXML_UNICODE is passed when compiling source code -that wants to use the UTF-16 variant. - -Now, this sounds fairly clear so far. - -But wait. LO can also be conigured to use a *system* expat -library. The System expat library is only available as one variant, -the "ASCII" one. (But the library is still called just "libexpat", no -"ascii" in the name, that is just LO/OO's convention.) So how does -this work then, how can the code that wants to use the UTF-16 expat -API then actually use the "ASCII" (UTF-8) expat API? Well, in the -SYSTEM_EXPAT case no -DXML_UNICODE is used, so the code needs to check -that and adapt. So in the system libexpat case, mentioning expat_utf16 -in a .mk file doesn't mean any UTF-16-using libexpat would actually be -used. - -Yeah, this is silly, confusing, etc. - -Furthermore, at least Debian actually *does* have also a "Unicode" -expat library, called libexpatw. Debian's LO does not use that, -though. (Using it would require modifications to the LO build -machinery.) - -Now, if LO manages just fine with just the UTF-8 (or, "ASCII") system -libexpat in builds where that is used, why is a separate Unicode one -needed when an internal expat is used? Good question. Next -question. Patches welcome. - From: [http://expat.sourceforge.net/] diff --git a/expat/StaticLibrary_expat_utf16.mk b/expat/StaticLibrary_expat_utf16.mk deleted file mode 100644 index 0ab3d1f25e61..000000000000 --- a/expat/StaticLibrary_expat_utf16.mk +++ /dev/null @@ -1,55 +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_utf16)) - -$(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat_utf16)) - -$(eval $(call gb_StaticLibrary_use_unpacked,expat_utf16,expat)) - -# no configure step on windows, no dependency -ifneq ($(OS)$(COM),WNTMSC) -$(eval $(call gb_StaticLibrary_use_external_project,expat_utf16,expat)) -endif - -$(eval $(call gb_StaticLibrary_add_defs,expat_utf16,\ - -DXML_UNICODE \ -)) - -$(eval $(call gb_StaticLibrary_set_include,expat_utf16,\ - -I$(call gb_UnpackedTarball_get_dir,expat) \ - $$(INCLUDE) \ -)) - -ifeq ($(OS),MACOSX) -ifneq ($(strip $(SYSBASE)),) -$(eval $(call gb_StaticLibrary_add_defs,expat_utf16,\ - -DHAVE_MEMMOVE \ - -DHAVE_BCOPY \ -)) -endif -endif - -ifeq ($(OS),WNT) -$(eval $(call gb_StaticLibrary_add_defs,expat_utf16,\ - -DCOMPILED_FROM_DSP \ -)) -else -$(eval $(call gb_StaticLibrary_add_defs,expat_utf16,\ - -DHAVE_EXPAT_CONFIG_H \ -)) -endif - -$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat_utf16,\ - UnpackedTarball/expat/lib/unicode_xmlparse \ - UnpackedTarball/expat/lib/unicode_xmlrole \ - UnpackedTarball/expat/lib/unicode_xmltok \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/expat/StaticLibrary_expat_x64.mk b/expat/StaticLibrary_expat_x64.mk index bc5b641e18fb..a38ba28c80dd 100644 --- a/expat/StaticLibrary_expat_x64.mk +++ b/expat/StaticLibrary_expat_x64.mk @@ -21,7 +21,6 @@ $(eval $(call gb_StaticLibrary_set_include,expat_x64,\ )) $(eval $(call gb_StaticLibrary_add_defs,expat_x64,\ - -DXML_UNICODE \ -DCOMPILED_FROM_DSP \ )) diff --git a/expat/UnpackedTarball_expat.mk b/expat/UnpackedTarball_expat.mk index a4daa51ea173..660271aa8300 100644 --- a/expat/UnpackedTarball_expat.mk +++ b/expat/UnpackedTarball_expat.mk @@ -15,18 +15,15 @@ $(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. + +# 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. -# 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,\ - cp lib/xmltok.c lib/unicode_xmltok.c && \ - cp lib/xmlrole.c lib/unicode_xmlrole.c && \ - cp lib/xmlparse.c lib/unicode_xmlparse.c \ - $(if $(filter $(BUILD_X64),TRUE), && \ + $(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) \ |