File texlive-20110705-source-icu.patch of Package mingw64-texlive

diff -Naur texlive-20110705-source/libs/icu/icu-4.6/common/unicode/platform.h.in texlive-20110705-source.icu/libs/icu/icu-4.6/common/unicode/platform.h.in
--- texlive-20110705-source/libs/icu/icu-4.6/common/unicode/platform.h.in	2010-12-03 10:05:05.000000000 +0100
+++ texlive-20110705-source.icu/libs/icu/icu-4.6/common/unicode/platform.h.in	2011-11-24 15:45:52.541388569 +0100
@@ -249,6 +249,12 @@
 #ifndef U_GNUC_UTF16_STRING
 #define U_GNUC_UTF16_STRING @U_CHECK_GNUC_UTF16_STRING@
 #endif
+
+/**
+ * Never define U_DECLARE_UTF16 for MinGW, as that will cause
+ * bogus UNICODE_STRING and U_STRING_DECL definitions.
+ */
+#ifndef __MINGW32__
 #if @U_CHECK_UTF16_STRING@ || defined(U_CHECK_UTF16_STRING)
 #if (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
     || (defined(__HP_aCC) && __HP_aCC >= 035000) \
@@ -264,6 +270,7 @@
 #define U_DECLARE_UTF16(string) L ## string
 #endif
 #endif
+#endif
 
 /** @} */
 
diff -Naur texlive-20110705-source/libs/icu/icu-4.6/common/wintz.c texlive-20110705-source.icu/libs/icu/icu-4.6/common/wintz.c
--- texlive-20110705-source/libs/icu/icu-4.6/common/wintz.c	2010-03-30 13:21:43.000000000 +0200
+++ texlive-20110705-source.icu/libs/icu/icu-4.6/common/wintz.c	2011-11-24 15:45:52.549388603 +0100
@@ -113,7 +113,7 @@
         }
     }
 
-    return winType+1; // +1 to bring it inline with the enum
+    return winType+1; /* +1 to bring it inline with the enum */
 }
 
 static LONG openTZRegKey(HKEY *hkey, const char *winid)
diff -Naur texlive-20110705-source/libs/icu/icu-4.6/config/icu.pc.in texlive-20110705-source.icu/libs/icu/icu-4.6/config/icu.pc.in
--- texlive-20110705-source/libs/icu/icu-4.6/config/icu.pc.in	2010-12-03 10:05:05.000000000 +0100
+++ texlive-20110705-source.icu/libs/icu/icu-4.6/config/icu.pc.in	2011-11-24 15:45:52.553388627 +0100
@@ -1,27 +1,27 @@
 # Copyright (C) 2010, International Business Machines Corporation. All Rights Reserved.
 
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-#bindir = @bindir@
-libdir = @libdir@
-includedir = @includedir@
-baselibs = @LIBS@
-#datarootdir = @datarootdir@
-#datadir = @datadir@
-#sbindir = @sbindir@
-#mandir = @mandir@
-#sysconfdir = @sysconfdir@
-CFLAGS = @CFLAGS@ 
-#CXXFLAGS = @CXXFLAGS@ 
-DEFS = @DEFS@ 
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+#bindir=@bindir@
+libdir=@libdir@
+includedir=@includedir@
+baselibs=@LIBS@
+#datarootdir=@datarootdir@
+#datadir=@datadir@
+#sbindir=@sbindir@
+#mandir=@mandir@
+#sysconfdir=@sysconfdir@
+CFLAGS=@CFLAGS@ 
+#CXXFLAGS=@CXXFLAGS@ 
+DEFS=@DEFS@ 
 UNICODE_VERSION=@UNICODE_VERSION@
 ICUPREFIX=icu
 ICULIBSUFFIX=@ICULIBSUFFIX@
-LIBICU=lib${ICUPREFIX}
+LIBICU=${ICUPREFIX}
 #SHAREDLIBCFLAGS=-fPIC
 pkglibdir=${libdir}/@PACKAGE@${ICULIBSUFFIX}/@VERSION@
 #pkgdatadir=${datadir}/@PACKAGE@${ICULIBSUFFIX}/@VERSION@
-ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
+ICUDATA_NAME=icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
 #ICUPKGDATA_DIR=@libdir@
 #ICUDATA_DIR=${pkgdatadir}
 ICUDESC=International Components for Unicode
diff -Naur texlive-20110705-source/libs/icu/icu-4.6/config/Makefile.inc.in texlive-20110705-source.icu/libs/icu/icu-4.6/config/Makefile.inc.in
--- texlive-20110705-source/libs/icu/icu-4.6/config/Makefile.inc.in	2011-05-09 11:22:03.000000000 +0200
+++ texlive-20110705-source.icu/libs/icu/icu-4.6/config/Makefile.inc.in	2011-11-24 15:45:52.561388666 +0100
@@ -41,7 +41,7 @@
 # The prefix for ICU libraries, normally 'icu'
 ICUPREFIX = icu
 PACKAGE = @PACKAGE@
-LIBICU = lib$(ICUPREFIX)
+LIBICU = $(ICUPREFIX)
 
 # Static library prefix and file extension
 STATIC_PREFIX =
