[Mplayer-cvslog] CVS: main configure,1.668,1.669 Makefile,1.256,1.257

Arpi of Ize arpi at mplayerhq.hu
Fri Feb 21 00:33:03 CET 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv3106

Modified Files:
	configure Makefile 
Log Message:
Latest version has the following features:

 - --language=ab,cd,ef and --language="ab cd ef" are supported, the list
   is now used as a fallback for possible message/gui translations
 - --language=all is supported
 - --language=ab,cd,ef,all and --language="ab cd ef all" are supported
   for all man pages, but different message/gui translations than en
 - $LINGUAS is honored
 - if no --language or $LINGUAS is given it defaults to en

Credits for ideas go out to (in no particular order):

Tobias Diedrich
Sylvain Petreolle
Dan Christiansen
Dominik Mierzejewski
Andriy N. Gritsenko

and everyone I've forgotten

Andreas Hess <jaska at gmx.net>


Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.668
retrieving revision 1.669
diff -u -r1.668 -r1.669
--- configure	19 Feb 2003 17:26:59 -0000	1.668
+++ configure	20 Feb 2003 23:32:46 -0000	1.669
@@ -235,8 +235,12 @@
   --target=PLATFORM      target platform (i386-linux, arm-linux, etc)
   --enable-static        build a statically linked binary. Set further linking
                          options with --enable-static="-lslang -lncurses"
-  --language=xx          select a language (for translated messages/gui) [en]
-                         (Available: $LANGUAGES)
+  --language=list        a white space or comma separated list of languages
+                         for translated man pages, the first language is the
+                         primary and therefore used for translated messages
+                         and GUI (also the environment variable \$LINGUAS is
+                         honored) [en]
+                         (Available: $LANGUAGES all)
   --enable-shared-pp     install & use shared postprocessing lib
   --install-path=PATH    the path to a custom install program (useful if
                          your OS uses a GNU-incompatible install utility by
@@ -294,10 +298,6 @@
 done # for parm in ...
 
 
-# set up LANGUAGES
-test "$LINGUAS" || LINGUAS=`cd DOCS;/bin/ls -d ??` 2>/dev/null
-LANGUAGES=`echo $LINGUAS | sed 's/en//g' | sed 's/^ *//'`
-
 # 1st pass checking for vital options
 _install=install
 _ranlib=ranlib
@@ -1045,7 +1045,7 @@
 _zr=auto
 _bl=no
 _largefiles=no
-_language=en
+#_language=en
 _shm=auto
 _linux_devfs=no
 _i18n=auto
@@ -1269,7 +1269,7 @@
   --disable-sortsub) _sortsub=no ;;
 
   --language=*)
-    LINGUAS=`echo $ac_option | cut -d '=' -f 2`
+    _language=`echo $ac_option | cut -d '=' -f 2`
     ;;
   --with-libdvdnav=*)
     _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
@@ -1585,7 +1585,6 @@
 fi
 if test "$_i18n" = yes ; then
   _def_i18n='#define USE_I18N 1'
-#  LINGUAS='en' # force help_mp-en.h
 else
   _def_i18n='#undef USE_I18N'
 fi
@@ -1617,14 +1616,30 @@
 
 
 echocheck "language"
