Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 05/11] gettext: convert to autotools-package
  2012-09-03 22:02 [Buildroot] [PATCH 0/11 v2] " Yann E. MORIN
@ 2012-09-03 22:02 ` Yann E. MORIN
  2012-09-16 10:16   ` Samuel Martin
  0 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-03 22:02 UTC (permalink / raw)
  To: buildroot

From: Maxime Ripard <maxime.ripard@free-electrons.com>

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998 at free.fr: add license info]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/gettext/Config.in  |   10 +++-
 package/gettext/gettext.mk |  165 ++++++-------------------------------------
 2 files changed, 32 insertions(+), 143 deletions(-)

diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index de19410..ee7d8cb 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -7,11 +7,19 @@ config BR2_PACKAGE_GETTEXT
 	  framework to help other GNU packages produce multi-lingual
 	  messages.
 
-	  Only the gettext libraries will be installed in the
+	  Only the libintl library will be installed in the
 	  target. The full gettext suite, including tools, will be
 	  installed in the staging directory.
 
 	  http://www.gnu.org/software/gettext/
 
+config BR2_PACKAGE_GETTEXT_TOOLS
+	bool "Install gettext tools"
+	depends on BR2_PACKAGE_GETTEXT
+	help
+	  This option allows to install the complete gettext suite in
+	  the target filesystem. This is typically not useful for
+	  correct operation of programs.
+
 comment "gettext requires a toolchain with WCHAR support"
 	depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 4dff941..1de8c3b 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -3,147 +3,28 @@
 # gettext
 #
 #############################################################
