[PATCH] upgrade icu to 51.1

Peter Foley (via Code Review) gerrit at gerrit.libreoffice.org
Sat Mar 23 14:01:45 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2953

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/53/2953/1

upgrade icu to 51.1

Change-Id: I1c0d5ca4b2f88ca48225fcdbeb978f27fa91f7a6
---
M RepositoryExternal.mk
M configure.ac
M download.lst
M icu/ExternalPackage_icu.mk
M icu/UnpackedTarball_icu.mk
D icu/icu4c-CVE-2013-0900_umutex.patch
D icu/icu4c-bsd.patch
M icu/icu4c-build.patch
M icu/icu4c-solarisgcc.patch
D icu/icu4c.9313.cygwin.patch
D icu/icu4c.9737.CVE-2013-0900_changesets_32865_32908.patch
M libcdr/ExternalProject_libcdr.mk
M libmspub/ExternalProject_libmspub.mk
M vcl/generic/glyphs/gcach_layout.cxx
M writerfilter/Library_writerfilter.mk
15 files changed, 34 insertions(+), 598 deletions(-)



diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 6fad496..3cf9d24 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1081,9 +1081,11 @@
 endif
 
 define gb_LinkTarget__use_icu_headers
-$(call gb_LinkTarget_use_package,$(1),icu)
+$(call gb_LinkTarget_use_unpacked,$(1),icu)
 $(call gb_LinkTarget_set_include,$(1),\
-	$(ISYSTEM)$(OUTDIR)/inc/external \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source/common \
 	$$(INCLUDE) \
 )
 
diff --git a/configure.ac b/configure.ac
index 6a31c89..731b10d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8205,9 +8205,9 @@
 SYSTEM_GENCCODE=
 SYSTEM_GENCMN=
 
-ICU_MAJOR=49
+ICU_MAJOR=51
 ICU_MINOR=1
-ICU_MICRO=1
+ICU_MICRO=
 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES"
diff --git a/download.lst b/download.lst
index c82ed16..6ad294d 100644
--- a/download.lst
+++ b/download.lst
@@ -39,7 +39,7 @@
 export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
 export HUNSPELL_TARBALL := 3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz
 export HYPHEN_TARBALL := a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz
-export ICU_TARBALL := 7c53f83e0327343f4060c0eb83842daf-icu4c-49_1_1-src.tgz
+export ICU_TARBALL := 6eef33b229d0239d654983028c9c7053-icu4c-51_1-src.tgz
 export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
 export JFREEREPORT_FLUTE_TARBALL := d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
 export JFREEREPORT_LIBBASE_TARBALL := eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
diff --git a/icu/ExternalPackage_icu.mk b/icu/ExternalPackage_icu.mk
index fbb9ee0..105365f 100644
--- a/icu/ExternalPackage_icu.mk
+++ b/icu/ExternalPackage_icu.mk
@@ -7,181 +7,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
+icu_VERSION := $(ICU_MAJOR).$(ICU_MINOR)$(if $(ICU_MICRO),.$(ICU_MICRO))
+
 $(eval $(call gb_ExternalPackage_ExternalPackage,icu,icu))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,icu,inc/external/layout,\