@@ -113,6 +113,7 @@
 ICULIBS_BASE = $(LIBS) -L$(libdir)
 
 # for icu-config to test with
+SO = lib
 ICULIBS_COMMON_LIB_NAME = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
 ICULIBS_COMMON_LIB_NAME_A = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}
 
diff -Naur texlive-20110705-source/libs/icu/icu-4.6/config/mh-mingw texlive-20110705-source.icu/libs/icu/icu-4.6/config/mh-mingw
--- texlive-20110705-source/libs/icu/icu-4.6/config/mh-mingw	2010-12-07 10:19:15.000000000 +0100
+++ texlive-20110705-source.icu/libs/icu/icu-4.6/config/mh-mingw	2011-11-24 17:04:16.056712037 +0100
@@ -38,8 +38,10 @@
 #LINK.cc=      $(CXX) $(CXXFLAGS) $(LDFLAGS)
 
 ## Commands to make a shared library
-SHLIB.c=	$(CC) $(CFLAGS) $(LDFLAGS) -shared
-SHLIB.cc=	$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
+# $(subst) won't work in shell script.  #M# at the end omits these
+# lines from the shell script (Make only)
+SHLIB.c=	$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,--enable-auto-import -Wl,--out-implib=$(subst $(SO_TARGET_VERSION_MAJOR),,$(subst $(ICUPREFIX),$(LIBPREFIX)$(ICUPREFIX),$@)).$(A)#M#
+SHLIB.cc=	$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,--enable-auto-import -Wl,--out-implib=$(subst $(SO_TARGET_VERSION_MAJOR),,$(subst $(ICUPREFIX),$(LIBPREFIX)$(ICUPREFIX),$@)).$(A)#M#
 
 ## Compiler switch to embed a runtime search path
 LD_RPATH=	
@@ -56,7 +58,20 @@
 ## An import library is needed for z/OS and MSVC
 #IMPORT_LIB_EXT = .lib
 
-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+LIBICU = $(ICUPREFIX)
+LIBSICU = $(LIBPREFIX)$(ICUPREFIX)
+## To have an import library is better on Windows
+IMPORT_LIB_EXT = .dll.a
+
+LIBICU = $(ICUPREFIX)
+ICULIBS_DT       = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_UC       = -l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_I18N     = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_LE       = -l$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_LX       = -l$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_IO       = -l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_CTESTFW  = -l$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_TOOLUTIL = -l$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)
 
 # The #M# is used to delete lines for icu-config
 # Current full path directory.
@@ -92,21 +107,32 @@
 ## Versioned target for a shared library.
 ## Since symbolic links don't work the same way on Windows,
 ## we only use the version major number.
-#FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
 FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
 MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
+SHARED_OBJECT = $(FINAL_SO_TARGET)
 
-## Special pkgdata information that is needed
-PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
-#ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
-#ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M#
+IMPORT_LIB = $(subst $(ICUPREFIX),$(LIBPREFIX)$(ICUPREFIX),$(basename $(SO_TARGET))).$(SO).$(A)#M#
+MIDDLE_IMPORT_LIB = $(IMPORT_LIB)#M#
+FINAL_IMPORT_LIB = $(IMPORT_LIB)#M#
+
+# The following is for Makefile.inc's use.
+ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
 
 ## Versioned libraries rules
-#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
-#	$(RM) $@ && cp ${<F} $@
 %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
 	@echo -n
 
+## Install libraries as executable
+INSTALL-L=$(INSTALL_PROGRAM)
+
+##  Bind internal references
+
+# LDflags that pkgdata will use
+BIR_LDFLAGS= -Wl,-Bsymbolic
+
+# Dependencies [i.e. map files] for the final library
+BIR_DEPS=
+
 # Environment variable to set a runtime search path
 LDLIBRARYPATH_ENVVAR = PATH
 
diff -Naur texlive-20110705-source/libs/icu/icu-4.6/tools/toolutil/pkg_genc.c texlive-20110705-source.icu/libs/icu/icu-4.6/tools/toolutil/pkg_genc.c
--- texlive-20110705-source/libs/icu/icu-4.6/tools/toolutil/pkg_genc.c	2010-12-03 10:05:05.000000000 +0100
+++ texlive-20110705-source.icu/libs/icu/icu-4.6/tools/toolutil/pkg_genc.c	2011-11-24 15:45:52.649389098 +0100
@@ -145,6 +145,22 @@
 
         ".long ","",HEX_0X
     },
+    {"gcc-mingw-x86",
+        ".globl _%s\n"
+        "\t.section .rdata,\"dr\"\n"
+        "\t.align 4\n"
+        "_%s:\n\n",
+
+        ".long ","",HEX_0X
+    },
+    {"gcc-mingw-x64",
+        ".globl %s\n"
+        "\t.section .rdata,\"dr\"\n"
+        "\t.align 16\n" /* Either align 8 bytes or 2^8 (256) bytes. 8 bytes is needed. */
+        "%s:\n\n",
+
+        ".long ","",HEX_0X
+    },
     {"sun",
         "\t.section \".rodata\"\n"
         "\t.align   8\n"
openSUSE Build Service is sponsored by