-GETTEXT_VERSION:=0.16.1
-GETTEXT_SOURCE:=gettext-$(GETTEXT_VERSION).tar.gz
-GETTEXT_SITE:=$(BR2_GNU_MIRROR)/gettext
-GETTEXT_DIR:=$(BUILD_DIR)/gettext-$(GETTEXT_VERSION)
-GETTEXT_CAT:=$(ZCAT)
-GETTEXT_BINARY:=gettext-runtime/src/gettext
-GETTEXT_TARGET_BINARY:=usr/bin/gettext
-
-LIBINTL_TARGET_BINARY:=usr/lib/libintl.so
-
-$(DL_DIR)/$(GETTEXT_SOURCE):
-	 $(call DOWNLOAD,$(GETTEXT_SITE)/$(GETTEXT_SOURCE))
-
-gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE)
-
-$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE)
-	$(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	support/scripts/apply-patches.sh $(GETTEXT_DIR) package/gettext/ gettext\*.patch
-	$(call CONFIG_UPDATE,$(@D))
-	touch $@
-
-ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-IGNORE_EXTERNAL_GETTEXT:=--with-included-gettext
+GETTEXT_VERSION = 0.16.1
+GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext
+GETTEXT_INSTALL_STAGING = YES
+GETTEXT_LICENSE = GPLv2+
+GETTEXT_LICENSE_FILES = COPYING
+
+GETTEXT_CONF_OPT += \
+	--disable-libasprintf \
+	--disable-openmp \
+	--disable-rpath \
+	--disable-java \
+	--disable-native-java \
+	--disable-csharp \
+	--disable-relocatable \
+	--without-emacs
+
+# When the gettext tools are not enabled in the configuration, we only
+# install libintl to the target.
+ifeq ($(BR2_PACKAGE_GETTEXT_TOOLS),)
+define GETTEXT_INSTALL_TARGET_CMDS
+	cp -dpf $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
+endef
 endif
 
-$(GETTEXT_DIR)/.configured: $(GETTEXT_DIR)/.unpacked
-	(cd $(GETTEXT_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		ac_cv_func_strtod=yes \
-		ac_fsusage_space=yes \
-		fu_cv_sys_stat_statfs2_bsize=yes \
-		ac_cv_func_closedir_void=no \
-		ac_cv_func_getloadavg=no \
-		ac_cv_lib_util_getloadavg=no \
-		ac_cv_lib_getloadavg_getloadavg=no \
-		ac_cv_func_getgroups=yes \
-		ac_cv_func_getgroups_works=yes \
-		ac_cv_func_chown_works=yes \
-		ac_cv_have_decl_euidaccess=no \
-		ac_cv_func_euidaccess=no \
-		ac_cv_have_decl_strnlen=yes \
-		ac_cv_func_strnlen_working=yes \
-		ac_cv_func_lstat_dereferences_slashed_symlink=yes \
-		ac_cv_func_lstat_empty_string_bug=no \
-		ac_cv_func_stat_empty_string_bug=no \
-		vb_cv_func_rename_trailing_slash_bug=no \
-		ac_cv_have_decl_nanosleep=yes \
-		jm_cv_func_nanosleep_works=yes \
-		gl_cv_func_working_utimes=yes \
-		ac_cv_func_utime_null=yes \
-		ac_cv_have_decl_strerror_r=yes \
-		ac_cv_func_strerror_r_char_p=no \
-		jm_cv_func_svid_putenv=yes \
-		ac_cv_func_getcwd_null=yes \
-		ac_cv_func_getdelim=yes \
-		ac_cv_func_mkstemp=yes \
-		utils_cv_func_mkstemp_limitations=no \
-		utils_cv_func_mkdir_trailing_slash_bug=no \
-		jm_cv_func_gettimeofday_clobber=no \
-		gl_cv_func_working_readdir=yes \
-		jm_ac_cv_func_link_follows_symlink=no \
-		utils_cv_localtime_cache=no \
-		ac_cv_struct_st_mtim_nsec=no \
-		gl_cv_func_tzset_clobber=no \
-		gl_cv_func_getcwd_null=yes \
-		gl_cv_func_getcwd_path_max=yes \
-		ac_cv_func_fnmatch_gnu=yes \
-		am_getline_needs_run_time_check=no \
-		am_cv_func_working_getline=yes \
-		gl_cv_func_mkdir_trailing_slash_bug=no \
-		gl_cv_func_mkstemp_limitations=no \
-		ac_cv_func_working_mktime=yes \
-		jm_cv_func_working_re_compile_pattern=yes \
-		ac_use_included_regex=no \
-		gl_cv_c_restrict=no \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--exec-prefix=/usr \
-		--disable-libasprintf \
-		--enable-shared \
-		$(IGNORE_EXTERNAL_GETTEXT) \
-		--disable-openmp \
-	)
-	touch $@
-
-$(GETTEXT_DIR)/$(GETTEXT_BINARY): $(GETTEXT_DIR)/.configured
-	$(MAKE) -C $(GETTEXT_DIR)
-	touch -c $(GETTEXT_DIR)/$(GETTEXT_BINARY)
-
-$(STAGING_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY)
-	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(GETTEXT_DIR) install
-	$(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextlib.la
-	$(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextpo.la
-	$(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextsrc.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextlib.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextpo.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextsrc.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libintl.la
-	rm -f $(addprefix $(STAGING_DIR)/usr/bin/, \
-		autopoint envsubst gettext.sh gettextize msg* ?gettext)
-	touch -c $@
-
-gettext-legal-info:
-	@$(call legal-warning-pkg,gettext,legal-info not yet implemented)
-
-gettext: host-pkg-config $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY) $(TARGET_DIR)/$(LIBINTL_TARGET_BINARY)
-
-gettext-unpacked: $(GETTEXT_DIR)/.unpacked
-
-gettext-clean:
-	-$(MAKE) DESTDIR=$(STAGING_DIR) CC="$(TARGET_CC)" -C $(GETTEXT_DIR) uninstall
-	-$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GETTEXT_DIR) uninstall
-	-$(MAKE) -C $(GETTEXT_DIR) clean
-
-gettext-dirclean:
-	rm -rf $(GETTEXT_DIR)
-
-#############################################################
-#
-# gettext on the target
-#
-#############################################################
-
-$(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
-	cp -dpf $(STAGING_DIR)/usr/lib/libgettext*.so* \
-		$(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
-	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libgettext*.so*
-	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libintl*.so*
-	rm -f $(addprefix $(TARGET_DIR)/usr/lib/, \
-		libgettext*.so*.la libintl*.so*.la)
-	touch -c $@
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-TARGETS+=gettext
-endif
+$(eval $(autotools-package))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 05/11] gettext: convert to autotools-package
  2012-09-03 22:02 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
@ 2012-09-16 10:16   ` Samuel Martin
  0 siblings, 0 replies; 35+ messages in thread
From: Samuel Martin @ 2012-09-16 10:16 UTC (permalink / raw)
  To: buildroot

Hi Yann, Thomas, Maxime, all,

Comments inlined.

2012/9/4 Yann E. MORIN <yann.morin.1998@free.fr>:
> From: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> [yann.morin.1998 at free.fr: add license info]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> CC: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/gettext/Config.in  |   10 +++-
>  package/gettext/gettext.mk |  165 ++++++-------------------------------------
>  2 files changed, 32 insertions(+), 143 deletions(-)
>
[...]
> diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
> index 4dff941..1de8c3b 100644
> --- a/package/gettext/gettext.mk
> +++ b/package/gettext/gettext.mk
> @@ -3,147 +3,28 @@
>  # gettext
>  #
>  #############################################################
> -GETTEXT_VERSION:=0.16.1
> -GETTEXT_SOURCE:=gettext-$(GETTEXT_VERSION).tar.gz
> -GETTEXT_SITE:=$(BR2_GNU_MIRROR)/gettext
> -GETTEXT_DIR:=$(BUILD_DIR)/gettext-$(GETTEXT_VERSION)
> -GETTEXT_CAT:=$(ZCAT)
> -GETTEXT_BINARY:=gettext-runtime/src/gettext
> -GETTEXT_TARGET_BINARY:=usr/bin/gettext
> -
> -LIBINTL_TARGET_BINARY:=usr/lib/libintl.so
> -
> -$(DL_DIR)/$(GETTEXT_SOURCE):
> -        $(call DOWNLOAD,$(GETTEXT_SITE)/$(GETTEXT_SOURCE))
> -
> -gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE)
> -
> -$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE)
> -       $(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
> -       support/scripts/apply-patches.sh $(GETTEXT_DIR) package/gettext/ gettext\*.patch
> -       $(call CONFIG_UPDATE,$(@D))
> -       touch $@
> -
> -ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y)
> -IGNORE_EXTERNAL_GETTEXT:=--with-included-gettext
> +GETTEXT_VERSION = 0.16.1
> +GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext
> +GETTEXT_INSTALL_STAGING = YES
> +GETTEXT_LICENSE = GPLv2+
> +GETTEXT_LICENSE_FILES = COPYING
> +
> +GETTEXT_CONF_OPT += \
> +       --disable-libasprintf \
> +       --disable-openmp \
> +       --disable-rpath \
> +       --disable-java \
> +       --disable-native-java \
> +       --disable-csharp \
> +       --disable-relocatable \
> +       --without-emacs
> +
> +# When the gettext tools are not enabled in the configuration, we only
> +# install libintl to the target.
> +ifeq ($(BR2_PACKAGE_GETTEXT_TOOLS),)
> +define GETTEXT_INSTALL_TARGET_CMDS
> +       cp -dpf $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
> +endef
>  endif

Since libintl is only built when the toolchain has locale/i18n support
enabled, this should be:

ifeq ($(BR2_PACKAGE_GETTEXT_TOOLS),)
ifeq ($(BR2_ENABLE_LOCALE),y)
define GETTEXT_INSTALL_TARGET_CMDS
       cp -dpf $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
endef
endif
endif

BTW, I'm wondering what is the behavior if one uses a libc which
provides i18n/l10n support + install gettext, so libintl, on its
target.
A binary which has been linked against libintl, would it call
i18n/l10n functions from the libc or from libintl?
To make it shorter, shall we install libintl only if the libc also
provides i18n/l10n support?
Shall we allow to install gettext if the libc provides i18n/l10n support?


-- 
Sam

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
@ 2012-09-16 22:57 Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 01/11] gettext: remove option to build statically Yann E. MORIN
                   ` (15 more replies)
  0 siblings, 16 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

Hello All!

This patch series is an aggregation of the gettext rework by Samuel,
Maxime, Thomas, and I.

See this post for the 6 first patches:
http://lists.busybox.net/pipermail/buildroot/2012-July/055871.html

    [PATCH 01/11] gettext: remove option to build statically
    [PATCH 02/11] gettext: remove the gettext-target make target, unused
    [PATCH 03/11] gettext: remove libintl handling
    [PATCH 04/11] Remove all references to libintl
    [PATCH 05/11] gettext: convert to autotools-package
    [PATCH 06/11] doc: update after gettext changes

The following 2 patches fix two packages in preparation for the end of the
series:

    [PATCH 07/11] package/lshw: add missing dependency on gettext
    [PATCH 08/11] package/pulseaudio: fix build-dependency on gettext

See this post for an explanation for the next 3 patches:
http://lists.busybox.net/pipermail/buildroot/2012-August/058042.html

    [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT
    [PATCH 10/11] toolchain/common: introduce blind options
                  BR2_NEEDS_GETTEXT{,_IF_LOCALE}
    [PATCH 11/11] packages: use the new gettext mechanism

The tests were done with two external uClibc-based toolchains built with
crosstool-NG, one with locale support, the other without. All packages
touched by the series were first built with both toolchains and the series
not applied (to check for any non-series related issues, see gmpc below),
then the series was fully applied, and the packages all re-built from
scratch.

gmpc failed to build, even before the series was applied, because it does
not link with -lm and thus misses some sumbols (eg. floor(3)). All other
packages were built successfully (albeit using a great deal of electrons
in the process! ;-) ). No test-run was done on my side.

Changes since v2:
  - fix conversion to autotools to always build libintl, even if locales are
    disabled, to fix packages that always require NLS
  - thus removed Arnout's Tested-by on patch 5/11, as it has changed
  - rebase on-top latest tree
  - also C: Samuel on the introductory message

Changes since v1:
  - drop the gettext-before-all patch (Arnout, Thomas)
  - keep and simplify build-dependency against gettext (Arnout)
  - add config-dependency against gettext for diffutils, flex, ndisc6
    and util-linux, in patch 11
  - rebase on-top latest tree (and upgrade new package linux-pam in the
    process)
  - update doc
  - add Tested-by and Acked-by Arnout were he said so
  - CC: Samuel Martin as a recognition for his original work on this topic,
    which this series is based on. (Arnout)

Regards,
Yann E. MORIN.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 01/11] gettext: remove option to build statically
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 02/11] gettext: remove the gettext-target make target, unused Yann E. MORIN
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/gettext/Config.in  |   12 ------------
 package/gettext/gettext.mk |    9 ---------
 2 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index fabfe1e..0ee4065 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -12,18 +12,6 @@ config BR2_PACKAGE_GETTEXT
 comment "gettext requires a toolchain with WCHAR support"
 	depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR
 
-config BR2_PACKAGE_GETTEXT_STATIC
-	bool "Use libgettext.a instead of libgettext.so.*"
-	depends on BR2_PACKAGE_GETTEXT
-	depends on BR2_arm
-	help
-	  The GNU `gettext' utilities are a set of tools that provide a
-	  framework to help other GNU packages produce multi-lingual
-	  messages.
-
-	  http://www.gnu.org/software/gettext/
-
-
 config BR2_PACKAGE_LIBINTL
 	bool "libintl"
 	depends on BR2_NEEDS_GETTEXT
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 9778007..20bd672 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -11,11 +11,7 @@ GETTEXT_CAT:=$(ZCAT)
 GETTEXT_BINARY:=gettext-runtime/src/gettext
 GETTEXT_TARGET_BINARY:=usr/bin/gettext
 
-ifeq ($(BR2_PACKAGE_GETTEXT_STATIC),y)
-LIBINTL_TARGET_BINARY:=usr/lib/libintl.a
-else
 LIBINTL_TARGET_BINARY:=usr/lib/libintl.so
-endif
 
 $(DL_DIR)/$(GETTEXT_SOURCE):
 	 $(call DOWNLOAD,$(GETTEXT_SITE)/$(GETTEXT_SOURCE))
@@ -147,11 +143,6 @@ $(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
 		libgettext*.so*.la libintl*.so*.la)
 	touch -c $@
 
-$(TARGET_DIR)/usr/lib/libintl.a: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
-	cp -dpf $(STAGING_DIR)/usr/lib/libgettext*.a $(TARGET_DIR)/usr/lib/
-	cp -dpf $(STAGING_DIR)/usr/lib/libintl*.a $(TARGET_DIR)/usr/lib/
-	touch -c $@
-
 libintl: $(TARGET_DIR)/$(LIBINTL_TARGET_BINARY)
 
 #############################################################
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 02/11] gettext: remove the gettext-target make target, unused
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 01/11] gettext: remove option to build statically Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 03/11] gettext: remove libintl handling Yann E. MORIN
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/gettext/gettext.mk |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 20bd672..6b2c336 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -130,10 +130,6 @@ gettext-dirclean:
 #
 #############################################################
 
-gettext-target: $(GETTEXT_DIR)/$(GETTEXT_BINARY)
-	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GETTEXT_DIR) install
-	chmod +x $(TARGET_DIR)/usr/lib/libintl.so* # identify as needing to be stripped
-
 $(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
 	cp -dpf $(STAGING_DIR)/usr/lib/libgettext*.so* \
 		$(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 03/11] gettext: remove libintl handling
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 01/11] gettext: remove option to build statically Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 02/11] gettext: remove the gettext-target make target, unused Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 04/11] Remove all references to libintl Yann E. MORIN
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Now, the gettext package always:

 * install everything to the staging directory
 * install the libraries to the target directory

Note that this commit removes BR2_PACKAGE_LIBINTL without updating the
packages, it is done in a separate commit to ease the review process.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998 at free.fr: keep BR2_PACKAGE_LIBINTL as blind option]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/gettext/Config.in  |   14 ++++++--------
 package/gettext/gettext.mk |    7 +------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index 0ee4065..04f7de6 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -7,17 +7,15 @@ config BR2_PACKAGE_GETTEXT
 	  framework to help other GNU packages produce multi-lingual
 	  messages.
 
+	  Only the gettext libraries will be installed in the
+	  target. The full gettext suite, including tools, will be
+	  installed in the staging directory.
+
 	  http://www.gnu.org/software/gettext/
 
 comment "gettext requires a toolchain with WCHAR support"
 	depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR
 
 config BR2_PACKAGE_LIBINTL
-	bool "libintl"
-	depends on BR2_NEEDS_GETTEXT
-	depends on BR2_USE_WCHAR
-	help
-	  Selecting this package installs all of gettext in the staging
-	  directory and the shared library for it's use in the target.
-
-	  http://www.gnu.org/software/gettext/
+	bool
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 6b2c336..4dff941 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -112,7 +112,7 @@ $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY)
 gettext-legal-info:
 	@$(call legal-warning-pkg,gettext,legal-info not yet implemented)
 
-gettext: host-pkg-config $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
+gettext: host-pkg-config $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY) $(TARGET_DIR)/$(LIBINTL_TARGET_BINARY)
 
 gettext-unpacked: $(GETTEXT_DIR)/.unpacked
 
@@ -139,16 +139,11 @@ $(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
 		libgettext*.so*.la libintl*.so*.la)
 	touch -c $@
 
-libintl: $(TARGET_DIR)/$(LIBINTL_TARGET_BINARY)
-
 #############################################################
 #
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
-TARGETS+=libintl
-endif
 ifeq ($(BR2_PACKAGE_GETTEXT),y)
 TARGETS+=gettext
 endif
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 04/11] Remove all references to libintl
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (2 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 03/11] gettext: remove libintl handling Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

From now on, packages only need to select the BR2_PACKAGE_GETTEXT
option and depend on the 'gettext' package to get the necessary i18n
libraries installed on the target.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998 at free.fr: remove BR2_PACKAGE_LIBINTL]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/avahi/Config.in                     |    1 -
 package/avahi/avahi.mk                      |    6 +++---
 package/axel/Config.in                      |    1 -
 package/axel/axel.mk                        |    2 +-
 package/binutils/Config.in                  |    1 -
 package/binutils/binutils.mk                |    2 +-
 package/diffutils/diffutils.mk              |    3 +--
 package/dnsmasq/Config.in                   |    1 -
 package/dnsmasq/dnsmasq.mk                  |    2 +-
 package/flex/flex.mk                        |    3 +--
 package/gdk-pixbuf/Config.in                |    1 -
 package/gdk-pixbuf/gdk-pixbuf.mk            |    2 +-
 package/gettext/Config.in                   |    4 ----
 package/glib-networking/Config.in           |    1 -
 package/glib-networking/glib-networking.mk  |    2 +-
 package/gmpc/Config.in                      |    1 -
 package/gmpc/gmpc.mk                        |    2 +-
 package/grep/Config.in                      |    1 -
 package/grep/grep.mk                        |    2 +-
 package/kbd/Config.in                       |    1 -
 package/kbd/kbd.mk                          |    2 +-
 package/libglib2/Config.in                  |    1 -
 package/libglib2/libglib2.mk                |    2 +-
 package/libsoup/Config.in                   |    1 -
 package/libsoup/libsoup.mk                  |    2 +-
 package/linux-pam/Config.in                 |    1 -
 package/linux-pam/linux-pam.mk              |    4 ++--
 package/lshw/lshw.mk                        |    2 +-
 package/make/Config.in                      |    1 -
 package/make/make.mk                        |    2 +-
 package/midori/Config.in                    |    1 -
 package/midori/midori.mk                    |    2 +-
 package/multimedia/pulseaudio/Config.in     |    2 +-
 package/multimedia/pulseaudio/pulseaudio.mk |    2 +-
 package/ndisc6/ndisc6.mk                    |    4 ++--
 package/pango/Config.in                     |    1 -
 package/pango/pango.mk                      |    2 +-
 package/psmisc/Config.in                    |    1 -
 package/psmisc/psmisc.mk                    |    2 +-
 package/quota/Config.in                     |    1 -
 package/quota/quota.mk                      |    2 +-
 package/sshfs/Config.in                     |    1 -
 package/sshfs/sshfs.mk                      |    2 +-
 package/sysstat/Config.in                   |    1 -
 package/sysstat/sysstat.mk                  |    2 +-
 package/ushare/Config.in                    |    1 -
 package/ushare/ushare.mk                    |    2 +-
 package/util-linux/util-linux.mk            |    4 ++--
 package/vala/Config.in                      |    1 -
 package/vala/vala.mk                        |    2 +-
 50 files changed, 33 insertions(+), 60 deletions(-)

diff --git a/package/avahi/Config.in b/package/avahi/Config.in
index eb3ccb6..8ba33d5 100644
--- a/package/avahi/Config.in
+++ b/package/avahi/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_AVAHI
 	bool "avahi"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index a26481d..03dc368 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -85,7 +85,7 @@ AVAHI_CONF_OPT = --localstatedir=/var \
 		--with-autoipd-user=default \
 		--with-autoipd-group=default
 
-AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-intltool host-pkg-config
+AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool host-pkg-config
 
 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
 AVAHI_DEPENDENCIES += libdaemon
@@ -133,8 +133,8 @@ else
 AVAHI_CONF_OPT += --disable-python
 endif
 
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
-AVAHI_DEPENDENCIES += libintl
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+AVAHI_DEPENDENCIES += gettext
 AVAHI_MAKE_OPT = LIBS=-lintl
 endif
 
diff --git a/package/axel/Config.in b/package/axel/Config.in
index 98f4941..d823272 100644
--- a/package/axel/Config.in
+++ b/package/axel/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_AXEL
 	bool "axel"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  HTTP/FTP download accelerator.
diff --git a/package/axel/axel.mk b/package/axel/axel.mk
index 893caf1..0ed8ad2 100644
--- a/package/axel/axel.mk
+++ b/package/axel/axel.mk
@@ -10,7 +10,7 @@ AXEL_SITE = https://alioth.debian.org/frs/download.php/3015
 AXEL_LDFLAGS = -lpthread
 
 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-AXEL_DEPENDENCIES += gettext libintl
+AXEL_DEPENDENCIES += gettext
 AXEL_LDFLAGS += -lintl
 endif
 
diff --git a/package/binutils/Config.in b/package/binutils/Config.in
index e068b20..6480370 100644
--- a/package/binutils/Config.in
+++ b/package/binutils/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_BINUTILS
 	bool "binutils"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Install binutils on the target
 
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index a91879a..d41cac4 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -23,7 +23,7 @@ BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
 endif
 BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS))
 BINUTILS_INSTALL_STAGING = YES
-BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 # We need to specify host & target to avoid breaking ARM EABI
 BINUTILS_CONF_OPT = --disable-multilib --disable-werror \
diff --git a/package/diffutils/diffutils.mk b/package/diffutils/diffutils.mk
index d6029a4..168d040 100644
--- a/package/diffutils/diffutils.mk
+++ b/package/diffutils/diffutils.mk
@@ -7,8 +7,7 @@
 DIFFUTILS_VERSION = 3.2
 DIFFUTILS_SITE = $(BR2_GNU_MIRROR)/diffutils
 DIFFUTILS_DEPENDENCIES = \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext) \
-	$(if $(BR2_PACKAGE_LIBINTL),libintl)
+	$(if $(BR2_PACKAGE_GETTEXT),gettext)
 
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 DIFFUTILS_DEPENDENCIES += busybox
diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in
index e67aa46..b76ddb2 100644
--- a/package/dnsmasq/Config.in
+++ b/package/dnsmasq/Config.in
@@ -25,7 +25,6 @@ config BR2_PACKAGE_DNSMASQ_IDN
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_LIBIDN
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Enable IDN support in dnsmasq.
 	  This option is a big space taker since it pulls in many libraries.
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index 1f714bf..e92a554 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -24,7 +24,7 @@ endif
 
 # NLS requires IDN so only enable it (i18n) when IDN is true
 ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
-	DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+	DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 	DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
 	DNSMASQ_COPTS += -DHAVE_IDN
 	DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n)
diff --git a/package/flex/flex.mk b/package/flex/flex.mk
index 16f6801..2599cdc 100644
--- a/package/flex/flex.mk
+++ b/package/flex/flex.mk
@@ -12,8 +12,7 @@ FLEX_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/f/flex
 FLEX_DIR = $(BUILD_DIR)/flex-$(FLEX_VERSION)
 FLEX_INSTALL_STAGING = YES
 FLEX_DEPENDENCIES = \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext) \
-	$(if $(BR2_PACKAGE_LIBINTL),libintl)
+	$(if $(BR2_PACKAGE_GETTEXT),gettext)
 # we don't have a host-gettext/libintl
 HOST_FLEX_DEPENDENCIES =
 
diff --git a/package/gdk-pixbuf/Config.in b/package/gdk-pixbuf/Config.in
index 28a0f12..33b5f7c 100644
--- a/package/gdk-pixbuf/Config.in
+++ b/package/gdk-pixbuf/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_GDK_PIXBUF
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Gdk-Pixbuf is an image loader and scaler. It uses GObject
diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk
index 0d9e206..92a34bf 100644
--- a/package/gdk-pixbuf/gdk-pixbuf.mk
+++ b/package/gdk-pixbuf/gdk-pixbuf.mk
@@ -40,7 +40,7 @@ GDK_PIXBUF_DEPENDENCIES += xlib_libX11
 endif
 
 GDK_PIXBUF_DEPENDENCIES += \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \
+	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv) \
 	host-pkg-config libglib2
 
diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index 04f7de6..de19410 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -15,7 +15,3 @@ config BR2_PACKAGE_GETTEXT
 
 comment "gettext requires a toolchain with WCHAR support"
 	depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR
-
-config BR2_PACKAGE_LIBINTL
-	bool
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
diff --git a/package/glib-networking/Config.in b/package/glib-networking/Config.in
index 16f0d4a..dab35ea 100644
--- a/package/glib-networking/Config.in
+++ b/package/glib-networking/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_GLIB_NETWORKING
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  Network-related GIO modules for glib.
 
diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk
index 385ad47..823ba39 100644
--- a/package/glib-networking/glib-networking.mk
+++ b/package/glib-networking/glib-networking.mk
@@ -13,7 +13,7 @@ GLIB_NETWORKING_SOURCE = glib-networking-$(GLIB_NETWORKING_VERSION).tar.xz
 GLIB_NETWORKING_INSTALL_STAGING = YES
 
 GLIB_NETWORKING_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \
+	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
 	host-pkg-config \
 	host-intltool \
 	libglib2
diff --git a/package/gmpc/Config.in b/package/gmpc/Config.in
index f86945c..9b38d1a 100644
--- a/package/gmpc/Config.in
+++ b/package/gmpc/Config.in
@@ -5,7 +5,6 @@ config BR2_PACKAGE_GMPC
 	depends on BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBMPD
 	select BR2_PACKAGE_LIBSOUP
diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk
index 51d0cd9..a136cf4 100644
--- a/package/gmpc/gmpc.mk
+++ b/package/gmpc/gmpc.mk
@@ -11,6 +11,6 @@ GMPC_CONF_OPT = --disable-mmkeys --disable-unique
 GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkg-config host-vala \
 	libglib2 libgtk2 libmpd libsoup sqlite \
 	xlib_libICE xlib_libSM xlib_libX11 \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 $(eval $(autotools-package))
diff --git a/package/grep/Config.in b/package/grep/Config.in
index 1b39922..5906e69 100644
--- a/package/grep/Config.in
+++ b/package/grep/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_GREP
 	bool "grep"
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  The GNU regular expression matcher.
 
diff --git a/package/grep/grep.mk b/package/grep/grep.mk
index a02fe2c..2636c83 100644
--- a/package/grep/grep.mk
+++ b/package/grep/grep.mk
@@ -10,7 +10,7 @@ GREP_SOURCE = grep-$(GREP_VERSION).tar.xz
 GREP_LICENSE = GPLv3+
 GREP_LICENSE_FILES = COPYING
 GREP_CONF_OPT = --disable-perl-regexp --without-included-regex
-GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 # link with iconv if enabled
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
diff --git a/package/kbd/Config.in b/package/kbd/Config.in
index a23b70a..44c3163 100644
--- a/package/kbd/Config.in
+++ b/package/kbd/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_KBD
 	bool "kbd"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	# Uses fork()
 	depends on BR2_USE_MMU
 	help
diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk
index a52ad5a..325978e 100644
--- a/package/kbd/kbd.mk
+++ b/package/kbd/kbd.mk
@@ -2,6 +2,6 @@ KBD_VERSION = 1.15.2
 KBD_SOURCE = kbd-$(KBD_VERSION).tar.gz
 KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd
 
-KBD_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+KBD_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 $(eval $(autotools-package))
diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index d1d7231..5282885 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_LIBGLIB2
 	bool "libglib2"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_ZLIB
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 2b2bd32..030cecb 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -55,7 +55,7 @@ HOST_LIBGLIB2_CONF_OPT = \
 		--disable-gtk-doc \
 		--enable-debug=no \
 
-LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
+LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
 
 HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-libffi host-zlib
 
diff --git a/package/libsoup/Config.in b/package/libsoup/Config.in
index f40625d..57b425f 100644
--- a/package/libsoup/Config.in
+++ b/package/libsoup/Config.in
@@ -4,7 +4,6 @@ config BR2_PACKAGE_LIBSOUP
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  libsoup is an HTTP client/server library. It uses GObject
 	  and the GLib main loop, to integrate well with GNOME
diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk
index fe1a41c..30655ba 100644
--- a/package/libsoup/libsoup.mk
+++ b/package/libsoup/libsoup.mk
@@ -19,7 +19,7 @@ endif
 
 LIBSOUP_CONF_OPT = --disable-glibtest --without-gnome
 
-LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-pkg-config host-libglib2 libglib2 libxml2
+LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-pkg-config host-libglib2 libglib2 libxml2
 
 ifeq ($(BR2_PACKAGE_LIBSOUP_SSL),y)
 LIBSOUP_DEPENDENCIES += glib-networking
diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in
index 722b875..7cfd814 100644
--- a/package/linux-pam/Config.in
+++ b/package/linux-pam/Config.in
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_LINUX_PAM
 	bool "linux-pam"
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_FLEX
 	select BR2_PACKAGE_FLEX_LIBFL
diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk
index 48cb073..1a2e7f6 100644
--- a/package/linux-pam/linux-pam.mk
+++ b/package/linux-pam/linux-pam.mk
@@ -15,12 +15,12 @@ LINUX_PAM_CONF_OPT = \
 	--disable-regenerate-docu \
 	--enable-securedir=/lib/security \
 	--libdir=/lib
-LINUX_PAM_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) flex
+LINUX_PAM_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) flex
 LINUX_PAM_AUTORECONF = YES
 LINUX_PAM_LICENSE = BSD-3c
 LINUX_PAM_LICENSE_FILES = Copyright
 
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
 	LINUX_PAM_MAKE_OPT += LIBS=-lintl
 endif
 
diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
index a53c107..68daa0d 100644
--- a/package/lshw/lshw.mk
+++ b/package/lshw/lshw.mk
@@ -9,7 +9,7 @@ LSHW_SITE = http://ezix.org/software/files
 LSHW_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \
 	RPM_OPT_FLAGS="$(TARGET_CFLAGS)" all
 LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_GETTEXT),-lintl)"
-LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),libintl)
+LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext)
 
 define LSHW_BUILD_CMDS
 	$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPT)
diff --git a/package/make/Config.in b/package/make/Config.in
index 364bb1e..ea2ae1b 100644
--- a/package/make/Config.in
+++ b/package/make/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_MAKE
 	bool "make"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  A tool which controls the generation of executables and other
 	  non-source files of a program from the program's source files.
diff --git a/package/make/make.mk b/package/make/make.mk
index a0981c7..02b2741 100644
--- a/package/make/make.mk
+++ b/package/make/make.mk
@@ -7,7 +7,7 @@ MAKE_VERSION:=3.81
 MAKE_SOURCE:=make-$(MAKE_VERSION).tar.bz2
 MAKE_SITE:=$(BR2_GNU_MIRROR)/make
 
-MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 MAKE_CONF_ENV = make_cv_sys_gnu_glob=no \
 		GLOBINC='-I$(@D)/glob' \
diff --git a/package/midori/Config.in b/package/midori/Config.in
index 49867e4..41f4515 100644
--- a/package/midori/Config.in
+++ b/package/midori/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_MIDORI
 	select BR2_PACKAGE_WEBKIT
 	select BR2_PACKAGE_LIBSEXY
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_INSTALL_LIBSTDCPP # webkit
diff --git a/package/midori/midori.mk b/package/midori/midori.mk
index 87559bb..33f94cf 100644
--- a/package/midori/midori.mk
+++ b/package/midori/midori.mk
@@ -14,7 +14,7 @@ MIDORI_DEPENDENCIES = \
 	libgtk2 \
 	libsexy \
 	webkit \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \
+	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 ifneq ($(BR2_PACKAGE_XORG7),y)
diff --git a/package/multimedia/pulseaudio/Config.in b/package/multimedia/pulseaudio/Config.in
index 6e6d64c..6c767bb 100644
--- a/package/multimedia/pulseaudio/Config.in
+++ b/package/multimedia/pulseaudio/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_JSON_C
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_SPEEX
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
diff --git a/package/multimedia/pulseaudio/pulseaudio.mk b/package/multimedia/pulseaudio/pulseaudio.mk
index 13d8770..6f7d7d2 100644
--- a/package/multimedia/pulseaudio/pulseaudio.mk
+++ b/package/multimedia/pulseaudio/pulseaudio.mk
@@ -16,7 +16,7 @@ PULSEAUDIO_CONF_OPT = \
 
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkg-config libtool json-c libsndfile speex host-intltool \
-	$(if $(BR2_PACKAGE_LIBINTL),libintl) \
+	$(if $(BR2_PACKAGE_GETTEXT),gettext) \
 	$(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
 	$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
diff --git a/package/ndisc6/ndisc6.mk b/package/ndisc6/ndisc6.mk
index eb30e11..f58cc13 100644
--- a/package/ndisc6/ndisc6.mk
+++ b/package/ndisc6/ndisc6.mk
@@ -10,8 +10,8 @@ NDISC6_SITE = http://www.remlab.net/files/ndisc6/
 NDISC6_CONF_ENV = CC="$(TARGET_CC) -std=gnu99"
 NDISC6_CONF_OPT = --localstatedir=/var --disable-rpath --disable-suid-install
 
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
-NDISC6_DEPENDENCIES += libintl
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+NDISC6_DEPENDENCIES += gettext
 NDISC6_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
 endif
 
diff --git a/package/pango/Config.in b/package/pango/Config.in
index 923c3d4..60e9931 100644
--- a/package/pango/Config.in
+++ b/package/pango/Config.in
@@ -6,7 +6,6 @@ config BR2_PACKAGE_PANGO
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Pango is a library for laying out and rendering of text, with an
 	  emphasis on internationalization. Pango can be used anywhere that
diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index efb722d..86ab474 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -41,7 +41,7 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 
 PANGO_CONF_OPT = --enable-explicit-deps=no --disable-debug
 
-PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-pkg-config libglib2 cairo
+PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-pkg-config libglib2 cairo
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
         PANGO_CONF_OPT += --with-x \
diff --git a/package/psmisc/Config.in b/package/psmisc/Config.in
index a138204..cc8420b 100644
--- a/package/psmisc/Config.in
+++ b/package/psmisc/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_PSMISC
 	bool "psmisc"
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Helpful /proc related utilities such as pstree, fuser, and killall
 
diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk
index 3132b70..5d2333f 100644
--- a/package/psmisc/psmisc.mk
+++ b/package/psmisc/psmisc.mk
@@ -8,7 +8,7 @@ PSMISC_VERSION = 22.16
 PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc
 PSMISC_LICENSE = GPLv2
 PSMISC_LICENSE_FILES = COPYING
-PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 ifneq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
 # Don't force -fstack-protector
diff --git a/package/quota/Config.in b/package/quota/Config.in
index 6c2beff..3ad0b8c 100644
--- a/package/quota/Config.in
+++ b/package/quota/Config.in
@@ -6,7 +6,6 @@ config BR2_PACKAGE_QUOTA
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_MOUNT
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Implementation of the disk quota system.
 
diff --git a/package/quota/quota.mk b/package/quota/quota.mk
index 7602e93..abe3675 100644
--- a/package/quota/quota.mk
+++ b/package/quota/quota.mk
@@ -11,7 +11,7 @@ QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(Q
 QUOTA_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-QUOTA_DEPENDENCIES = gettext libintl
+QUOTA_DEPENDENCIES = gettext
 QUOTA_MAKE_OPT += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
 endif
 
diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in
index 73d552f..37188ba 100644
--- a/package/sshfs/Config.in
+++ b/package/sshfs/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_SSHFS
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_OPENSSH
 	depends on BR2_LARGEFILE
diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk
index 67b9c7f..e72db0a 100644
--- a/package/sshfs/sshfs.mk
+++ b/package/sshfs/sshfs.mk
@@ -9,7 +9,7 @@ SSHFS_SITE = http://downloads.sourceforge.net/project/fuse/sshfs-fuse/$(SSHFS_VE
 SSHFS_SOURCE = sshfs-fuse-$(SSHFS_VERSION).tar.gz
 SSHFS_DEPENDENCIES = \
 	libglib2 libfuse openssh \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \
+	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv)
 
 $(eval $(autotools-package))
diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in
index 6e62ff1..ceba503 100644
--- a/package/sysstat/Config.in
+++ b/package/sysstat/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_SYSSTAT
 	bool "sysstat"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	# Uses fork()
 	depends on BR2_USE_MMU
 	help
diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk
index 9d91a42..83609a0 100644
--- a/package/sysstat/sysstat.mk
+++ b/package/sysstat/sysstat.mk
@@ -14,7 +14,7 @@ SYSSTAT_CONF_OPT += --disable-documentation
 endif
 
 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-SYSSTAT_DEPENDENCIES += gettext libintl
+SYSSTAT_DEPENDENCIES += gettext
 SYSSTAT_MAKE_OPT += CFLAGS+=-lintl
 endif
 
diff --git a/package/ushare/Config.in b/package/ushare/Config.in
index acf025f..f7b2124 100644
--- a/package/ushare/Config.in
+++ b/package/ushare/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_USHARE
 	depends on BR2_LARGEFILE
 	select BR2_PACKAGE_LIBUPNP
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  uShare is a UPnP (TM) A/V & DLNA Media Server.
 	  It implements the server component that provides UPnP media devices
diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
index 2d8bca5..78cbcda 100644
--- a/package/ushare/ushare.mk
+++ b/package/ushare/ushare.mk
@@ -10,7 +10,7 @@ USHARE_SITE = http://ushare.geexbox.org/releases
 USHARE_DEPENDENCIES = host-pkg-config libupnp
 
 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-USHARE_DEPENDENCIES += gettext libintl
+USHARE_DEPENDENCIES += gettext
 USHARE_LDFLAGS += -lintl
 endif
 
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index ddc9c12..71a6c53 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -29,8 +29,8 @@ else
 UTIL_LINUX_CONF_OPT += --without-ncurses
 endif
 
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
-UTIL_LINUX_DEPENDENCIES += libintl
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+UTIL_LINUX_DEPENDENCIES += gettext
 UTIL_LINUX_MAKE_OPT += LIBS=-lintl
 endif
 
diff --git a/package/vala/Config.in b/package/vala/Config.in
index 89b4459..e0d665c 100644
--- a/package/vala/Config.in
+++ b/package/vala/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_VALA
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Compiler for the GObject type system.
diff --git a/package/vala/vala.mk b/package/vala/vala.mk
index 984043c..3ce8610 100644
--- a/package/vala/vala.mk
+++ b/package/vala/vala.mk
@@ -10,7 +10,7 @@ VALA_VERSION = $(VALA_VERSION_MAJOR).$(VALA_VERSION_MINOR)
 VALA_SITE = http://download.gnome.org/sources/vala/$(VALA_VERSION_MAJOR)
 VALA_SOURCE = vala-$(VALA_VERSION).tar.xz
 VALA_DEPENDENCIES = host-flex libglib2 \
-		$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
+		$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 HOST_VALA_DEPENDENCIES = host-flex host-libglib2
 
 $(eval $(autotools-package))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 05/11] gettext: convert to autotools-package
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (3 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 04/11] Remove all references to libintl Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-20 19:44   ` Arnout Vandecappelle
  2012-09-16 22:57 ` [Buildroot] [PATCH 06/11] doc: update after gettext changes Yann E. MORIN
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

From: Maxime Ripard <maxime.ripard@free-electrons.com>

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998 at free.fr: add license info, build libintl if locales disabled]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/gettext/Config.in  |   10 +++-
 package/gettext/gettext.mk |  172 ++++++++------------------------------------
 2 files changed, 40 insertions(+), 142 deletions(-)

diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index de19410..ee7d8cb 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -7,11 +7,19 @@ config BR2_PACKAGE_GETTEXT
 	  framework to help other GNU packages produce multi-lingual
 	  messages.
 
-	  Only the gettext libraries will be installed in the
+	  Only the libintl library will be installed in the
 	  target. The full gettext suite, including tools, will be
 	  installed in the staging directory.
 
 	  http://www.gnu.org/software/gettext/
 
+config BR2_PACKAGE_GETTEXT_TOOLS
+	bool "Install gettext tools"
+	depends on BR2_PACKAGE_GETTEXT
+	help
+	  This option allows to install the complete gettext suite in
+	  the target filesystem. This is typically not useful for
+	  correct operation of programs.
+
 comment "gettext requires a toolchain with WCHAR support"
 	depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 4dff941..74f5218 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -3,147 +3,37 @@
 # gettext
 #
 #############################################################
-GETTEXT_VERSION:=0.16.1
-GETTEXT_SOURCE:=gettext-$(GETTEXT_VERSION).tar.gz
-GETTEXT_SITE:=$(BR2_GNU_MIRROR)/gettext
-GETTEXT_DIR:=$(BUILD_DIR)/gettext-$(GETTEXT_VERSION)
-GETTEXT_CAT:=$(ZCAT)
-GETTEXT_BINARY:=gettext-runtime/src/gettext
-GETTEXT_TARGET_BINARY:=usr/bin/gettext
-
-LIBINTL_TARGET_BINARY:=usr/lib/libintl.so
-
-$(DL_DIR)/$(GETTEXT_SOURCE):
-	 $(call DOWNLOAD,$(GETTEXT_SITE)/$(GETTEXT_SOURCE))
-
-gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE)
-
-$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE)
-	$(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	support/scripts/apply-patches.sh $(GETTEXT_DIR) package/gettext/ gettext\*.patch
-	$(call CONFIG_UPDATE,$(@D))
-	touch $@
-
-ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-IGNORE_EXTERNAL_GETTEXT:=--with-included-gettext
+GETTEXT_VERSION = 0.16.1
+GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext
+GETTEXT_INSTALL_STAGING = YES
+GETTEXT_LICENSE = GPLv2+
+GETTEXT_LICENSE_FILES = COPYING
+
+GETTEXT_CONF_OPT += \
+	--disable-libasprintf \
+	--disable-openmp \
+	--disable-rpath \
+	--disable-java \
+	--disable-native-java \
+	--disable-csharp \
+	--disable-relocatable \
+	--without-emacs
+
+# Force build with NLS support, otherwise libintl is not built
+# This is needed because some packages (eg. libglib2) requires
+# locales, but do not properly depend on BR2_ENABLE_LOCALE, and
+# instead select BR2_PACKAGE_GETTEXT. Those packages need to be
+# fixed before we can remove the following 3 lines... :-(
+ifeq ($(BR2_ENABLE_LOCALE),)
+GETTEXT_CONF_OPT += --enable-nls
 endif
 
-$(GETTEXT_DIR)/.configured: $(GETTEXT_DIR)/.unpacked
-	(cd $(GETTEXT_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		ac_cv_func_strtod=yes \
-		ac_fsusage_space=yes \
-		fu_cv_sys_stat_statfs2_bsize=yes \
-		ac_cv_func_closedir_void=no \
-		ac_cv_func_getloadavg=no \
-		ac_cv_lib_util_getloadavg=no \
-		ac_cv_lib_getloadavg_getloadavg=no \
-		ac_cv_func_getgroups=yes \
-		ac_cv_func_getgroups_works=yes \
-		ac_cv_func_chown_works=yes \
-		ac_cv_have_decl_euidaccess=no \
-		ac_cv_func_euidaccess=no \
-		ac_cv_have_decl_strnlen=yes \
-		ac_cv_func_strnlen_working=yes \
-		ac_cv_func_lstat_dereferences_slashed_symlink=yes \
-		ac_cv_func_lstat_empty_string_bug=no \
-		ac_cv_func_stat_empty_string_bug=no \
-		vb_cv_func_rename_trailing_slash_bug=no \
-		ac_cv_have_decl_nanosleep=yes \
-		jm_cv_func_nanosleep_works=yes \
-		gl_cv_func_working_utimes=yes \
-		ac_cv_func_utime_null=yes \
-		ac_cv_have_decl_strerror_r=yes \
-		ac_cv_func_strerror_r_char_p=no \
-		jm_cv_func_svid_putenv=yes \
-		ac_cv_func_getcwd_null=yes \
-		ac_cv_func_getdelim=yes \
-		ac_cv_func_mkstemp=yes \
-		utils_cv_func_mkstemp_limitations=no \
-		utils_cv_func_mkdir_trailing_slash_bug=no \
-		jm_cv_func_gettimeofday_clobber=no \
-		gl_cv_func_working_readdir=yes \
-		jm_ac_cv_func_link_follows_symlink=no \
-		utils_cv_localtime_cache=no \
-		ac_cv_struct_st_mtim_nsec=no \
-		gl_cv_func_tzset_clobber=no \
-		gl_cv_func_getcwd_null=yes \
-		gl_cv_func_getcwd_path_max=yes \
-		ac_cv_func_fnmatch_gnu=yes \
-		am_getline_needs_run_time_check=no \
-		am_cv_func_working_getline=yes \
-		gl_cv_func_mkdir_trailing_slash_bug=no \
-		gl_cv_func_mkstemp_limitations=no \
-		ac_cv_func_working_mktime=yes \
-		jm_cv_func_working_re_compile_pattern=yes \
-		ac_use_included_regex=no \
-		gl_cv_c_restrict=no \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--exec-prefix=/usr \
-		--disable-libasprintf \
-		--enable-shared \
-		$(IGNORE_EXTERNAL_GETTEXT) \
-		--disable-openmp \
-	)
-	touch $@
-
-$(GETTEXT_DIR)/$(GETTEXT_BINARY): $(GETTEXT_DIR)/.configured
-	$(MAKE) -C $(GETTEXT_DIR)
-	touch -c $(GETTEXT_DIR)/$(GETTEXT_BINARY)
-
-$(STAGING_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY)
-	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(GETTEXT_DIR) install
-	$(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextlib.la
-	$(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextpo.la
-	$(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextsrc.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextlib.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextpo.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextsrc.la
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libintl.la
-	rm -f $(addprefix $(STAGING_DIR)/usr/bin/, \
-		autopoint envsubst gettext.sh gettextize msg* ?gettext)
-	touch -c $@
-
-gettext-legal-info:
-	@$(call legal-warning-pkg,gettext,legal-info not yet implemented)
-
-gettext: host-pkg-config $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY) $(TARGET_DIR)/$(LIBINTL_TARGET_BINARY)
-
-gettext-unpacked: $(GETTEXT_DIR)/.unpacked
-
-gettext-clean:
-	-$(MAKE) DESTDIR=$(STAGING_DIR) CC="$(TARGET_CC)" -C $(GETTEXT_DIR) uninstall
-	-$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GETTEXT_DIR) uninstall
-	-$(MAKE) -C $(GETTEXT_DIR) clean
-
-gettext-dirclean:
-	rm -rf $(GETTEXT_DIR)
+# When the gettext tools are not enabled in the configuration, we only
+# install libintl to the target.
+ifeq ($(BR2_PACKAGE_GETTEXT_TOOLS),)
+define GETTEXT_INSTALL_TARGET_CMDS
+	cp -dpf $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
+endef
+endif # GETTEXT_TOOLS = n
 
-#############################################################
-#
-# gettext on the target
-#
-#############################################################
-
-$(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
-	cp -dpf $(STAGING_DIR)/usr/lib/libgettext*.so* \
-		$(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
-	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libgettext*.so*
-	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libintl*.so*
-	rm -f $(addprefix $(TARGET_DIR)/usr/lib/, \
-		libgettext*.so*.la libintl*.so*.la)
-	touch -c $@
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-TARGETS+=gettext
-endif
+$(eval $(autotools-package))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 06/11] doc: update after gettext changes
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (4 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 07/11] package/lshw: add missing dependency on gettext Yann E. MORIN
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/adding-packages-gettext.txt |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt
index 1ed834e..e0df1a4 100644
--- a/docs/manual/adding-packages-gettext.txt
+++ b/docs/manual/adding-packages-gettext.txt
@@ -27,18 +27,14 @@ Therefore, Buildroot defines two configuration options:
 
 Therefore, packages that unconditionally need gettext should:
 
-* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ and possibly
-  +select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT+, if libintl is
-  also needed
+* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+
 
 * Use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
   +DEPENDENCIES+ variable
 
 Packages that need gettext only when locale support is enabled should:
 
-* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ and
-  possibly +select BR2_PACKAGE_LIBINTL if
-  BR2_NEEDS_GETTEXT_IF_LOCALE+, if libintl is also needed
+* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+
 
 * Use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
   +DEPENDENCIES+ variable
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 07/11] package/lshw: add missing dependency on gettext
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (5 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 06/11] doc: update after gettext changes Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-16 22:57 ` [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency " Yann E. MORIN
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

lshw.mk defines a build-dependency on gettext,
but not in its Config.in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/lshw/Config.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/package/lshw/Config.in b/package/lshw/Config.in
index 4960ac9..98beacd 100644
--- a/package/lshw/Config.in
+++ b/package/lshw/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LSHW
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  lshw (Hardware Lister) is a small tool to provide
 	  detailed information on the hardware configuration of the machine.
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency on gettext
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (6 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 07/11] package/lshw: add missing dependency on gettext Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-18 17:58   ` Thomas Petazzoni
  2012-09-16 22:57 ` [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT Yann E. MORIN
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

In its Config.in, pulseaudio declares a dependency on gettext
using the documented construct:
    select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT

but in its .mk file, declares a dependency on the package:
    PULSEAUDIO_DEPENDENCIES = [...] $(if $(BR2_PACKAGE_GETTEXT),gettext) [...]

instead of the documented:
    $(if $(BR2_NEEDS_GETTEXT),gettext)

Fix that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/multimedia/pulseaudio/pulseaudio.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/multimedia/pulseaudio/pulseaudio.mk b/package/multimedia/pulseaudio/pulseaudio.mk
index 6f7d7d2..406dd8f 100644
--- a/package/multimedia/pulseaudio/pulseaudio.mk
+++ b/package/multimedia/pulseaudio/pulseaudio.mk
@@ -16,7 +16,7 @@ PULSEAUDIO_CONF_OPT = \
 
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkg-config libtool json-c libsndfile speex host-intltool \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext) \
+	$(if $(BR2_NEEDS_GETTEXT),gettext) \
 	$(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
 	$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (7 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency " Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-20 22:21   ` Arnout Vandecappelle
  2012-09-16 22:57 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

Rename the BR2_NEEDS_GETTEXT variable to a more explanatory name,
BR2_NEEDS_EXTERNAL_GETTEXT.

Update manual and all packages accordingly.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
CC: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/adding-packages-gettext.txt     |   12 ++++++------
 package/avahi/Config.in                     |    2 +-
 package/avahi/avahi.mk                      |    2 +-
 package/axel/Config.in                      |    2 +-
 package/axel/axel.mk                        |    2 +-
 package/binutils/Config.in                  |    2 +-
 package/binutils/binutils.mk                |    2 +-
 package/dnsmasq/Config.in                   |    2 +-
 package/dnsmasq/dnsmasq.mk                  |    4 ++--
 package/gdk-pixbuf/Config.in                |    2 +-
 package/gdk-pixbuf/gdk-pixbuf.mk            |    2 +-
 package/gettext/Config.in                   |    4 ++--
 package/glib-networking/Config.in           |    2 +-
 package/glib-networking/glib-networking.mk  |    2 +-
 package/gmpc/Config.in                      |    2 +-
 package/gmpc/gmpc.mk                        |    2 +-
 package/grep/Config.in                      |    2 +-
 package/grep/grep.mk                        |    2 +-
 package/kbd/Config.in                       |    2 +-
 package/kbd/kbd.mk                          |    2 +-
 package/libglib2/Config.in                  |    2 +-
 package/libglib2/libglib2.mk                |    2 +-
 package/libidn/Config.in                    |    2 +-
 package/libidn/libidn.mk                    |    2 +-
 package/libsoup/Config.in                   |    2 +-
 package/libsoup/libsoup.mk                  |    2 +-
 package/linux-pam/Config.in                 |    2 +-
 package/linux-pam/linux-pam.mk              |    2 +-
 package/lshw/Config.in                      |    2 +-
 package/lshw/lshw.mk                        |    4 ++--
 package/make/Config.in                      |    2 +-
 package/make/make.mk                        |    2 +-
 package/midori/Config.in                    |    2 +-
 package/midori/midori.mk                    |    2 +-
 package/multimedia/pulseaudio/Config.in     |    2 +-
 package/multimedia/pulseaudio/pulseaudio.mk |    2 +-
 package/pango/Config.in                     |    2 +-
 package/pango/pango.mk                      |    2 +-
 package/php/Config.ext                      |    2 +-
 package/php/php.mk                          |    2 +-
 package/psmisc/Config.in                    |    2 +-
 package/psmisc/psmisc.mk                    |    2 +-
 package/quota/Config.in                     |    2 +-
 package/quota/quota.mk                      |    2 +-
 package/sshfs/Config.in                     |    2 +-
 package/sshfs/sshfs.mk                      |    2 +-
 package/sysstat/Config.in                   |    2 +-
 package/sysstat/sysstat.mk                  |    2 +-
 package/ushare/Config.in                    |    2 +-
 package/ushare/ushare.mk                    |    2 +-
 package/vala/Config.in                      |    2 +-
 package/vala/vala.mk                        |    2 +-
 toolchain/toolchain-common.in               |    6 +++---
 53 files changed, 63 insertions(+), 63 deletions(-)

diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt
index e0df1a4..71da62a 100644
--- a/docs/manual/adding-packages-gettext.txt
+++ b/docs/manual/adding-packages-gettext.txt
@@ -18,23 +18,23 @@ is enabled.
 
 Therefore, Buildroot defines two configuration options:
 
-* +BR2_NEEDS_GETTEXT+, which is true as soon as the toolchain doesn't
+* +BR2_NEEDS_EXTERNAL_GETTEXT+, which is true as soon as the toolchain doesn't
   provide its own gettext implementation
 
-* +BR2_NEEDS_GETTEXT_IF_LOCALE+, which is true if the toolchain
+* +BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE+, which is true if the toolchain
   doesn't provide its own gettext implementation and if locale support
   is enabled
 
 Therefore, packages that unconditionally need gettext should:
 
-* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+
+* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT+
 
-* Use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
+* Use +$(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)+ in the package
   +DEPENDENCIES+ variable
 
 Packages that need gettext only when locale support is enabled should:
 
-* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+
+* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE+
 
-* Use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
+* Use +$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)+ in the package
   +DEPENDENCIES+ variable
diff --git a/package/avahi/Config.in b/package/avahi/Config.in
index 8ba33d5..982966d 100644
--- a/package/avahi/Config.in
+++ b/package/avahi/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_AVAHI
 	bool "avahi"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index 03dc368..67b357e 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -85,7 +85,7 @@ AVAHI_CONF_OPT = --localstatedir=/var \
 		--with-autoipd-user=default \
 		--with-autoipd-group=default
 
-AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool host-pkg-config
+AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) host-intltool host-pkg-config
 
 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
 AVAHI_DEPENDENCIES += libdaemon
diff --git a/package/axel/Config.in b/package/axel/Config.in
index d823272..4c22286 100644
--- a/package/axel/Config.in
+++ b/package/axel/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_AXEL
 	bool "axel"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  HTTP/FTP download accelerator.
diff --git a/package/axel/axel.mk b/package/axel/axel.mk
index 0ed8ad2..cfec43d 100644
--- a/package/axel/axel.mk
+++ b/package/axel/axel.mk
@@ -9,7 +9,7 @@ AXEL_SITE = https://alioth.debian.org/frs/download.php/3015
 
 AXEL_LDFLAGS = -lpthread
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
 AXEL_DEPENDENCIES += gettext
 AXEL_LDFLAGS += -lintl
 endif
diff --git a/package/binutils/Config.in b/package/binutils/Config.in
index 6480370..159bee1 100644
--- a/package/binutils/Config.in
+++ b/package/binutils/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_BINUTILS
 	bool "binutils"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Install binutils on the target
 
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index d41cac4..27cdfd2 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -23,7 +23,7 @@ BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
 endif
 BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS))
 BINUTILS_INSTALL_STAGING = YES
-BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 
 # We need to specify host & target to avoid breaking ARM EABI
 BINUTILS_CONF_OPT = --disable-multilib --disable-werror \
diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in
index b76ddb2..7b55a20 100644
--- a/package/dnsmasq/Config.in
+++ b/package/dnsmasq/Config.in
@@ -24,7 +24,7 @@ config BR2_PACKAGE_DNSMASQ_IDN
 	bool "IDN support"
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_LIBIDN
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Enable IDN support in dnsmasq.
 	  This option is a big space taker since it pulls in many libraries.
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index e92a554..8ef4cd3 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -24,8 +24,8 @@ endif
 
 # NLS requires IDN so only enable it (i18n) when IDN is true
 ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
-	DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
-	DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
+	DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+	DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),-lintl)"
 	DNSMASQ_COPTS += -DHAVE_IDN
 	DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n)
 endif