-	source/layout/LayoutEngine.h \
-	source/layout/LEFontInstance.h \
-	source/layout/LEGlyphFilter.h \
-	source/layout/LEGlyphStorage.h \
-	source/layout/LEInsertionList.h \
-	source/layout/LELanguages.h \
-	source/layout/LEScripts.h \
-	source/layout/LESwaps.h \
-	source/layout/LETypes.h \
-	source/layout/loengine.h \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,icu,inc/external/unicode,\
-	source/common/unicode/appendable.h \
-	source/common/unicode/brkiter.h \
-	source/common/unicode/bytestream.h \
-	source/common/unicode/bytestrie.h \
-	source/common/unicode/bytestriebuilder.h \
-	source/common/unicode/caniter.h \
-	source/common/unicode/chariter.h \
-	source/common/unicode/dbbi.h \
-	source/common/unicode/docmain.h \
-	source/common/unicode/dtintrv.h \
-	source/common/unicode/errorcode.h \
-	source/common/unicode/icudataver.h \
-	source/common/unicode/icuplug.h \
-	source/common/unicode/idna.h \
-	source/common/unicode/localpointer.h \
-	source/common/unicode/locid.h \
-	source/common/unicode/messagepattern.h \
-	source/common/unicode/normalizer2.h \
-	source/common/unicode/normlzr.h \
-	source/common/unicode/parseerr.h \
-	source/common/unicode/parsepos.h \
-	source/common/unicode/platform.h \
-	source/common/unicode/ptypes.h \
-	source/common/unicode/putil.h \
-	source/common/unicode/rbbi.h \
-	source/common/unicode/rep.h \
-	source/common/unicode/resbund.h \
-	source/common/unicode/schriter.h \
-	source/common/unicode/std_string.h \
-	source/common/unicode/strenum.h \
-	source/common/unicode/stringpiece.h \
-	source/common/unicode/stringtriebuilder.h \
-	source/common/unicode/symtable.h \
-	source/common/unicode/ubidi.h \
-	source/common/unicode/ubrk.h \
-	source/common/unicode/ucasemap.h \
-	source/common/unicode/ucat.h \
-	source/common/unicode/uchar.h \
-	source/common/unicode/ucharstrie.h \
-	source/common/unicode/ucharstriebuilder.h \
-	source/common/unicode/uchriter.h \
-	source/common/unicode/uclean.h \
-	source/common/unicode/ucnv.h \
-	source/common/unicode/ucnv_cb.h \
-	source/common/unicode/ucnv_err.h \
-	source/common/unicode/ucnvsel.h \
-	source/common/unicode/uconfig.h \
-	source/common/unicode/udata.h \
-	source/common/unicode/uenum.h \
-	source/common/unicode/uidna.h \
-	source/common/unicode/uiter.h \
-	source/common/unicode/uloc.h \
-	source/common/unicode/umachine.h \
-	source/common/unicode/umisc.h \
-	source/common/unicode/unifilt.h \
-	source/common/unicode/unifunct.h \
-	source/common/unicode/unimatch.h \
-	source/common/unicode/uniset.h \
-	source/common/unicode/unistr.h \
-	source/common/unicode/unorm.h \
-	source/common/unicode/unorm2.h \
-	source/common/unicode/uobject.h \
-	source/common/unicode/urename.h \
-	source/common/unicode/urep.h \
-	source/common/unicode/ures.h \
-	source/common/unicode/uscript.h \
-	source/common/unicode/uset.h \
-	source/common/unicode/usetiter.h \
-	source/common/unicode/ushape.h \
-	source/common/unicode/usprep.h \
-	source/common/unicode/ustring.h \
-	source/common/unicode/ustringtrie.h \
-	source/common/unicode/utext.h \
-	source/common/unicode/utf.h \
-	source/common/unicode/utf16.h \
-	source/common/unicode/utf32.h \
-	source/common/unicode/utf8.h \
-	source/common/unicode/utf_old.h \
-	source/common/unicode/utrace.h \
-	source/common/unicode/utypes.h \
-	source/common/unicode/uvernum.h \
-	source/common/unicode/uversion.h \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,icu,inc/external/unicode,\
-	source/i18n/unicode/alphaindex.h \
-	source/i18n/unicode/basictz.h \
-	source/i18n/unicode/bms.h \
-	source/i18n/unicode/bmsearch.h \
-	source/i18n/unicode/calendar.h \
-	source/i18n/unicode/choicfmt.h \
-	source/i18n/unicode/coleitr.h \
-	source/i18n/unicode/coll.h \
-	source/i18n/unicode/colldata.h \
-	source/i18n/unicode/curramt.h \
-	source/i18n/unicode/currpinf.h \
-	source/i18n/unicode/currunit.h \
-	source/i18n/unicode/datefmt.h \
-	source/i18n/unicode/dcfmtsym.h \
-	source/i18n/unicode/decimfmt.h \
-	source/i18n/unicode/dtfmtsym.h \
-	source/i18n/unicode/dtitvfmt.h \
-	source/i18n/unicode/dtitvinf.h \
-	source/i18n/unicode/dtptngen.h \
-	source/i18n/unicode/dtrule.h \
-	source/i18n/unicode/fieldpos.h \
-	source/i18n/unicode/fmtable.h \
-	source/i18n/unicode/format.h \
-	source/i18n/unicode/fpositer.h \
-	source/i18n/unicode/gregocal.h \
-	source/i18n/unicode/locdspnm.h \
-	source/i18n/unicode/measfmt.h \
-	source/i18n/unicode/measunit.h \
-	source/i18n/unicode/measure.h \
-	source/i18n/unicode/msgfmt.h \
-	source/i18n/unicode/numfmt.h \
-	source/i18n/unicode/numsys.h \
-	source/i18n/unicode/plurfmt.h \
-	source/i18n/unicode/plurrule.h \
-	source/i18n/unicode/rbnf.h \
-	source/i18n/unicode/rbtz.h \
-	source/i18n/unicode/regex.h \
-	source/i18n/unicode/search.h \
-	source/i18n/unicode/selfmt.h \
-	source/i18n/unicode/simpletz.h \
-	source/i18n/unicode/smpdtfmt.h \
-	source/i18n/unicode/sortkey.h \
-	source/i18n/unicode/stsearch.h \
-	source/i18n/unicode/tblcoll.h \
-	source/i18n/unicode/timezone.h \
-	source/i18n/unicode/tmunit.h \
-	source/i18n/unicode/tmutamt.h \
-	source/i18n/unicode/tmutfmt.h \
-	source/i18n/unicode/translit.h \
-	source/i18n/unicode/tzfmt.h \
-	source/i18n/unicode/tznames.h \
-	source/i18n/unicode/tzrule.h \
-	source/i18n/unicode/tztrans.h \
-	source/i18n/unicode/ucal.h \
-	source/i18n/unicode/ucol.h \
-	source/i18n/unicode/ucoleitr.h \
-	source/i18n/unicode/ucsdet.h \
-	source/i18n/unicode/ucurr.h \
-	source/i18n/unicode/udat.h \
-	source/i18n/unicode/udateintervalformat.h \
-	source/i18n/unicode/udatpg.h \
-	source/i18n/unicode/uldnames.h \
-	source/i18n/unicode/ulocdata.h \
-	source/i18n/unicode/umsg.h \
-	source/i18n/unicode/unirepl.h \
-	source/i18n/unicode/unum.h \
-	source/i18n/unicode/upluralrules.h \
-	source/i18n/unicode/uregex.h \
-	source/i18n/unicode/usearch.h \
-	source/i18n/unicode/uspoof.h \
-	source/i18n/unicode/utmscale.h \
-	source/i18n/unicode/utrans.h \
-	source/i18n/unicode/vtzone.h \
-))
 
 $(eval $(call gb_ExternalPackage_use_external_project,icu,icu))
 ifeq ($(OS),WNT)
