From: Andrea Zagli Date: Sun, 22 Apr 2018 07:06:37 +0000 (+0200) Subject: icu pkg: aggiunto da msys2 upstream con patch per winxp. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=2623b4de0eb7cdaf99b0c97e7e3cdbf4428f4270;p=msys2 icu pkg: aggiunto da msys2 upstream con patch per winxp. --- diff --git a/packages/mingw-w64-icu/0004-move-to-bin.mingw.patch b/packages/mingw-w64-icu/0004-move-to-bin.mingw.patch new file mode 100644 index 0000000..f9274e7 --- /dev/null +++ b/packages/mingw-w64-icu/0004-move-to-bin.mingw.patch @@ -0,0 +1,19 @@ +diff -Naur icu-orig/source/tools/genren/Makefile icu/source/tools/genren/Makefile +--- icu-orig/source/tools/genren/Makefile 2016-09-21 09:07:26.000000000 +0300 ++++ icu/source/tools/genren/Makefile 2018-03-01 10:09:05.338601800 +0300 +@@ -32,11 +32,11 @@ + include $(BUILDDIR)/icudefs.mk + endif + +-COM=$(ICUDIR)/lib/libicuuc.$(SO) +-I18=$(ICUDIR)/lib/libicui18n.$(SO) +-LEX=$(ICUDIR)/lib/libiculx.$(SO) ++COM=$(ICUDIR)/bin/libicuuc.$(SO) ++I18=$(ICUDIR)/bin/libicui18n.$(SO) ++LEX=$(ICUDIR)/bin/libiculx.$(SO) + DAT=$(ICUDIR)/stubdata/libicudata.$(SO) +-UIO=$(ICUDIR)/lib/libicuio.$(SO) ++UIO=$(ICUDIR)/bin/libicuio.$(SO) + + LIBS=$(COM) $(I18) $(LEX) $(UIO) + diff --git a/packages/mingw-w64-icu/0007-actually-move-to-bin.mingw.patch b/packages/mingw-w64-icu/0007-actually-move-to-bin.mingw.patch new file mode 100644 index 0000000..4fd9fd6 --- /dev/null +++ b/packages/mingw-w64-icu/0007-actually-move-to-bin.mingw.patch @@ -0,0 +1,168 @@ +diff -Naur icu-orig/source/common/Makefile.in icu/source/common/Makefile.in +--- icu-orig/source/common/Makefile.in 2016-09-09 19:41:15.000000000 +0300 ++++ icu/source/common/Makefile.in 2018-03-01 10:09:13.513016200 +0300 +@@ -147,16 +147,16 @@ + install-local: install-headers install-library + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) +diff -Naur icu-orig/source/i18n/Makefile.in icu/source/i18n/Makefile.in +--- icu-orig/source/i18n/Makefile.in 2016-09-14 01:15:13.000000000 +0300 ++++ icu/source/i18n/Makefile.in 2018-03-01 10:09:13.528616200 +0300 +@@ -135,16 +135,16 @@ + install-local: install-headers install-library + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) +diff -Naur icu-orig/source/io/Makefile.in icu/source/io/Makefile.in +--- icu-orig/source/io/Makefile.in 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/io/Makefile.in 2018-03-01 10:09:13.825016700 +0300 +@@ -96,16 +96,16 @@ + install-local: install-headers install-library + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) +diff -Naur icu-orig/source/layoutex/Makefile.in icu/source/layoutex/Makefile.in +--- icu-orig/source/layoutex/Makefile.in 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/layoutex/Makefile.in 2018-03-01 10:09:13.856216800 +0300 +@@ -109,16 +109,16 @@ + endif + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) +diff -Naur icu-orig/source/stubdata/Makefile.in icu/source/stubdata/Makefile.in +--- icu-orig/source/stubdata/Makefile.in 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/stubdata/Makefile.in 2018-03-01 10:09:13.887416800 +0300 +@@ -82,16 +82,16 @@ + install-local: install-library + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) +diff -Naur icu-orig/source/tools/ctestfw/Makefile.in icu/source/tools/ctestfw/Makefile.in +--- icu-orig/source/tools/ctestfw/Makefile.in 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/tools/ctestfw/Makefile.in 2018-03-01 10:09:13.918616900 +0300 +@@ -78,16 +78,16 @@ + install-local: install-library + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) +diff -Naur icu-orig/source/tools/toolutil/Makefile.in icu/source/tools/toolutil/Makefile.in +--- icu-orig/source/tools/toolutil/Makefile.in 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/tools/toolutil/Makefile.in 2018-03-01 10:09:13.981017000 +0300 +@@ -89,16 +89,16 @@ + install-local: install-library + + install-library: all-local +- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + ifneq ($(ENABLE_STATIC),) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) + endif + ifneq ($(ENABLE_SHARED),) +- $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ++ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) + ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) + ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) +- cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) ++ cd $(DESTDIR)$(bindir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) + endif + endif + ifneq ($(IMPORT_LIB_EXT),) diff --git a/packages/mingw-w64-icu/0008-data-install-dir.mingw.patch b/packages/mingw-w64-icu/0008-data-install-dir.mingw.patch new file mode 100644 index 0000000..53ed0f9 --- /dev/null +++ b/packages/mingw-w64-icu/0008-data-install-dir.mingw.patch @@ -0,0 +1,12 @@ +diff -Naur icu-orig/source/data/Makefile.in icu/source/data/Makefile.in +--- icu-orig/source/data/Makefile.in 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/data/Makefile.in 2018-03-01 10:09:15.837420200 +0300 +@@ -213,7 +213,7 @@ + endif + ifneq ($(ENABLE_STATIC),) + ifeq ($(PKGDATA_MODE),dll) +- $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR) ++ $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(DESTDIR)$(bindir) + endif + endif + ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) diff --git a/packages/mingw-w64-icu/0009-fix-bindir-in-config.mingw.patch b/packages/mingw-w64-icu/0009-fix-bindir-in-config.mingw.patch new file mode 100644 index 0000000..8974e78 --- /dev/null +++ b/packages/mingw-w64-icu/0009-fix-bindir-in-config.mingw.patch @@ -0,0 +1,12 @@ +diff -Naur icu-orig/source/config/icu-config-bottom icu/source/config/icu-config-bottom +--- icu-orig/source/config/icu-config-bottom 2016-09-10 00:28:18.000000000 +0300 ++++ icu/source/config/icu-config-bottom 2018-03-01 10:09:17.662623400 +0300 +@@ -5,7 +5,7 @@ + ## Copyright (c) 2002-2013, International Business Machines Corporation and + ## others. All Rights Reserved. + +-ICUUC_FILE="${libdir}/${ICULIBS_COMMON_LIB_NAME}" ++ICUUC_FILE="${bindir}/${ICULIBS_COMMON_LIB_NAME}" + ICUUC_FILE_A="${libdir}/${ICULIBS_COMMON_LIB_NAME_A}" + + # echo ENABLE RPATH $ENABLE_RPATH and RPATHLDFLAGS=${RPATH_LDFLAGS} diff --git a/packages/mingw-w64-icu/0010-msys-rules-for-makefiles.mingw.patch b/packages/mingw-w64-icu/0010-msys-rules-for-makefiles.mingw.patch new file mode 100644 index 0000000..044e37e --- /dev/null +++ b/packages/mingw-w64-icu/0010-msys-rules-for-makefiles.mingw.patch @@ -0,0 +1,38 @@ +diff -Naur icu-orig/source/config/mh-mingw icu/source/config/mh-mingw +--- icu-orig/source/config/mh-mingw 2016-09-13 23:29:47.000000000 +0300 ++++ icu/source/config/mh-mingw 2018-03-01 10:09:19.300626300 +0300 +@@ -96,11 +96,11 @@ + + # The #M# is used to delete lines for icu-config + # Current full path directory. +-#CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS +-CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell ++CURR_FULL_DIR=$(shell $(SHELL) -c "pwd -W")#M# for MSYS ++#CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell + # Current full path directory for use in source code in a -D compiler option. +-#CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS +-CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell ++CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell $(SHELL) -c "pwd -W"))#M# for MSYS ++#CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell + + ## Compilation rules + %.$(STATIC_O): $(srcdir)/%.c +diff -Naur icu-orig/source/config/mh-mingw64 icu/source/config/mh-mingw64 +--- icu-orig/source/config/mh-mingw64 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/config/mh-mingw64 2018-03-01 10:09:19.300626300 +0300 +@@ -96,11 +96,11 @@ + + # The #M# is used to delete lines for icu-config + # Current full path directory. +-#CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS +-CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell ++CURR_FULL_DIR=$(shell $(SHELL) -c "pwd -W")#M# for MSYS ++#CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell + # Current full path directory for use in source code in a -D compiler option. +-#CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS +-CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell ++CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell $(SHELL) -c "pwd -W"))#M# for MSYS ++#CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell + + ## Compilation rules + %.$(STATIC_O): $(srcdir)/%.c diff --git a/packages/mingw-w64-icu/0011-sbin-dir.mingw.patch b/packages/mingw-w64-icu/0011-sbin-dir.mingw.patch new file mode 100644 index 0000000..1bca770 --- /dev/null +++ b/packages/mingw-w64-icu/0011-sbin-dir.mingw.patch @@ -0,0 +1,30 @@ +diff -Naur icu-orig/source/config/mh-mingw icu/source/config/mh-mingw +--- icu-orig/source/config/mh-mingw 2018-03-01 10:09:20.533028500 +0300 ++++ icu/source/config/mh-mingw 2018-03-01 10:09:21.141429600 +0300 +@@ -10,11 +10,6 @@ + # This file is similar to mh-mingw64 + # Any changes made here may also need to be made in mh-mingw64 + +-# We install sbin tools into the same bin directory because +-# pkgdata needs some of the tools in sbin, and we can't always depend on +-# icu-config working on Windows. +-sbindir=$(bindir) +- + ## Commands to generate dependency files + GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) + GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) +diff -Naur icu-orig/source/config/mh-mingw64 icu/source/config/mh-mingw64 +--- icu-orig/source/config/mh-mingw64 2018-03-01 10:09:20.548628500 +0300 ++++ icu/source/config/mh-mingw64 2018-03-01 10:09:21.141429600 +0300 +@@ -10,11 +10,6 @@ + # This file is similar to mh-mingw + # Any changes made here may also need to be made in mh-mingw + +-# We install sbin tools into the same bin directory because +-# pkgdata needs some of the tools in sbin, and we can't always depend on +-# icu-config working on Windows. +-sbindir=$(bindir) +- + ## Commands to generate dependency files + GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) + GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) diff --git a/packages/mingw-w64-icu/0012-libprefix.mingw.patch b/packages/mingw-w64-icu/0012-libprefix.mingw.patch new file mode 100644 index 0000000..93a3607 --- /dev/null +++ b/packages/mingw-w64-icu/0012-libprefix.mingw.patch @@ -0,0 +1,78 @@ +diff -Naur icu-orig/source/config/mh-mingw icu/source/config/mh-mingw +--- icu-orig/source/config/mh-mingw 2018-03-01 10:09:22.529832000 +0300 ++++ icu/source/config/mh-mingw 2018-03-01 10:09:23.060232900 +0300 +@@ -41,8 +41,8 @@ + LD_SOOPTIONS= -Wl,-Bsymbolic + + ## Commands to make a shared library +-SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)lib$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# +-SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)lib$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# ++SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# ++SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# + + ## Compiler switch to embed a runtime search path + LD_RPATH= +@@ -75,7 +75,7 @@ + # This is also for backwards compatibility. + DATA_STUBNAME = dt + I18N_STUBNAME = in +-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) ++LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + + #SH### copied from Makefile.inc + #SH## for icu-config to test with +@@ -127,7 +127,7 @@ + FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) + MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) + +-FINAL_IMPORT_LIB = $(dir $(SO_TARGET))lib$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M# ++FINAL_IMPORT_LIB = $(dir $(SO_TARGET))$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M# + IMPORT_LIB = $(FINAL_IMPORT_LIB)#M# + MIDDLE_IMPORT_LIB = $(FINAL_IMPORT_LIB)#M# + +diff -Naur icu-orig/source/config/mh-mingw64 icu/source/config/mh-mingw64 +--- icu-orig/source/config/mh-mingw64 2018-03-01 10:09:22.545432000 +0300 ++++ icu/source/config/mh-mingw64 2018-03-01 10:09:23.060232900 +0300 +@@ -41,8 +41,8 @@ + LD_SOOPTIONS= -Wl,-Bsymbolic + + ## Commands to make a shared library +-SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)lib$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# +-SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)lib$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# ++SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# ++SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# + + ## Compiler switch to embed a runtime search path + LD_RPATH= +@@ -63,19 +63,19 @@ + endif + + # Static library prefix and file extension +-LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) ++LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) + A = a + + ## An import library is needed for z/OS and MSVC + IMPORT_LIB_EXT = .dll.a + +-LIBPREFIX= ++LIBPREFIX=lib + + # Change the stubnames so that poorly working FAT disks and installation programs can work. + # This is also for backwards compatibility. + DATA_STUBNAME = dt + I18N_STUBNAME = in +-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) ++LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + + #SH### copied from Makefile.inc + #SH## for icu-config to test with +@@ -127,7 +127,7 @@ + FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) + MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) + +-FINAL_IMPORT_LIB = $(dir $(SO_TARGET))lib$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M# ++FINAL_IMPORT_LIB = $(dir $(SO_TARGET))$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M# + IMPORT_LIB = $(FINAL_IMPORT_LIB)#M# + MIDDLE_IMPORT_LIB = $(FINAL_IMPORT_LIB)#M# + diff --git a/packages/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch b/packages/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch new file mode 100644 index 0000000..5f561df --- /dev/null +++ b/packages/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch @@ -0,0 +1,42 @@ +diff -Naur icu-orig/source/tools/pkgdata/pkgdata.cpp icu/source/tools/pkgdata/pkgdata.cpp +--- icu-orig/source/tools/pkgdata/pkgdata.cpp 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/tools/pkgdata/pkgdata.cpp 2018-03-01 10:09:24.760635900 +0300 +@@ -893,20 +893,9 @@ + const char* FILE_EXTENSION_SEP = uprv_strlen(pkgDataFlags[SO_EXT]) == 0 ? "" : "."; + const char* FILE_SUFFIX = pkgDataFlags[LIB_EXT_ORDER][0] == '.' ? "." : ""; + +-#if U_PLATFORM == U_PF_MINGW +- /* MinGW does not need the library prefix when building in dll mode. */ +- if (IN_DLL_MODE(mode)) { +- sprintf(libFileNames[LIB_FILE], "%s", libName); +- } else { +- sprintf(libFileNames[LIB_FILE], "%s%s", +- pkgDataFlags[LIBPREFIX], +- libName); +- } +-#else + sprintf(libFileNames[LIB_FILE], "%s%s", + pkgDataFlags[LIBPREFIX], + libName); +-#endif + + if(o->verbose) { + fprintf(stdout, "# libFileName[LIB_FILE] = %s\n", libFileNames[LIB_FILE]); +diff -Naur icu-orig/source/tools/pkgdata/pkgtypes.h icu/source/tools/pkgdata/pkgtypes.h +--- icu-orig/source/tools/pkgdata/pkgtypes.h 2016-06-15 21:58:17.000000000 +0300 ++++ icu/source/tools/pkgdata/pkgtypes.h 2018-03-01 10:09:24.760635900 +0300 +@@ -140,10 +140,10 @@ + # ifndef UDATA_SO_SUFFIX + # define UDATA_SO_SUFFIX ".dll" + # endif +-# define LIB_PREFIX "" +-# define LIB_STATIC_PREFIX "" +-# define OBJ_SUFFIX ".obj" +-# define UDATA_LIB_SUFFIX ".lib" ++# define LIB_PREFIX "lib" ++# define LIB_STATIC_PREFIX "lib" ++# define OBJ_SUFFIX ".o" ++# define UDATA_LIB_SUFFIX ".a" + + #elif U_PLATFORM == U_PF_CYGWIN + # define LIB_PREFIX "cyg" diff --git a/packages/mingw-w64-icu/0015-debug.mingw.patch b/packages/mingw-w64-icu/0015-debug.mingw.patch new file mode 100644 index 0000000..1e89016 --- /dev/null +++ b/packages/mingw-w64-icu/0015-debug.mingw.patch @@ -0,0 +1,34 @@ +diff -Naur icu-orig/source/configure.ac icu/source/configure.ac +--- icu-orig/source/configure.ac 2016-10-04 22:30:20.000000000 +0300 ++++ icu/source/configure.ac 2018-03-01 10:09:26.414238800 +0300 +@@ -1223,7 +1223,7 @@ + if test "$ICULIBSUFFIX" != "" + then + U_HAVE_LIB_SUFFIX=1 +- ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'` ++ ICULIBSUFFIXCNAME=`echo $ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'` + UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} " + else + U_HAVE_LIB_SUFFIX=0 +diff -Naur icu-orig/source/tools/pkgdata/pkgdata.cpp icu/source/tools/pkgdata/pkgdata.cpp +--- icu-orig/source/tools/pkgdata/pkgdata.cpp 2018-03-01 10:09:26.024238100 +0300 ++++ icu/source/tools/pkgdata/pkgdata.cpp 2018-03-01 10:09:26.414238800 +0300 +@@ -1375,6 +1375,18 @@ + freeCmd = TRUE; + } + #if U_PLATFORM == U_PF_MINGW ++ fprintf(stderr, "genlib=%s targetdir=%s libfilenames=%s -o pkgdataflags=%s targetdir=%s libfilenames=%s objectfileandeverythingelse=%s %s%s %s %s", ++ pkgDataFlags[GENLIB], ++ targetDir, ++ libFileNames[LIB_FILE_MINGW], ++ pkgDataFlags[LDICUDTFLAGS], ++ targetDir, ++ libFileNames[LIB_FILE_VERSION_TMP], ++ objectFile, ++ pkgDataFlags[LD_SONAME], ++ pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION_MAJOR], ++ pkgDataFlags[RPATH_FLAGS], ++ pkgDataFlags[BIR_FLAGS]); + sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s", + pkgDataFlags[GENLIB], + targetDir, diff --git a/packages/mingw-w64-icu/0016-icu-pkgconfig.patch b/packages/mingw-w64-icu/0016-icu-pkgconfig.patch new file mode 100644 index 0000000..f1efb5d --- /dev/null +++ b/packages/mingw-w64-icu/0016-icu-pkgconfig.patch @@ -0,0 +1,32 @@ +diff -Naur icu-orig/source/icudefs.mk.in icu/source/icudefs.mk.in +--- icu-orig/source/icudefs.mk.in 2016-09-10 00:28:18.000000000 +0300 ++++ icu/source/icudefs.mk.in 2018-03-01 10:09:28.099041800 +0300 +@@ -258,6 +258,7 @@ + ICULEHB_TRUE= + ICULEHB_FALSE=# + ICULIBS_LE=$(ICULEHB_LIBS) ++ICULIBS_LE=$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX) + ICULE_CFLAGS=$(ICULEHB_CFLAGS) -DUSING_ICULEHB + else + USING_ICULEHB=no +@@ -266,13 +267,13 @@ + endif + + # Just the libs. +-ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +-ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +-ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +-ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +-ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +-ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +-ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) ++ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX) + # Link commands to link to ICU libs + LLIBDIR = -L$(LIBDIR) + LSTUBDIR = -L$(top_builddir)/stubdata diff --git a/packages/mingw-w64-icu/0017-icu-config-versioning.patch b/packages/mingw-w64-icu/0017-icu-config-versioning.patch new file mode 100644 index 0000000..5f9c0f8 --- /dev/null +++ b/packages/mingw-w64-icu/0017-icu-config-versioning.patch @@ -0,0 +1,70 @@ +diff -Naur icu-orig/source/config/Makefile.inc.in icu/source/config/Makefile.inc.in +--- icu-orig/source/config/Makefile.inc.in 2016-09-10 00:28:18.000000000 +0300 ++++ icu/source/config/Makefile.inc.in 2018-03-01 10:09:29.643444500 +0300 +@@ -106,14 +106,14 @@ + # - $(ICULIBS_I18N) - i18n library, formatting, etc. + # - $(ICULIBS_ICUIO) - ICU stdio equivalent library + +-ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) ++ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX) ++ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX) ++ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX) ++ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX) ++ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX) ++ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX) + ICULIBS_BASE = -L$(libdir) + + # for icu-config to test with +diff -Naur icu-orig/source/config/mh-mingw icu/source/config/mh-mingw +--- icu-orig/source/config/mh-mingw 2018-03-01 10:09:24.339435200 +0300 ++++ icu/source/config/mh-mingw 2018-03-01 10:09:29.627844500 +0300 +@@ -77,13 +77,16 @@ + I18N_STUBNAME = in + LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + ++# The following is for Makefile.inc's use. ++ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) ++ + #SH### copied from Makefile.inc + #SH## for icu-config to test with + #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" + #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" + +-#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" +-#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" ++#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" ++#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" + #SH# + #SH## ICULIBS is the set of libraries your application should link + #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. +diff -Naur icu-orig/source/config/mh-mingw64 icu/source/config/mh-mingw64 +--- icu-orig/source/config/mh-mingw64 2018-03-01 10:09:24.339435200 +0300 ++++ icu/source/config/mh-mingw64 2018-03-01 10:09:29.627844500 +0300 +@@ -77,13 +77,16 @@ + I18N_STUBNAME = in + LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + ++# The following is for Makefile.inc's use. ++ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) ++ + #SH### copied from Makefile.inc + #SH## for icu-config to test with + #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" + #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" + +-#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" +-#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" ++#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" ++#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" + #SH# + #SH## ICULIBS is the set of libraries your application should link + #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. diff --git a/packages/mingw-w64-icu/0020-workaround-missing-locale.patch b/packages/mingw-w64-icu/0020-workaround-missing-locale.patch new file mode 100644 index 0000000..168e22f --- /dev/null +++ b/packages/mingw-w64-icu/0020-workaround-missing-locale.patch @@ -0,0 +1,33 @@ +diff -Naur icu-orig/source/i18n/digitlst.cpp icu/source/i18n/digitlst.cpp +--- icu-orig/source/i18n/digitlst.cpp 2016-10-27 04:37:56.000000000 +0300 ++++ icu/source/i18n/digitlst.cpp 2018-03-01 10:09:31.297047400 +0300 +@@ -489,7 +489,20 @@ + + #if U_USE_STRTOD_L && U_PLATFORM_USES_ONLY_WIN32_API + # define locale_t _locale_t ++// Stubs ++#if defined(__MINGW32__) ++inline locale_t createlocale(int _Category,const char *_Locale) { ++ locale_t loc; ++ return loc; ++} ++ ++inline void freelocale(locale_t _Locale) { ++ ++} ++#else + # define freelocale _free_locale ++# define createlocale _create_locale ++#endif + # define strtod_l _strtod_l + #endif + +@@ -514,7 +527,7 @@ + ucln_i18n_registerCleanup(UCLN_I18N_DIGITLIST, digitList_cleanup); + #if U_USE_STRTOD_L + # if U_PLATFORM_USES_ONLY_WIN32_API +- gCLocale = _create_locale(LC_ALL, "C"); ++ gCLocale = createlocale(LC_ALL, "C"); + # else + gCLocale = newlocale(LC_ALL_MASK, "C", (locale_t)0); + # endif diff --git a/packages/mingw-w64-icu/0021-mingw-static-libraries-without-s.patch b/packages/mingw-w64-icu/0021-mingw-static-libraries-without-s.patch new file mode 100644 index 0000000..f2a55b1 --- /dev/null +++ b/packages/mingw-w64-icu/0021-mingw-static-libraries-without-s.patch @@ -0,0 +1,26 @@ +diff -Naur icu-orig/source/config/mh-mingw icu/source/config/mh-mingw +--- icu-orig/source/config/mh-mingw 2018-03-01 10:09:30.907046700 +0300 ++++ icu/source/config/mh-mingw 2018-03-01 10:19:05.831438700 +0300 +@@ -62,6 +62,9 @@ + SO_TARGET_VERSION_SUFFIX = + endif + ++STATIC_PREFIX_WHEN_USED = ++STATIC_PREFIX = ++ + # Static library prefix and file extension + LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) + A = a +diff -Naur icu-orig/source/config/mh-mingw64 icu/source/config/mh-mingw64 +--- icu-orig/source/config/mh-mingw64 2018-03-01 10:09:30.907046700 +0300 ++++ icu/source/config/mh-mingw64 2018-03-01 10:19:13.118855500 +0300 +@@ -62,6 +62,9 @@ + SO_TARGET_VERSION_SUFFIX = + endif + ++STATIC_PREFIX_WHEN_USED = ++STATIC_PREFIX = ++ + # Static library prefix and file extension + LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) + A = a diff --git a/packages/mingw-w64-icu/0099-winxp.patch b/packages/mingw-w64-icu/0099-winxp.patch new file mode 100644 index 0000000..7fb106f --- /dev/null +++ b/packages/mingw-w64-icu/0099-winxp.patch @@ -0,0 +1,124 @@ +--- ./source/common/putil.cpp ++++ ./source/common/putil.cpp +@@ -1732,108 +1732,19 @@ + return gCorrectedPOSIXLocale; + } + +- // No cached value, need to determine the current value +- static WCHAR windowsLocale[LOCALE_NAME_MAX_LENGTH]; +-#if U_PLATFORM_HAS_WINUWP_API == 0 +- // If not a Universal Windows App, we'll need user default language. +- // Vista and above should use Locale Names instead of LCIDs +- int length = GetUserDefaultLocaleName(windowsLocale, UPRV_LENGTHOF(windowsLocale)); +-#else +- // In a UWP app, we want the top language that the application and user agreed upon +- ComPtr> languageList; +- +- ComPtr applicationLanguagesStatics; +- HRESULT hr = GetActivationFactory( +- HStringReference(RuntimeClass_Windows_Globalization_ApplicationLanguages).Get(), +- &applicationLanguagesStatics); +- if (SUCCEEDED(hr)) +- { +- hr = applicationLanguagesStatics->get_Languages(&languageList); +- } +- +- if (FAILED(hr)) +- { +- // If there is no application context, then use the top language from the user language profile +- ComPtr globalizationPreferencesStatics; +- hr = GetActivationFactory( +- HStringReference(RuntimeClass_Windows_System_UserProfile_GlobalizationPreferences).Get(), +- &globalizationPreferencesStatics); +- if (SUCCEEDED(hr)) +- { +- hr = globalizationPreferencesStatics->get_Languages(&languageList); +- } +- } +- +- // We have a list of languages, ICU knows one, so use the top one for our locale +- HString topLanguage; +- if (SUCCEEDED(hr)) +- { +- hr = languageList->GetAt(0, topLanguage.GetAddressOf()); +- } +- +- if (FAILED(hr)) +- { +- // Unexpected, use en-US by default +- if (gCorrectedPOSIXLocale == NULL) { +- gCorrectedPOSIXLocale = "en_US"; +- } +- +- return gCorrectedPOSIXLocale; +- } +- +- // ResolveLocaleName will get a likely subtags form consistent with Windows behavior. +- int length = ResolveLocaleName(topLanguage.GetRawBuffer(NULL), windowsLocale, UPRV_LENGTHOF(windowsLocale)); +-#endif +- // Now we should have a Windows locale name that needs converted to the POSIX style, +- if (length > 0) +- { +- // First we need to go from UTF-16 to char (and also convert from _ to - while we're at it.) +- char modifiedWindowsLocale[LOCALE_NAME_MAX_LENGTH]; +- +- int32_t i; +- for (i = 0; i < UPRV_LENGTHOF(modifiedWindowsLocale); i++) +- { +- if (windowsLocale[i] == '_') +- { +- modifiedWindowsLocale[i] = '-'; +- } +- else +- { +- modifiedWindowsLocale[i] = static_cast(windowsLocale[i]); +- } +- +- if (modifiedWindowsLocale[i] == '\0') +- { +- break; +- } +- } +- +- if (i >= UPRV_LENGTHOF(modifiedWindowsLocale)) +- { +- // Ran out of room, can't really happen, maybe we'll be lucky about a matching +- // locale when tags are dropped +- modifiedWindowsLocale[UPRV_LENGTHOF(modifiedWindowsLocale) - 1] = '\0'; +- } +- +- // Now normalize the resulting name +- correctedPOSIXLocale = static_cast(uprv_malloc(POSIX_LOCALE_CAPACITY + 1)); +- /* TODO: Should we just exit on memory allocation failure? */ +- if (correctedPOSIXLocale) +- { +- int32_t posixLen = uloc_canonicalize(modifiedWindowsLocale, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status); +- if (U_SUCCESS(status)) +- { +- *(correctedPOSIXLocale + posixLen) = 0; +- gCorrectedPOSIXLocale = correctedPOSIXLocale; +- gCorrectedPOSIXLocaleHeapAllocated = true; +- ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup); +- } +- else +- { +- uprv_free(correctedPOSIXLocale); +- } +- } +- } ++ LCID id = GetThreadLocale(); ++ correctedPOSIXLocale = static_cast(uprv_malloc(POSIX_LOCALE_CAPACITY + 1)); ++ if (correctedPOSIXLocale) { ++ int32_t posixLen = uprv_convertToPosix(id, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status); ++ if (U_SUCCESS(status)) { ++ *(correctedPOSIXLocale + posixLen) = 0; ++ gCorrectedPOSIXLocale = correctedPOSIXLocale; ++ ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup); ++ } else { ++ uprv_free(correctedPOSIXLocale); ++ } ++ } ++ + + // If unable to find a locale we can agree upon, use en-US by default + if (gCorrectedPOSIXLocale == NULL) { diff --git a/packages/mingw-w64-icu/PKGBUILD b/packages/mingw-w64-icu/PKGBUILD new file mode 100644 index 0000000..b10a1fa --- /dev/null +++ b/packages/mingw-w64-icu/PKGBUILD @@ -0,0 +1,190 @@ +# Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly + +# Note: I would like to update to 59.1 but I found +# putil.cpp: In function 'const char* uprv_getDefaultLocaleID_59d()': +# putil.cpp:1733:86: error: 'GetUserDefaultLocaleName' was not declared in this sc ope +# int length = GetUserDefaultLocaleName(windowsLocale, UPRV_LENGTHOF(windowsL ocale)); + +_realname=icu +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-libs") +pkgver=61.1 +pkgrel=3 +arch=('any') +pkgdesc="International Components for Unicode library (mingw-w64)" +arch=('any') +url="http://www.icu-project.org/" +license=('custom:icu') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +# There's no point adding 'debug' to options as both +# debug and release packages are built regardless. +options=('!buildflags' 'staticlibs' 'strip') +source=("http://download.icu-project.org/files/icu4c/${pkgver}/icu4c-${pkgver//./_}-src.tgz" + 0004-move-to-bin.mingw.patch + 0007-actually-move-to-bin.mingw.patch + 0008-data-install-dir.mingw.patch + 0009-fix-bindir-in-config.mingw.patch + 0010-msys-rules-for-makefiles.mingw.patch + 0011-sbin-dir.mingw.patch + 0012-libprefix.mingw.patch + 0014-mingwize-pkgdata.mingw.patch + 0015-debug.mingw.patch + 0016-icu-pkgconfig.patch + 0017-icu-config-versioning.patch + 0020-workaround-missing-locale.patch + 0021-mingw-static-libraries-without-s.patch + 0099-winxp.patch) +sha256sums=('d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef' + '0b6f5ea91bb579f03cdfa2737719411e3207169f5921ffeea8564cf24fa46715' + 'a32b3fae6a59599c942e5f8bc2d29416aaedca0ce2832c857ecf99eb7529cee1' + 'f437f25a62420856ed234d2b33672b860ae00106cb5d4ccc682f5ff15176aeaf' + 'c84fda5b32edcbf062d629bbf04c47e73e7b9620f4dae752c1c0c25f49124ca8' + '1cf7fd08bad22f39441213d54f0659a3046e163729aa4cd6ff393602ec22c285' + '4f4787caeccf70607cf0cbde0c005f05f5c6de1543265a927839122405b4054f' + 'e7ecdafe85e18a4a4b5f29bbfde38776521a848e5b65089a2379b90e59f1592d' + '564e0171b9c183dfc45a0022ee94220de715d17351b3d2a8aa7fa7ff4c20a8cd' + '0181f9ff8b7dd0a423869d8772da0a4feea64188347eb0dee7eb059aea92131c' + '87ebe8962f8c387714f2a697a664a0c49aed2331b988548069d0c211abc36e05' + '5247102df5604671c33a6e7226e5135a6b48049550861b892f0686dcefec4329' + 'cf4c5925da545f864277abde2741009816ec77ae9083a6970f5bde5162a93feb' + 'd8612f40b1731d9a94290afcf80c896184a2f15b8ae8f23b3643c64f6cabfa2f' + '9e1b6aa79b15fca7ab82f611e5afd1e627b399b2f8903573be0b3c464b75dbf1') + +# Helper macros to help make tasks easier # +apply_patch_with_msg() { + msg2 "Applying $1" + patch -Nbp1 -i "${srcdir}"/$1 +} + +del_file_exists() { + for _fname in "$@" + do + if [ -f $_fname ]; then + rm -rf $_fname + fi + done +} +# =========================================== # + +prepare() { + cd "${srcdir}/icu" + + apply_patch_with_msg 0004-move-to-bin.mingw.patch + apply_patch_with_msg 0007-actually-move-to-bin.mingw.patch + apply_patch_with_msg 0008-data-install-dir.mingw.patch + apply_patch_with_msg 0009-fix-bindir-in-config.mingw.patch + apply_patch_with_msg 0010-msys-rules-for-makefiles.mingw.patch + apply_patch_with_msg 0011-sbin-dir.mingw.patch + apply_patch_with_msg 0012-libprefix.mingw.patch + apply_patch_with_msg 0014-mingwize-pkgdata.mingw.patch + apply_patch_with_msg 0015-debug.mingw.patch + apply_patch_with_msg 0016-icu-pkgconfig.patch + apply_patch_with_msg 0017-icu-config-versioning.patch + apply_patch_with_msg 0020-workaround-missing-locale.patch + apply_patch_with_msg 0021-mingw-static-libraries-without-s.patch + apply_patch_with_msg 0099-winxp.patch + + cd source + autoreconf -vfi +} + +build() { + local -a extra_config + CXXFLAGS+=" -DU_USE_STRTOD_L=0" # breaks on Windows XP + #CXXFLAGS+=" -D_WIN32_WINNT=0x0601" + cd "${srcdir}/icu/" + # For ICU we ignore the options for debug above and always + # build both debug and release (and static and shared). + # This is because ICU people want the debug libraries be + # suffixed with 'd' and e.g. Qt-Project go along with this + # (though only for the static variant, oddly, see: + # qtbase/config.tests/unix/icu/icu.pro + for _variant in debug release; do + [[ -d build-${CARCH}-${_variant} ]] && rm -rf build-${CARCH}-${_variant} + if [ "${_variant}" = "debug" ]; then + extra_config=( --enable-debug ) + extra_config+=( --with-library-suffix=d ) + else + extra_config=( --enable-release ) + fi + cp -rf source build-${CARCH}-${_variant} + pushd build-${CARCH}-${_variant} + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --disable-rpath \ + --enable-shared \ + --enable-static \ + "${extra_config[@]}" + make -j1 + popd + done +} + +check() { + for _variant in debug release; do + pushd "${srcdir}/icu/build-${CARCH}-${_variant}" + PATH=${srcdir}/icu/build-${CARCH}/bin:${srcdir}/icu/build-${CARCH}/lib:$PATH \ + make V=1 -k check + popd + done +} + +package_icu() { + pushd "${srcdir}/icu/build-${CARCH}-release" + make install DESTDIR="${pkgdir}" + + mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ + mv "${pkgdir}${MINGW_PREFIX}"/bin/*.a "${pkgdir}${MINGW_PREFIX}"/lib/ + pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null + # fix installation directory + mv libicu*${pkgver%%.*}.dll "${pkgdir}${MINGW_PREFIX}"/lib/ + # remove unversioned DLL symlinks + rm -f *.dll + # move dlls back to bin + mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ + popd > /dev/null +} + +package_icu-debug-libs() { + options=('debug' '!strip') + pushd "${srcdir}/icu/build-${CARCH}-debug" + make install DESTDIR="${pkgdir}" + + mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ + mv "${pkgdir}${MINGW_PREFIX}"/bin/*.a "${pkgdir}${MINGW_PREFIX}"/lib/ + pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null + # fix installation directory + mv libicu*${pkgver%%.*}.dll "${pkgdir}${MINGW_PREFIX}"/lib/ + # remove unversioned DLL symlinks + rm -f *.dll + # move dlls back to bin + mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ + popd > /dev/null + + # Remove bits that are also in the main package. + # TODO :: Maybe move the pkg-config files to 'd' suffixed variants? + rm -rf "${pkgdir}${MINGW_PREFIX}"/{include,sbin,share,lib/pkgconfig} + rm -rf "${pkgdir}${MINGW_PREFIX}"/bin/*.exe + rm -rf "${pkgdir}${MINGW_PREFIX}"/bin/icu-config +} + +package_mingw-w64-i686-icu() { + package_icu +} + +package_mingw-w64-i686-icu-debug-libs() { + package_icu-debug-libs +} + +package_mingw-w64-x86_64-icu() { + package_icu +} + +package_mingw-w64-x86_64-icu-debug-libs() { + package_icu-debug-libs +} diff --git a/packages/mingw-w64-icu/icu4c-61_1-src.tgz b/packages/mingw-w64-icu/icu4c-61_1-src.tgz new file mode 100644 index 0000000..fd431bb Binary files /dev/null and b/packages/mingw-w64-icu/icu4c-61_1-src.tgz differ