diff --git a/package/gdk-pixbuf/Config.in b/package/gdk-pixbuf/Config.in
index 33b5f7c..e50ecbc 100644
--- a/package/gdk-pixbuf/Config.in
+++ b/package/gdk-pixbuf/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_GDK_PIXBUF
 	bool "gdk-pixbuf"
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Gdk-Pixbuf is an image loader and scaler. It uses GObject
diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk
index 92a34bf..1df409e 100644
--- a/package/gdk-pixbuf/gdk-pixbuf.mk
+++ b/package/gdk-pixbuf/gdk-pixbuf.mk
@@ -40,7 +40,7 @@ GDK_PIXBUF_DEPENDENCIES += xlib_libX11
 endif
 
 GDK_PIXBUF_DEPENDENCIES += \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv) \
 	host-pkg-config libglib2
 
diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index ee7d8cb..56a8fe7 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_GETTEXT
 	bool "gettext"
-	depends on BR2_NEEDS_GETTEXT
+	depends on BR2_NEEDS_EXTERNAL_GETTEXT
 	depends on BR2_USE_WCHAR
 	help
 	  The GNU `gettext' utilities are a set of tools that provide a
@@ -22,4 +22,4 @@ config BR2_PACKAGE_GETTEXT_TOOLS
 	  correct operation of programs.
 
 comment "gettext requires a toolchain with WCHAR support"
-	depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR
+	depends on BR2_NEEDS_EXTERNAL_GETTEXT && !BR2_USE_WCHAR
diff --git a/package/glib-networking/Config.in b/package/glib-networking/Config.in
index dab35ea..6ed312b 100644
--- a/package/glib-networking/Config.in
+++ b/package/glib-networking/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_GLIB_NETWORKING
 	bool "glib-networking"
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	help
 	  Network-related GIO modules for glib.
 
diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk
index 823ba39..9f74c35 100644
--- a/package/glib-networking/glib-networking.mk
+++ b/package/glib-networking/glib-networking.mk
@@ -13,7 +13,7 @@ GLIB_NETWORKING_SOURCE = glib-networking-$(GLIB_NETWORKING_VERSION).tar.xz
 GLIB_NETWORKING_INSTALL_STAGING = YES
 
 GLIB_NETWORKING_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
 	host-pkg-config \
 	host-intltool \
 	libglib2
diff --git a/package/gmpc/Config.in b/package/gmpc/Config.in
index 9b38d1a..45b08d4 100644
--- a/package/gmpc/Config.in
+++ b/package/gmpc/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_GMPC
 	depends on BR2_USE_WCHAR # glib2
 	depends on BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBMPD
 	select BR2_PACKAGE_LIBSOUP
diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk
index a136cf4..bdc10c5 100644
--- a/package/gmpc/gmpc.mk
+++ b/package/gmpc/gmpc.mk
@@ -11,6 +11,6 @@ GMPC_CONF_OPT = --disable-mmkeys --disable-unique
 GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkg-config host-vala \
 	libglib2 libgtk2 libmpd libsoup sqlite \
 	xlib_libICE xlib_libSM xlib_libX11 \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 
 $(eval $(autotools-package))
diff --git a/package/grep/Config.in b/package/grep/Config.in
index 5906e69..fc4e5b9 100644
--- a/package/grep/Config.in
+++ b/package/grep/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_GREP
 	bool "grep"
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  The GNU regular expression matcher.
 
diff --git a/package/grep/grep.mk b/package/grep/grep.mk
index 2636c83..6c37847 100644
--- a/package/grep/grep.mk
+++ b/package/grep/grep.mk
@@ -10,7 +10,7 @@ GREP_SOURCE = grep-$(GREP_VERSION).tar.xz
 GREP_LICENSE = GPLv3+
 GREP_LICENSE_FILES = COPYING
 GREP_CONF_OPT = --disable-perl-regexp --without-included-regex
-GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+GREP_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 
 # link with iconv if enabled
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
diff --git a/package/kbd/Config.in b/package/kbd/Config.in
index 44c3163..939565f 100644
--- a/package/kbd/Config.in
+++ b/package/kbd/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_KBD
 	bool "kbd"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	# Uses fork()
 	depends on BR2_USE_MMU
 	help
diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk
index 325978e..69a22c1 100644
--- a/package/kbd/kbd.mk
+++ b/package/kbd/kbd.mk
@@ -2,6 +2,6 @@ KBD_VERSION = 1.15.2
 KBD_SOURCE = kbd-$(KBD_VERSION).tar.gz
 KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd
 
-KBD_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+KBD_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 
 $(eval $(autotools-package))
diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index 5282885..50e95d5 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBGLIB2
 	bool "libglib2"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_ZLIB
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 030cecb..7df1cd0 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -55,7 +55,7 @@ HOST_LIBGLIB2_CONF_OPT = \
 		--disable-gtk-doc \
 		--enable-debug=no \
 
-LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
+LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 libffi zlib $(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)
 
 HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-libffi host-zlib
 
diff --git a/package/libidn/Config.in b/package/libidn/Config.in
index dcf9724..9ef7a64 100644
--- a/package/libidn/Config.in
+++ b/package/libidn/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBIDN
 	bool "libidn"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Libidn's purpose is to encode and decode internationalized
 	  domain names.
diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk
index c55f2c5..3219dae 100644
--- a/package/libidn/libidn.mk
+++ b/package/libidn/libidn.mk
@@ -9,7 +9,7 @@ LIBIDN_SITE = $(BR2_GNU_MIRROR)/libidn
 LIBIDN_INSTALL_STAGING = YES
 LIBIDN_CONF_ENV = EMACS="no"
 LIBIDN_CONF_OPT = --disable-java --enable-csharp=no
-LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 define LIBIDN_REMOVE_BINARY
 	rm -f $(TARGET_DIR)/usr/bin/idn
diff --git a/package/libsoup/Config.in b/package/libsoup/Config.in
index 57b425f..5a4061a 100644
--- a/package/libsoup/Config.in
+++ b/package/libsoup/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_LIBSOUP
 	depends on BR2_USE_WCHAR # glib2 and gnutls
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	help
 	  libsoup is an HTTP client/server library. It uses GObject
 	  and the GLib main loop, to integrate well with GNOME
diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk
index 30655ba..c14771d 100644
--- a/package/libsoup/libsoup.mk
+++ b/package/libsoup/libsoup.mk
@@ -19,7 +19,7 @@ endif
 
 LIBSOUP_CONF_OPT = --disable-glibtest --without-gnome
 
-LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-pkg-config host-libglib2 libglib2 libxml2
+LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) host-pkg-config host-libglib2 libglib2 libxml2
 
 ifeq ($(BR2_PACKAGE_LIBSOUP_SSL),y)
 LIBSOUP_DEPENDENCIES += glib-networking
diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in
index 7cfd814..1b0bc6e 100644
--- a/package/linux-pam/Config.in
+++ b/package/linux-pam/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LINUX_PAM
 	bool "linux-pam"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_FLEX
 	select BR2_PACKAGE_FLEX_LIBFL
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR)
diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk
index 1a2e7f6..9bd1b1b 100644
--- a/package/linux-pam/linux-pam.mk
+++ b/package/linux-pam/linux-pam.mk
@@ -15,7 +15,7 @@ LINUX_PAM_CONF_OPT = \
 	--disable-regenerate-docu \
 	--enable-securedir=/lib/security \
 	--libdir=/lib
-LINUX_PAM_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) flex
+LINUX_PAM_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) flex
 LINUX_PAM_AUTORECONF = YES
 LINUX_PAM_LICENSE = BSD-3c
 LINUX_PAM_LICENSE_FILES = Copyright
diff --git a/package/lshw/Config.in b/package/lshw/Config.in
index 98beacd..45ca2b2 100644
--- a/package/lshw/Config.in
+++ b/package/lshw/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_LSHW
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	help
 	  lshw (Hardware Lister) is a small tool to provide
 	  detailed information on the hardware configuration of the machine.
diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
index 68daa0d..5bdffc9 100644
--- a/package/lshw/lshw.mk
+++ b/package/lshw/lshw.mk
@@ -8,8 +8,8 @@ LSHW_VERSION = B.02.16
 LSHW_SITE = http://ezix.org/software/files
 LSHW_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \
 	RPM_OPT_FLAGS="$(TARGET_CFLAGS)" all
-LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_GETTEXT),-lintl)"
-LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext)
+LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_EXTERNAL_GETTEXT),-lintl)"
+LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)
 
 define LSHW_BUILD_CMDS
 	$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPT)
diff --git a/package/make/Config.in b/package/make/Config.in
index ea2ae1b..d650649 100644
--- a/package/make/Config.in
+++ b/package/make/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_MAKE
 	bool "make"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  A tool which controls the generation of executables and other
 	  non-source files of a program from the program's source files.
diff --git a/package/make/make.mk b/package/make/make.mk
index 02b2741..b8fe323 100644
--- a/package/make/make.mk
+++ b/package/make/make.mk
@@ -7,7 +7,7 @@ MAKE_VERSION:=3.81
 MAKE_SOURCE:=make-$(MAKE_VERSION).tar.bz2
 MAKE_SITE:=$(BR2_GNU_MIRROR)/make
 
-MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 
 MAKE_CONF_ENV = make_cv_sys_gnu_glob=no \
 		GLOBINC='-I$(@D)/glob' \
diff --git a/package/midori/Config.in b/package/midori/Config.in
index 41f4515..5933699 100644
--- a/package/midori/Config.in
+++ b/package/midori/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_MIDORI
 	bool "midori"
 	select BR2_PACKAGE_WEBKIT
 	select BR2_PACKAGE_LIBSEXY
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_INSTALL_LIBSTDCPP # webkit
diff --git a/package/midori/midori.mk b/package/midori/midori.mk
index 33f94cf..f98bd91 100644
--- a/package/midori/midori.mk
+++ b/package/midori/midori.mk
@@ -14,7 +14,7 @@ MIDORI_DEPENDENCIES = \
 	libgtk2 \
 	libsexy \
 	webkit \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 ifneq ($(BR2_PACKAGE_XORG7),y)
diff --git a/package/multimedia/pulseaudio/Config.in b/package/multimedia/pulseaudio/Config.in
index 6c767bb..927d347 100644
--- a/package/multimedia/pulseaudio/Config.in
+++ b/package/multimedia/pulseaudio/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_JSON_C
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_SPEEX
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
diff --git a/package/multimedia/pulseaudio/pulseaudio.mk b/package/multimedia/pulseaudio/pulseaudio.mk
index 406dd8f..439cb17 100644
--- a/package/multimedia/pulseaudio/pulseaudio.mk
+++ b/package/multimedia/pulseaudio/pulseaudio.mk
@@ -16,7 +16,7 @@ PULSEAUDIO_CONF_OPT = \
 
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkg-config libtool json-c libsndfile speex host-intltool \
-	$(if $(BR2_NEEDS_GETTEXT),gettext) \
+	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext) \
 	$(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
 	$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
diff --git a/package/pango/Config.in b/package/pango/Config.in
index 60e9931..07ca298 100644
--- a/package/pango/Config.in
+++ b/package/pango/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_PANGO
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_CAIRO
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Pango is a library for laying out and rendering of text, with an
 	  emphasis on internationalization. Pango can be used anywhere that
diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index 86ab474..ed2e313 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -41,7 +41,7 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 
 PANGO_CONF_OPT = --enable-explicit-deps=no --disable-debug
 
-PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-pkg-config libglib2 cairo
+PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) host-pkg-config libglib2 cairo
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
         PANGO_CONF_OPT += --with-x \
diff --git a/package/php/Config.ext b/package/php/Config.ext
index 2cf71d3..33d64ec 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -146,7 +146,7 @@ comment "Human language and character encoding support"
 
 config BR2_PACKAGE_PHP_EXT_GETTEXT
 	bool "Gettext"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
 	depends on BR2_USE_WCHAR
 	help
 	  Gettext support
diff --git a/package/php/php.mk b/package/php/php.mk
index 2f8e99e..38aebdd 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -87,7 +87,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
 	PHP_CONF_OPT += --with-gettext=$(STAGING_DIR)/usr
-	PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
+	PHP_DEPENDENCIES += $(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
diff --git a/package/psmisc/Config.in b/package/psmisc/Config.in
index cc8420b..4832956 100644
--- a/package/psmisc/Config.in
+++ b/package/psmisc/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_PSMISC
 	bool "psmisc"
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Helpful /proc related utilities such as pstree, fuser, and killall
 
diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk
index 5d2333f..aaf08d1 100644
--- a/package/psmisc/psmisc.mk
+++ b/package/psmisc/psmisc.mk
@@ -8,7 +8,7 @@ PSMISC_VERSION = 22.16
 PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc
 PSMISC_LICENSE = GPLv2
 PSMISC_LICENSE_FILES = COPYING
-PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 
 ifneq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
 # Don't force -fstack-protector
diff --git a/package/quota/Config.in b/package/quota/Config.in
index 3ad0b8c..17f2278 100644
--- a/package/quota/Config.in
+++ b/package/quota/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_QUOTA
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_MOUNT
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  Implementation of the disk quota system.
 
diff --git a/package/quota/quota.mk b/package/quota/quota.mk
index abe3675..2be3fa4 100644
--- a/package/quota/quota.mk
+++ b/package/quota/quota.mk
@@ -10,7 +10,7 @@ QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(Q
 
 QUOTA_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
 QUOTA_DEPENDENCIES = gettext
 QUOTA_MAKE_OPT += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
 endif
diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in
index 37188ba..1416393 100644
--- a/package/sshfs/Config.in
+++ b/package/sshfs/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_SSHFS
 	bool "sshfs (FUSE)"
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_OPENSSH
 	depends on BR2_LARGEFILE
diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk
index e72db0a..23e62e0 100644
--- a/package/sshfs/sshfs.mk
+++ b/package/sshfs/sshfs.mk
@@ -9,7 +9,7 @@ SSHFS_SITE = http://downloads.sourceforge.net/project/fuse/sshfs-fuse/$(SSHFS_VE
 SSHFS_SOURCE = sshfs-fuse-$(SSHFS_VERSION).tar.gz
 SSHFS_DEPENDENCIES = \
 	libglib2 libfuse openssh \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv)
 
 $(eval $(autotools-package))
diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in
index ceba503..834e99b 100644
--- a/package/sysstat/Config.in
+++ b/package/sysstat/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSSTAT
 	bool "sysstat"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	# Uses fork()
 	depends on BR2_USE_MMU
 	help
diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk
index 83609a0..794d70b 100644
--- a/package/sysstat/sysstat.mk
+++ b/package/sysstat/sysstat.mk
@@ -13,7 +13,7 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y)
 SYSSTAT_CONF_OPT += --disable-documentation
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
 SYSSTAT_DEPENDENCIES += gettext
 SYSSTAT_MAKE_OPT += CFLAGS+=-lintl
 endif
diff --git a/package/ushare/Config.in b/package/ushare/Config.in
index f7b2124..eb1d2b2 100644
--- a/package/ushare/Config.in
+++ b/package/ushare/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_USHARE
 	bool "ushare"
 	depends on BR2_LARGEFILE
 	select BR2_PACKAGE_LIBUPNP
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	help
 	  uShare is a UPnP (TM) A/V & DLNA Media Server.
 	  It implements the server component that provides UPnP media devices
diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
index 78cbcda..aa47618 100644
--- a/package/ushare/ushare.mk
+++ b/package/ushare/ushare.mk
@@ -9,7 +9,7 @@ USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2
 USHARE_SITE = http://ushare.geexbox.org/releases
 USHARE_DEPENDENCIES = host-pkg-config libupnp
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
 USHARE_DEPENDENCIES += gettext
 USHARE_LDFLAGS += -lintl
 endif
diff --git a/package/vala/Config.in b/package/vala/Config.in
index e0d665c..0021895 100644
--- a/package/vala/Config.in
+++ b/package/vala/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_VALA
 	bool "vala"
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Compiler for the GObject type system.
diff --git a/package/vala/vala.mk b/package/vala/vala.mk
index 3ce8610..fef51da 100644
--- a/package/vala/vala.mk
+++ b/package/vala/vala.mk
@@ -10,7 +10,7 @@ VALA_VERSION = $(VALA_VERSION_MAJOR).$(VALA_VERSION_MINOR)
 VALA_SITE = http://download.gnome.org/sources/vala/$(VALA_VERSION_MAJOR)
 VALA_SOURCE = vala-$(VALA_VERSION).tar.xz
 VALA_DEPENDENCIES = host-flex libglib2 \
-		$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+		$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
 HOST_VALA_DEPENDENCIES = host-flex host-libglib2
 
 $(eval $(autotools-package))
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 6e0d159..091aaa1 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -82,15 +82,15 @@ config BR2_GENERATE_LOCALE
 # locale support is enabled. See the documentation for how packages
 # should rely on the following two options.
 
-config BR2_NEEDS_GETTEXT
+config BR2_NEEDS_EXTERNAL_GETTEXT
 	bool
 	default y if BR2_TOOLCHAIN_BUILDROOT
 	default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	default y if BR2_TOOLCHAIN_CTNG_uClibc
 
-config BR2_NEEDS_GETTEXT_IF_LOCALE
+config BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	bool
-	default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
+	default y if (BR2_NEEDS_EXTERNAL_GETTEXT && BR2_ENABLE_LOCALE)
 
 config BR2_USE_MMU
 	bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_sh || BR2_xtensa
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (8 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-18 17:55   ` Thomas Petazzoni
  2012-09-20 22:24   ` Arnout Vandecappelle
  2012-09-16 22:57 ` [Buildroot] [PATCH 11/11] packages: use the new gettext mechanism Yann E. MORIN
                   ` (5 subsequent siblings)
  15 siblings, 2 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

Introduce two new blind config options:
  - BR2_NEEDS_GETTEXT
        selects the gettext package if the toolchain does not provide it
  - BR2_NEEDS_GETTEXT_IF_LOCALE
        ditto, but only if locales are enabled

Packages can then select either if they require gettext (resp. if locales
are enabled).

This will simplify the packages Config.in by no longer requiring that the
'select' be conditional, thus hiding the gory details out of packages,
which don't really need to know about those details.

Also, introduce four new Makefile variables:
  - $(gettext)
        contains the needed dependencies for pacakges that need gettext
        functioanlity: 'gettext' if the gettext pacakge is needed, empty
        otherwise
  - $(gettext-if-locale)
        ditto, but only if locales are enabled
  - $(gettext-LDFLAGS)
        contains the required LDFLAGS ("-lintl") if gettext is provided by
        the gettext package, empty otherwise
  - $(gettext-LDFLAGS-if-locale)
        ditto, but only if locales are enabled

Packages can then add either variable to their own LDFLAGS.

Note: those new options and variables are going to be used in the next
patch, for now they are a no-op.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
CC: Samuel Martin <s.martin49@gmail.com>
---
 Makefile                                |    1 +
 docs/manual/adding-packages-gettext.txt |   55 +++++++++++++++++++++++-------
 toolchain/toolchain-common.in           |   10 +++++-
 toolchain/toolchain-common.mk           |   35 +++++++++++++++++++
 4 files changed, 87 insertions(+), 14 deletions(-)
 create mode 100644 toolchain/toolchain-common.mk

diff --git a/Makefile b/Makefile
index ba5da99..16cfdf1 100644
--- a/Makefile
+++ b/Makefile
@@ -294,6 +294,7 @@ include support/dependencies/dependencies.mk
 # We also need the various per-package makefiles, which also add
 # each selected package to TARGETS if that package was selected
 # in the .config file.
+include toolchain/toolchain-common.mk
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 include toolchain/toolchain-buildroot.mk
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt
index 71da62a..ad5b7af 100644
--- a/docs/manual/adding-packages-gettext.txt
+++ b/docs/manual/adding-packages-gettext.txt
@@ -18,23 +18,52 @@ is enabled.
 
 Therefore, Buildroot defines two configuration options:
 
-* +BR2_NEEDS_EXTERNAL_GETTEXT+, which is true as soon as the toolchain doesn't
-  provide its own gettext implementation
+* +BR2_NEEDS_GETTEXT+, which a package **must** +select+ in its +Config.in+,
+  to indicate it requires gettext functionality
 
-* +BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE+, which is true if the toolchain
-  doesn't provide its own gettext implementation and if locale support
-  is enabled
+* +BR2_NEEDS_GETTEXT_IF_LOCALE+, which a package **must** +select+ in its
+  +Config.in+, to indicate it requires gettext functionality if locales
+  are enabled
 
-Therefore, packages that unconditionally need gettext should:
+Buildroot also defines four +Makefile+ variables:
 
-* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT+
+* +$(gettext)+, that a package **must** add to its dependency list if it
+  requires gettext functionality
 
-* Use +$(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)+ in the package
-  +DEPENDENCIES+ variable
+* +$(gettext-if-locale)+, that a package **must** add to its dependency
+  list if it requires gettext functionality if locales are enabled
 
-Packages that need gettext only when locale support is enabled should:
+* +$(gettext-LDFLAGS)+, that a package ___can___ add to its +LDFLAGS+ if it
+  requires gettext functionality
 
-* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE+
+* +$(gettext-LDFLAGS-if-locale)+, that a package ___can___ add to its
+  +LDFLAGS+ if it requires gettext functionality if locales are enabled
 
-* Use +$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)+ in the package
-  +DEPENDENCIES+ variable
+Example +Config.in+ excerpts for two packages:
+
+----
+config BR2_PACKAGE_FOO
+	bool "foo"
+	select BR2_NEEDS_GETTEXT
+----
+----
+config BR2_PACKAGE_BAR
+	bool "bar"
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
+----
+
+And the corresponding excerpts from their +.mk+ files:
+
+----
+FOO_DEPENDENCIES += $(gettext)
+FOO_LDFLAGS += $(gettext-LDFLAGS)
+----
+----
+BAR_DEPENDENCIES += $(gettext-if-locale)
+BAR_CONF_ENV += LIBS="$(gettext-LDFLAGS-if-locale)"
+----
+
+___**Note:**___ The two Makefile variable +$(gettext-LDFLAGS)+ and
++$(gettext-LDFLAGS-if-locale)+ should be used **only** if the package's
+build-system does not automatically detects that linking with +-lint+ is
+needed.
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 091aaa1..4c55578 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -80,7 +80,7 @@ config BR2_GENERATE_LOCALE
 # gettext isn't needed and shouldn't be built to avoid conflicts. Some
 # packages always need gettext, other packages only need gettext when
 # locale support is enabled. See the documentation for how packages
-# should rely on the following two options.
+# should rely on the following four options.
 
 config BR2_NEEDS_EXTERNAL_GETTEXT
 	bool
@@ -92,6 +92,14 @@ config BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
 	bool
 	default y if (BR2_NEEDS_EXTERNAL_GETTEXT && BR2_ENABLE_LOCALE)
 
+config BR2_NEEDS_GETTEXT
+	bool
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+
+config BR2_NEEDS_GETTEXT_IF_LOCALE
+	bool
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+
 config BR2_USE_MMU
 	bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_sh || BR2_xtensa
 	default y if !BR2_bfin
diff --git a/toolchain/toolchain-common.mk b/toolchain/toolchain-common.mk
new file mode 100644
index 0000000..6333808
--- /dev/null
+++ b/toolchain/toolchain-common.mk
@@ -0,0 +1,35 @@
+# Common set of variables
+
+# $(gettext)
+#  - contains the needed dependencies for packages that need gettext
+#    functioanlity: 'gettext' if the gettext package is needed
+#  - empty otherwise
+#
+# $(gettext-if-locale)
+#  - contains the needed dependencies for packages that need gettext
+#    functioanlity: 'gettext' if the gettext package is needed, and
+#    locales are enabled
+#  - empty otherwise
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT),y)
+gettext = $(if $(BR2_PACKAGE_GETTEXT),gettext)
+endif
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
+gettext-if-locale = $(if $(BR2_PACKAGE_GETTEXT),gettext)
+endif
+
+# $(gettext-LDFLAGS)
+#  - set to "-lintl" if the toolchain does not provide gettext, and
+#    package gettext is selected
+#  - empty otherwise
+#
+# $(gettext-LDFLAGS-if-locale)
+#  - set to "-lintl" if the toolchain does not provide gettext, and
+#    locales are enabled, and package gettext is selected
+#  - empty otherwise
+#
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT),y)
+gettext-LDFLAGS = $(if $(BR2_PACKAGE_GETTEXT),-lintl)
+endif
+ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
+gettext-LDFLAGS-if-locale = $(if $(BR2_PACKAGE_GETTEXT),-lintl)
+endif
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 11/11] packages: use the new gettext mechanism
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (9 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
@ 2012-09-16 22:57 ` Yann E. MORIN
  2012-09-18 21:17 ` [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Samuel Martin
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-16 22:57 UTC (permalink / raw)
  To: buildroot

Now, packages that require the gettext functionality just need to add
one of the following in their Config.in file:
  - select BR2_NEEDS_GETTEXT
  - select BR2_NEEDS_GETTEXT_IF_LOCALE

And add the appropriate $(gettext) or $(gettext--if-locale) to their
build-dependencies in their .mk file.

Alternatively, if a package needs special link flags when gettext is not
provided by the toolchain, then can use the appropriate $(gettext-LDFLAGS)
or $(gettext-LDFLAGS-if-locale) to their own LDFLAGS.

Becasue of this, four packages that did not have a config-dependency on
gettext but had a build-dependency, now have such a config-dependency
(note that these packages were previously broken in case no other package
would provide gettext). Those packages are:
    diffutils, flex, ndisc6, util-linux

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
CC: Samuel Martin <s.martin49@gmail.com>
---
 package/avahi/Config.in                     |    2 +-
 package/avahi/avahi.mk                      |    7 ++-----
 package/axel/Config.in                      |    2 +-
 package/axel/axel.mk                        |    8 ++------
 package/binutils/Config.in                  |    2 +-
 package/binutils/binutils.mk                |    2 +-
 package/diffutils/Config.in                 |    1 +
 package/diffutils/diffutils.mk              |    3 +--
 package/dnsmasq/Config.in                   |    2 +-
 package/dnsmasq/dnsmasq.mk                  |    4 ++--
 package/flex/Config.in                      |    1 +
 package/flex/flex.mk                        |    3 +--
 package/gdk-pixbuf/Config.in                |    2 +-
 package/gdk-pixbuf/gdk-pixbuf.mk            |    2 +-
 package/glib-networking/Config.in           |    2 +-
 package/glib-networking/glib-networking.mk  |    2 +-
 package/gmpc/Config.in                      |    2 +-
 package/gmpc/gmpc.mk                        |    2 +-
 package/grep/Config.in                      |    2 +-
 package/grep/grep.mk                        |    2 +-
 package/kbd/Config.in                       |    2 +-
 package/kbd/kbd.mk                          |    3 +--
 package/libglib2/Config.in                  |    2 +-
 package/libglib2/libglib2.mk                |    2 +-
 package/libidn/Config.in                    |    2 +-
 package/libidn/libidn.mk                    |    2 +-
 package/libsoup/Config.in                   |    2 +-
 package/libsoup/libsoup.mk                  |    2 +-
 package/linux-pam/Config.in                 |    3 +--
 package/linux-pam/linux-pam.mk              |    6 ++----
 package/lshw/Config.in                      |    2 +-
 package/lshw/lshw.mk                        |    4 ++--
 package/make/Config.in                      |    2 +-
 package/make/make.mk                        |    2 +-
 package/midori/Config.in                    |    2 +-
 package/midori/midori.mk                    |    2 +-
 package/multimedia/pulseaudio/Config.in     |    2 +-
 package/multimedia/pulseaudio/pulseaudio.mk |    2 +-
 package/ndisc6/Config.in                    |    1 +
 package/ndisc6/ndisc6.mk                    |    6 ++----
 package/pango/Config.in                     |    2 +-
 package/pango/pango.mk                      |    2 +-
 package/php/Config.ext                      |    2 +-
 package/php/php.mk                          |    2 +-
 package/psmisc/Config.in                    |    2 +-
 package/psmisc/psmisc.mk                    |    2 +-
 package/quota/Config.in                     |    2 +-
 package/quota/quota.mk                      |    6 ++----
 package/sshfs/Config.in                     |    2 +-
 package/sshfs/sshfs.mk                      |    2 +-
 package/sysstat/Config.in                   |    2 +-
 package/sysstat/sysstat.mk                  |    6 ++----
 package/ushare/Config.in                    |    2 +-
 package/ushare/ushare.mk                    |    6 ++----
 package/util-linux/Config.in                |    1 +
 package/util-linux/util-linux.mk            |    6 ++----
 package/vala/Config.in                      |    2 +-
 package/vala/vala.mk                        |    3 +--
 58 files changed, 68 insertions(+), 88 deletions(-)

diff --git a/package/avahi/Config.in b/package/avahi/Config.in
index 982966d..ed585ff 100644
--- a/package/avahi/Config.in
+++ b/package/avahi/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_AVAHI
 	bool "avahi"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index 67b357e..b099ace 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -85,7 +85,7 @@ AVAHI_CONF_OPT = --localstatedir=/var \
 		--with-autoipd-user=default \
 		--with-autoipd-group=default
 
-AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) host-intltool host-pkg-config
+AVAHI_DEPENDENCIES = host-intltool host-pkg-config $(gettext-if-locale)
 
 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
 AVAHI_DEPENDENCIES += libdaemon
@@ -133,10 +133,7 @@ else
 AVAHI_CONF_OPT += --disable-python
 endif
 
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-AVAHI_DEPENDENCIES += gettext
-AVAHI_MAKE_OPT = LIBS=-lintl
-endif
+AVAHI_MAKE_OPT = LIBS="$(gettext-LDFLAGS-if-locale)"
 
 define AVAHI_REMOVE_INITSCRIPT
 	rm -rf $(TARGET_DIR)/etc/init.d/avahi-*
diff --git a/package/axel/Config.in b/package/axel/Config.in
index 4c22286..79b8d6b 100644
--- a/package/axel/Config.in
+++ b/package/axel/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_AXEL
 	bool "axel"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  HTTP/FTP download accelerator.
diff --git a/package/axel/axel.mk b/package/axel/axel.mk
index cfec43d..96c7755 100644
--- a/package/axel/axel.mk
+++ b/package/axel/axel.mk
@@ -7,12 +7,8 @@ AXEL_VERSION = 2.4
 AXEL_SOURCE = axel-$(AXEL_VERSION).tar.gz
 AXEL_SITE = https://alioth.debian.org/frs/download.php/3015
 
-AXEL_LDFLAGS = -lpthread
-
-ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
-AXEL_DEPENDENCIES += gettext
-AXEL_LDFLAGS += -lintl
-endif
+AXEL_DEPENDENCIES += $(gettext-if-locale)
+AXEL_LDFLAGS = -lpthread $(gettext-LDFLAGS-if-locale)
 
 ifneq ($(BR2_ENABLE_LOCALE),y)
 AXEL_DISABLE_I18N=--i18n=0
diff --git a/package/binutils/Config.in b/package/binutils/Config.in
index 159bee1..d5203a2 100644
--- a/package/binutils/Config.in
+++ b/package/binutils/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_BINUTILS
 	bool "binutils"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Install binutils on the target
 
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 27cdfd2..3abad62 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -23,7 +23,7 @@ BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
 endif
 BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS))
 BINUTILS_INSTALL_STAGING = YES
-BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+BINUTILS_DEPENDENCIES = $(gettext-if-locale)
 
 # We need to specify host & target to avoid breaking ARM EABI
 BINUTILS_CONF_OPT = --disable-multilib --disable-werror \
diff --git a/package/diffutils/Config.in b/package/diffutils/Config.in
index 86da5d3..065e97b 100644
--- a/package/diffutils/Config.in
+++ b/package/diffutils/Config.in
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_DIFFUTILS
 	bool"diffutils"
 	depends on BR2_USE_WCHAR
+	select BR2_NEEDS_GETTEXT
 	help
 	  GNU diff. Compare files per line.
 
diff --git a/package/diffutils/diffutils.mk b/package/diffutils/diffutils.mk
index 168d040..4e5603a 100644
--- a/package/diffutils/diffutils.mk
+++ b/package/diffutils/diffutils.mk
@@ -6,8 +6,7 @@
 
 DIFFUTILS_VERSION = 3.2
 DIFFUTILS_SITE = $(BR2_GNU_MIRROR)/diffutils
-DIFFUTILS_DEPENDENCIES = \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext)
+DIFFUTILS_DEPENDENCIES = $(gettext)
 
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 DIFFUTILS_DEPENDENCIES += busybox
diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in
index 7b55a20..3027256 100644
--- a/package/dnsmasq/Config.in
+++ b/package/dnsmasq/Config.in
@@ -24,7 +24,7 @@ config BR2_PACKAGE_DNSMASQ_IDN
 	bool "IDN support"
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_LIBIDN
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Enable IDN support in dnsmasq.
 	  This option is a big space taker since it pulls in many libraries.
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index 8ef4cd3..998bb41 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -24,8 +24,8 @@ endif
 
 # NLS requires IDN so only enable it (i18n) when IDN is true
 ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
-	DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
-	DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),-lintl)"
+	DNSMASQ_DEPENDENCIES += libidn $(gettext-if-locale)
+	DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(gettext-LDFLAGS-if-locale)"
 	DNSMASQ_COPTS += -DHAVE_IDN
 	DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n)
 endif
diff --git a/package/flex/Config.in b/package/flex/Config.in
index b10eb00..f977d82 100644
--- a/package/flex/Config.in
+++ b/package/flex/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_FLEX
 	bool "flex"
+	select BR2_NEEDS_GETTEXT
 	help
 	  A fast lexical analyser generator.  A tool for generating
 	  programs that perform pattern-matching on text.
diff --git a/package/flex/flex.mk b/package/flex/flex.mk
index 2599cdc..4c77fa0 100644
--- a/package/flex/flex.mk
+++ b/package/flex/flex.mk
@@ -11,8 +11,7 @@ FLEX_PATCH = flex_$(FLEX_VERSION)-$(FLEX_PATCH_VERSION).diff.gz
 FLEX_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/f/flex
 FLEX_DIR = $(BUILD_DIR)/flex-$(FLEX_VERSION)
 FLEX_INSTALL_STAGING = YES
-FLEX_DEPENDENCIES = \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext)
+FLEX_DEPENDENCIES = $(gettext)
 # we don't have a host-gettext/libintl
 HOST_FLEX_DEPENDENCIES =
 
diff --git a/package/gdk-pixbuf/Config.in b/package/gdk-pixbuf/Config.in
index e50ecbc..40bd3b4 100644
--- a/package/gdk-pixbuf/Config.in
+++ b/package/gdk-pixbuf/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_GDK_PIXBUF
 	bool "gdk-pixbuf"
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Gdk-Pixbuf is an image loader and scaler. It uses GObject
diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk
index 1df409e..9c445b9 100644
--- a/package/gdk-pixbuf/gdk-pixbuf.mk
+++ b/package/gdk-pixbuf/gdk-pixbuf.mk
@@ -40,7 +40,7 @@ GDK_PIXBUF_DEPENDENCIES += xlib_libX11
 endif
 
 GDK_PIXBUF_DEPENDENCIES += \
-	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
+	$(gettext) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv) \
 	host-pkg-config libglib2
 
diff --git a/package/glib-networking/Config.in b/package/glib-networking/Config.in
index 6ed312b..41e113a 100644
--- a/package/glib-networking/Config.in
+++ b/package/glib-networking/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_GLIB_NETWORKING
 	bool "glib-networking"
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	help
 	  Network-related GIO modules for glib.
 
diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk
index 9f74c35..9691329 100644
--- a/package/glib-networking/glib-networking.mk
+++ b/package/glib-networking/glib-networking.mk
@@ -13,7 +13,7 @@ GLIB_NETWORKING_SOURCE = glib-networking-$(GLIB_NETWORKING_VERSION).tar.xz
 GLIB_NETWORKING_INSTALL_STAGING = YES
 
 GLIB_NETWORKING_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
+	$(gettext) \
 	host-pkg-config \
 	host-intltool \
 	libglib2
diff --git a/package/gmpc/Config.in b/package/gmpc/Config.in
index 45b08d4..95554b2 100644
--- a/package/gmpc/Config.in
+++ b/package/gmpc/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_GMPC
 	depends on BR2_USE_WCHAR # glib2
 	depends on BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBMPD
 	select BR2_PACKAGE_LIBSOUP
diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk
index bdc10c5..4317b7a 100644
--- a/package/gmpc/gmpc.mk
+++ b/package/gmpc/gmpc.mk
@@ -11,6 +11,6 @@ GMPC_CONF_OPT = --disable-mmkeys --disable-unique
 GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkg-config host-vala \
 	libglib2 libgtk2 libmpd libsoup sqlite \
 	xlib_libICE xlib_libSM xlib_libX11 \
-	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+	$(gettext-if-locale)
 
 $(eval $(autotools-package))
diff --git a/package/grep/Config.in b/package/grep/Config.in
index fc4e5b9..0c8c7ba 100644
--- a/package/grep/Config.in
+++ b/package/grep/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_GREP
 	bool "grep"
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  The GNU regular expression matcher.
 
diff --git a/package/grep/grep.mk b/package/grep/grep.mk
index 6c37847..b1c8307 100644
--- a/package/grep/grep.mk
+++ b/package/grep/grep.mk
@@ -10,7 +10,7 @@ GREP_SOURCE = grep-$(GREP_VERSION).tar.xz
 GREP_LICENSE = GPLv3+
 GREP_LICENSE_FILES = COPYING
 GREP_CONF_OPT = --disable-perl-regexp --without-included-regex
-GREP_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+GREP_DEPENDENCIES = $(gettext-if-locale)
 
 # link with iconv if enabled
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
diff --git a/package/kbd/Config.in b/package/kbd/Config.in
index 939565f..8a69736 100644
--- a/package/kbd/Config.in
+++ b/package/kbd/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_KBD
 	bool "kbd"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	# Uses fork()
 	depends on BR2_USE_MMU
 	help
diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk
index 69a22c1..4f6b443 100644
--- a/package/kbd/kbd.mk
+++ b/package/kbd/kbd.mk
@@ -1,7 +1,6 @@
 KBD_VERSION = 1.15.2
 KBD_SOURCE = kbd-$(KBD_VERSION).tar.gz
 KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd
-
-KBD_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+KBD_DEPENDENCIES = $(gettext-if-locale)
 
 $(eval $(autotools-package))
diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index 50e95d5..4b850eb 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBGLIB2
 	bool "libglib2"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_ZLIB
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 7df1cd0..5b9bbfe 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -55,7 +55,7 @@ HOST_LIBGLIB2_CONF_OPT = \
 		--disable-gtk-doc \
 		--enable-debug=no \
 
-LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 libffi zlib $(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)
+LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 libffi zlib $(gettext)
 
 HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-libffi host-zlib
 
diff --git a/package/libidn/Config.in b/package/libidn/Config.in
index 9ef7a64..8c3d200 100644
--- a/package/libidn/Config.in
+++ b/package/libidn/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBIDN
 	bool "libidn"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Libidn's purpose is to encode and decode internationalized
 	  domain names.
diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk
index 3219dae..7859882 100644
--- a/package/libidn/libidn.mk
+++ b/package/libidn/libidn.mk
@@ -9,7 +9,7 @@ LIBIDN_SITE = $(BR2_GNU_MIRROR)/libidn
 LIBIDN_INSTALL_STAGING = YES
 LIBIDN_CONF_ENV = EMACS="no"
 LIBIDN_CONF_OPT = --disable-java --enable-csharp=no
-LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN_DEPENDENCIES = host-pkg-config $(gettext-if-locale) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 define LIBIDN_REMOVE_BINARY
 	rm -f $(TARGET_DIR)/usr/bin/idn
diff --git a/package/libsoup/Config.in b/package/libsoup/Config.in
index 5a4061a..bd81c45 100644
--- a/package/libsoup/Config.in
+++ b/package/libsoup/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_LIBSOUP
 	depends on BR2_USE_WCHAR # glib2 and gnutls
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	help
 	  libsoup is an HTTP client/server library. It uses GObject
 	  and the GLib main loop, to integrate well with GNOME
diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk
index c14771d..121af9a 100644
--- a/package/libsoup/libsoup.mk
+++ b/package/libsoup/libsoup.mk
@@ -19,7 +19,7 @@ endif
 
 LIBSOUP_CONF_OPT = --disable-glibtest --without-gnome
 
-LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) host-pkg-config host-libglib2 libglib2 libxml2
+LIBSOUP_DEPENDENCIES = $(gettext) host-pkg-config host-libglib2 libglib2 libxml2
 
 ifeq ($(BR2_PACKAGE_LIBSOUP_SSL),y)
 LIBSOUP_DEPENDENCIES += glib-networking
diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in
index 1b0bc6e..7051e89 100644
--- a/package/linux-pam/Config.in
+++ b/package/linux-pam/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LINUX_PAM
 	bool "linux-pam"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_FLEX
 	select BR2_PACKAGE_FLEX_LIBFL
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR)
@@ -11,4 +11,3 @@ config BR2_PACKAGE_LINUX_PAM
 
 comment "linux-pam requires a toolchain with WCHAR and locale support"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR)
-
diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk
index 9bd1b1b..abc4d7a 100644
--- a/package/linux-pam/linux-pam.mk
+++ b/package/linux-pam/linux-pam.mk
@@ -15,13 +15,11 @@ LINUX_PAM_CONF_OPT = \
 	--disable-regenerate-docu \
 	--enable-securedir=/lib/security \
 	--libdir=/lib
-LINUX_PAM_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) flex
+LINUX_PAM_DEPENDENCIES = $(gettext-if-locale) flex
 LINUX_PAM_AUTORECONF = YES
 LINUX_PAM_LICENSE = BSD-3c
 LINUX_PAM_LICENSE_FILES = Copyright
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-	LINUX_PAM_MAKE_OPT += LIBS=-lintl
-endif
+LINUX_PAM_MAKE_OPT += LIBS="$(gettext-LDFLAGS-if-locale)"
 
 $(eval $(autotools-package))
diff --git a/package/lshw/Config.in b/package/lshw/Config.in
index 45ca2b2..37f4e22 100644
--- a/package/lshw/Config.in
+++ b/package/lshw/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_LSHW
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	help
 	  lshw (Hardware Lister) is a small tool to provide
 	  detailed information on the hardware configuration of the machine.
diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
index 5bdffc9..f99d7ab 100644
--- a/package/lshw/lshw.mk
+++ b/package/lshw/lshw.mk
@@ -8,8 +8,8 @@ LSHW_VERSION = B.02.16
 LSHW_SITE = http://ezix.org/software/files
 LSHW_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \
 	RPM_OPT_FLAGS="$(TARGET_CFLAGS)" all
-LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_EXTERNAL_GETTEXT),-lintl)"
-LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)
+LSHW_MAKE_ENV = LIBS="$(gettext-LDFLAGS)"
+LSHW_DEPENDENCIES = $(gettext)
 
 define LSHW_BUILD_CMDS
 	$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPT)
diff --git a/package/make/Config.in b/package/make/Config.in
index d650649..bc89986 100644
--- a/package/make/Config.in
+++ b/package/make/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_MAKE
 	bool "make"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  A tool which controls the generation of executables and other
 	  non-source files of a program from the program's source files.
diff --git a/package/make/make.mk b/package/make/make.mk
index b8fe323..94783bc 100644
--- a/package/make/make.mk
+++ b/package/make/make.mk
@@ -7,7 +7,7 @@ MAKE_VERSION:=3.81
 MAKE_SOURCE:=make-$(MAKE_VERSION).tar.bz2
 MAKE_SITE:=$(BR2_GNU_MIRROR)/make
 
-MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+MAKE_DEPENDENCIES = $(gettext-if-locale)
 
 MAKE_CONF_ENV = make_cv_sys_gnu_glob=no \
 		GLOBINC='-I$(@D)/glob' \
diff --git a/package/midori/Config.in b/package/midori/Config.in
index 5933699..b97e24f 100644
--- a/package/midori/Config.in
+++ b/package/midori/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_MIDORI
 	bool "midori"
 	select BR2_PACKAGE_WEBKIT
 	select BR2_PACKAGE_LIBSEXY
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_INSTALL_LIBSTDCPP # webkit
diff --git a/package/midori/midori.mk b/package/midori/midori.mk
index f98bd91..e68249b 100644
--- a/package/midori/midori.mk
+++ b/package/midori/midori.mk
@@ -14,7 +14,7 @@ MIDORI_DEPENDENCIES = \
 	libgtk2 \
 	libsexy \
 	webkit \
-	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
+	$(gettext-if-locale) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 ifneq ($(BR2_PACKAGE_XORG7),y)
diff --git a/package/multimedia/pulseaudio/Config.in b/package/multimedia/pulseaudio/Config.in
index 927d347..7deb0f9 100644
--- a/package/multimedia/pulseaudio/Config.in
+++ b/package/multimedia/pulseaudio/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_JSON_C
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_SPEEX
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
diff --git a/package/multimedia/pulseaudio/pulseaudio.mk b/package/multimedia/pulseaudio/pulseaudio.mk
index 439cb17..8f31998 100644
--- a/package/multimedia/pulseaudio/pulseaudio.mk
+++ b/package/multimedia/pulseaudio/pulseaudio.mk
@@ -16,7 +16,7 @@ PULSEAUDIO_CONF_OPT = \
 
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkg-config libtool json-c libsndfile speex host-intltool \
-	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext) \
+	$(gettext) \
 	$(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
 	$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
diff --git a/package/ndisc6/Config.in b/package/ndisc6/Config.in
index 126bfa2..cd42b55 100644
--- a/package/ndisc6/Config.in
+++ b/package/ndisc6/Config.in
@@ -4,6 +4,7 @@ comment "ndisc6 requires a toolchain with IPv6 support"
 config BR2_PACKAGE_NDISC6
 	bool "ndisc6 tools"
 	depends on BR2_INET_IPV6
+	select BR2_NEEDS_GETTEXT
 	help
 	  NDisc6 is a small collection of useful tools for IPv6 networking
 
diff --git a/package/ndisc6/ndisc6.mk b/package/ndisc6/ndisc6.mk
index f58cc13..849b003 100644
--- a/package/ndisc6/ndisc6.mk
+++ b/package/ndisc6/ndisc6.mk
@@ -10,10 +10,8 @@ NDISC6_SITE = http://www.remlab.net/files/ndisc6/
 NDISC6_CONF_ENV = CC="$(TARGET_CC) -std=gnu99"
 NDISC6_CONF_OPT = --localstatedir=/var --disable-rpath --disable-suid-install
 
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-NDISC6_DEPENDENCIES += gettext
-NDISC6_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
-endif
+NDISC6_DEPENDENCIES = $(gettext)
+NDISC6_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) $(gettext-LDFLAGS)"
 
 NDISC6_BIN_ += dnssort # perl script
 NDISC6_BIN_$(BR2_PACKAGE_NDISC6_NAME2ADDR) += name2addr addr2name
diff --git a/package/pango/Config.in b/package/pango/Config.in
index 07ca298..c8d4796 100644
--- a/package/pango/Config.in
+++ b/package/pango/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_PANGO
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_CAIRO
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Pango is a library for laying out and rendering of text, with an
 	  emphasis on internationalization. Pango can be used anywhere that
diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index ed2e313..c5cd3eb 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -41,7 +41,7 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 
 PANGO_CONF_OPT = --enable-explicit-deps=no --disable-debug
 
-PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) host-pkg-config libglib2 cairo
+PANGO_DEPENDENCIES = $(gettext-if-locale) host-pkg-config libglib2 cairo
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
         PANGO_CONF_OPT += --with-x \
diff --git a/package/php/Config.ext b/package/php/Config.ext
index 33d64ec..47c9146 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -146,7 +146,7 @@ comment "Human language and character encoding support"
 
 config BR2_PACKAGE_PHP_EXT_GETTEXT
 	bool "Gettext"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT
+	select BR2_NEEDS_GETTEXT
 	depends on BR2_USE_WCHAR
 	help
 	  Gettext support
diff --git a/package/php/php.mk b/package/php/php.mk
index 38aebdd..6535bf9 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -87,7 +87,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
 	PHP_CONF_OPT += --with-gettext=$(STAGING_DIR)/usr
-	PHP_DEPENDENCIES += $(if $(BR2_NEEDS_EXTERNAL_GETTEXT),gettext)
+	PHP_DEPENDENCIES += $(gettext)
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
diff --git a/package/psmisc/Config.in b/package/psmisc/Config.in
index 4832956..886e2d4 100644
--- a/package/psmisc/Config.in
+++ b/package/psmisc/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_PSMISC
 	bool "psmisc"
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Helpful /proc related utilities such as pstree, fuser, and killall
 
diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk
index aaf08d1..df7d885 100644
--- a/package/psmisc/psmisc.mk
+++ b/package/psmisc/psmisc.mk
@@ -8,7 +8,7 @@ PSMISC_VERSION = 22.16
 PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc
 PSMISC_LICENSE = GPLv2
 PSMISC_LICENSE_FILES = COPYING
-PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+PSMISC_DEPENDENCIES = ncurses $(gettext-if-locale)
 
 ifneq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
 # Don't force -fstack-protector
diff --git a/package/quota/Config.in b/package/quota/Config.in
index 17f2278..bcb6523 100644
--- a/package/quota/Config.in
+++ b/package/quota/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_QUOTA
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_MOUNT
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Implementation of the disk quota system.
 
diff --git a/package/quota/quota.mk b/package/quota/quota.mk
index 2be3fa4..4ab14c5 100644
--- a/package/quota/quota.mk
+++ b/package/quota/quota.mk
@@ -10,10 +10,8 @@ QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(Q
 
 QUOTA_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
-ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
-QUOTA_DEPENDENCIES = gettext
-QUOTA_MAKE_OPT += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
-endif
+QUOTA_DEPENDENCIES = $(gettext-if-locale)
+QUOTA_MAKE_OPT += LDFLAGS="$(TARGET_LDFLAGS) $(gettext-LDFLAGS-if-locale)"
 
 # Package uses autoconf but not automake.
 QUOTA_INSTALL_TARGET_OPT = \
diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in
index 1416393..9024d53 100644
--- a/package/sshfs/Config.in
+++ b/package/sshfs/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_SSHFS
 	bool "sshfs (FUSE)"
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_OPENSSH
 	depends on BR2_LARGEFILE
diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk
index 23e62e0..7ec254b 100644
--- a/package/sshfs/sshfs.mk
+++ b/package/sshfs/sshfs.mk
@@ -9,7 +9,7 @@ SSHFS_SITE = http://downloads.sourceforge.net/project/fuse/sshfs-fuse/$(SSHFS_VE
 SSHFS_SOURCE = sshfs-fuse-$(SSHFS_VERSION).tar.gz
 SSHFS_DEPENDENCIES = \
 	libglib2 libfuse openssh \
-	$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext) \
+	$(gettext-if-locale) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv)
 
 $(eval $(autotools-package))
diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in
index 834e99b..8d899cf 100644
--- a/package/sysstat/Config.in
+++ b/package/sysstat/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSSTAT
 	bool "sysstat"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	# Uses fork()
 	depends on BR2_USE_MMU
 	help
diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk
index 794d70b..5aff21c 100644
--- a/package/sysstat/sysstat.mk
+++ b/package/sysstat/sysstat.mk
@@ -13,10 +13,8 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y)
 SYSSTAT_CONF_OPT += --disable-documentation
 endif
 
-ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
-SYSSTAT_DEPENDENCIES += gettext
-SYSSTAT_MAKE_OPT += CFLAGS+=-lintl
-endif
+SYSSTATDEPENDENCIES += $(gettext-if-locale)
+SYSSTAT_MAKE_OPT += CFLAGS+=$(gettext-LDFLAGS-if-locale)
 
 # The isag tool is a post processing script that depends on tcl/tk
 # among other things. So we don't install it.
diff --git a/package/ushare/Config.in b/package/ushare/Config.in
index eb1d2b2..c5fb516 100644
--- a/package/ushare/Config.in
+++ b/package/ushare/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_USHARE
 	bool "ushare"
 	depends on BR2_LARGEFILE
 	select BR2_PACKAGE_LIBUPNP
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  uShare is a UPnP (TM) A/V & DLNA Media Server.
 	  It implements the server component that provides UPnP media devices
diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
index aa47618..697a384 100644
--- a/package/ushare/ushare.mk
+++ b/package/ushare/ushare.mk
@@ -9,10 +9,8 @@ USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2
 USHARE_SITE = http://ushare.geexbox.org/releases
 USHARE_DEPENDENCIES = host-pkg-config libupnp
 
-ifeq ($(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),y)
-USHARE_DEPENDENCIES += gettext
-USHARE_LDFLAGS += -lintl
-endif
+USHARE_DEPENDENCIES += $(gettext-if-locale)
+USHARE_LDFLAGS += $(gettext-LDFLAGS-if-locale)
 
 define USHARE_CONFIGURE_CMDS
 	(cd $(@D); \
diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 43a8444..3f56a57 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_UTIL_LINUX
 	bool "util-linux"
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
+	select BR2_NEEDS_GETTEXT
 	help
 	  Various useful/essential Linux utilities.
 
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 71a6c53..2260af1 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -29,10 +29,8 @@ else
 UTIL_LINUX_CONF_OPT += --without-ncurses
 endif
 
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-UTIL_LINUX_DEPENDENCIES += gettext
-UTIL_LINUX_MAKE_OPT += LIBS=-lintl
-endif
+UTIL_LINUX_DEPENDENCIES += $(gettext)
+UTIL_LINUX_MAKE_OPT += LIBS="$(gettext-LDFLAGS)"
 
 #############################################
 #
diff --git a/package/vala/Config.in b/package/vala/Config.in
index 0021895..4e542c4 100644
--- a/package/vala/Config.in
+++ b/package/vala/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_VALA
 	bool "vala"
 	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE
+	select BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Compiler for the GObject type system.
diff --git a/package/vala/vala.mk b/package/vala/vala.mk
index fef51da..01bae20 100644
--- a/package/vala/vala.mk
+++ b/package/vala/vala.mk
@@ -9,8 +9,7 @@ VALA_VERSION_MINOR = 6
 VALA_VERSION = $(VALA_VERSION_MAJOR).$(VALA_VERSION_MINOR)
 VALA_SITE = http://download.gnome.org/sources/vala/$(VALA_VERSION_MAJOR)
 VALA_SOURCE = vala-$(VALA_VERSION).tar.xz
-VALA_DEPENDENCIES = host-flex libglib2 \
-		$(if $(BR2_NEEDS_EXTERNAL_GETTEXT_IF_LOCALE),gettext)
+VALA_DEPENDENCIES = host-flex libglib2 $(gettext-if-locale)
 HOST_VALA_DEPENDENCIES = host-flex host-libglib2
 
 $(eval $(autotools-package))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-16 22:57 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
@ 2012-09-18 17:55   ` Thomas Petazzoni
  2012-09-18 21:16     ` Samuel Martin
  2012-09-18 21:28     ` Yann E. MORIN
  2012-09-20 22:24   ` Arnout Vandecappelle
  1 sibling, 2 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-18 17:55 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Mon, 17 Sep 2012 00:57:55 +0200, Yann E. MORIN wrote:
> Introduce two new blind config options:
>   - BR2_NEEDS_GETTEXT
>         selects the gettext package if the toolchain does not provide it
>   - BR2_NEEDS_GETTEXT_IF_LOCALE
>         ditto, but only if locales are enabled
> 
> Packages can then select either if they require gettext (resp. if locales
> are enabled).
> 
> This will simplify the packages Config.in by no longer requiring that the
> 'select' be conditional, thus hiding the gory details out of packages,
> which don't really need to know about those details.

Nice.

> Also, introduce four new Makefile variables:
>   - $(gettext)
>         contains the needed dependencies for pacakges that need gettext
>         functioanlity: 'gettext' if the gettext pacakge is needed, empty
>         otherwise
>   - $(gettext-if-locale)
>         ditto, but only if locales are enabled
>   - $(gettext-LDFLAGS)
>         contains the required LDFLAGS ("-lintl") if gettext is provided by
>         the gettext package, empty otherwise
>   - $(gettext-LDFLAGS-if-locale)
>         ditto, but only if locales are enabled
> 
> Packages can then add either variable to their own LDFLAGS.

I am happy about the entire patch set, except those $(gettext),
$(gettext-if-locale), $(gettext-LDFLAGS) and
$(gettext-LDFLAGS-if-locale) variables. Even though they admittedly
make the code a bit shorter, I think they needlessly hide what is
really happening. I very much prefer an explicit:

FOO_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)

(which doesn't use any special construct)

rather than the more strange:

FOO_DEPENDENCIES += $(gettext)

I know I'm annoying by rejecting many new additional constructs, but I
think such constructs are crossing the boundary of shortness vs.
readability.

Of course, this is only my opinion, and if others are strongly in
favor of this approach, then I'll learn to live with it, but I think
it's a dangerous direction for the readability of .mk files. If you
respin your patch set without those constructs, you'll have my Acked-by
on the whole thing.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency on gettext
  2012-09-16 22:57 ` [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency " Yann E. MORIN
@ 2012-09-18 17:58   ` Thomas Petazzoni
  2012-09-18 20:45     ` Yann E. MORIN
  0 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-18 17:58 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Mon, 17 Sep 2012 00:57:53 +0200, Yann E. MORIN wrote:
> In its Config.in, pulseaudio declares a dependency on gettext
> using the documented construct:
>     select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
> 
> but in its .mk file, declares a dependency on the package:
>     PULSEAUDIO_DEPENDENCIES = [...] $(if $(BR2_PACKAGE_GETTEXT),gettext) [...]
> 
> instead of the documented:
>     $(if $(BR2_NEEDS_GETTEXT),gettext)
> 
> Fix that.

Some other packages seem to suffer from the same problem, for example
diffutils. Why are you fixing pulseaudio separately, and not diffutils,
which gets fixed in your 11/11 patch:

-DIFFUTILS_DEPENDENCIES = \
-       $(if $(BR2_PACKAGE_GETTEXT),gettext)
+DIFFUTILS_DEPENDENCIES = $(gettext)

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency on gettext
  2012-09-18 17:58   ` Thomas Petazzoni
@ 2012-09-18 20:45     ` Yann E. MORIN
  0 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-18 20:45 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On Tuesday 18 September 2012 19:58:40 Thomas Petazzoni wrote:
> On Mon, 17 Sep 2012 00:57:53 +0200, Yann E. MORIN wrote:
> > In its Config.in, pulseaudio declares a dependency on gettext
> > using the documented construct:
> >     select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
> > 
> > but in its .mk file, declares a dependency on the package:
> >     PULSEAUDIO_DEPENDENCIES = [...] $(if $(BR2_PACKAGE_GETTEXT),gettext) [...]
> > 
> > instead of the documented:
> >     $(if $(BR2_NEEDS_GETTEXT),gettext)
> > 
> > Fix that.
> 
> Some other packages seem to suffer from the same problem, for example
> diffutils. Why are you fixing pulseaudio separately, and not diffutils,
> which gets fixed in your 11/11 patch:
> 
> -DIFFUTILS_DEPENDENCIES = \
> -       $(if $(BR2_PACKAGE_GETTEXT),gettext)
> +DIFFUTILS_DEPENDENCIES = $(gettext)

Yes, that's an oversight on my part. I quickly fixed it when I encountered
the issue, and forgot to extract it into their own cset.

I'll separate that, wait for some more review a litle longer, and repost
the series later.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-18 17:55   ` Thomas Petazzoni
@ 2012-09-18 21:16     ` Samuel Martin
  2012-09-18 21:28     ` Yann E. MORIN
  1 sibling, 0 replies; 35+ messages in thread
From: Samuel Martin @ 2012-09-18 21:16 UTC (permalink / raw)
  To: buildroot

Hi Yann, Thomas, all,

2012/9/18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Yann E. MORIN,
>
> On Mon, 17 Sep 2012 00:57:55 +0200, Yann E. MORIN wrote:
[...]
>> Also, introduce four new Makefile variables:
>>   - $(gettext)
>>         contains the needed dependencies for pacakges that need gettext
>>         functioanlity: 'gettext' if the gettext pacakge is needed, empty
>>         otherwise
>>   - $(gettext-if-locale)
>>         ditto, but only if locales are enabled
>>   - $(gettext-LDFLAGS)
>>         contains the required LDFLAGS ("-lintl") if gettext is provided by
>>         the gettext package, empty otherwise
>>   - $(gettext-LDFLAGS-if-locale)
>>         ditto, but only if locales are enabled
>>
>> Packages can then add either variable to their own LDFLAGS.
>
> I am happy about the entire patch set, except those $(gettext),
> $(gettext-if-locale), $(gettext-LDFLAGS) and
> $(gettext-LDFLAGS-if-locale) variables. Even though they admittedly
> make the code a bit shorter, I think they needlessly hide what is
> really happening. I very much prefer an explicit:

I disagree with Thomas.
True, this hides a bit the details, but I do not think it that's a bad thing.
I mean gettext/locale support is somehow quite closely related to the
toolchain, so, having these variables warns a bit more about what one
is about to do.

Though, these variables hide some things, it's pretty easy to find out
their definitions; and IMHO, there are other things more hidden than
this in BR. ;-)
Besides, I think,  the variable names are clear, and won't easily lead
to mistakes or misunderstandings.


Yours,

-- 
Sam

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (10 preceding siblings ...)
  2012-09-16 22:57 ` [Buildroot] [PATCH 11/11] packages: use the new gettext mechanism Yann E. MORIN
@ 2012-09-18 21:17 ` Samuel Martin
  2012-09-19 21:11 ` Arnout Vandecappelle
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Samuel Martin @ 2012-09-18 21:17 UTC (permalink / raw)
  To: buildroot

Hi Yann,

2012/9/17 Yann E. MORIN <yann.morin.1998@free.fr>:
> Hello All!
>
> This patch series is an aggregation of the gettext rework by Samuel,
> Maxime, Thomas, and I.
>
> See this post for the 6 first patches:
> http://lists.busybox.net/pipermail/buildroot/2012-July/055871.html
>
>     [PATCH 01/11] gettext: remove option to build statically
>     [PATCH 02/11] gettext: remove the gettext-target make target, unused
>     [PATCH 03/11] gettext: remove libintl handling
>     [PATCH 04/11] Remove all references to libintl
>     [PATCH 05/11] gettext: convert to autotools-package
>     [PATCH 06/11] doc: update after gettext changes
>
> The following 2 patches fix two packages in preparation for the end of the
> series:
>
>     [PATCH 07/11] package/lshw: add missing dependency on gettext
>     [PATCH 08/11] package/pulseaudio: fix build-dependency on gettext
>
> See this post for an explanation for the next 3 patches:
> http://lists.busybox.net/pipermail/buildroot/2012-August/058042.html
>
>     [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT
>     [PATCH 10/11] toolchain/common: introduce blind options
>                   BR2_NEEDS_GETTEXT{,_IF_LOCALE}
>     [PATCH 11/11] packages: use the new gettext mechanism
>
> The tests were done with two external uClibc-based toolchains built with
> crosstool-NG, one with locale support, the other without. All packages
> touched by the series were first built with both toolchains and the series
> not applied (to check for any non-series related issues, see gmpc below),
> then the series was fully applied, and the packages all re-built from
> scratch.
>
> gmpc failed to build, even before the series was applied, because it does
> not link with -lm and thus misses some sumbols (eg. floor(3)). All other
> packages were built successfully (albeit using a great deal of electrons
> in the process! ;-) ). No test-run was done on my side.
>
> Changes since v2:
>   - fix conversion to autotools to always build libintl, even if locales are
>     disabled, to fix packages that always require NLS
>   - thus removed Arnout's Tested-by on patch 5/11, as it has changed
>   - rebase on-top latest tree
>   - also C: Samuel on the introductory message
>
> Changes since v1:
>   - drop the gettext-before-all patch (Arnout, Thomas)
>   - keep and simplify build-dependency against gettext (Arnout)
>   - add config-dependency against gettext for diffutils, flex, ndisc6
>     and util-linux, in patch 11
>   - rebase on-top latest tree (and upgrade new package linux-pam in the
>     process)
>   - update doc
>   - add Tested-by and Acked-by Arnout were he said so
>   - CC: Samuel Martin as a recognition for his original work on this topic,
>     which this series is based on. (Arnout)
>
> Regards,
> Yann E. MORIN.

You have my Acked-by for the whole series.

Again, thanks for this great work.


Yours,

-- 
Sam

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-18 17:55   ` Thomas Petazzoni
  2012-09-18 21:16     ` Samuel Martin
@ 2012-09-18 21:28     ` Yann E. MORIN
  2012-09-20 18:53       ` Thomas Petazzoni
  2012-09-20 22:29       ` Arnout Vandecappelle
  1 sibling, 2 replies; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-18 21:28 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On Tuesday 18 September 2012 19:55:18 Thomas Petazzoni wrote:
> On Mon, 17 Sep 2012 00:57:55 +0200, Yann E. MORIN wrote:
> > Also, introduce four new Makefile variables:
> >   - $(gettext)
> >         contains the needed dependencies for pacakges that need gettext
> >         functioanlity: 'gettext' if the gettext pacakge is needed, empty
> >         otherwise
> >   - $(gettext-if-locale)
> >         ditto, but only if locales are enabled
> >   - $(gettext-LDFLAGS)
> >         contains the required LDFLAGS ("-lintl") if gettext is provided by
> >         the gettext package, empty otherwise
> >   - $(gettext-LDFLAGS-if-locale)
> >         ditto, but only if locales are enabled
> > 
> > Packages can then add either variable to their own LDFLAGS.
> 
> I am happy about the entire patch set, except those $(gettext),
> $(gettext-if-locale), $(gettext-LDFLAGS) and
> $(gettext-LDFLAGS-if-locale) variables. Even though they admittedly
> make the code a bit shorter, I think they needlessly hide what is
> really happening. I very much prefer an explicit:
> 
> FOO_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
> 
> (which doesn't use any special construct)
> 
> rather than the more strange:
> 
> FOO_DEPENDENCIES += $(gettext)

My reasoning behind this was to keep the similar constructs in the
Config.in and the package.mk.

In Config.in, a package declares its dependency on gettext, and buildroot
does what is needed "behind the hood":
  select BR2_NEEDS_GETTEXT

Then buildroot will or will not effectively select the gettext package,
depending on the toolchain features.

(To be noted, in this case we are already /hidding/ stuff behind the
 scenes, which could well be considered "crossing the line", too.)

I wanted to introduce a similar behavior in the .mk, hence the $(gettext*)
variables, without the package to even have to deal with the depedencies by
itself. A package would just have to declare a build-time dependency on the
gettext _feature_, and buildroot would decide to build or not to build the
gettext _package_ depending on the toolchain features.

> I know I'm annoying by rejecting many new additional constructs, but I
> think such constructs are crossing the boundary of shortness vs.
> readability.

(No, you are not annoying; I do expect such discussions on such impacting
changes. Yes, it's a bit frustrating, but this is absolutely needed. :-) )

I agree that this is somewhat crossing the line. But I also believe this
change would make it easier to maintain packages, with a single, right way
of expressing the dependency, and a single place we'd have to change if
we'd have to, rather than scouting the tree for packages that needs gettext
feature (although a trivial grep would probably do the trick, granted).

Also, leaving packages do the conditional test opens the door to packages
doing it in their own way, eg:

  if BR2_NEEDS_GETTEXT
  FOO_DEPS += gettext
  endif

vs.

  FOO_DEPS += $(if $(BR2_NEEDS_GETTEXT),gettext)

This is source for confusion, and thus should be avoided.

I know that semantically, this would not change much, but what if we were
to rename those variables, so they are more in-line with the Config.in ones
such as:
  $(needs-gettext)
  $(needs-gettext-if-locale)
  $(needs-gettext_LDFLAGS)
  $(needs-gettext-if-locale_LDFLAGS)

( Yes, I'm pushing for this change as much as I can! ;-)  )

> Of course, this is only my opinion, and if others are strongly in
> favor of this approach, then I'll learn to live with it, but I think
> it's a dangerous direction for the readability of .mk files. If you
> respin your patch set without those constructs, you'll have my Acked-by
> on the whole thing.

OK, so here's what I suggest:
  - fix the 4 gettext mis-constructs in packages, as you pointed out in
    another mail,
  - split the gettext abstraction in two parts: one for the Config.in stuff,
    and a second for the .mk stuff.

This way, at least the part of the series that we all agree on can be merged,
and the litiguous parts can be refined/dropped.

Does that sound OK?

Thanks for the comments! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (11 preceding siblings ...)
  2012-09-18 21:17 ` [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Samuel Martin
@ 2012-09-19 21:11 ` Arnout Vandecappelle
  2012-09-19 22:53 ` Arnout Vandecappelle
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-19 21:11 UTC (permalink / raw)
  To: buildroot

On 09/17/12 00:57, Yann E. MORIN wrote:
> Hello All!
>
> This patch series is an aggregation of the gettext rework by Samuel,
> Maxime, Thomas, and I.
>
> See this post for the 6 first patches:
> http://lists.busybox.net/pipermail/buildroot/2012-July/055871.html
>
>      [PATCH 01/11] gettext: remove option to build statically
>      [PATCH 02/11] gettext: remove the gettext-target make target, unused
>      [PATCH 03/11] gettext: remove libintl handling
>      [PATCH 04/11] Remove all references to libintl
>      [PATCH 05/11] gettext: convert to autotools-package
>      [PATCH 06/11] doc: update after gettext changes
[snip]

  I'm still in the process of (re-)reviewing the patches, but I'm in favour
of committing 1-4 + 6 right away.  They can benefit from some autobuild
exposure before we continue with the rest.  (Note: the ordering is a bit
off, since the doc update is independent of the conversion to
autotools-package).


  Peter, do you agree?


  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (12 preceding siblings ...)
  2012-09-19 21:11 ` Arnout Vandecappelle
@ 2012-09-19 22:53 ` Arnout Vandecappelle
  2012-09-20 16:50   ` Yann E. MORIN
  2012-09-20 18:49 ` Thomas Petazzoni
  2012-09-20 19:42 ` Peter Korsgaard
  15 siblings, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-19 22:53 UTC (permalink / raw)
  To: buildroot

On 09/17/12 00:57, Yann E. MORIN wrote:
>    - fix conversion to autotools to always build libintl, even if locales are
>      disabled, to fix packages that always require NLS
>    - thus removed Arnout's Tested-by on patch 5/11, as it has changed

  Goes to show how valuable my testing was :-(

  How about finding and fixing the packages that require NLS?

  But then, Samuel's remark becomes valid: if ENABLE_LOCALE is not true,
then libintl won't be built, so the -lintl becomes invalid.  In fact,
I would think that packages that select BR2_NEEDS_EXTERNAL_GETTEXT should
actually depend on ENABLE_LOCALE... Or usually they should be
..._IF_LOCALE instead.  For instance, I tried util-linux and it builds
perfectly without locale and gettext.

  Any chance of testing if the cases that have gettext without -if-locale
can be replaced with gettext-if-locale?

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-19 22:53 ` Arnout Vandecappelle
@ 2012-09-20 16:50   ` Yann E. MORIN
  2012-09-20 18:47     ` Thomas Petazzoni
  0 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2012-09-20 16:50 UTC (permalink / raw)
  To: buildroot

Arnout, All,

(Adding Samuel in Cc)

On Thursday 20 September 2012 00:53:12 Arnout Vandecappelle wrote:
> On 09/17/12 00:57, Yann E. MORIN wrote:
> >    - fix conversion to autotools to always build libintl, even if locales are
> >      disabled, to fix packages that always require NLS
> >    - thus removed Arnout's Tested-by on patch 5/11, as it has changed
[--SNIP--]
>   How about finding and fixing the packages that require NLS?
> 
>   But then, Samuel's remark becomes valid: if ENABLE_LOCALE is not true,
> then libintl won't be built, so the -lintl becomes invalid.  In fact,
> I would think that packages that select BR2_NEEDS_EXTERNAL_GETTEXT should
> actually depend on ENABLE_LOCALE... Or usually they should be
> ..._IF_LOCALE instead.  For instance, I tried util-linux and it builds
> perfectly without locale and gettext.
> 
>   Any chance of testing if the cases that have gettext without -if-locale
> can be replaced with gettext-if-locale?

My goal with the series was not to fix anything (except for the required
fixes), but rather to improve on the existing infrastructure.

Fixing anything that would break after the series, and that was already
broken before the series, was not the goal. This can come in a later
series [0], if such fixes are needed.

[0] Admitedly, it could (should?) even come before the series, but fixing
    packages is really different from improving the infrastructure.

That being said, we now have a few venues to deal with this series:
  0- drop the series entirely,
  1- postpone this series until after all packages have been fixed,
  2- finalise the series so it is fully agreed-on, apply it, then fix
     packages,
  3- get a benevolent dictator to agree the whole series for good,
     apply it, then we can fix the packages,
  4- apply all agreed-on patches (eg. 1-4, 6), then fix all packages,
     then refine/drop currently not agreed-on patches.
  5- apply all agreed-on patches (eg. 1-4, 6), then refine/drop the
     rest of the series, apply it, and fix packages,

Hopefully, we all agree that 0 is out-of-question. ;-)

Although 1 would be the best technical solution, it is (IMHO) not the
best from a practical point of view.

Going with 2 means another long round-trip, as there is at least one
opposition to this series (although I hope Thomas can be coerced into
approving the series! ;-p ).

3 is not the best course of action, we still have not reached consensus
on the technical (de)merits of the series (specifically the end of it).

I do not have a strong feeling between 4 and 5, although, from a personal
position, I'd say we should go for 5, so I can get rid of this series
entirely (and switch to other interesting stuff! ;-) ).

