[MPlayer-dev-eng] Re: install localized manpages + [PATCH#2]
Andriy N. Gritsenko
andrej at lucky.net
Mon Feb 17 12:11:05 CET 2003
Hi, Gabucino!
Sometime (on Sunday, February 16 at 10:17) I've received something...
>Ok, I've made a patch. It Works For Me(tm)
It works for you but as for me it works badly. I don't want de, fr, etc.
locales, nobody will use it.
>This is the GNUish way AFAIK, though you may argue about whether it's "optimal"
>or not. I think it's good.
GNUish way for it is using LINGUAS environment variable to define which
locales du you want to install. If there is no such variable then assume
you want all.
See attached patch against current CVS. It will work. Commit it, please.
However, why do we still using statically linked languages? Why don't use
gettext instead?
>Anyway, if there are no objections, I'll commit this in an hour.
I have an objection. ;)
With the best wishes.
Andriy.
-------------- next part --------------
diff -udpr MPlayer-20030217.orig/Makefile MPlayer-20030217/Makefile
--- MPlayer-20030217.orig/Makefile Sun Feb 16 16:14:13 2003
+++ MPlayer-20030217/Makefile Mon Feb 17 13:04:14 2003
@@ -247,10 +247,25 @@ ifeq ($(GUI),yes)
endif
if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi
$(INSTALL) -c -m 644 DOCS/en/mplayer.1 $(MANDIR)/man1/mplayer.1
- @for LCLMANS in de fr hu pl; do $(INSTALL) -D -c -m 644 DOCS/$$LCLMANS/mplayer.1 $(MANDIR)/$$LCLMANS/man1/mplayer.1; done
+ @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 ; \
+ fi ; \
+ done ; \
+ fi
ifeq ($(MENCODER),yes)
$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
- @for LCLMANS in de fr hu pl; do ln -sf mplayer.1 $(MANDIR)/$$LCLMANS/man1/mencoder.1; done
+ 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 ; \
+ fi ; \
+ done ; \
+ fi
endif
@if test ! -d $(DATADIR) ; then mkdir -p $(DATADIR) ; fi
@if test ! -d $(DATADIR)/font ; then mkdir -p $(DATADIR)/font ; fi
diff -udpr MPlayer-20030217.orig/configure MPlayer-20030217/configure
--- MPlayer-20030217.orig/configure Sat Feb 15 23:51:24 2003
+++ MPlayer-20030217/configure Mon Feb 17 12:50:59 2003
@@ -293,6 +293,10 @@ EOF
done # for parm in ...
+# set up LANGUAGES
+test "$LINGUAS" || LINGUAS = `cd DOCS;/bin/ls -d ?? ??_??`
+LANGUAGES=`echo $LINGUAS | sed 's/en//g' | sed 's/^ *//'`
+
# 1st pass checking for vital options
_install=install
_ranlib=ranlib
@@ -4808,6 +4812,7 @@ cat > config.mak << EOF
LANG = C
LINGUAS = $LINGUAS
+LANGUAGES = $LANGUAGES
TARGET_OS = $system_name
DESTDIR =
prefix = \$(DESTDIR)$_prefix
More information about the MPlayer-dev-eng
mailing list