1 ################################################################################
5 ################################################################################
7 GETTEXT_VERSION = 0.19.4
8 GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext
9 GETTEXT_SOURCE = gettext-$(GETTEXT_VERSION).tar.xz
10 GETTEXT_INSTALL_STAGING = YES
11 GETTEXT_LICENSE = GPLv2+
12 GETTEXT_LICENSE_FILES = COPYING
14 GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
15 HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency
17 GETTEXT_CONF_OPTS += \
18 --disable-libasprintf \
23 --disable-native-java \
25 --disable-relocatable \
28 HOST_GETTEXT_CONF_OPTS = \
29 --disable-libasprintf \
34 --disable-native-java \
36 --disable-relocatable \
39 # For the target version, we only need the runtime, and for the host
40 # version, we only need the tools.
41 GETTEXT_SUBDIR = gettext-runtime
42 HOST_GETTEXT_SUBDIR = gettext-tools
44 # Disable the build of documentation and examples of gettext-tools,
45 # and the build of documentation and tests of gettext-runtime.
46 define HOST_GETTEXT_DISABLE_UNNEEDED
47 $(SED) '/^SUBDIRS/s/ doc //;/^SUBDIRS/s/examples$$//' $(@D)/gettext-tools/Makefile.in
48 $(SED) '/^SUBDIRS/s/ doc //;/^SUBDIRS/s/tests$$//' $(@D)/gettext-runtime/Makefile.in
51 GETTEXT_POST_PATCH_HOOKS += HOST_GETTEXT_DISABLE_UNNEEDED
52 HOST_GETTEXT_POST_PATCH_HOOKS += HOST_GETTEXT_DISABLE_UNNEEDED
54 define GETTEXT_REMOVE_UNNEEDED
55 $(RM) -rf $(TARGET_DIR)/usr/share/gettext/ABOUT-NLS
56 rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/gettext
59 GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_REMOVE_UNNEEDED
61 define GETTEXT_GETTEXTIZE_EYE_CANDY
62 $(SED) '/Press Return\|read dummy/d' $(HOST_DIR)/usr/bin/gettextize
65 HOST_GETTEXT_POST_INSTALL_HOOKS += GETTEXT_GETTEXTIZE_EYE_CANDY
67 # Force build with NLS support, otherwise libintl is not built
68 # This is needed because some packages (eg. libglib2) requires
69 # locales, but do not properly depend on BR2_ENABLE_LOCALE, and
70 # instead select BR2_PACKAGE_GETTEXT. Those packages need to be
71 # fixed before we can remove the following 3 lines... :-(
72 ifeq ($(BR2_ENABLE_LOCALE),)
73 GETTEXT_CONF_OPTS += --enable-nls
76 # Disable interactive confirmation in host gettextize for package fixups
77 define HOST_GETTEXT_GETTEXTIZE_CONFIRMATION
78 $(SED) '/read dummy/d' $(HOST_DIR)/usr/bin/gettextize
80 HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_GETTEXTIZE_CONFIRMATION
82 GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/usr/bin/autom4te $(HOST_DIR)/usr/bin/gettextize -f
84 $(eval $(autotools-package))
85 $(eval $(host-autotools-package))