Also, we have not heard from Peter on this series, so maybe I'll pause
working on it until he has a chance to express his opinion. Peter? ;-p

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-20 16:50   ` Yann E. MORIN
@ 2012-09-20 18:47     ` Thomas Petazzoni
  0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 18:47 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Thu, 20 Sep 2012 18:50:55 +0200, Yann E. MORIN wrote:

> My goal with the series was not to fix anything (except for the required
> fixes), but rather to improve on the existing infrastructure.

Agreed.

> Fixing anything that would break after the series, and that was already
> broken before the series, was not the goal. This can come in a later
> series [0], if such fixes are needed.
> 
> [0] Admitedly, it could (should?) even come before the series, but fixing
>     packages is really different from improving the infrastructure.
> 
> That being said, we now have a few venues to deal with this series:
>   0- drop the series entirely,
>   1- postpone this series until after all packages have been fixed,
>   2- finalise the series so it is fully agreed-on, apply it, then fix
>      packages,
>   3- get a benevolent dictator to agree the whole series for good,
>      apply it, then we can fix the packages,
>   4- apply all agreed-on patches (eg. 1-4, 6), then fix all packages,
>      then refine/drop currently not agreed-on patches.
>   5- apply all agreed-on patches (eg. 1-4, 6), then refine/drop the
>      rest of the series, apply it, and fix packages,
> 
> Hopefully, we all agree that 0 is out-of-question. ;-)
> 
> Although 1 would be the best technical solution, it is (IMHO) not the
> best from a practical point of view.
> 
> Going with 2 means another long round-trip, as there is at least one
> opposition to this series (although I hope Thomas can be coerced into
> approving the series! ;-p ).
> 
> 3 is not the best course of action, we still have not reached consensus
> on the technical (de)merits of the series (specifically the end of it).
> 
> I do not have a strong feeling between 4 and 5, although, from a personal
> position, I'd say we should go for 5, so I can get rid of this series
> entirely (and switch to other interesting stuff! ;-) ).

