]> git.sesse.net Git - vlc/commitdiff
contrib: add gettext
authorGrigori Goronzy <greg@blackbox>
Tue, 4 Oct 2011 19:47:22 +0000 (21:47 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Oct 2011 00:28:35 +0000 (02:28 +0200)
Modified-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
contrib/src/gettext/SHA512SUMS [new file with mode: 0644]
contrib/src/gettext/gettext-macosx.patch [new file with mode: 0644]
contrib/src/gettext/rules.mak [new file with mode: 0644]

diff --git a/contrib/src/gettext/SHA512SUMS b/contrib/src/gettext/SHA512SUMS
new file mode 100644 (file)
index 0000000..e472947
--- /dev/null
@@ -0,0 +1 @@
+1735599307a2d12be609ecfe1141815a11af144c6b94301f6c7101242e0b628251a3613d1d70df099ec07423befeaf10dfb53b8176f710c7e158c4fc63ea8747  gettext-0.18.1.1.tar.gz
diff --git a/contrib/src/gettext/gettext-macosx.patch b/contrib/src/gettext/gettext-macosx.patch
new file mode 100644 (file)
index 0000000..214fb3d
--- /dev/null
@@ -0,0 +1,11 @@
+--- gettext/gettext-tools/src/msgmerge.c.orig  2007-10-21 03:25:52.000000000 +0200
++++ gettext/gettext-tools/src/msgmerge.c       2008-03-23 19:54:36.000000000 +0100
+@@ -96,7 +96,7 @@
+ /* Update mode.  */
+ static bool update_mode = false;
+-static const char *version_control_string;
++static const char *version_control_string = "none";
+ static const char *backup_suffix_string;
+ /* Long options.  */
diff --git a/contrib/src/gettext/rules.mak b/contrib/src/gettext/rules.mak
new file mode 100644 (file)
index 0000000..18cbf5f
--- /dev/null
@@ -0,0 +1,51 @@
+# gettext
+GETTEXT_VERSION=0.18.1.1
+GETTEXT_URL=$(GNU)/gettext/gettext-$(GETTEXT_VERSION).tar.gz
+
+ifeq ($(call need_pkg,"gettext"),)
+PKGS_FOUND += gettext
+endif
+
+$(TARBALLS)/gettext-$(GETTEXT_VERSION).tar.gz:
+       $(call download,$(GETTEXT_URL))
+
+.sum-gettext: gettext-$(GETTEXT_VERSION).tar.gz
+
+gettext: gettext-$(GETTEXT_VERSION).tar.gz .sum-gettext
+       $(UNPACK)
+ifdef HAVE_MACOSX
+       $(APPLY) $(SRC)/gettext/gettext-macosx.patch
+endif
+       $(MOVE)
+
+DEPS_gettext = iconv $(DEPS_iconv)
+
+.gettext: gettext
+       #cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --disable-relocatable --disable-java --disable-native-java --without-emacs
+       #cd $< && $(MAKE) install
+       #cd $< && make -C gettext-runtime/intl && make -C gettext-runtime/intl install && make -C gettext-tools/misc install
+       #touch $@
+
+ifdef HAVE_WIN32
+       (cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --disable-relocatable --disable-java --disable-native-java)
+else
+       (cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --disable-java --disable-native-java --without-emacs)
+endif
+ifneq ($(HOST),$(BUILD))
+  ifndef HAVE_CYGWIN
+    # We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap
+       (cd $< && make -C gettext-runtime/intl && make -C gettext-runtime/intl install && make -C gettext-tools/misc install)
+  else
+    # We are compiling for MinGW on Cygwin -- build the full current gettext
+       (cd $< && make && make install)
+  endif
+else
+# Build and install the whole gettext
+       (cd $< && make && make install)
+endif
+# Work around another non-sense of autoconf.
+ifdef HAVE_WIN32
+       (cd $(PREFIX)/include; sed -i.orig '314 c #if 0' libintl.h)
+endif
+       touch $@
+