@@ -235,21 +63,21 @@
 	source/lib/libicutulo.so \
 ))
 else
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO),source/lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT),source/lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO),source/lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT),source/lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO),source/lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT),source/lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO),source/lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT),source/lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO),source/lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT),source/lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR).$(ICU_MINOR).$(ICU_MICRO)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata$(gb_Library_DLLEXT),source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT),source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT),source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)))
+$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)))
 
 $(eval $(call gb_ExternalPackage_add_files,icu,bin,\
 	source/bin/genccode \
diff --git a/icu/UnpackedTarball_icu.mk b/icu/UnpackedTarball_icu.mk
index 14da6d5..35c95c4 100644
--- a/icu/UnpackedTarball_icu.mk
+++ b/icu/UnpackedTarball_icu.mk
@@ -13,20 +13,16 @@
 
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
 	icu/icu4c.9948.mlym-crash.patch \
-	icu/icu4c-bsd.patch \
 	icu/icu4c-build.patch \
 	icu/icu4c.8198.revert.icu5431.patch \
 	icu/icu4c.7601.Indic-ccmp.patch \
 	icu/icu4c-aix.patch \
 	icu/icu4c-wchar_t.patch \
 	icu/icu4c-warnings.patch \
-	icu/icu4c.9313.cygwin.patch \
 	icu/icu4c-macosx.patch \
 	icu/icu4c-solarisgcc.patch \
 	icu/icu4c-mkdir.patch \
 	icu/icu4c-buffer-overflow.patch \
-	icu/icu4c.9737.CVE-2013-0900_changesets_32865_32908.patch \
-	icu/icu4c-CVE-2013-0900_umutex.patch \
 	icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch \
 ))
 
