diff --git a/Gettext.Tools.nuspec b/Gettext.Tools.nuspec index 45844ee..e05dfdf 100644 --- a/Gettext.Tools.nuspec +++ b/Gettext.Tools.nuspec @@ -2,7 +2,7 @@ Gettext.Tools - 0.21.0.1 + 0.21.1 GNU gettext tools for Windows Vaclav Slavik GPL-3.0-or-later diff --git a/Makefile b/Makefile index d8b6f8a..65b31ab 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ -GETTEXT_VERSION = 0.21 +GETTEXT_VERSION = 0.21.1 LIBICONV_VERSION = 1.16 # version of the gettext-tools-windows package; usually same as GETTEXT_VERSION # use "-n" suffix; for NuGet, use ".n" suffix instead, e.g. 0.20.1-1 and 0.20.1.1 -PACKAGE_VERSION = $(GETTEXT_VERSION)-1 -NUGET_VERSION = $(GETTEXT_VERSION).0.1 +PACKAGE_VERSION = $(GETTEXT_VERSION) +NUGET_VERSION = $(GETTEXT_VERSION) # Awful trickery to undo MSYS's magical path conversion (see # http://www.mingw.org/wiki/Posix_path_conversion) which happens to break @@ -29,8 +29,7 @@ GETTEXT_FLAGS = --prefix=$(MSYS_PREFIX) \ --disable-csharp \ --disable-java \ --enable-threads=windows \ - --enable-relocatable \ - ac_cv_func__set_invalid_parameter_handler=no + --enable-relocatable CFLAGS := -O2 LDFLAGS := -Wl,--dynamicbase -Wl,--nxcompat -Wl,--no-seh @@ -98,10 +97,10 @@ $(GETTEXT_COMPILE): $(GETTEXT_DOWNLOAD) $(LIBICONV_COMPILE) tar -C $(COMPILEDIR) -xzf $< cd $(COMPILEDIR)/gettext-$(GETTEXT_VERSION) && \ for p in $(GETTEXT_PATCHES) ; do \ - patch -p1 < $$p ; \ + patch -p1 < $$p || exit 1 ; \ done cd $(COMPILEDIR)/gettext-$(GETTEXT_VERSION) && \ - ./configure $(GETTEXT_FLAGS) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" && \ + ./configure -C $(GETTEXT_FLAGS) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" && \ $(MAKE) -C libtextstyle && \ $(MAKE) -C gettext-tools touch $@ diff --git a/patches/gettext-0.21-0001-build-Fix-build-failure-on-mingw-formatstring_ruby.patch b/patches/gettext-0.21-0001-build-Fix-build-failure-on-mingw-formatstring_ruby.patch deleted file mode 100644 index 1444d5f..0000000 --- a/patches/gettext-0.21-0001-build-Fix-build-failure-on-mingw-formatstring_ruby.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 296c70c182c93c78c59c751db45823012dad5b4e Mon Sep 17 00:00:00 2001 -From: Michele Locati -Date: Thu, 30 Jul 2020 18:58:02 +0200 -Subject: [PATCH] build: Fix build failure on mingw (formatstring_ruby) - ---- - gettext-tools/woe32dll/gettextsrc-exports.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gettext-tools/woe32dll/gettextsrc-exports.c b/gettext-tools/woe32dll/gettextsrc-exports.c -index 4477ae8d4..6d7608959 100644 ---- a/gettext-tools/woe32dll/gettextsrc-exports.c -+++ b/gettext-tools/woe32dll/gettextsrc-exports.c -@@ -50,6 +50,7 @@ VARIABLE(formatstring_python) - VARIABLE(formatstring_python_brace) - VARIABLE(formatstring_qt) - VARIABLE(formatstring_qt_plural) -+VARIABLE(formatstring_ruby) - VARIABLE(formatstring_scheme) - VARIABLE(formatstring_sh) - VARIABLE(formatstring_smalltalk) --- -2.28.0.windows.1 - diff --git a/patches/gettext-0.21-0001-build-failure-on-mingw-close-module.patch b/patches/gettext-0.21-0001-build-failure-on-mingw-close-module.patch new file mode 100644 index 0000000..20ea58b --- /dev/null +++ b/patches/gettext-0.21-0001-build-failure-on-mingw-close-module.patch @@ -0,0 +1,51 @@ +diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c +index fb7e2c8a0..bcb6ae354 100644 +--- a/gettext-tools/src/msgexec.c ++++ b/gettext-tools/src/msgexec.c +@@ -325,6 +325,8 @@ or by email to <%s>.\n"), + + #ifdef EINTR + ++#undef close ++ + /* EINTR handling for close(). + These functions can return -1/EINTR even though we don't have any + signal handlers set up, namely when we get interrupted via SIGSTOP. */ +diff --git a/gettext-tools/src/msggrep.c b/gettext-tools/src/msggrep.c +index e3b7a9ca4..a5fdbaa04 100644 +--- a/gettext-tools/src/msggrep.c ++++ b/gettext-tools/src/msggrep.c +@@ -658,6 +658,8 @@ filename_list_match (const string_list_ty *slp, const char *filename) + + #ifdef EINTR + ++#undef close ++ + /* EINTR handling for close(). + These functions can return -1/EINTR even though we don't have any + signal handlers set up, namely when we get interrupted via SIGSTOP. */ +diff --git a/gettext-tools/src/urlget.c b/gettext-tools/src/urlget.c +index ca3df36e7..0f2df9816 100644 +--- a/gettext-tools/src/urlget.c ++++ b/gettext-tools/src/urlget.c +@@ -50,6 +50,7 @@ + # define STDOUT_FILENO 1 + #endif + ++#undef close + + /* Only high-level toolkits, written in languages with exception handling, + have an URL datatype and operations to fetch an URL's contents. Such +diff --git a/gettext-tools/src/write-catalog.c b/gettext-tools/src/write-catalog.c +index c25916d1b..479a7efdb 100644 +--- a/gettext-tools/src/write-catalog.c ++++ b/gettext-tools/src/write-catalog.c +@@ -59,6 +59,8 @@ + + #endif + ++#undef close ++ + + /* =========== Some parameters for use by 'msgdomain_list_print'. ========== */ + diff --git a/patches/gettext-0.21-0002-fix-unc-paths-handling.patch b/patches/gettext-0.21-0002-fix-unc-paths-handling.patch deleted file mode 100644 index 0ac3aa3..0000000 --- a/patches/gettext-0.21-0002-fix-unc-paths-handling.patch +++ /dev/null @@ -1,48 +0,0 @@ -canonicalize: Add support for UNC file names on native Windows. - -Reported and initial patch by Vaclav Slavik in -. - -* lib/canonicalize.c (canonicalize_filename_mode): For UNC file names, -extend the prefix to include the server. - -diff -ru a/gettext-tools/gnulib-lib/canonicalize.c b/gettext-tools/gnulib-lib/canonicalize.c ---- a/gettext-tools/gnulib-lib/canonicalize.c 2020-07-05 23:46:46.000000000 +0200 -+++ b/gettext-tools/gnulib-lib/canonicalize.c 2020-11-07 17:40:00.000000000 +0100 -@@ -166,8 +166,34 @@ - *dest++ = '/'; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT) - { -- if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len) -- *dest++ = '/'; -+ if (prefix_len == 0 /* implies ISSLASH (name[0]) */ -+ && ISSLASH (name[1]) && !ISSLASH (name[2])) -+ { -+ *dest++ = '/'; -+#if defined _WIN32 && !defined __CYGWIN__ -+ /* For UNC file names '\\server\path\to\file', extend the prefix -+ to include the server: '\\server\'. */ -+ { -+ size_t i; -+ for (i = 2; name[i] != '\0' && !ISSLASH (name[i]); ) -+ i++; -+ if (name[i] != '\0' /* implies ISSLASH (name[i]) */ -+ && i + 1 < rname_limit - rname) -+ { -+ prefix_len = i; -+ memcpy (dest, name + 2, i - 2 + 1); -+ dest += i - 2 + 1; -+ } -+ else -+ { -+ /* Either name = '\\server'; this is an invalid file name. -+ Or name = '\\server\...' and server is more than -+ PATH_MAX - 4 bytes long. In either case, stop the UNC -+ processing. */ -+ } -+ } -+#endif -+ } - *dest = '\0'; - } - start = name + prefix_len;