From 7bc44cf5ece3a2bd05132eb06dc6430d50eebd18 Mon Sep 17 00:00:00 2001 From: Olivier Teuliere Date: Mon, 6 Apr 2020 19:27:39 +0200 Subject: [PATCH] Update gettext and stop using a local intl folder --- .gitignore | 2 +- Makefile.am | 2 +- configure.ac | 8 ++++---- dic/Makefile.am | 8 ++++---- po/makefile-qt4.patch | 17 +++++++++-------- qt/Makefile.am | 2 +- utils/Makefile.am | 4 ++-- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 72a2d0a..e3dead8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ configure missing .deps tags -intl ABOUT-NLS config.rpath mkinstalldirs @@ -33,6 +32,7 @@ m4/fcntl-o.m4 m4/gettext.m4 m4/glibc2.m4 m4/glibc21.m4 +m4/host-cpu-c-abi.m4 m4/iconv.m4 m4/intdiv0.m4 m4/intl.m4 diff --git a/Makefile.am b/Makefile.am index 967f16f..3fbda5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = intl dic game utils qt po extras +SUBDIRS = dic game utils qt po extras ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index 87a5428..8ace792 100644 --- a/configure.ac +++ b/configure.ac @@ -209,11 +209,11 @@ AC_ARG_ENABLE([text],AS_HELP_STRING([--enable-text],[text interface support (def AM_CONDITIONAL([BUILD_TEXT], [test "${enable_text}" != "no"]) dnl Internationalization macros -AM_GNU_GETTEXT_VERSION(0.18.1) -AM_GNU_GETTEXT +AM_GNU_GETTEXT_VERSION(0.20) +AM_GNU_GETTEXT([external]) dnl Iconv -dnl This test depends on AM_GNU_GETTEXT executed before +AM_ICONV AS_IF([test "$am_cv_func_iconv" != "yes"], [AC_MSG_ERROR([libiconv is needed for Eliot to work properly])]) @@ -240,7 +240,7 @@ fi dnl -------------------------------------------------------------- dnl Output dnl -------------------------------------------------------------- -AC_CONFIG_FILES(intl/Makefile po/Makefile.in +AC_CONFIG_FILES(po/Makefile.in dic/Makefile game/Makefile utils/Makefile diff --git a/dic/Makefile.am b/dic/Makefile.am index 7fb3813..432936d 100644 --- a/dic/Makefile.am +++ b/dic/Makefile.am @@ -20,7 +20,7 @@ noinst_LIBRARIES = libdic.a localedir = $(datadir)/locale -AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir) -I../intl -I$(top_srcdir)/intl $(INCICONV) @LOG4CXX_CFLAGS@ +AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir) $(INCICONV) @LOG4CXX_CFLAGS@ libdic_a_SOURCES = \ logging.h \ @@ -51,14 +51,14 @@ bin_PROGRAMS = \ compdic_SOURCES=compdicmain.cpp compdic_CPPFLAGS=$(AM_CPPFLAGS) @BOOST_CPPFLAGS@ -compdic_LDADD=libdic.a @LIBINTL@ +compdic_LDADD=libdic.a @LIBICONV@ listdic_SOURCES=listdicmain.cpp -listdic_LDADD=libdic.a @LIBINTL@ +listdic_LDADD=libdic.a @LIBICONV@ #regexp_CFLAGS=-DDEBUG_RE regexp_SOURCES=regexpmain.cpp -regexp_LDADD=libdic.a @LIBINTL@ +regexp_LDADD=libdic.a @LIBICONV@ if WITH_LOGGING compdic_LDADD += @LOG4CXX_LIBS@ diff --git a/po/makefile-qt4.patch b/po/makefile-qt4.patch index 9894e5a..d60e2d8 100644 --- a/po/makefile-qt4.patch +++ b/po/makefile-qt4.patch @@ -1,6 +1,6 @@ ---- po/Makefile.in.in 2013-01-06 17:32:47.328960440 +0100 -+++ po/Makefile.in.in.new 2013-01-06 17:34:22.641893986 +0100 -@@ -135,6 +135,11 @@ +--- po/Makefile.in.in 2020-04-06 19:12:50.652868150 +0200 ++++ po/Makefile.in.in.new 2020-04-06 19:16:31.289415435 +0200 +@@ -163,6 +163,11 @@ # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. @@ -11,21 +11,22 @@ + # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. - $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed -@@ -150,14 +155,14 @@ + # The determination of whether the package xyz is a GNU one is based on the +@@ -194,7 +199,7 @@ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --msgid-bugs-address="$$msgid_bugs_address" \ +@@ -202,7 +207,7 @@ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ *) \ - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ diff --git a/qt/Makefile.am b/qt/Makefile.am index 6a04c61..669903e 100644 --- a/qt/Makefile.am +++ b/qt/Makefile.am @@ -148,7 +148,7 @@ BUILT_SOURCES = $(nodist_eliot_SOURCES) MOSTLYCLEANFILES = $(nodist_eliot_SOURCES) -eliot_LDADD = ../game/libgame.a ../dic/libdic.a @QT_LIBS@ @LIBINTL@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@ +eliot_LDADD = ../game/libgame.a ../dic/libdic.a @QT_LIBS@ @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@ # Needed for proper stack trace handling eliot_LDFLAGS = -rdynamic diff --git a/utils/Makefile.am b/utils/Makefile.am index 8469cc0..0c3ca71 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -25,7 +25,7 @@ bin_PROGRAMS = if BUILD_TEXT noinst_PROGRAMS += eliottxt eliottxt_SOURCES = game_io.h game_io.cpp eliottxt.cpp -eliottxt_LDADD = $(top_builddir)/game/libgame.a $(top_builddir)/dic/libdic.a @LIBINTL@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@ +eliottxt_LDADD = $(top_builddir)/game/libgame.a $(top_builddir)/dic/libdic.a @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@ if HAS_READLINE eliottxt_LDADD += -lreadline @@ -38,7 +38,7 @@ endif if BUILD_NCURSES bin_PROGRAMS += eliotcurses eliotcurses_SOURCES = curses_intf.cpp curses_intf.h -eliotcurses_LDADD = ../game/libgame.a ../dic/libdic.a @CURSES_LIB@ @LIBINTL@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@ +eliotcurses_LDADD = ../game/libgame.a ../dic/libdic.a @CURSES_LIB@ @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@ if WITH_LOGGING eliotcurses_LDADD += @LOG4CXX_LIBS@ endif