diff --git a/icu/icu4c-CVE-2013-0900_umutex.patch b/icu/icu4c-CVE-2013-0900_umutex.patch
deleted file mode 100644
index e195c5c..0000000
--- a/icu/icu4c-CVE-2013-0900_umutex.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN icu.orig/source/common/locid.cpp icu/source/common/locid.cpp
---- build/icu.orig/source/common/locid.cpp	2013-03-06 21:27:35.170696967 +0100
-+++ build/icu/source/common/locid.cpp	2013-03-06 21:29:47.711378977 +0100
-@@ -53,7 +53,7 @@
- static Locale *gLocaleCache = NULL;
- 
- // gDefaultLocaleMutex protects all access to gDefaultLocalesHashT and gDefaultLocale.
--static UMutex gDefaultLocaleMutex = U_MUTEX_INITIALIZER;
-+static UMTX gDefaultLocaleMutex = NULL;
- static UHashtable *gDefaultLocalesHashT = NULL;
- static Locale *gDefaultLocale = NULL;
- 
diff --git a/icu/icu4c-bsd.patch b/icu/icu4c-bsd.patch
deleted file mode 100644
index 78f8ca2..0000000
--- a/icu/icu4c-bsd.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- misc/icu/source/common/putilimp.h	2012-06-01 10:52:52.000000000 -0400
-+++ misc/build/icu/source/common/putilimp.h	2012-08-21 13:32:58.000000000 -0400
-@@ -117,6 +117,8 @@
- #   define U_TIMEZONE __timezone
- #elif U_PLATFORM_USES_ONLY_WIN32_API
- #   define U_TIMEZONE _timezone
-+#elif U_PLATFORM == U_PF_BSD && !defined(__NetBSD__)
-+   /* not defined */
- #elif U_PLATFORM == U_PF_OS400
-    /* not defined */
- #else
---- misc/icu/source/common/unicode/platform.h	2012-08-21 16:53:20.957449000 -0400
-+++ misc/build/icu/source/common/unicode/platform.h	2012-08-21 17:02:16.000000000 -0400
-@@ -131,7 +131,7 @@
- #   include <android/api-level.h>
- #elif defined(linux) || defined(__linux__) || defined(__linux)
- #   define U_PLATFORM U_PF_LINUX
--#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
- #   define U_PLATFORM U_PF_BSD
- #elif defined(sun) || defined(__sun)
-     /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris from SunOS? */
diff --git a/icu/icu4c-build.patch b/icu/icu4c-build.patch
index 75c4139..cf6e682 100644
--- a/icu/icu4c-build.patch
+++ b/icu/icu4c-build.patch
@@ -41,17 +41,6 @@
          "\t.section \".rodata\"\n"
          "\t.align   8\n"
 
---- misc/icu/source/common/stringpiece.cpp	2010-09-29 20:37:20.000000000 +0200
-+++ misc/build/icu/source/common/stringpiece.cpp	2011-03-15 10:57:24.722045561 +0100
-@@ -75,7 +75,7 @@
-  * Visual Studios 9.0.
-  * Cygwin with MSVC 9.0 also complains here about redefinition.
-  */
--#if (!defined(_MSC_VER) || (_MSC_VER > 1500)) && !defined(CYGWINMSVC)
-+#if (!defined(_MSC_VER) && !defined(CYGWINMSVC))
- const int32_t StringPiece::npos;
- #endif
- 
 --- misc/icu/source/config/mh-darwin	2010-09-29 20:37:36.000000000 +0200
 +++ misc/build/icu/source/config/mh-darwin	2011-03-15 10:56:26.653056004 +0100
 @@ -25,11 +25,7 @@
@@ -75,9 +64,9 @@
 -FINAL_SO_TARGET=  $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO)
 -MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO)
 -
- ## Compilation rules
+ ## Compilation and dependency rules
  %.$(STATIC_O): $(srcdir)/%.c
- 	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
+	$(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<)
 @@ -80,16 +72,10 @@
  
  ## Versioned libraries rules
