[vlc-commits] contrib: add gettext

Grigori Goronzy git at videolan.org
Thu Oct 13 02:28:53 CEST 2011


vlc | branch: master | Grigori Goronzy <greg at blackbox> | Tue Oct  4 21:47:22 2011 +0200| [c72e33dbe19fbb78a3e57f64af9fb973e5657c48] | committer: Jean-Baptiste Kempf

contrib: add gettext

Modified-by: Jean-Baptiste Kempf <jb at videolan.org>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c72e33dbe19fbb78a3e57f64af9fb973e5657c48
---

 contrib/src/gettext/SHA512SUMS           |    1 +
 contrib/src/gettext/gettext-macosx.patch |   11 ++++++
 contrib/src/gettext/rules.mak            |   51 ++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/contrib/src/gettext/SHA512SUMS b/contrib/src/gettext/SHA512SUMS
new file mode 100644
index 0000000..e472947
--- /dev/null
+++ b/contrib/src/gettext/SHA512SUMS
@@ -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
index 0000000..214fb3d
--- /dev/null
+++ b/contrib/src/gettext/gettext-macosx.patch
@@ -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
index 0000000..18cbf5f
--- /dev/null
+++ b/contrib/src/gettext/rules.mak
@@ -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 $@
+



More information about the vlc-commits mailing list