Peter, can you please apply now patches 1 to 8 in this series, so the
volume of the series reduces and we can more easily work on an
agreement for the remaining patches?

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (13 preceding siblings ...)
  2012-09-19 22:53 ` Arnout Vandecappelle
@ 2012-09-20 18:49 ` Thomas Petazzoni
  2012-09-20 19:42 ` Peter Korsgaard
  15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 18:49 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Mon, 17 Sep 2012 00:57:45 +0200, Yann E. MORIN wrote:

> This patch series is an aggregation of the gettext rework by Samuel,
> Maxime, Thomas, and I.
> 
> See this post for the 6 first patches:
> http://lists.busybox.net/pipermail/buildroot/2012-July/055871.html
> 
>     [PATCH 01/11] gettext: remove option to build statically
>     [PATCH 02/11] gettext: remove the gettext-target make target, unused
>     [PATCH 03/11] gettext: remove libintl handling
>     [PATCH 04/11] Remove all references to libintl
>     [PATCH 05/11] gettext: convert to autotools-package
>     [PATCH 06/11] doc: update after gettext changes
> 
> The following 2 patches fix two packages in preparation for the end of the
> series:
> 
>     [PATCH 07/11] package/lshw: add missing dependency on gettext
>     [PATCH 08/11] package/pulseaudio: fix build-dependency on gettext

For patches 1 to 8,

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Peter, please merge as soon as possible so we can make progress on
this. Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-18 21:28     ` Yann E. MORIN
@ 2012-09-20 18:53       ` Thomas Petazzoni
  2012-09-20 22:29       ` Arnout Vandecappelle
  1 sibling, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 18:53 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Tue, 18 Sep 2012 23:28:38 +0200, Yann E. MORIN wrote:

> I agree that this is somewhat crossing the line. But I also believe this
> change would make it easier to maintain packages, with a single, right way
> of expressing the dependency, and a single place we'd have to change if
> we'd have to, rather than scouting the tree for packages that needs gettext
> feature (although a trivial grep would probably do the trick, granted).
> 
> Also, leaving packages do the conditional test opens the door to packages
> doing it in their own way, eg:
> 
>   if BR2_NEEDS_GETTEXT
>   FOO_DEPS += gettext
>   endif
> 
> vs.
> 
>   FOO_DEPS += $(if $(BR2_NEEDS_GETTEXT),gettext)

Those two ways are identical, so I don't mind what packages do between
both cases. Depending on how the package .mk file is written, one way
or the other might make more sense.

> OK, so here's what I suggest:
>   - fix the 4 gettext mis-constructs in packages, as you pointed out in
>     another mail,
>   - split the gettext abstraction in two parts: one for the Config.in stuff,
>     and a second for the .mk stuff.
> 
> This way, at least the part of the series that we all agree on can be merged,
> and the litiguous parts can be refined/dropped.
> 
> Does that sound OK?

I am all in favor of merging your entire patch series, but I remain
unconvinced on just the .mk macros themselves. That said, it seems
other people are fine with it, so if it goes in, I will not be overly
shocked. I don't think it's a good direction, but I can live with it.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 0/11 v3] Rework the gettext handling
  2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
                   ` (14 preceding siblings ...)
  2012-09-20 18:49 ` Thomas Petazzoni