diff --git a/icu/icu4c-solarisgcc.patch b/icu/icu4c-solarisgcc.patch
index 11b13cf..cb668d8 100644
--- a/icu/icu4c-solarisgcc.patch
+++ b/icu/icu4c-solarisgcc.patch
@@ -1,26 +1,3 @@
-diff -uriwb build/icu.old/source/aclocal.m4 misc/build/icu/source/aclocal.m4
---- build/icu.old/source/aclocal.m4	2012-04-05 21:49:28.000000000 +0100
-+++ build/icu/source/aclocal.m4	2012-06-21 15:44:57.299256932 +0100
-@@ -455,7 +455,7 @@
-             case "${host}" in
-             *-*-solaris*)
-                 CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long"
--                CFLAGS="$CFLAGS -D__STDC__=0";;
-+                CFLAGS="$CFLAGS -std=c99";;
-             *-*-hpux*)
-                 echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see <http://bugs.icu-project.org/trac/ticket/8493>"
-                 CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
-@@ -474,10 +474,6 @@
-         if test "$GXX" = yes
-         then
-             CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
--            case "${host}" in
--            *-*-solaris*)
--                CXXFLAGS="$CXXFLAGS -D__STDC__=0";;
--            esac
-         else
-             case "${host}" in
-             *-*-cygwin)
 diff -uriwb build/icu.old/source/common/uposixdefs.h misc/build/icu/source/common/uposixdefs.h
 --- build/icu.old/source/common/uposixdefs.h	2012-04-05 21:46:18.000000000 +0100
 +++ build/icu/source/common/uposixdefs.h	2012-06-21 15:45:17.613369477 +0100
@@ -33,26 +10,3 @@
  #   define _XOPEN_SOURCE_EXTENDED 1
  #endif
  
