blob: cfb0290f9b7d3d068e807c10deddff6c7fe58e5f [file] [log] [blame]
Andrew Geisslerac970dd2021-02-12 15:32:45 -06001From e03d3ef5aadd582ebf7102b7d5785fed177a0cb1 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sun, 7 Feb 2021 13:25:29 +0100
4Subject: [PATCH] configure.ac: fix build with autoconf-2.71
5
6* fixes:
7 | autoreconf: running: intltoolize --copy --force
8 | ERROR: 'IT_PROG_INTLTOOL' must appear in configure.ac for intltool to work.
9 | autoreconf: error: intltoolize failed with exit status: 1
10
11* replace AM_GLIB_GNU_GETTEXT with AM_GNU_GETTEXT as suggested in:
12 https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration
13 https://blogs.gnome.org/jjardon/2010/10/08/use-upstream-gettext-instead-the-glib-one/
14 because the former is causing issues with autoconf-2.71:
15
16 -m4trace:configure.ac:266: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
17 -You should run autoupdate.], [../autoconf-2.71/lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
18 -../autoconf-2.71/lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
19 -../autoconf-2.71/lib/autoconf/headers.m4:89: _AC_CHECK_HEADER_COMPILE is expanded from...
20 -../autoconf-2.71/lib/autoconf/headers.m4:56: AC_CHECK_HEADER is expanded from...
21 -pidgin/2.14.1-r0/recipe-sysroot-native/usr/share/aclocal/glib-gettext.m4:150: GLIB_WITH_NLS is expanded from...
22 -pidgin/2.14.1-r0/recipe-sysroot-native/usr/share/aclocal/glib-gettext.m4:370: GLIB_GNU_GETTEXT is expanded from...
23 -pidgin/2.14.1-r0/recipe-sysroot-native/usr/share/aclocal/glib-gettext.m4:470: AM_GLIB_GNU_GETTEXT is expanded from...
24 -configure.ac:266: the top level])
25 -m4trace:configure.ac:266: -1- m4_pattern_allow([^ENABLE_NLS$])
26 -m4trace:configure.ac:266: -1- _m4_warn([obsolete], [The macro `AC_OUTPUT_COMMANDS' is obsolete.
27 -You should run autoupdate.], [../autoconf-2.71/lib/autoconf/status.m4:1025: AC_OUTPUT_COMMANDS is expanded from...
28 -pidgin/2.14.1-r0/recipe-sysroot-native/usr/share/aclocal/glib-gettext.m4:150: GLIB_WITH_NLS is expanded from...
29 -pidgin/2.14.1-r0/recipe-sysroot-native/usr/share/aclocal/glib-gettext.m4:370: GLIB_GNU_GETTEXT is expanded from...
30 -pidgin/2.14.1-r0/recipe-sysroot-native/usr/share/aclocal/glib-gettext.m4:470: AM_GLIB_GNU_GETTEXT is expanded from...
31 -configure.ac:266: the top level])
32
33 and then configure fails with:
34
35 configure.ac:2621: error: `po/stamp-it' is already registered with AC_CONFIG_COMMANDS.
36 autoconf-2.71/lib/autoconf/status.m4:1008: AC_CONFIG_COMMANDS is expanded from...
37 configure.ac:2621: the top level
38
39* add AM_GNU_GETTEXT_VERSION as well to resolve warning with autoconf-2.71
40 configure.ac: warning: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION
41
42Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
43---
44 ABOUT-NLS | 1 +
45 Makefile.am | 6 +---
46 configure.ac | 6 ++--
47 pidgin/Makefile.am | 7 ++--
48 po/Makevars | 82 ++++++++++++++++++++++++++++++++++++++++++++++
49 po/POTFILES.in | 1 -
50 6 files changed, 92 insertions(+), 11 deletions(-)
51 create mode 100644 ABOUT-NLS
52 create mode 100644 po/Makevars
53
54diff --git a/ABOUT-NLS b/ABOUT-NLS
55new file mode 100644
56index 0000000..0a9d56d
57--- /dev/null
58+++ b/ABOUT-NLS
59@@ -0,0 +1 @@
60+<https://www.gnu.org/software/gettext/manual/html_node/Users.html>
61diff --git a/Makefile.am b/Makefile.am
62index f8e2bc9..a74145f 100644
63--- a/Makefile.am
64+++ b/Makefile.am
65@@ -13,9 +13,6 @@ EXTRA_DIST = \
66 fix-casts.sh \
67 gaim.pc.in \
68 gaim-uninstalled.pc.in \
69- intltool-extract.in \
70- intltool-merge.in \
71- intltool-update.in \
72 package_revision.h \
73 pidgin.apspec.in \
74 pidgin.spec.in \
75@@ -139,5 +136,4 @@ endif
76 distuninstallcheck_listfiles = \
77 find . -type f -print | grep -v perl | grep -v Purple.3pm | grep -v Pidgin.3pm
78
79-DISTCLEANFILES= intltool-extract intltool-merge intltool-update \
80- package_revision_raw.txt
81+DISTCLEANFILES=package_revision_raw.txt
82diff --git a/configure.ac b/configure.ac
83index 81d8592..e2280cd 100644
84--- a/configure.ac
85+++ b/configure.ac
86@@ -43,7 +43,7 @@ fi
87
88 AC_CANONICAL_HOST
89 AC_CONFIG_HEADERS([config.h])
90-AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2])
91+AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 foreign])
92 dnl TODO: Always use AM_SILENT_RULES when we depend on automake >= 1.11
93 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
94
95@@ -257,12 +257,12 @@ dnl #######################################################################
96 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
97
98 if test x$enable_i18n = xyes; then
99- AC_PROG_INTLTOOL
100 GETTEXT_PACKAGE=pidgin
101 AC_SUBST(GETTEXT_PACKAGE)
102
103 ALL_LINGUAS="af am ar ar_SA as ast az be@latin bg bn_IN bn br brx bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es_AR es et eu fa fi fr ga gl gu he hi hr hu id it ja ka kk km kn ko ks ku_IQ ku lt lv mai mhr mk ml mn mr ms_MY my_MM nb ne nl nn oc or pa pl ps pt_BR pt ro ru sd si sk sl sq sr@latin sr sv sw ta te th tr tt uk ur uz vi xh zh_CN zh_HK zh_TW"
104- AM_GLIB_GNU_GETTEXT
105+ AM_GNU_GETTEXT([external])
106+ AM_GNU_GETTEXT_VERSION([0.21])
107
108 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
109 dnl AM_GLIB_GNU_GETTEXT found it.
110diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
111index 2278b88..4d32c53 100644
112--- a/pidgin/Makefile.am
113+++ b/pidgin/Makefile.am
114@@ -192,13 +192,16 @@ DESKTOP_FILE=data/pidgin.desktop
115 appsdir = $(datadir)/applications
116 apps_in_files = data/pidgin.desktop.in
117 apps_DATA = $(apps_in_files:.desktop.in=.desktop)
118-@INTLTOOL_DESKTOP_RULE@
119+
120+data/pidgin.desktop: data/pidgin.desktop.in
121+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
122
123 appdatadir = $(datarootdir)/appdata
124 appdata_DATA = $(appdata_in_files:.xml.in=.xml)
125 appdata_in_files = data/pidgin.appdata.xml.in
126
127-@INTLTOOL_XML_RULE@
128+data/pidgin.appdata.xml: data/pidgin.appdata.xml.in
129+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ || cp $< $@
130
131 endif # INSTALL_I18N
132
133diff --git a/po/Makevars b/po/Makevars
134new file mode 100644
135index 0000000..970237a
136--- /dev/null
137+++ b/po/Makevars
138@@ -0,0 +1,82 @@
139+# Makefile variables for PO directory in any package using GNU gettext.
140+#
141+# Copyright (C) 2003-2019 Free Software Foundation, Inc.
142+# This file is free software; the Free Software Foundation gives
143+# unlimited permission to use, copy, distribute, and modify it.
144+
145+# Usually the message domain is the same as the package name.
146+DOMAIN = $(PACKAGE)
147+
148+# These two variables depend on the location of this directory.
149+subdir = po
150+top_builddir = ..
151+
152+# These options get passed to xgettext.
153+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8
154+
155+# This is the copyright holder that gets inserted into the header of the
156+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
157+# package. (Note that the msgstr strings, extracted from the package's
158+# sources, belong to the copyright holder of the package.) Translators are
159+# expected to transfer the copyright for their translations to this person
160+# or entity, or to disclaim their copyright. The empty string stands for
161+# the public domain; in this case the translators are expected to disclaim
162+# their copyright.
163+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
164+
165+# This tells whether or not to prepend "GNU " prefix to the package
166+# name that gets inserted into the header of the $(DOMAIN).pot file.
167+# Possible values are "yes", "no", or empty. If it is empty, try to
168+# detect it automatically by scanning the files in $(top_srcdir) for
169+# "GNU packagename" string.
170+PACKAGE_GNU =
171+
172+# This is the email address or URL to which the translators shall report
173+# bugs in the untranslated strings:
174+# - Strings which are not entire sentences, see the maintainer guidelines
175+# in the GNU gettext documentation, section 'Preparing Strings'.
176+# - Strings which use unclear terms or require additional context to be
177+# understood.
178+# - Strings which make invalid assumptions about notation of date, time or
179+# money.
180+# - Pluralisation problems.
181+# - Incorrect English spelling.
182+# - Incorrect formatting.
183+# It can be your email address, or a mailing list address where translators
184+# can write to without being subscribed, or the URL of a web page through
185+# which the translators can contact you.
186+MSGID_BUGS_ADDRESS =
187+
188+# This is the list of locale categories, beyond LC_MESSAGES, for which the
189+# message catalogs shall be used. It is usually empty.
190+EXTRA_LOCALE_CATEGORIES =
191+
192+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
193+# context. Possible values are "yes" and "no". Set this to yes if the
194+# package uses functions taking also a message context, like pgettext(), or
195+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
196+USE_MSGCTXT = no
197+
198+# These options get passed to msgmerge.
199+# Useful options are in particular:
200+# --previous to keep previous msgids of translated messages,
201+# --quiet to reduce the verbosity.
202+MSGMERGE_OPTIONS =
203+
204+# These options get passed to msginit.
205+# If you want to disable line wrapping when writing PO files, add
206+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
207+# MSGINIT_OPTIONS.
208+MSGINIT_OPTIONS =
209+
210+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
211+# has changed. Possible values are "yes" and "no". Set this to no if
212+# the POT file is checked in the repository and the version control
213+# program ignores timestamps.
214+PO_DEPENDS_ON_POT = no
215+
216+# This tells whether or not to forcibly update $(DOMAIN).pot and
217+# regenerate PO files on "make dist". Possible values are "yes" and
218+# "no". Set this to no if the POT file and PO files are maintained
219+# externally.
220+DIST_DEPENDS_ON_UPDATE_PO = no
221diff --git a/po/POTFILES.in b/po/POTFILES.in
222index a5691a1..b494bf3 100644
223--- a/po/POTFILES.in
224+++ b/po/POTFILES.in
225@@ -1,4 +1,3 @@
226-[encoding: UTF-8]
227 finch/finch.c
228 finch/gntaccount.c
229 finch/gntblist.c