]> git.lyx.org Git - lyx.git/blob - development/gettext.patch
Notes update.
[lyx.git] / development / gettext.patch
1
2   This patch contains the changes that have been made wrt gettext 0.10.40
3
4 --- .common/src/gettext-0.10.40/intl/Makefile.in        Sat Sep 15 03:15:49 2001
5 +++ src/lyx/lyx-devel/intl/Makefile.in  Mon Oct  8 16:24:11 2001
6 @@ -102,7 +102,7 @@
7         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
8         mv t-$@ $@
9  
10 -INCLUDES = -I.. -I. -I$(top_srcdir)/intl
11 +INCLUDES = -I../src -I. -I$(top_srcdir)/intl
12  
13  all: all-@USE_INCLUDED_LIBINTL@
14  all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
15 @@ -253,7 +253,7 @@
16  
17  info dvi:
18  
19 -$(OBJECTS): ../config.h libgnuintl.h
20 +$(OBJECTS): ../src/config.h libgnuintl.h
21  bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
22  dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
23  
24 --- .common/src/gettext-0.10.38/po/Makefile.in.in       Fri May 18 17:06:54 2001
25 +++ src/lyx/lyx-devel/po/Makefile.in.in Mon Oct  8 16:24:11 2001
26 @@ -50,6 +50,8 @@
27  DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
28  $(POFILES) $(GMOFILES)
29  
30 +POTFILE_IN_DEPS = $(shell find $(top_srcdir)/src -name Makefile.am)
31 +
32  POTFILES = \
33  
34  CATALOGS = @CATALOGS@
35 @@ -69,7 +71,10 @@
36  
37  .po.gmo:
38         file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
39 -         && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
40 +         && case "$(GMSGFMT)" in \
41 +              */msgfmt) rm -f $$file && $(GMSGFMT) --statistics -o $$file $<;; \
42 +              *) touch $$file ;; \
43 +            esac
44  
45  
46  all: all-@USE_NLS@
47 @@ -89,7 +94,6 @@
48            || ( rm -f $(srcdir)/$(PACKAGE).pot \
49                 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
50  
51 -
52  install: install-exec install-data
53  install-exec:
54  install-data: install-data-@USE_NLS@
55 @@ -190,6 +194,26 @@
56         cd $(top_builddir) \
57           && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
58                $(SHELL) ./config.status
59 +
60 +${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
61 +       rm -f $@-t \
62 +       && ( cd $(top_srcdir); \
63 +            grep -l "_(\".*\")" `find src -name \*.[hHC] -print` |\
64 +            grep -v frontends/kde |\
65 +            sed -e '/xforms.forms/d' | \
66 +            sort -f -n | uniq ) > $@-t \
67 +       && echo "src/ext_l10n.h" >> $@-t \
68 +       && mv $@-t $@
69 +
70 +$(top_srcdir)/src/ext_l10n.h: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/ui/default.ui $(top_srcdir)/lib/languages
71 +       sed < $(top_srcdir)/lib/ui/default.ui -n \
72 +               -e 's/.*[sS]ub[mM]enu[^"]*\("[^"]*"\).*/_(\1);/p' \
73 +               -e 's/.*[iI]tem[^"]*\("[^"]*"\).*/_(\1);/p' \
74 +               > $@
75 +       cat $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc | \
76 +               sed -n -e 's/^[sS]tyle[ ]*\([^ ]*\)$$/_("\1");/p' | \
77 +               sort | uniq >> $@
78 +       sed < $(top_srcdir)/lib/languages -e '/^#/d' -e 's/[^"]*\("[A-Za-z0-9][^"]*"\).*/_(\1);/' >> $@
79  
80  # Tell versions [3.59,3.63) of GNU make not to export all variables.
81  # Otherwise a system limit (for SysV at least) may be exceeded.
82 --- .common/src/gettext-0.10.38/m4/progtest.m4  Thu Feb  8 14:25:47 2001
83 +++ src/lyx/lyx-devel/config/progtest.m4        Mon Oct  8 16:24:11 2001
84 @@ -2,15 +2,32 @@
85  # Ulrich Drepper <drepper@cygnus.com>, 1996.
86  #
87  # This file can be copied and used freely without restrictions.  It can
88 -# be used in projects which are not available under the GNU Public License
89 -# but which still want to provide support for the GNU gettext functionality.
90 -# Please note that the actual code is *not* freely available.
91 +# be used in projects which are not available under the GNU General Public
92 +# License or the GNU Library General Public License but which still want
93 +# to provide support for the GNU gettext functionality.
94 +# Please note that the actual code of the GNU gettext library is covered
95 +# by the GNU Library General Public License, and the rest of the GNU
96 +# gettext package package is covered by the GNU General Public License.
97 +# They are *not* in the public domain.
98  
99 -# serial 1
100 +# serial 2
101  
102  dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
103  dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
104  AC_DEFUN([AM_PATH_PROG_WITH_TEST],
105 +[case "`uname -s 2> /dev/null`" in
106 +OS/2)
107 +  PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'`
108 +  PATH_IFS=';'
109 +  EXE_EXT='.exe'
110 +  CMD_EXT='.cmd'
111 +  ;;
112 +*)
113 +  PATH_IFS=':'
114 +  EXE_EXT=''
115 +  CMD_EXT=''
116 +  ;;
117 +esac]
118  [# Extract the first word of "$2", so it can be a program name with args.
119  set dummy $2; ac_word=[$]2
120  AC_MSG_CHECKING([for $ac_word])
121 @@ -20,10 +37,12 @@
122    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
123    ;;
124    *)
125 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
126 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}$PATH_IFS"
127    for ac_dir in ifelse([$5], , $PATH, [$5]); do
128      test -z "$ac_dir" && ac_dir=.
129 -    if test -f $ac_dir/$ac_word; then
130 +    if test -f $ac_dir/$ac_word \
131 +        -o -f $ac_dir/$ac_word$EXE_EXT \
132 +        -o -f $ac_dir/$ac_word$CMD_EXT; then
133        if [$3]; then
134         ac_cv_path_$1="$ac_dir/$ac_word"
135         break
136 @@ -38,7 +57,7 @@
137    ;;
138  esac])dnl
139  $1="$ac_cv_path_$1"
140 -if test -n "[$]$1"; then
141 +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
142    AC_MSG_RESULT([$]$1)
143  else
144    AC_MSG_RESULT(no)