@ 2012-09-20 19:42 ` Peter Korsgaard
  15 siblings, 0 replies; 35+ messages in thread
From: Peter Korsgaard @ 2012-09-20 19:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 Yann> Hello All!
 Yann> This patch series is an aggregation of the gettext rework by Samuel,
 Yann> Maxime, Thomas, and I.

Committed patch 1-8, thank you all and sorry for the slow response.

I'll try to find time to look at the remaining 3 patches this weekend.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 05/11] gettext: convert to autotools-package
  2012-09-16 22:57 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
@ 2012-09-20 19:44   ` Arnout Vandecappelle
  2012-09-20 19:46     ` Arnout Vandecappelle
  0 siblings, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-20 19:44 UTC (permalink / raw)
  To: buildroot

On 09/17/12 00:57, Yann E. MORIN wrote:
> From: Maxime Ripard<maxime.ripard@free-electrons.com>
>
> Signed-off-by: Maxime Ripard<maxime.ripard@free-electrons.com>
> Signed-off-by: Thomas Petazzoni<thomas.petazzoni@free-electrons.com>
> Tested-by: "Yann E. MORIN"<yann.morin.1998@free.fr>
> [yann.morin.1998 at free.fr:  add license info, build libintl if locales disabled]
> Signed-off-by: "Yann E. MORIN"<yann.morin.1998@free.fr>
> CC: Samuel Martin<s.martin49@gmail.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  patches 1-8, with an internal toolchain with everything enabled except LOCALE,
  with all 735 packages that build successfully (i.e. an allpackageyesconfig and
  removing the ones that fail to build (mainly because avr32linux.org has
  vanished)

  With all the acks received so far, I propose to commit patches 1-6 (i.e.
including this one).

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 05/11] gettext: convert to autotools-package
  2012-09-20 19:44   ` Arnout Vandecappelle
