Fix libintl and add support for gettext in the win32 contribs

This commit is contained in:
Olivier Teuliere 2020-04-11 12:34:06 +02:00
parent 4497fc01da
commit 32a7aa2234
4 changed files with 28 additions and 7 deletions

View file

@ -51,14 +51,14 @@ bin_PROGRAMS = \
compdic_SOURCES=compdicmain.cpp
compdic_CPPFLAGS=$(AM_CPPFLAGS) @BOOST_CPPFLAGS@
compdic_LDADD=libdic.a @LIBICONV@
compdic_LDADD=libdic.a @LIBINTL@ @LIBICONV@
listdic_SOURCES=listdicmain.cpp
listdic_LDADD=libdic.a @LIBICONV@
listdic_LDADD=libdic.a @LIBINTL@ @LIBICONV@
#regexp_CFLAGS=-DDEBUG_RE
regexp_SOURCES=regexpmain.cpp
regexp_LDADD=libdic.a @LIBICONV@
regexp_LDADD=libdic.a @LIBINTL@ @LIBICONV@
if WITH_LOGGING
compdic_LDADD += @LOG4CXX_LIBS@

View file

@ -3,6 +3,7 @@ APU_VERSION := 1.6.1
ARABICA_VERSION := 2016-January
BOOST_VERSION := 1.72.0
EXPAT_VERSION := 2.2.9
GETTEXT_VERSION := 0.20.1
ICONV_VERSION := 1.16
LIBCONFIG_VERSION := 1.7.2
LIBXML2_VERSION := 2.9.8
@ -31,7 +32,7 @@ CONFIGURE = CC="$(CC)" CXX="$(CXX)" CPPFLAGS="$(CPPFLAGS)" ./configure --host=$(
# Dependencies (incomplete list):
# expat <- apr <- apu <- log4cxx
LIBS := iconv boost expat apr apu libconfig log4cxx arabica qt2
LIBS := iconv gettext boost expat apr apu libconfig log4cxx arabica qt2
TARGETS = $(LIBS:%=.%)
.PHONY: help all clean clean-% distclean distclean-%
@ -169,6 +170,26 @@ $(EXPAT_DIR_FLAG): $(EXPAT_ARCHIVE)
touch $@
### gettext ###
GETTEXT_DIR = $(BUILD_DIR)/gettext-$(GETTEXT_VERSION)
GETTEXT_DIR_FLAG = $(GETTEXT_DIR)/.flag
GETTEXT_ARCHIVE = $(ARCHIVE_DIR)/gettext-$(GETTEXT_VERSION).tar.gz
$(GETTEXT_ARCHIVE): $(PREFIX_FLAG)
$(WGET) https://ftp.gnu.org/pub/gnu/gettext/$(shell basename $@)
$(GETTEXT_DIR_FLAG): $(GETTEXT_ARCHIVE)
$(TAR) -xzf $<
touch $@
.gettext: $(GETTEXT_DIR_FLAG)
(cd $(GETTEXT_DIR) \
&& $(CONFIGURE) --disable-java --disable-native-java --disable-relocatable --without-emacs --without-included-libxml \
&& make install)
touch $@
### iconv ###
ICONV_DIR = $(BUILD_DIR)/libiconv-$(ICONV_VERSION)

View file

@ -148,7 +148,7 @@ BUILT_SOURCES = $(nodist_eliot_SOURCES)
MOSTLYCLEANFILES = $(nodist_eliot_SOURCES)
eliot_LDADD = ../game/libgame.a ../dic/libdic.a @QT_LIBS@ @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@
eliot_LDADD = ../game/libgame.a ../dic/libdic.a @QT_LIBS@ @LIBINTL@ @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@
# Needed for proper stack trace handling
eliot_LDFLAGS = -rdynamic

View file

@ -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 @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@
eliottxt_LDADD = $(top_builddir)/game/libgame.a $(top_builddir)/dic/libdic.a @LIBINTL@ @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@ @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@
eliotcurses_LDADD = ../game/libgame.a ../dic/libdic.a @CURSES_LIB@ @LIBINTL@ @LIBICONV@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LIBS@
if WITH_LOGGING
eliotcurses_LDADD += @LOG4CXX_LIBS@
endif