-test -z "$LINGUAS" && LINGUAS="en"
-if test -f "help/help_mp-${LINGUAS}.h" ; then
-  echores "using ${LINGUAS}"
-else
-  echores "${LINGUAS} not found, using en"
-  LINGUAS="en"
-fi
-_mp_help="help/help_mp-${LINGUAS}.h"
+test -z "$_language" && _language=$LINGUAS
+_language=`echo $_language | sed 's/,/ /g'`
+echo $_language | grep all > /dev/null || LANGUAGES=$_language
+for i in $_language ; do
+  test "$i" = all && i=en
+  if test -f "help/help_mp-${i}.h" ; then
+    _language=$i
+    break
+  else
+    echo -n "$i not found, "
+    _language=`echo $_language | sed "s/$i *//g"`
+  fi
+done
+test -z "$_language" && _language=en
+for i in $LANGUAGES ; do
+  if test -f "DOCS/$i/mplayer.1" ; then
+    LANGUAGES=`echo $LANGUAGES | sed "s/$i *//2" | sed 's/ *$//'`
+  else
+    LANGUAGES=`echo $LANGUAGES | sed "s/$i *//g" | sed 's/ *$//'`
+  fi
+done
+test -z "$LANGUAGES" && LANGUAGES=en
+echores "using $_language (man pages: $LANGUAGES)"
+_mp_help="help/help_mp-${_language}.h"
 test -f $_mp_help || die "$_mp_help not found"
 
 echocheck "enable sighandler"
@@ -4871,7 +4886,6 @@
 # -------- Generated by configure -----------
 
 LANG = C
-LINGUAS = $LINGUAS
 LANGUAGES = $LANGUAGES
 TARGET_OS = $system_name
 DESTDIR =
@@ -5525,7 +5539,17 @@
 
   Byte order: $_byte_order
   Optimizing for: $_optimizing
+
+  Languages:
+    Messages/GUI: $_language
+EOF
+
+echo -n "    Manual pages: $LANGUAGES"
+test "$LANGUAGES" = en && echo -n " (no localization selected, use --language=all)"
+echo
   
+cat << EOF
+
   Enabled optional drivers:
     Input: $_inputmodules
     Codecs: $_codecmodules

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -r1.256 -r1.257
--- Makefile	19 Feb 2003 17:26:59 -0000	1.256
+++ Makefile	20 Feb 2003 23:32:47 -0000	1.257
@@ -246,26 +246,23 @@
 	-ln -sf $(PRG) $(BINDIR)/gmplayer
 endif
 	if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi
-	$(INSTALL) -c -m 644 DOCS/en/mplayer.1 $(MANDIR)/man1/mplayer.1
-	@if [ -n "$(LANGUAGES)" ]; then \
-	    for i in $(LANGUAGES); do \
-		if [ -f DOCS/$$i/mplayer.1 ]; then \
-		    echo "Installing manual for language $$i" ; \
-		    mkdir -p $(MANDIR)/$$i/man1 ; \
-		    $(INSTALL) -c -m 644 DOCS/$$i/mplayer.1 $(MANDIR)/$$i/man1/mplayer.1 ; \
+	for i in $(LANGUAGES); do \
+		if test "$$i" = en ; then \
+			$(INSTALL) -c -m 644 DOCS/en/mplayer.1 $(MANDIR)/man1/mplayer.1 ; \
+		else \
+			mkdir -p $(MANDIR)/$$i/man1 ; \
+			$(INSTALL) -c -m 644 DOCS/$$i/mplayer.1 $(MANDIR)/$$i/man1/mplayer.1 ; \
 		fi ; \
-	    done ; \
-	fi
+	done
 ifeq ($(MENCODER),yes)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
-	ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1
-	@if [ -n "$(LANGUAGES)" ]; then \
-	    for i in $(LANGUAGES); do \
-		if [ -f DOCS/$$i/mplayer.1 ]; then \
-		    ln -sf mplayer.1 $(MANDIR)/$$i/man1/mencoder.1 ; \
+	for i in $(LANGUAGES); do \
+		if test "$$i" = en ; then \
+			ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1 ; \
+		else \
+			ln -sf mplayer.1 $(MANDIR)/$$i/man1/mencoder.1 ; \
 		fi ; \
-	    done ; \
-	fi
+	done
 endif
 	@if test ! -d $(DATADIR) ; then mkdir -p $(DATADIR) ; fi
 	@if test ! -d $(DATADIR)/font ; then mkdir -p $(DATADIR)/font ; fi



More information about the MPlayer-cvslog mailing list