diff options
author | Pete Batard <pbatard@gmail.com> | 2010-04-19 13:26:31 +0100 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-04-19 13:26:31 +0100 |
commit | b7c99f781f34103174b368dd22502b56c572be0c (patch) | |
tree | 1f7104e6319928c3045ad44cbce5259b0dffad92 | |
parent | 63edc0276d5f3fb2975954c33f14d2b995257b0e (diff) | |
download | libusb-b7c99f781f34103174b368dd22502b56c572be0c.tar.gz |
added official libtool NLS patch for Chinese localer265
-rwxr-xr-x | autogen.sh | 10 | ||||
-rw-r--r-- | libtool-nls.diff | 22 |
2 files changed, 26 insertions, 6 deletions
@@ -1,14 +1,12 @@ #!/bin/sh - # use glibtoolize if it is available (darwin) (glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize $LIBTOOLIZE --copy --force || exit 1 -# Force ltmain's NLS test to set locale to C always. Prevents an -# issue when compiling shared libs with MinGW on Chinese locale. -type -P sed &>/dev/null || { echo "sed command not found. Aborting." >&2; exit 1; } -sed -e s/\\\\\${\$lt_var+set}/set/g ltmain.sh > lttmp.sh -mv lttmp.sh ltmain.sh +# If available, apply libtool's NLS patch to set locale to C always. +# Prevents an issue when compiling shared libs with MinGW on Chinese locale. +# see: http://lists.gnu.org/archive/html/bug-libtool/2010-03/msg00012.html +type -P patch &>/dev/null && { if [ -e "libtool-nls.diff" ]; then patch -p1 -Nl -i libtool-nls.diff &>/dev/null; fi; } # aclocal || exit 1 autoheader || exit 1 diff --git a/libtool-nls.diff b/libtool-nls.diff new file mode 100644 index 0000000..d41b733 --- /dev/null +++ b/libtool-nls.diff @@ -0,0 +1,22 @@ +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -105,9 +105,6 @@ _LTECHO_EOF' + } + + # NLS nuisances: We save the old values to restore during execute mode. +-# Only set LANG and LC_ALL to C if already set. +-# These must not be set unconditionally because not all systems understand +-# e.g. LANG=C (notably SCO). + lt_user_locale= + lt_safe_locale= + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +@@ -120,6 +117,9 @@ do + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" + done ++LC_ALL=C ++LANGUAGE=C ++export LANGUAGE LC_ALL + + $lt_unset CDPATH + |