-diff -uriwb build/icu.old/source/configure misc/build/icu/source/configure
---- build/icu.old/source/configure	2012-04-05 21:49:28.000000000 +0100
-+++ build/icu/source/configure	2012-06-21 15:44:42.817030445 +0100
-@@ -4264,7 +4264,7 @@
-             case "${host}" in
-             *-*-solaris*)
-                 CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long"
--                CFLAGS="$CFLAGS -D__STDC__=0";;
-+                CFLAGS="$CFLAGS -std=c99";;
-             *-*-hpux*)
-                 echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see <http://bugs.icu-project.org/trac/ticket/8493>"
-                 CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
-@@ -4283,10 +4283,6 @@
-         if test "$GXX" = yes
-         then
-             CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
--            case "${host}" in
--            *-*-solaris*)
--                CXXFLAGS="$CXXFLAGS -D__STDC__=0";;
--            esac
-         else
-             case "${host}" in
-             *-*-cygwin)
diff --git a/icu/icu4c.9313.cygwin.patch b/icu/icu4c.9313.cygwin.patch
deleted file mode 100644
index 666f675..0000000
--- a/icu/icu4c.9313.cygwin.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- misc/icu/source/icudefs.mk.in
-+++ misc/build/icu/source/icudefs.mk.in
-@@ -266,9 +266,9 @@
- include @platform_make_fragment@
- 
- # Current full path directory.
--CURR_FULL_DIR=$(shell pwd | sed 's/ /\\ /g')
-+CURR_FULL_DIR?=$(shell pwd | sed 's/ /\\ /g')
- # Current full path directory for use in source code in a -D compiler option.
--CURR_SRCCODE_FULL_DIR=$(shell pwd | sed 's/ /\\ /')
-+CURR_SRCCODE_FULL_DIR?=$(shell pwd | sed 's/ /\\ /')
- 
- # When shared libraries are disabled and static libraries are enabled,
- # the C++ compiler must be used to link in the libraries for the tools.
diff --git a/icu/icu4c.9737.CVE-2013-0900_changesets_32865_32908.patch b/icu/icu4c.9737.CVE-2013-0900_changesets_32865_32908.patch
deleted file mode 100644
index 8010f092..0000000
--- a/icu/icu4c.9737.CVE-2013-0900_changesets_32865_32908.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-Squashed into one:
-https://ssl.icu-project.org/trac/changeset/32865
-https://ssl.icu-project.org/trac/changeset/32908
-
-diff -ruN icu.orig/source/common/locid.cpp icu/source/common/locid.cpp
---- build/icu.orig/source/common/locid.cpp	2012-04-05 22:46:14.000000000 +0200
-+++ build/icu/source/common/locid.cpp	2013-03-05 21:54:11.974608225 +0100
-@@ -1,6 +1,6 @@
- /*
-  **********************************************************************
-- *   Copyright (C) 1997-2011, International Business Machines
-+ *   Copyright (C) 1997-2012, International Business Machines
-  *   Corporation and others.  All Rights Reserved.
-  **********************************************************************
- *
-@@ -33,6 +33,7 @@
- #include "unicode/locid.h"
- #include "unicode/uloc.h"
- #include "putilimp.h"
-+#include "mutex.h"
- #include "umutex.h"
- #include "uassert.h"
- #include "cmemory.h"
-@@ -43,6 +44,21 @@
- 
- #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
- 
-+U_CDECL_BEGIN
-+static UBool U_CALLCONV locale_cleanup(void);
-+U_CDECL_END
-+
-+U_NAMESPACE_BEGIN
-+
-+static Locale *gLocaleCache = NULL;
-+
-+// gDefaultLocaleMutex protects all access to gDefaultLocalesHashT and gDefaultLocale.
-+static UMutex gDefaultLocaleMutex = U_MUTEX_INITIALIZER;
-+static UHashtable *gDefaultLocalesHashT = NULL;
-+static Locale *gDefaultLocale = NULL;
-+
-+U_NAMESPACE_END
-+
- typedef enum ELocalePos {
-     eENGLISH,
-     eFRENCH,
-@@ -77,10 +93,6 @@
-             UBool valuesToo,
-             UErrorCode *status);
- 
--static icu::Locale *gLocaleCache = NULL;
--static icu::Locale *gDefaultLocale = NULL;
--static UHashtable *gDefaultLocalesHashT = NULL;
--
- U_CDECL_BEGIN
- //
- // Deleter function for Locales owned by the default Locale hash table/
-@@ -102,24 +114,19 @@
-     if (gDefaultLocalesHashT) {
-         uhash_close(gDefaultLocalesHashT);   // Automatically deletes all elements, using deleter func.
-         gDefaultLocalesHashT = NULL;
-+        gDefaultLocale = NULL;
-     }
--    else if (gDefaultLocale) {
--        // The cache wasn't created, and only one default locale was created.
--        delete gDefaultLocale;
--    }
--    gDefaultLocale = NULL;
- 
-     return TRUE;
- }
- U_CDECL_END
- 
- U_NAMESPACE_BEGIN
--//
--//  locale_set_default_internal.
--//
--void locale_set_default_internal(const char *id)
--{
--    UErrorCode   status = U_ZERO_ERROR;
-+
-+Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
-+    // Synchronize this entire function.
-+    Mutex lock(&gDefaultLocaleMutex);
-+    
-     UBool canonicalize = FALSE;
- 
-     // If given a NULL string for the locale id, grab the default
-@@ -127,17 +134,10 @@
-     //   (Different from most other locale APIs, where a null name means use
-     //    the current ICU default locale.)
-     if (id == NULL) {
--        umtx_lock(NULL);
--        id = uprv_getDefaultLocaleID();
--        umtx_unlock(NULL);
-+        id = uprv_getDefaultLocaleID();   // This function not thread safe? TODO: verify.
-         canonicalize = TRUE; // always canonicalize host ID
-     }
- 
--    // put the locale id into a canonical form,
--    //   in preparation for looking up this locale in the hash table of
--    //   already-created locale objects.
--    //
--    status = U_ZERO_ERROR;
-     char localeNameBuf[512];
- 
-     if (canonicalize) {
-@@ -148,100 +148,37 @@
-     localeNameBuf[sizeof(localeNameBuf)-1] = 0;  // Force null termination in event of
-                                                  //   a long name filling the buffer.
-                                                  //   (long names are truncated.)
-+                                                 //
-+    if (U_FAILURE(status)) {
-+        return gDefaultLocale;
-+    }
- 
--    // Lazy creation of the hash table itself, if needed.
--    UBool isOnlyLocale;
--    UMTX_CHECK(NULL, (gDefaultLocale == NULL), isOnlyLocale);
--    if (isOnlyLocale) {
--        // We haven't seen this locale id before.
--        // Create a new Locale object for it.
--        Locale *newFirstDefault = new Locale(Locale::eBOGUS);
--        if (newFirstDefault == NULL) {
--            // No way to report errors from here.
--            return;
--        }
--        newFirstDefault->init(localeNameBuf, FALSE);
--        umtx_lock(NULL);
--        if (gDefaultLocale == NULL) {
--            gDefaultLocale = newFirstDefault;  // Assignment to gDefaultLocale must happen inside mutex
--            newFirstDefault = NULL;
--            ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
--        }
--        // Else some other thread raced us through here, and set the new Locale.
--        // Use the hash table next.
--        umtx_unlock(NULL);
--        if (newFirstDefault == NULL) {
--            // We were successful in setting the locale, and we were the first one to set it.
--            return;
--        }
--        // else start using the hash table.
--    }
--
--    // Lazy creation of the hash table itself, if needed.
--    UBool hashTableNeedsInit;
--    UMTX_CHECK(NULL, (gDefaultLocalesHashT == NULL), hashTableNeedsInit);
--    if (hashTableNeedsInit) {
--        status = U_ZERO_ERROR;
--        UHashtable *tHashTable = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
-+    if (gDefaultLocalesHashT == NULL) {
-+        gDefaultLocalesHashT = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
-         if (U_FAILURE(status)) {
--            return;
-+            return gDefaultLocale;
-         }
--        uhash_setValueDeleter(tHashTable, deleteLocale);
--        umtx_lock(NULL);
--        if (gDefaultLocalesHashT == NULL) {
--            gDefaultLocalesHashT = tHashTable;
--            ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
--        } else {
--            uhash_close(tHashTable);
--            hashTableNeedsInit = FALSE;
--        }
--        umtx_unlock(NULL);
-+        uhash_setValueDeleter(gDefaultLocalesHashT, deleteLocale);
-+        ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
-     }
- 
--    // Hash table lookup, key is the locale full name
--    umtx_lock(NULL);
-     Locale *newDefault = (Locale *)uhash_get(gDefaultLocalesHashT, localeNameBuf);
--    if (newDefault != NULL) {
--        // We have the requested locale in the hash table already.
--        // Just set it as default.  Inside the mutex lock, for those troublesome processors.
--        gDefaultLocale = newDefault;
--        umtx_unlock(NULL);
--    } else {
--        umtx_unlock(NULL);
--        // We haven't seen this locale id before.
--        // Create a new Locale object for it.
-+    if (newDefault == NULL) {
-         newDefault = new Locale(Locale::eBOGUS);
-         if (newDefault == NULL) {
--            // No way to report errors from here.
--            return;
-+            status = U_MEMORY_ALLOCATION_ERROR;
-+            return gDefaultLocale;
-         }
-         newDefault->init(localeNameBuf, FALSE);
--
--        // Add newly created Locale to the hash table of default Locales
--        const char *key = newDefault->getName();
--        U_ASSERT(uprv_strcmp(key, localeNameBuf) == 0);
--        umtx_lock(NULL);
--        Locale *hashTableVal = (Locale *)uhash_get(gDefaultLocalesHashT, key);
--        if (hashTableVal == NULL) {
--            if (hashTableNeedsInit) {
--                // This is the second request to set the locale.
--                // Cache the first one.
--                uhash_put(gDefaultLocalesHashT, (void *)gDefaultLocale->getName(), gDefaultLocale, &status);
--            }
--            uhash_put(gDefaultLocalesHashT, (void *)key, newDefault, &status);
--            gDefaultLocale = newDefault;
--            // ignore errors from hash table insert.  (Couldn't do anything anyway)
--            // We can still set the default Locale,
--            //  it just wont be cached, and will eventually leak.
--        } else {
--            // Some other thread raced us through here, and got the new Locale
--            //   into the hash table before us.  Use that one.
--            gDefaultLocale = hashTableVal;  // Assignment to gDefaultLocale must happen inside mutex
--            delete newDefault;
-+        uhash_put(gDefaultLocalesHashT, (char*) newDefault->getName(), newDefault, &status);
-+        if (U_FAILURE(status)) {
-+            return gDefaultLocale;
-         }
--        umtx_unlock(NULL);
-     }
-+    gDefaultLocale = newDefault;
-+    return gDefaultLocale;
- }
-+
- U_NAMESPACE_END
- 
- /* sfb 07/21/99 */
-@@ -249,7 +186,8 @@
- locale_set_default(const char *id)
- {
-     U_NAMESPACE_USE
--    locale_set_default_internal(id);
-+    UErrorCode status = U_ZERO_ERROR;
-+    locale_set_default_internal(id, status);
- }
- /* end */
- 
-@@ -257,7 +195,6 @@
- locale_get_default(void)
- {
-     U_NAMESPACE_USE
--
-     return Locale::getDefault().getName();
- }
- 
-@@ -663,19 +600,14 @@
- const Locale& U_EXPORT2
- Locale::getDefault()
- {
--    const Locale *retLocale;
--    UMTX_CHECK(NULL, gDefaultLocale, retLocale);
--    if (retLocale == NULL) {
--        locale_set_default_internal(NULL);
--        umtx_lock(NULL);
--        // Need a mutex  in case some other thread set a new
--        // default inbetween when we set and when we get the new default.  For
--        // processors with weak memory coherency, we might not otherwise see all
--        // of the newly created new default locale.
--        retLocale = gDefaultLocale;
--        umtx_unlock(NULL);
-+    {
-+        Mutex lock(&gDefaultLocaleMutex);
-+        if (gDefaultLocale != NULL) {
-+            return *gDefaultLocale;
-+        }
-     }
--    return *retLocale;
-+    UErrorCode status = U_ZERO_ERROR;
-+    return *locale_set_default_internal(NULL, status);
- }
- 
- 
-@@ -692,7 +624,7 @@
-      * This is a convenient way to access the default locale caching mechanisms.
-      */
-     const char *localeID = newLocale.getName();
--    locale_set_default_internal(localeID);
-+    locale_set_default_internal(localeID, status);
- }
- 
- Locale U_EXPORT2
-diff -ruN icu.orig/source/common/unicode/locid.h icu/source/common/unicode/locid.h
---- build/icu.orig/source/common/unicode/locid.h	2012-04-05 22:46:08.000000000 +0200
-+++ build/icu/source/common/unicode/locid.h	2013-03-05 21:54:11.975608225 +0100
-@@ -738,7 +738,7 @@
-      * A friend to allow the default locale to be set by either the C or C++ API.
-      * @internal
-      */
--    friend void locale_set_default_internal(const char *);
-+    friend Locale *locale_set_default_internal(const char *, UErrorCode& status);
- };
- 
- inline UBool
diff --git a/libcdr/ExternalProject_libcdr.mk b/libcdr/ExternalProject_libcdr.mk
index f2f84b3..1ca3d04 100644
--- a/libcdr/ExternalProject_libcdr.mk
+++ b/libcdr/ExternalProject_libcdr.mk
@@ -29,7 +29,9 @@
 	$(call gb_ExternalProject_run,build,\
 		export PKG_CONFIG="" \
 		&& export ICU_LIBS=" " \
-		&& export ICU_CFLAGS="$(if $(filter NO,$(SYSTEM_ICU)),-I$(OUTDIR)/inc/external, )" \
+		&& export ICU_CFLAGS="$(if $(filter NO,$(SYSTEM_ICU)),\
+		$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
+		$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source/common, )" \
 		&& ./configure \
 			--with-pic \
 			--enable-static \
diff --git a/libmspub/ExternalProject_libmspub.mk b/libmspub/ExternalProject_libmspub.mk
index bd93b40..b9f4df1 100644
--- a/libmspub/ExternalProject_libmspub.mk
+++ b/libmspub/ExternalProject_libmspub.mk
@@ -27,7 +27,9 @@
 $(call gb_ExternalProject_get_state_target,libmspub,build) :
 	$(call gb_ExternalProject_run,build,\
 		export PKG_CONFIG="" \
-		&& export ICU_LIBS=" " && export ICU_CFLAGS="-I$(OUTDIR)/inc/external" \
+		&& export ICU_LIBS=" " \
+		&& export ICU_CFLAGS="$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,icu)/source/common" \
 		&& export LIBMSPUB_CFLAGS="$(WPG_CFLAGS) $(WPD_CFLAGS)" \
 		&& export LIBMSPUB_LIBS="$(WPG_LIBS) $(WPD_LIBS)" \
 		&& ./configure \
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 815ace6..ab482b4 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -108,6 +108,7 @@
                             : mrServerFont( rFont )
                             {}
 
+    using LEFontInstance::getFontTable;
     virtual const void*     getFontTable(LETag tableTag) const;
     virtual le_int32        getUnitsPerEM() const;
     virtual float           getXPixelsPerEm() const;
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 872e633..917228d 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -87,6 +87,7 @@
 
 $(eval $(call gb_Library_use_externals,writerfilter,\
 	boost_headers \
+	icu_headers \
 	libxml2 \
 ))
 

-- 
To view, visit https://gerrit.libreoffice.org/2953
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c0d5ca4b2f88ca48225fcdbeb978f27fa91f7a6
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Peter Foley <pefoley2 at verizon.net>



More information about the LibreOffice mailing list