Skip to content

Commit

Permalink
Fixes #1813: Pathed a bug in gettext
Browse files Browse the repository at this point in the history
  • Loading branch information
kintel committed Aug 3, 2017
1 parent a6e9883 commit cecf3b9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions patches/gettext.patch
@@ -0,0 +1,23 @@
diff -upr gettext-0.19.3.orig/gettext-runtime/intl/langprefs.c gettext-0.19.3/gettext-runtime/intl/langprefs.c
--- gettext-0.19.3.orig/gettext-runtime/intl/langprefs.c 2013-03-07 09:44:37.000000000 +0100
+++ gettext-0.19.3/gettext-runtime/intl/langprefs.c 2016-11-06 12:40:20.000000000 +0100
@@ -269,7 +269,8 @@ _nl_language_preferences_default (void)
in the preferences list, arrange for gettext() to
return the msgid, and ignore all further elements of
the preferences list. */
- if (strcmp (buf, "en") == 0)
+ if (strcmp (buf, "en") == 0
+ || strncmp (buf, "en-", 3))
break;
}
else
@@ -297,7 +298,8 @@ _nl_language_preferences_default (void)
strcpy (p, buf);
p += strlen (buf);
*p++ = ':';
- if (strcmp (buf, "en") == 0)
+ if (strcmp (buf, "en") == 0
+ || strncmp (buf, "en-", 3))
break;
}
else
4 changes: 2 additions & 2 deletions scripts/macosx-build-dependencies.sh
Expand Up @@ -649,12 +649,12 @@ build_gettext()
echo "Building gettext $version..."
cd "$BASEDIR"/src
rm -rf "gettext-$version"
if [ ! -f "gettext-$version.tar.xz" ]; then
if [ ! -f "gettext-$version.tar.gz" ]; then
curl --insecure -LO "http://ftpmirror.gnu.org/gettext/gettext-$version.tar.gz"
fi
tar xzf "gettext-$version.tar.gz"
cd "gettext-$version"

patch -p1 < $OPENSCADDIR/patches/gettext.patch
./configure --with-included-glib --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
make -j$NUMCPU
make install
Expand Down

0 comments on commit cecf3b9

Please sign in to comment.