@ 2012-09-20 19:46     ` Arnout Vandecappelle
  2012-09-21  6:33       ` Peter Korsgaard
  0 siblings, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-20 19:46 UTC (permalink / raw)
  To: buildroot

On 09/20/12 21:44, Arnout Vandecappelle wrote:
>   With all the acks received so far, I propose to commit patches 1-6 (i.e.
> including this one).

  Grmbl, I have to learn: *first* read all mails, *then* start replying...

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT
  2012-09-16 22:57 ` [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT Yann E. MORIN
@ 2012-09-20 22:21   ` Arnout Vandecappelle
  2012-09-21  5:10     ` Thomas Petazzoni
  0 siblings, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-20 22:21 UTC (permalink / raw)
  To: buildroot

On 09/17/12 00:57, Yann E. MORIN wrote:
> Rename the BR2_NEEDS_GETTEXT variable to a more explanatory name,
> BR2_NEEDS_EXTERNAL_GETTEXT.
>
> Update manual and all packages accordingly.
>
> Signed-off-by: "Yann E. MORIN"<yann.morin.1998@free.fr>
> Tested-by: Arnout Vandecappelle (Essensium/Mind)<arnout@mind.be>
> Acked-by: Arnout Vandecappelle (Essensium/Mind)<arnout@mind.be>
> CC: Samuel Martin<s.martin49@gmail.com>

  I don't think this one needs to be delayed either, right?  Peter, Thomas?

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-16 22:57 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
  2012-09-18 17:55   ` Thomas Petazzoni
@ 2012-09-20 22:24   ` Arnout Vandecappelle
  2012-09-21  5:13     ` Thomas Petazzoni
  1 sibling, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-20 22:24 UTC (permalink / raw)
  To: buildroot

On 09/17/12 00:57, Yann E. MORIN wrote:
> Introduce two new blind config options:
>    - BR2_NEEDS_GETTEXT
>          selects the gettext package if the toolchain does not provide it
>    - BR2_NEEDS_GETTEXT_IF_LOCALE
>          ditto, but only if locales are enabled

  There are 18 packages that use NEEDS_GETTEXT_IF_LOCALE, and 11 packages that
use NEEDS_GETTEXT.  However, for most of the latter, it looks like it should
be an _IF_LOCALE dependency.  Therefore, I think it's better to remove the
BR2_NEEDS_GETTEXT support and leave it explicit for these packages.  We can
fix those 11 packages (now or later).  Here's an initial analysis:

diffutils: should be _IF_LOCALE
flex: should be _IF_LOCALE
gdk-pixbuf: indirect dependency through libglib2
glib-networking: indirect dependency through libglib2
libglib2: _really_ depends on libintl
libsoup: indirect dependency through libglib2
lshw: add -DNONLS to CFLAGS
pulseaudio: indirect dependency through libglib2
ndisc6: should be _IF_LOCALE
php: gettext module obviously requires gettext
util-linux: should be _IF_LOCALE


  So, only two packages left that need gettext even without LOCALE: libglib2 and
php.  For php: gettext doesn't make much sense without LOCALE, so we can depend
on LOCALE there.  For libglib2: if you build that kind of bloat, you can live
with the overhead of LOCALE, so I'd also depend on LOCALE there...


  My proposal, therefore:

- only introduce BR2_NEEDS_GETTEXT_IF_LOCALE> ---

- Remove the NEEDS_GETTEXT part from the documentation

- we'll fix up these packages separately

- the patches for these packages are independent from patch 10/11 and 11/11
(if the NEEDS_GETTEXT symbol is not introduced), so they can be produced
in parallel.  Note that patch 9/11 is still in the way, but that's a
mechanical change that should anyway be re-done prior to commit (in case
a new package pops up using that symbol).


  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-18 21:28     ` Yann E. MORIN
  2012-09-20 18:53       ` Thomas Petazzoni
@ 2012-09-20 22:29       ` Arnout Vandecappelle
  1 sibling, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2012-09-20 22:29 UTC (permalink / raw)
  To: buildroot

On 09/18/12 23:28, Yann E. MORIN wrote:
> I know that semantically, this would not change much, but what if we were
> to rename those variables, so they are more in-line with the Config.in ones
> such as:
>    $(needs-gettext)
>    $(needs-gettext-if-locale)
>    $(needs-gettext_LDFLAGS)
>    $(needs-gettext-if-locale_LDFLAGS)
>
> ( Yes, I'm pushing for this change as much as I can!;-)   )

  For what it's worth, I too am in favour of the $(needs-gettext*) constructs.  As
mentioned in my previous mail, $(needs-gettext) itself should be left out.  But
I would name them:
$(gettext-deps-if-locale)
$(gettext-libs-if-locale)
Although the naming will never be fully self-explanatory.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT
  2012-09-20 22:21   ` Arnout Vandecappelle
@ 2012-09-21  5:10     ` Thomas Petazzoni
  0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-21  5:10 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Fri, 21 Sep 2012 00:21:25 +0200, Arnout Vandecappelle wrote:

>   I don't think this one needs to be delayed either, right?  Peter, Thomas?

Agreed.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2012-09-20 22:24   ` Arnout Vandecappelle
@ 2012-09-21  5:13     ` Thomas Petazzoni
  0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2012-09-21  5:13 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Fri, 21 Sep 2012 00:24:06 +0200, Arnout Vandecappelle wrote:

> diffutils: should be _IF_LOCALE
> flex: should be _IF_LOCALE
> gdk-pixbuf: indirect dependency through libglib2
> glib-networking: indirect dependency through libglib2
> libglib2: _really_ depends on libintl
> libsoup: indirect dependency through libglib2
> lshw: add -DNONLS to CFLAGS
> pulseaudio: indirect dependency through libglib2
> ndisc6: should be _IF_LOCALE
> php: gettext module obviously requires gettext
> util-linux: should be _IF_LOCALE
> 
> 
>   So, only two packages left that need gettext even without LOCALE: libglib2 and
> php.  For php: gettext doesn't make much sense without LOCALE, so we can depend
> on LOCALE there.  For libglib2: if you build that kind of bloat, you can live
> with the overhead of LOCALE, so I'd also depend on LOCALE there...

Ok. Just to make it clear: php itself does not depend on gettext, it's
only the gettext module that does. So even if we adopt your
solution, it remains to built the PHP interpreter with a toolchain that
doesn't have locale support, only building the gettext module will not
be possible, which indeed makes sense.

>   My proposal, therefore:
> 
> - only introduce BR2_NEEDS_GETTEXT_IF_LOCALE> ---
> 
> - Remove the NEEDS_GETTEXT part from the documentation
> 
> - we'll fix up these packages separately
> 
> - the patches for these packages are independent from patch 10/11 and 11/11
> (if the NEEDS_GETTEXT symbol is not introduced), so they can be produced
> in parallel.  Note that patch 9/11 is still in the way, but that's a
> mechanical change that should anyway be re-done prior to commit (in case
> a new package pops up using that symbol).

A full Acked-by from me on this approach. Thanks a lot for the in-depth
analysis of the problem that leads to this simplification, really great.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Buildroot] [PATCH 05/11] gettext: convert to autotools-package
  2012-09-20 19:46     ` Arnout Vandecappelle
@ 2012-09-21  6:33       ` Peter Korsgaard
  0 siblings, 0 replies; 35+ messages in thread
From: Peter Korsgaard @ 2012-09-21  6:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 Arnout> On 09/20/12 21:44, Arnout Vandecappelle wrote:
 >> With all the acks received so far, I propose to commit patches 1-6 (i.e.
 >> including this one).

 Arnout>  Grmbl, I have to learn: *first* read all mails, *then* start replying...

;)

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2012-09-21  6:33 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 01/11] gettext: remove option to build statically Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 02/11] gettext: remove the gettext-target make target, unused Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 03/11] gettext: remove libintl handling Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 04/11] Remove all references to libintl Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
2012-09-20 19:44   ` Arnout Vandecappelle
2012-09-20 19:46     ` Arnout Vandecappelle
2012-09-21  6:33       ` Peter Korsgaard
2012-09-16 22:57 ` [Buildroot] [PATCH 06/11] doc: update after gettext changes Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 07/11] package/lshw: add missing dependency on gettext Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency " Yann E. MORIN
2012-09-18 17:58   ` Thomas Petazzoni
2012-09-18 20:45     ` Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT Yann E. MORIN
2012-09-20 22:21   ` Arnout Vandecappelle
2012-09-21  5:10     ` Thomas Petazzoni
2012-09-16 22:57 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
2012-09-18 17:55   ` Thomas Petazzoni
2012-09-18 21:16     ` Samuel Martin
2012-09-18 21:28     ` Yann E. MORIN
2012-09-20 18:53       ` Thomas Petazzoni
2012-09-20 22:29       ` Arnout Vandecappelle
2012-09-20 22:24   ` Arnout Vandecappelle
2012-09-21  5:13     ` Thomas Petazzoni
2012-09-16 22:57 ` [Buildroot] [PATCH 11/11] packages: use the new gettext mechanism Yann E. MORIN
2012-09-18 21:17 ` [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Samuel Martin
2012-09-19 21:11 ` Arnout Vandecappelle
2012-09-19 22:53 ` Arnout Vandecappelle
2012-09-20 16:50   ` Yann E. MORIN
2012-09-20 18:47     ` Thomas Petazzoni
2012-09-20 18:49 ` Thomas Petazzoni
2012-09-20 19:42 ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2012-09-03 22:02 [Buildroot] [PATCH 0/11 v2] " Yann E. MORIN
2012-09-03 22:02 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
2012-09-16 10:16   ` Samuel Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox