Skip to contentSkip to conversation

Rework of the gettext handling

PATCH New Thomas Petazzoni 3 participants 116 messages Jul 4, 2017

lore
Share & tools
lore
#0 lore raw

cover Rework of the gettext handling

Hello,

This (huge) patch series implements a long overdue rework of our gettext handling.

The starting motivation for this rework is that we have been having lots of build failures in static linking situations due to missing -lintl, which happens because uClibc did not provide a gettext implementation, even minimal.

Since then, uClibc-ng has grown a minimal gettext implementation, which allows us to make sure that all 3 libraries provide a gettext implementation by default, avoiding such libintl linking issues.

We have also realized that we were tying the enabling/disabling of NLS support to the BR2_ENABLE_LOCALE, while these are completely independent things. And therefore the distinction between BR2_NEEDS_GETTEXT/BR2_NEEDS_GETTEXT_IF_LOCALE no longer made sense.

So, the main points of our rework are the following ones:

- The minimal gettext implementation in uClibc is enabled (PATCH 5)

- We introduce a hidden boolean BR2_TOOLCHAIN_HAS_FULL_GETTEXT that says if the C library provides a built-in full gettext implementation (glibc) or not (uclibc, musl). This is PATCH 6.

- We add logic in the gettext package to force building libintl, even if the C library provides a gettext implementation. This is useful if a user wants full NLS support with uClibc or musl: the libintl from gettext would then override the minimal gettext implementation from the C library. PATCH 7 simply adds a hidden BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL boolean, which is not selected anywhere for now.

- We introduce a BR2_SYSTEM_ENABLE_NLS option, which allows to enable or disable NLS support, independently from BR2_ENABLE_LOCALE. This option selects BR2_PACKAGE_GETTEXT when needed, and BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL is automatically enabled if the C library doesn't provide a full gettext implementation. This is PATCH 9.

It is worth mentioning that BR2_SYSTEM_ENABLE_NLS cannot be enabled in dynamic linking situations. Indeed, we don't want to continue handling this crazy mess of missing -lintl flags in static linking situations. So, NLS support on statically linked systems is no longer possible.

- PATCH 10 introduces the TARGET_NLS_DEPENDENCIES and TARGET_NLS_LIBS variables that packages should use to add the correct dependencies and link flags related to gettext.

- PATCH 12 to 84 switch a large number of packages to the new gettext handling.

- PATCH 85 to 97 remove lots of hacks and patches that were only needed to solve static linking issues related to libintl

- PATCH 98 finally drops the BR2_NEEDS_GETTEXT/BR2_NEEDS_GETTEXT_IF_LOCALE options.

- PATCH 99 and 100 update the documentation

- Other patches (PATCH 1 to 4 and PATCH 11) are minor preparation/fixup patches.

Best regards,

Thomas

Thomas Petazzoni (100):
libglib2: disable compiler warnings
flex: remove bogus comment
lvm2: force disable NLS support
ushare: do not use the DISABLE_NLS variable
uclibc: enable libintl stubs
toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT
gettext: force build libintl if needed
package: rename DISABLE_NLS to NLS_OPTS
system: introduce BR2_SYSTEM_ENABLE_NLS package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES,LIBS} package/Makefile.in: fix musl handling
alsa-utils: use new gettext logic
avahi: use new gettext logic
axel: use the new gettext logic
binutils: use the new gettext logic
clamav: use new gettext logic
coreutils: use the new gettext logic
cryptsetup: use new gettext logic
curlftpfs: use new gettext logic
diffutils: use new gettext logic
ding-libs: use the new gettext logic
dnsmasq: use new gettext logic
dos2unix: use new gettext logic
dropwatch: use new gettext logic
efibootmgr: use the new gettext logic
elfutils: use the new gettext logic
exiv2: use the new gettext logic
fetchmail: use the new gettext logic
flex: use the new gettext logic
gdbm: use the new gettext logic
git: use the new gettext logic
glib-networking: use the new gettext logic
gmpc: use the new gettext logic
gnuchess: use the new gettext logic
grep: use the new gettext logic
httping: use the new gettext logic
json-glib: use the new gettext logic
kbd: use the new gettext logic
lbreakout2: use the new gettext logic
libconfuse: use the new gettext logic
libftdi1: use the new gettext logic
libglib2: use the new gettext logic
libgpg-error: use the new gettext logic
libidn: use the new gettext logic
libuio: use the new gettext logic
libv4l: use the new gettext logic
libvips: use the new gettext logic
lightning: remove -lintl linking
linux-pam: use the new gettext logic
linux-tools: use the new gettext logic
lshw: use the new gettext logic
ltris: use the new gettext logic
madplay: use the new gettext logic
make: use the new gettext logic
mcrypt: use the new gettext logic
midori: use the new gettext logic
minidlna: use the new gettext logic
ndisc6: use the new gettext logic
net-tools: use the new gettext logic
newt: use the new gettext logic
nftables: use the new gettext logic
pango: use the new gettext logic
php: use the new gettext logic
popt: use the new gettext logic
powertop: use the new gettext logic
procps-ng: use the new gettext logic
psmisc: use the new gettext logic
pv: use the new gettext logic
python: use the new gettext logic
quota: use the new gettext logic
rhash: use the new gettext logic
rpm: use the new gettext logic
rrdtool: use the new gettext logic
samba4: use the new gettext logic
sshfs: use the new gettext logic
sysstat: use the new gettext logic
tpm-tools: use the new gettext logic
ushare: use the new gettext logic
util-linux: use the new gettext logic
vdr: use the new gettext logic
vim: use the new gettext logic
whois: use the new gettext logic
xlib_libXpm: use the new gettext logic
xscreensaver: use the new gettext logic
e2fsprogs: remove libintl static linking handling
gnuchess: remove libintl static linking handling
gptfdisk: remove libintl static linking handling
iputils: remove libintl static linking handling
net-tools: remove libintl static linking handling
oprofile: remove libintl static linking handling
parted: remove libintl static linking handling
perl: remove libintl static linking handling
popt: remove libintl static linking handling
qt: remove libintl static linking handling
util-linux: remove libintl static linking handling
xfsprogs: remove libintl static linking handling
xmlstarlet: remove libintl static linking handling
toolchain: drop BR2_NEEDS_GETTEXT{,_IF_LOCALE} docs/manual: update gettext details
CHANGES: add details on the gettext revamp

 CHANGES                                            |  19 ++++
 docs/manual/adding-packages-gettext.txt            |  83 ++++++++--------
 package/Makefile.in                                |  18 +++-
 package/alsa-utils/Config.in                       |   1 -
 package/alsa-utils/alsa-utils.mk                   |  13 +--
 package/avahi/Config.in                            |   1 -
 package/avahi/avahi.mk                             |   6 +-
 package/axel/Config.in                             |   1 -
 package/axel/axel.mk                               |  12 +--
 package/binutils/Config.in                         |   1 -
 package/binutils/binutils.mk                       |   3 +-
 package/clamav/Config.in                           |   1 -
 package/clamav/clamav.mk                           |   2 +-
 package/coreutils/coreutils.mk                     |   5 +-
 package/cryptsetup/Config.in                       |   1 -
 package/cryptsetup/cryptsetup.mk                   |   7 +-
 package/curlftpfs/Config.in                        |   1 -
 package/curlftpfs/curlftpfs.mk                     |   2 +-
 package/diffutils/Config.in                        |   1 -
 package/diffutils/diffutils.mk                     |   2 +-
 package/ding-libs/Config.in                        |   6 --
 package/ding-libs/ding-libs.mk                     |   2 +-
 package/dnsmasq/Config.in                          |   1 -
 package/dnsmasq/dnsmasq.mk                         |   4 +-
 package/dos2unix/Config.in                         |   1 -
 package/dos2unix/dos2unix.mk                       |  15 ++-
 package/dropwatch/dropwatch.mk                     |  10 +-
 package/e2fsprogs/e2fsprogs.mk                     |   6 --
 package/efibootmgr/Config.in                       |   7 +-
 package/efibootmgr/efibootmgr.mk                   |   4 +-
 package/elfutils/Config.in                         |   1 -
 package/elfutils/elfutils.mk                       |  11 +--
 package/exiv2/exiv2.mk                             |   7 +-
 package/fetchmail/fetchmail.mk                     |   8 +-
 package/flex/Config.in                             |   1 -
 package/flex/flex.mk                               |   4 +-
 package/gdbm/gdbm.mk                               |   5 +-
 package/gettext/Config.in                          |  10 +-
 package/gettext/gettext.mk                         |   8 ++
 package/git/git.mk                                 |   6 +-
 package/glib-networking/Config.in                  |   1 -
 package/glib-networking/glib-networking.mk         |   2 +-
 package/gmpc/Config.in                             |   1 -
 package/gmpc/gmpc.mk                               |   2 +-
 .../0001-fix-static-build-with-uClibc.patch        |  47 ---------
 package/gnuchess/Config.in                         |   1 -
 package/gnuchess/gnuchess.mk                       |   2 +-
 package/gptfdisk/gptfdisk.mk                       |   9 +-
 package/grep/grep.mk                               |   6 +-
 package/httping/Config.in                          |   1 -
 package/httping/httping.mk                         |   6 +-
 package/iputils/iputils.mk                         |   7 --
 package/json-glib/Config.in                        |   1 -
 package/json-glib/json-glib.mk                     |   2 +-
 package/kbd/Config.in                              |   1 -
 package/kbd/kbd.mk                                 |   2 +-
 package/lbreakout2/Config.in                       |   1 -
 package/lbreakout2/lbreakout2.mk                   |  10 +-
 package/libconfuse/libconfuse.mk                   |   5 +-
 package/libftdi1/libftdi1.mk                       |   5 +-
 package/libglib2/Config.in                         |   1 -
 package/libglib2/libglib2.mk                       |   7 +-
 package/libgpg-error/libgpg-error.mk               |   5 +-
 package/libidn/Config.in                           |   1 -
 package/libidn/libidn.mk                           |   2 +-
 package/libuio/Config.in                           |   1 -
 package/libuio/libuio.mk                           |   9 +-
 package/libv4l/Config.in                           |   1 -
 package/libv4l/libv4l.mk                           |   4 +-
 package/libvips/Config.in                          |   3 +-
 package/libvips/libvips.mk                         |   2 +-
 package/lightning/lightning.mk                     |   2 -
 package/linux-pam/Config.in                        |   1 -
 package/linux-pam/linux-pam.mk                     |   9 +-
 package/linux-tools/Config.in                      |   6 --
 package/linux-tools/linux-tool-cpupower.mk         |   4 +-
 package/lshw/Config.in                             |   1 -
 package/lshw/lshw.mk                               |   6 +-
 package/ltris/Config.in                            |   1 -
 package/ltris/ltris.mk                             |   8 +-
 package/lvm2/lvm2.mk                               |   6 +-
 package/madplay/Config.in                          |   1 -
 package/madplay/madplay.mk                         |   2 +-
 package/make/Config.in                             |   1 -
 package/make/make.mk                               |   2 +-
 package/mcrypt/Config.in                           |   1 -
 package/mcrypt/mcrypt.mk                           |   2 +-
 package/midori/Config.in                           |   1 -
 package/midori/midori.mk                           |   2 +-
 package/minidlna/Config.in                         |   1 -
 package/minidlna/minidlna.mk                       |   2 +-
 package/ndisc6/Config.in                           |   1 -
 package/ndisc6/ndisc6.mk                           |   8 +-
 ...efile-fix-static-linking-issue-with-lintl.patch |  79 ----------------
 ...1-iptunnel.c-do-not-include-netinet-ip.h.patch} |   0
 package/net-tools/Config.in                        |   1 -
 package/net-tools/net-tools.mk                     |   6 +-
 package/newt/Config.in                             |   1 -
 package/newt/newt.mk                               |   6 +-
 package/nftables/Config.in                         |   1 -
 package/nftables/nftables.mk                       |   2 +-
 package/oprofile/oprofile.mk                       |   6 --
 package/pango/Config.in                            |   1 -
 package/pango/pango.mk                             |   2 +-
 ...musl.patch => 0003-fix-includes-for-musl.patch} |   0
 package/parted/0003-fix-static-link-uuid.patch     |  48 ----------
 .../0001-fix-static-build-with-gdbm-gettext.patch  |  20 ----
 package/php/Config.ext                             |   5 -
 package/php/php.mk                                 |   2 +-
 package/pkg-autotools.mk                           |   2 +-
 ...-the-libintl-library-to-the-Libs.private-.patch |  47 ---------
 package/popt/popt.mk                               |   5 +-
 package/powertop/Config.in                         |   1 -
 package/powertop/powertop.mk                       |   9 +-
 package/procps-ng/Config.in                        |   1 -
 package/procps-ng/procps-ng.mk                     |   8 +-
 package/psmisc/Config.in                           |   1 -
 package/psmisc/psmisc.mk                           |   2 +-
 package/pv/Config.in                               |   1 -
 package/pv/pv.mk                                   |   8 +-
 package/python/python.mk                           |   6 +-
 ...form-socklen_t-on-other-C-libraries-than.patch} |   0
 ...-inclusion-order-when-building-statically.patch | 105 ---------------------
 ...ith-ldl-option-only-when-it-is-supported.patch} |   0
 ...12-OpenGL-EGL-Avoid-X11-header-collision.patch} |   0
 package/quota/Config.in                            |   1 -
 package/quota/quota.mk                             |   8 +-
 package/rhash/Config.in                            |   1 -
 package/rhash/rhash.mk                             |   9 +-
 package/rpm/Config.in                              |   1 -
 package/rpm/rpm.mk                                 |   4 +-
 package/rrdtool/Config.in                          |   1 -
 package/rrdtool/rrdtool.mk                         |   6 +-
 package/samba4/samba4.mk                           |   9 +-
 package/sshfs/Config.in                            |   1 -
 package/sshfs/sshfs.mk                             |   2 +-
 package/sysstat/Config.in                          |   1 -
 package/sysstat/sysstat.mk                         |   8 +-
 package/tpm-tools/Config.in                        |   1 -
 package/tpm-tools/tpm-tools.mk                     |   3 +-
 package/uclibc/uClibc-ng.config                    |   1 +
 package/ushare/Config.in                           |   1 -
 package/ushare/ushare.mk                           |  20 ++--
 package/util-linux/Config.in                       |   1 -
 package/util-linux/util-linux.mk                   |  16 +---
 package/vdr/Config.in                              |   1 -
 package/vdr/vdr.mk                                 |   9 +-
 package/vim/Config.in                              |   1 -
 package/vim/vim.mk                                 |   2 +-
 package/whois/Config.in                            |   1 -
 package/whois/whois.mk                             |   8 +-
 package/x11r7/xlib_libXpm/xlib_libXpm.mk           |   3 +-
 .../0004-build-add-EXTRALIBS-to-link-with.patch    |  53 -----------
 package/xfsprogs/xfsprogs.mk                       |  17 ----
 package/xmlstarlet/xmlstarlet.mk                   |   2 +-
 package/xscreensaver/Config.in                     |   1 -
 package/xscreensaver/xscreensaver.mk               |   2 +-
 system/Config.in                                   |  19 ++++
 toolchain/Config.in                                |   1 +
 toolchain/toolchain-common.in                      |  16 +---
 160 files changed, 274 insertions(+), 846 deletions(-)
 delete mode 100644 package/gnuchess/0001-fix-static-build-with-uClibc.patch
 delete mode 100644 package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch
 rename package/net-tools/{0002-iptunnel.c-do-not-include-netinet-ip.h.patch => 0001-iptunnel.c-do-not-include-netinet-ip.h.patch} (100%)
 rename package/parted/{0004-fix-includes-for-musl.patch => 0003-fix-includes-for-musl.patch} (100%)
 delete mode 100644 package/parted/0003-fix-static-link-uuid.patch
 delete mode 100644 package/perl/0001-fix-static-build-with-gdbm-gettext.patch
 delete mode 100644 package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch
 rename package/qt/{0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch => 0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch} (100%)
 delete mode 100644 package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch
 rename package/qt/{0012-Link-with-ldl-option-only-when-it-is-supported.patch => 0011-Link-with-ldl-option-only-when-it-is-supported.patch} (100%)
 rename package/qt/{0013-OpenGL-EGL-Avoid-X11-header-collision.patch => 0012-OpenGL-EGL-Avoid-X11-header-collision.patch} (100%)
 delete mode 100644 package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch
Signature · 1 line
2.9.4
#1 lore raw

PATCH 1/100 libglib2: disable compiler warnings

By default, libglib enables some fairly aggressive warnings, treated as errors. In particular, the -Wformat=2 warning triggers a warning due to the return value of the ngettext() macro from uClibc libintl stub not being understood as being potentially a format string.

So, before we enable the stub libintl in uClibc, we disable such warnings. A bug will be reported to upstream uClibc to get the actual bug fixed, but disabling compiler warnings treated as errors is anyway a good thing in the context of Buildroot.

---
 package/libglib2/libglib2.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/libglib2/libglib2.mk +2 -1
index d6b18dd..577dcec 100644
@@ -113,7 +113,8 @@ HOST_LIBGLIB2_DEPENDENCIES = \
 	host-zlib
 
 LIBGLIB2_CONF_OPTS = \
-	--with-pcre=system
+	--with-pcre=system \
+	--disable-compile-warnings
 
 ifneq ($(BR2_ENABLE_LOCALE),y)
 LIBGLIB2_DEPENDENCIES += libiconv
Signature · 1 line
2.9.4
#2 lore raw

PATCH 2/100 flex: remove bogus comment

In reply to Thomas Petazzoni

The comment that explains why we were defining HOST_FLEX_DEPENDENCIES instead of inheriting from FLEX_DEPENDENCIES no longer makes sense, since we remove such automatic inheritance of host dependencies from target dependencies a while ago.

---
 package/flex/flex.mk | 1 -
 1 file changed, 1 deletion(-)
package/flex/flex.mk +0 -1
index aa6c026..905621e 100644
@@ -12,7 +12,6 @@ FLEX_LICENSE_FILES = COPYING
 FLEX_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_GETTEXT_IF_LOCALE),gettext) host-m4
 FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4
-# we don't have a host-gettext/libintl
 HOST_FLEX_DEPENDENCIES = host-m4
 
 define FLEX_DISABLE_PROGRAM
Signature · 1 line
2.9.4
#3 lore raw

PATCH 3/100 lvm2: force disable NLS support

In reply to Thomas Petazzoni

We are going to pass --enable-nls to all autotools packages when NLS support is enabled globally. However, lvm2 NLS support doesn't build, and anyway lvm2 doesn't provide any useful translation files, so we force disable NLS support for this package.

---
 package/lvm2/lvm2.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/lvm2/lvm2.mk +4 -2
index 9a422fe..f5cd0b5 100644
@@ -12,12 +12,14 @@ LVM2_LICENSE = GPL-2.0, LGPL-2.1
 LVM2_LICENSE_FILES = COPYING COPYING.LIB
 
 # Make sure that binaries and libraries are installed with write
-# permissions for the owner.
+# permissions for the owner. We disable NLS because it's broken, and
+# the package anyway doesn't provide any translation files.
 LVM2_CONF_OPTS += \
 	--enable-write_install \
 	--enable-pkgconfig \
 	--enable-cmdlib \
-	--enable-dmeventd
+	--enable-dmeventd \
+	--disable-nls
 
 # LVM2 uses autoconf, but not automake, and the build system does not
 # take into account the toolchain passed at configure time.
Signature · 1 line
2.9.4
#4 lore raw

PATCH 4/100 ushare: do not use the DISABLE_NLS variable

In reply to Thomas Petazzoni

ushare is not an autoconf/automake based package, so it does not have the standard behavior of autoconf that every enable/disable option supports both --enable-foo and --disable-foo.

For example, it supports --disable-nls, but not --enable-nls. Currently, DISABLE_NLS is either empty or --disable-nls, but this will be changed in a follow-up commit. As a preparation, this commit modifies ushare to no longer use DISABLE_NLS, but instead calculate itself whether --disable-nls should be passed.

---
 package/ushare/ushare.mk | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
package/ushare/ushare.mk +13 -3
index 3a5f178..32aa445 100644
@@ -11,17 +11,27 @@ USHARE_DEPENDENCIES = host-pkgconf libupnp
 USHARE_LICENSE = GPL-2.0+
 USHARE_LICENSE_FILES = COPYING
 
+USHARE_CONF_OPTS = \
+	--prefix=/usr \
+	--cross-compile \
+	--cross-prefix="$(TARGET_CROSS)" \
+	--sysconfdir=/etc \
+	--disable-strip
+
 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
 USHARE_DEPENDENCIES += gettext
 USHARE_LDFLAGS += -lintl
 endif
 
+ifeq ($(BR2_ENABLE_LOCALE),)
+USHARE_CONF_OPTS += --disable-nls
+endif
+
 define USHARE_CONFIGURE_CMDS
 	(cd $(@D); \
 		$(TARGET_CONFIGURE_OPTS) \
-		./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \
-		--cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \
-		--disable-strip \
+		./configure \
+			$(USHARE_CONF_OPTS) \
 	)
 endef
 
Signature · 1 line
2.9.4
#5 lore raw

PATCH 5/100 uclibc: enable libintl stubs

In reply to Thomas Petazzoni

In order to avoid having to bring libintl from gettext whenever you want to build a program that needs it, uClibc-ng now provides a stub implementation of the gettext functions in uClibc-ng itself. This brings uClibc-ng in the same situation as musl.

This will fix a lot of build failures related to static linking with libintl, and generally is a first step to simplify our gettext handling.

---
 package/uclibc/uClibc-ng.config | 1 +
 1 file changed, 1 insertion(+)
package/uclibc/uClibc-ng.config +1 -0
index f0a876f..5beb2bd 100644
@@ -23,6 +23,7 @@ UCLIBC_HAS_RESOLVER_SUPPORT=y
 UCLIBC_HAS_LIBRESOLV_STUB=y
 UCLIBC_HAS_LIBNSL_STUB=y
 UCLIBC_HAS_CTYPE_CHECKED=y
+UCLIBC_HAS_LIBINTL=y
 UCLIBC_HAS_HEXADECIMAL_FLOATS=y
 UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
 UCLIBC_HAS_STDIO_GETC_MACRO=y
Signature · 1 line
2.9.4
#6 lore raw

PATCH 6/100 toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT

In reply to Thomas Petazzoni

This new boolean is true if the toolchain provides a built-in full-featured implementation of gettext (glibc), and false if only a stub implementation is provided (uclibc, musl).

This will be used in follow-up commits to decide whether libintl needs to be built by gettext or not.

---
 toolchain/Config.in           | 1 +
 toolchain/toolchain-common.in | 6 ++++++
 2 files changed, 7 insertions(+)
toolchain/Config.in +1 -0
index 6aaf68b..15ee335 100644
@@ -11,6 +11,7 @@ config BR2_TOOLCHAIN_USES_GLIBC
 	bool
 	select BR2_USE_WCHAR
 	select BR2_ENABLE_LOCALE
+	select BR2_TOOLCHAIN_HAS_FULL_GETTEXT
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
toolchain/toolchain-common.in +6 -0
index ed993dd..56de9ed 100644
@@ -88,6 +88,12 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE
 	bool
 	default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
 
+# This boolean is true if the toolchain provides a built-in full
+# featured gettext implementation (glibc), and false if only a stub
+# gettext implementation is provided (uclibc, musl)
+config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
+	bool
+
 config BR2_USE_MMU
 	bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
 	default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
Signature · 1 line
2.9.4
#7 lore raw

PATCH 7/100 gettext: force build libintl if needed

In reply to Thomas Petazzoni

This commit introduces a hidden option BR2_PACKAGE_GETTEXT_PROVIDES_INTL that is used by gettext.mk to force the build of libintl if the toolchain doesn't provide a full gettext implementation.

For now, this hidden option is not selected by anything, but a follow-up commit will introduce BR2_ENABLE_NLS, which will make use of it.

---
 package/gettext/Config.in  | 8 ++++++++
 package/gettext/gettext.mk | 8 ++++++++
 2 files changed, 16 insertions(+)
package/gettext/Config.in +8 -0
index 7871a48..18bfda6 100644
@@ -12,6 +12,14 @@ config BR2_PACKAGE_GETTEXT
 
 	  http://www.gnu.org/software/gettext/
 
+if BR2_PACKAGE_GETTEXT
+
+config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL
+	bool
+	depends on !BR2_TOOLCHAIN_HAS_FULL_GETTEXT
+
+endif
+
 comment "gettext needs a toolchain w/ wchar"
 	depends on BR2_NEEDS_GETTEXT
 	depends on !BR2_USE_WCHAR
package/gettext/gettext.mk +8 -0
index 498dfab..454ad29 100644
@@ -39,6 +39,14 @@ HOST_GETTEXT_CONF_OPTS = \
 	--disable-relocatable \
 	--without-emacs
 
+# Force the build of libintl, even if the C library provides a stub
+# gettext implementation
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
+GETTEXT_CONF_OPTS += --with-included-gettext
+else
+GETTEXT_CONF_OPTS += --without-included-gettext
+endif
+
 # For the target version, we only need the runtime, and for the host
 # version, we only need the tools.
 GETTEXT_SUBDIR = gettext-runtime
Signature · 1 line
2.9.4
#8 lore raw

PATCH 8/100 package: rename DISABLE_NLS to NLS_OPTS

In reply to Thomas Petazzoni

We are going to use DISABLE_NLS not only for disabling NLS support, but also to explicitly enable it. Therefore, this preparatory commit renames it to NLS_OPTS, which is consistent with other foo_OPTS variables defined in package/Makefile.in.

While at it, we replace the := assignments by regular = assignments.

---
 package/Makefile.in      | 4 ++--
 package/pkg-autotools.mk | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/Makefile.in +2 -2
index 8087bde..4a5b3af 100644
@@ -360,9 +360,9 @@ TARGET_CONFIGURE_ARGS = \
 ################################################################################
 
 ifeq ($(BR2_ENABLE_LOCALE),y)
-DISABLE_NLS :=
+NLS_OPTS =
 else
-DISABLE_NLS :=--disable-nls
+NLS_OPTS = --disable-nls
 endif
 
 ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
package/pkg-autotools.mk +1 -1
index e215382..ba1f4d9 100644
@@ -201,7 +201,7 @@ define $(2)_CONFIGURE_CMDS
 		--with-fop=no \
 		$$(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \
 		--enable-ipv6 \
-		$$(DISABLE_NLS) \
+		$$(NLS_OPTS) \
 		$$(SHARED_STATIC_LIBS_OPTS) \
 		$$(QUIET) $$($$(PKG)_CONF_OPTS) \
 	)
Signature · 1 line
2.9.4
#9 lore raw

PATCH 9/100 system: introduce BR2_SYSTEM_ENABLE_NLS

In reply to Thomas Petazzoni

Until now, the option BR2_ENABLE_LOCALE was more-or-less controlling whether NLS support was enabled in packages. More precisely, if BR2_ENABLE_LOCALE=y, we were not doing anything (so some packages could have NLS support enabled, some not). And only when BR2_ENABLE_LOCALE was disabled we were explicitly passing --disable-nls to packages.

This doesn't make much sense, and there is no reason to tie NLS support to locale support. You may want locale support, but not necessarily NLS support. Therefore, this commit introduces BR2_SYSTEM_ENABLE_NLS, which allows to enable/disable NLS support globally. When this option is enabled, we pass --enable-nls to packages, otherwise we pass --disable-nls.

In addition, when this option is enabled and the C library doesn't provide a full-blown implementation of gettext, we select the gettext package, which will provide the full blown implementation.

It is worth mentioning that this commit has a visible impact for users:

- Prior to this commit, as soon as BR2_ENABLE_LOCALE=y, packages *could* provide NLS support. It was up to each package to decide whether they wanted to provide NLS support or not (we were not passing --enable-nls nor --disable-nls).

- After this commit, it's BR2_SYSTEM_ENABLE_NLS that controls whether NLS is enabled or disabled, and this option is disabled by default.

Bottom line: with the default of BR2_SYSTEM_ENABLE_NLS disabled, some packages may lose NLS support that they used to provide. But we believe it's a reasonable default behavior for Buildroot, where generally NLS support is not necessary.

---
 package/Makefile.in       |  4 ++--
 package/gettext/Config.in |  1 +
 system/Config.in          | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)
package/Makefile.in +2 -2
index 4a5b3af..462b7ca 100644
@@ -359,8 +359,8 @@ TARGET_CONFIGURE_ARGS = \
 
 ################################################################################
 
-ifeq ($(BR2_ENABLE_LOCALE),y)
-NLS_OPTS =
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
+NLS_OPTS = --enable-nls
 else
 NLS_OPTS = --disable-nls
 endif
package/gettext/Config.in +1 -0
index 18bfda6..0dea03d 100644
@@ -17,6 +17,7 @@ if BR2_PACKAGE_GETTEXT
 config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL
 	bool
 	depends on !BR2_TOOLCHAIN_HAS_FULL_GETTEXT
+	default y if BR2_SYSTEM_ENABLE_NLS
 
 endif
 
system/Config.in +19 -0
index 8588839..828df42 100644
@@ -420,6 +420,25 @@ config BR2_GENERATE_LOCALE
 	  specified, UTF-8 is assumed. Examples of locales: en_US,
 	  fr_FR.UTF-8.
 
+config BR2_SYSTEM_ENABLE_NLS
+	bool "Enable Native Language Support (NLS)"
+	depends on BR2_USE_WCHAR
+	#  - glibc has built-in NLS support, but anyway doesn't
+	#    support static linking
+	#  - musl and uclibc support static linking, but they don't
+	#    have built-in NLS support, which is provided by the
+	#    libintl library from gettext. The fact that it is a
+	#    separate library causes too many problems for static
+	#    linking.
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_GETTEXT if !BR2_TOOLCHAIN_HAS_FULL_GETTEXT
+	help
+	  This option will enable Native Language Support, which will
+	  allow software packages to support translations.
+
+comment "NLS support needs a toolchain w/ wchar, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+
 config BR2_TARGET_TZ_INFO
 	bool "Install timezone info"
 	select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC
Signature · 1 line
2.9.4
#10 lore raw

PATCH 10/100 package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES, LIBS}

In reply to Thomas Petazzoni

All packages that can use NLS support will have to depend on host-gettext, as it provides the tools for generating .mo files from .po files.

In addition, all packages may need to depend on gettext (and link with -lintl) if the full-blown gettext implementation is provided by libintl and not by the C library.

In order to avoid repeating such conditions everywhere, this commit introduces two variables:

- TARGET_NLS_DEPENDENCIES, which packages that may use NLS support should unconditionally add to their <pkg>_DEPENDENCIES variable.

- TARGET_NLS_LIBS, which packages can use to pass through LIBS or LDFLAGS when the package build system needs help to realize that it should link against libintl.

---
 package/Makefile.in | 5 +++++
 1 file changed, 5 insertions(+)
package/Makefile.in +5 -0
index 462b7ca..d30da3f 100644
@@ -361,6 +361,11 @@ TARGET_CONFIGURE_ARGS = \
 
 ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
 NLS_OPTS = --enable-nls
+TARGET_NLS_DEPENDENCIES = host-gettext
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
+TARGET_NLS_DEPENDENCIES += gettext
+TARGET_NLS_LIBS += -lintl
+endif
 else
 NLS_OPTS = --disable-nls
 endif
Signature · 1 line
2.9.4
#11 lore raw

PATCH 11/100 package/Makefile.in: fix musl handling

In reply to Thomas Petazzoni

Until now, we had no support for full NLS with the musl C library:
BR2_NEEDS_GETTEXT was only true for uClibc. But the musl C library provides a stub gettext implementation, which some packages were failing to recognize as being usable, and therefore we are passing autoconf cache variables to hint those packages that yes, the C library has a usable gettext implementation.

However, we are going to enable full NLS support for musl, by giving the possibility to build gettext libintl with musl. In such a case, we do not want packages to use the gettext implementation of the C library, but really the one provided by gettext libintl.

Therefore, we should only pre-seed the gt_cv_func_gnugettext1_libc*=yes variables if we're on musl but without gettext libintl. Otherwise packages will fail building because:

- libintl.h is the one from the full-blown gettext implementation, so it assumes the package will link against -lintl

- the package thinks gettext is provided by the C library, so it doesn't link with -lintl

---
 package/Makefile.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/Makefile.in +6 -1
index d30da3f..b98333f 100644
@@ -338,7 +338,12 @@ endif
 # AM_GNU_GETTEXT misdetects musl gettext support.
 # musl currently implements api level 1 and 2 (basic + ngettext)
 # http://www.openwall.com/lists/musl/2015/04/16/3
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+#
+# These autoconf variables should only be pre-seeded when the minimal
+# gettext implementation of musl is used. When the full blown
+# implementation provided by gettext libintl is used, auto-detection
+# works fine, and pre-seeding those values is actually wrong.
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y:)
 BR2_GT_CV_FUNC_GNUGETTEXT_LIBC = \
 	gt_cv_func_gnugettext1_libc=yes \
 	gt_cv_func_gnugettext2_libc=yes
Signature · 1 line
2.9.4
#12 lore raw

PATCH 12/100 alsa-utils: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/alsa-utils/Config.in     |  1 -
 package/alsa-utils/alsa-utils.mk | 13 +++++--------
 2 files changed, 5 insertions(+), 9 deletions(-)
package/alsa-utils/Config.in +0 -1
index 1d42f2e..d3fd18d 100644
@@ -8,7 +8,6 @@ menuconfig BR2_PACKAGE_ALSA_UTILS
 	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	depends on !BR2_STATIC_LIBS # uses dlfcn.h
 	select BR2_PACKAGE_ALSA_LIB
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  This package contains the command line utilities for the ALSA
 	  project.
package/alsa-utils/alsa-utils.mk +5 -8
index f0b964a..e9fd942 100644
@@ -10,27 +10,24 @@ ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils
 ALSA_UTILS_LICENSE = GPL-2.0
 ALSA_UTILS_LICENSE_FILES = COPYING
 ALSA_UTILS_INSTALL_STAGING = YES
-ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \
+ALSA_UTILS_DEPENDENCIES = host-pkgconf alsa-lib \
 	$(if $(BR2_PACKAGE_NCURSES),ncurses) \
-	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate)
+	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
+	$(TARGET_NLS_DEPENDENCIES)
 # Regenerate aclocal.m4 to pick the patched
 # version of alsa.m4 from alsa-lib
 ALSA_UTILS_AUTORECONF = YES
 ALSA_UTILS_GETTEXTIZE = YES
 
 ALSA_UTILS_CONF_ENV = \
-	ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
+	ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) \
+	LIBS=$(TARGET_NLS_LIBS)
 
 ALSA_UTILS_CONF_OPTS = \
 	--disable-xmlto \
 	--disable-rst2man \
 	--with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses)
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-ALSA_UTILS_DEPENDENCIES += gettext
-ALSA_UTILS_CONF_ENV += LIBS=-lintl
-endif
-
 ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSALOOP),y)
 ALSA_UTILS_CONF_OPTS += --enable-alsaloop
 else
Signature · 1 line
2.9.4
#13 lore raw

PATCH 12/100 alsa-utils: use new gettext logic

Quoted 10 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

Regards,
Arnout

Quoted 55 lines
---
 package/alsa-utils/Config.in     |  1 -
 package/alsa-utils/alsa-utils.mk | 13 +++++--------
 2 files changed, 5 insertions(+), 9 deletions(-)
package/alsa-utils/Config.in +0 -1
index 1d42f2e..d3fd18d 100644
@@ -8,7 +8,6 @@ menuconfig BR2_PACKAGE_ALSA_UTILS
 	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	depends on !BR2_STATIC_LIBS # uses dlfcn.h
 	select BR2_PACKAGE_ALSA_LIB
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  This package contains the command line utilities for the ALSA
 	  project.
package/alsa-utils/alsa-utils.mk +5 -8
index f0b964a..e9fd942 100644
@@ -10,27 +10,24 @@ ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils
 ALSA_UTILS_LICENSE = GPL-2.0
 ALSA_UTILS_LICENSE_FILES = COPYING
 ALSA_UTILS_INSTALL_STAGING = YES
-ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \
+ALSA_UTILS_DEPENDENCIES = host-pkgconf alsa-lib \
 	$(if $(BR2_PACKAGE_NCURSES),ncurses) \
-	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate)
+	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
+	$(TARGET_NLS_DEPENDENCIES)
 # Regenerate aclocal.m4 to pick the patched
 # version of alsa.m4 from alsa-lib
 ALSA_UTILS_AUTORECONF = YES
 ALSA_UTILS_GETTEXTIZE = YES
 
 ALSA_UTILS_CONF_ENV = \
-	ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
+	ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) \
+	LIBS=$(TARGET_NLS_LIBS)
 
 ALSA_UTILS_CONF_OPTS = \
 	--disable-xmlto \
 	--disable-rst2man \
 	--with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses)
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-ALSA_UTILS_DEPENDENCIES += gettext
-ALSA_UTILS_CONF_ENV += LIBS=-lintl
-endif
-
 ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSALOOP),y)
 ALSA_UTILS_CONF_OPTS += --enable-alsaloop
 else
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#14 lore raw

PATCH 13/100 avahi: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/avahi/Config.in | 1 -
 package/avahi/avahi.mk  | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)
package/avahi/Config.in +0 -1
index a6b4ac8..5e303d0 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_AVAHI
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
package/avahi/avahi.mk +3 -3
index a356a08..94b6292 100644
@@ -97,8 +97,8 @@ AVAHI_CONF_OPTS = \
 	--with-autoipd-group=avahi
 
 AVAHI_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
-	host-pkgconf host-gettext
+	host-intltool host-pkgconf \
+	$(TARGET_NLS_DEPENDENCIES)
 
 AVAHI_CFLAGS = $(TARGET_CFLAGS)
 
@@ -168,7 +168,7 @@ endif
 
 AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
 
-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
+AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)
 
 define AVAHI_USERS
 	avahi -1 avahi -1 * - - -
Signature · 1 line
2.9.4
#15 lore raw

PATCH 13/100 avahi: use new gettext logic

Quoted 10 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

Regards,
Arnout

Quoted 42 lines
---
 package/avahi/Config.in | 1 -
 package/avahi/avahi.mk  | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)
package/avahi/Config.in +0 -1
index a6b4ac8..5e303d0 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_AVAHI
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
package/avahi/avahi.mk +3 -3
index a356a08..94b6292 100644
@@ -97,8 +97,8 @@ AVAHI_CONF_OPTS = \
 	--with-autoipd-group=avahi
 
 AVAHI_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
-	host-pkgconf host-gettext
+	host-intltool host-pkgconf \
+	$(TARGET_NLS_DEPENDENCIES)
 
 AVAHI_CFLAGS = $(TARGET_CFLAGS)
 
@@ -168,7 +168,7 @@ endif
 
 AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
 
-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
+AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)
 
 define AVAHI_USERS
 	avahi -1 avahi -1 * - - -
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#16 lore raw

PATCH 14/100 axel: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

Note that -lpthread is no longer needed for -lintl, but axel uses pthread directly anyway, so we have to keep -lpthread as part of LDFLAGS.

Finally, we now use BR2_SYSTEM_ENABLE_NLS to decide whether NLS support should be enabled or not.

---
 package/axel/Config.in |  1 -
 package/axel/axel.mk   | 12 +++---------
 2 files changed, 3 insertions(+), 10 deletions(-)
package/axel/Config.in +0 -1
index aea85bf..6e709cf 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_AXEL
 	bool "axel"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  HTTP/FTP download accelerator.
 
package/axel/axel.mk +3 -9
index e89a946..60bf5e4 100644
@@ -8,16 +8,10 @@ AXEL_VERSION = 2.4
 AXEL_SITE = http://sources.buildroot.net
 AXEL_LICENSE = GPL-2.0+
 AXEL_LICENSE_FILES = COPYING
+AXEL_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
+AXEL_LDFLAGS = -lpthread $(TARGET_NLS_LIBS)
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-AXEL_DEPENDENCIES += gettext
-AXEL_LDFLAGS += -lintl
-endif
-
-# -lintl may use symbols from -lpthread
-AXEL_LDFLAGS += -lpthread
-
-ifneq ($(BR2_ENABLE_LOCALE),y)
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
 AXEL_DISABLE_I18N = --i18n=0
 endif
 
Signature · 1 line
2.9.4
#17 lore raw

PATCH 15/100 binutils: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl. This wasn't done so far, but is needed for the build to work, because uClibc now has a stub gettext implementation, which is mistaken as being the full gettext implementation by the configure script

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/binutils/Config.in   | 1 -
 package/binutils/binutils.mk | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/binutils/Config.in +0 -1
index 360dd5e..e17a8ec 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_BINUTILS
 	bool "binutils"
 	depends on !BR2_nios2
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Install binutils on the target
 
package/binutils/binutils.mk +2 -1
index 0dc20a0..c64ec47 100644
@@ -24,7 +24,8 @@ BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2
 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 = $(TARGET_NLS_DEPENDENCIES)
+BINUTILS_MAKE_OPTS = LIBS=$(TARGET_NLS_LIBS)
 BINUTILS_LICENSE = GPL-3.0+, libiberty LGPL-2.1+
 BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB
 
Signature · 1 line
2.9.4
#18 lore raw

PATCH 16/100 clamav: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/clamav/Config.in | 1 -
 package/clamav/clamav.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/clamav/Config.in +0 -1
index a962103..bc934ea 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_CLAMAV
 	bool "clamav"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBTOOL
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_ZLIB
package/clamav/clamav.mk +1 -1
index 23dee0a..5429abb 100644
@@ -15,7 +15,7 @@ CLAMAV_DEPENDENCIES = \
 	libtool \
 	openssl \
 	zlib \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	$(TARGET_NLS_DEPENDENCIES)
 
 # mmap cannot be detected when cross-compiling, needed for mempool support
 CLAMAV_CONF_ENV = \
Signature · 1 line
2.9.4
#19 lore raw

PATCH 17/100 coreutils: use the new gettext logic

In reply to Thomas Petazzoni

This commit uses TARGET_NLS_DEPENDENCIES instead of existing logic to add the dependency on gettext. To keep the existing behavior, we keep the --with-libintl-prefix option, but only when a libintl library is effectively provided by gettext.

---
 package/coreutils/coreutils.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/coreutils/coreutils.mk +3 -2
index 14b952f..6a8a31b 100644
@@ -77,10 +77,11 @@ else
 COREUTILS_CONF_OPTS += --disable-xattr
 endif
 
+COREUTILS_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
+
 # It otherwise fails to link properly, not mandatory though
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
 COREUTILS_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
-COREUTILS_DEPENDENCIES += gettext
 endif
 
 ifeq ($(BR2_PACKAGE_GMP),y)
Signature · 1 line
2.9.4
#20 lore raw

PATCH 18/100 cryptsetup: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/cryptsetup/Config.in     | 1 -
 package/cryptsetup/cryptsetup.mk | 7 ++-----
 2 files changed, 2 insertions(+), 6 deletions(-)
package/cryptsetup/Config.in +0 -1
index 3ca23ba..5cd4676 100644
@@ -8,7 +8,6 @@ config BR2_PACKAGE_CRYPTSETUP
 	select BR2_PACKAGE_LVM2
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  This tool helps manipulate dm-crypt and luks partitions for
 	  on-disk encryption.
package/cryptsetup/cryptsetup.mk +2 -5
index 787331c..5496583 100644
@@ -9,14 +9,11 @@ CRYPTSETUP_VERSION = $(CRYPTSETUP_VERSION_MAJOR).5
 CRYPTSETUP_SOURCE = cryptsetup-$(CRYPTSETUP_VERSION).tar.xz
 CRYPTSETUP_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/cryptsetup/v$(CRYPTSETUP_VERSION_MAJOR)
 CRYPTSETUP_DEPENDENCIES = lvm2 popt util-linux host-pkgconf \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	$(TARGET_NLS_DEPENDENCIES)
 CRYPTSETUP_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (library)
 CRYPTSETUP_LICENSE_FILES = COPYING COPYING.LGPL
 CRYPTSETUP_INSTALL_STAGING = YES
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
-endif
+CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)"
 
 # cryptsetup uses libgcrypt by default, but can be configured to use OpenSSL
 # or kernel crypto modules instead
Signature · 1 line
2.9.4
#21 lore raw

PATCH 19/100 curlftpfs: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/curlftpfs/Config.in    | 1 -
 package/curlftpfs/curlftpfs.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/curlftpfs/Config.in +0 -1
index 986faf1..c8c432f 100644
@@ -6,7 +6,6 @@ config BR2_PACKAGE_CURLFTPFS
 	depends on !BR2_STATIC_LIBS # libfuse
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LIBCURL
package/curlftpfs/curlftpfs.mk +1 -1
index 585dbf2..584d01a 100644
@@ -11,7 +11,7 @@ CURLFTPFS_LICENSE = GPL-2.0
 CURLFTPFS_LICENSE_FILES = COPYING
 CURLFTPFS_DEPENDENCIES = \
 	libglib2 libfuse openssl libcurl \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv)
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#22 lore raw

PATCH 20/100 diffutils: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/diffutils/Config.in    | 1 -
 package/diffutils/diffutils.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/diffutils/Config.in +0 -1
index 97cb38b..3c38f25 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_DIFFUTILS
 	bool "diffutils"
 	depends on BR2_USE_WCHAR
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  GNU diff. Compare files per line.
 
package/diffutils/diffutils.mk +1 -1
index 4662e2b..6e5b9b6 100644
@@ -7,7 +7,7 @@
 DIFFUTILS_VERSION = 3.6
 DIFFUTILS_SOURCE = diffutils-$(DIFFUTILS_VERSION).tar.xz
 DIFFUTILS_SITE = $(BR2_GNU_MIRROR)/diffutils
-DIFFUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+DIFFUTILS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 DIFFUTILS_LICENSE = GPL-3.0+
 DIFFUTILS_LICENSE_FILES = COPYING
 
Signature · 1 line
2.9.4
#23 lore raw

PATCH 21/100 ding-libs: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

The BR2_USE_WCHAR dependency was only needed for gettext. But now, we no longer need gettext unconditionally, so this dependency on BR2_USE_WCHAR is removed.

---
 package/ding-libs/Config.in    | 6 ------
 package/ding-libs/ding-libs.mk | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
package/ding-libs/Config.in +0 -6
index d397f29..6dc2a80 100644
@@ -1,7 +1,5 @@
 config BR2_PACKAGE_DING_LIBS
 	bool "ding-libs"
-	depends on BR2_USE_WCHAR || !BR2_NEEDS_GETTEXT
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  The ding-libs packages contain a set of libraries used by
@@ -16,7 +14,3 @@ config BR2_PACKAGE_DING_LIBS
 	  structure (libini_config).
 
 	  https://git.fedorahosted.org/git/ding-libs.git
-
-comment "ding-libs needs a toolchain w/ wchar"
-	depends on BR2_NEEDS_GETTEXT
-	depends on !BR2_USE_WCHAR
package/ding-libs/ding-libs.mk +1 -1
index 4b045be..e9508cc 100644
@@ -8,7 +8,7 @@ DING_LIBS_VERSION = 0_4_0
 DING_LIBS_SOURCE = ding_libs-$(DING_LIBS_VERSION).tar.xz
 DING_LIBS_SITE = https://git.fedorahosted.org/cgit/ding-libs.git/snapshot
 DING_LIBS_DEPENDENCIES = host-pkgconf \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 DING_LIBS_INSTALL_STAGING = YES
 DING_LIBS_LICENSE = LGPL-3.0+ (library),GPL-3.0+ (test programs)
Signature · 1 line
2.9.4
#24 lore raw

PATCH 22/100 dnsmasq: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/dnsmasq/Config.in  | 1 -
 package/dnsmasq/dnsmasq.mk | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
package/dnsmasq/Config.in +0 -1
index 936b1de..8921fc6 100644
@@ -31,7 +31,6 @@ 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
 	help
 	  Enable IDN support in dnsmasq.
 	  This option is a big space taker since it pulls in many
package/dnsmasq/dnsmasq.mk +2 -2
index c6f15e2..00a59da 100644
@@ -32,8 +32,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) host-gettext
-DNSMASQ_MAKE_OPTS += LIBS+="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
+DNSMASQ_DEPENDENCIES += libidn $(TARGET_NLS_DEPENDENCIES)
+DNSMASQ_MAKE_OPTS += LIBS+=$(TARGET_NLS_LIBS)
 DNSMASQ_COPTS += -DHAVE_IDN
 DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n)
 endif
Signature · 1 line
2.9.4
#25 lore raw

PATCH 23/100 dos2unix: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

In addition, we now use BR2_SYSTEM_ENABLE_NLS instead of BR2_ENABLE_LOCALE to decide if NLS support should be enabled or disabled.

---
 package/dos2unix/Config.in   |  1 -
 package/dos2unix/dos2unix.mk | 15 +++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)
package/dos2unix/Config.in +0 -1
index 6945f52..cfb5ba4 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_DOS2UNIX
 	bool "dos2unix"
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  dos2unix converts text file line endings between CRLF and LF
 
package/dos2unix/dos2unix.mk +7 -8
index 3540ec8..87525fb 100644
@@ -8,19 +8,18 @@ DOS2UNIX_VERSION = 7.3.4
 DOS2UNIX_SITE = http://waterlan.home.xs4all.nl/dos2unix
 DOS2UNIX_LICENSE = BSD-2-Clause
 DOS2UNIX_LICENSE_FILES = COPYING.txt
-DOS2UNIX_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+DOS2UNIX_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_BUSYBOX),busybox) \
+	$(TARGET_NLS_DEPENDENCIES)
 
-ifeq ($(BR2_ENABLE_LOCALE),y)
-DOS2UNIX_DEPENDENCIES += host-gettext
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
+DOS2UNIX_MAKE_OPTS += ENABLE_NLS=1
+DOS2UNIX_MAKE_OPTS += LIBS_EXTRA=$(TARGET_NLS_LIBS)
 else
+# Should be defined to empty to disable NLS support
 DOS2UNIX_MAKE_OPTS += ENABLE_NLS=
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-DOS2UNIX_DEPENDENCIES += gettext
-DOS2UNIX_MAKE_OPTS += LIBS_EXTRA=-lintl
-endif
-
 ifeq ($(BR2_USE_WCHAR),)
 DOS2UNIX_MAKE_OPTS += UCS=
 endif
Signature · 1 line
2.9.4
#26 lore raw

PATCH 24/100 dropwatch: use new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of relying on binutils depending on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

---
 package/dropwatch/dropwatch.mk | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
package/dropwatch/dropwatch.mk +4 -6
index e08a0c1..692a6e8 100644
@@ -6,18 +6,16 @@
 
 DROPWATCH_VERSION = 7c33d8a8ed105b07a46b55d71d93b36ed34c16db
 DROPWATCH_SITE = git://git.infradead.org/users/nhorman/dropwatch.git
-DROPWATCH_DEPENDENCIES = binutils libnl readline host-pkgconf
+DROPWATCH_DEPENDENCIES = binutils libnl readline host-pkgconf \
+	$(TARGET_NLS_DEPENDENCIES)
 DROPWATCH_LICENSE = GPL-2.0
 DROPWATCH_LICENSE_FILES = COPYING
 
 # libbfd may be linked to libintl
 # Ugly... but LDLIBS are hardcoded anyway
 DROPWATCH_LDLIBS = \
-	-lbfd -lreadline -lnl-3 -lnl-genl-3 -lpthread -lncurses -lm
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-DROPWATCH_LDLIBS += -lintl
-endif
+	-lbfd -lreadline -lnl-3 -lnl-genl-3 -lpthread -lncurses -lm \
+	$(TARGET_NLS_LIBS)
 
 define DROPWATCH_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
Signature · 1 line
2.9.4
#27 lore raw

PATCH 25/100 efibootmgr: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

The BR2_USE_WCHAR dependency was needed for gettext, now that we no longer need gettext, we can also get rid of this dependency.

---
 package/efibootmgr/Config.in     | 7 ++-----
 package/efibootmgr/efibootmgr.mk | 4 ++--
 2 files changed, 4 insertions(+), 7 deletions(-)
package/efibootmgr/Config.in +2 -5
index 57874fc..1096b9d 100644
@@ -6,8 +6,6 @@ config BR2_PACKAGE_EFIBOOTMGR
 	depends on !BR2_TOOLCHAIN_USES_MUSL # efivar
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # efivar
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
-	depends on BR2_USE_WCHAR # gettext
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_EFIVAR
 	help
 	  A Linux user-space application to modify the Intel Extensible
@@ -17,11 +15,10 @@ config BR2_PACKAGE_EFIBOOTMGR
 
 	  https://github.com/rhinstaller/efibootmgr
 
-comment "efibootmgr needs a glibc or uClibc toolchain w/ wchar, dynamic library, headers >= 3.12, gcc >= 4.9"
+comment "efibootmgr needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.12, gcc >= 4.9"
 	depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
 	depends on BR2_STATIC_LIBS || \
 		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
 		BR2_TOOLCHAIN_USES_MUSL || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
-		!BR2_USE_WCHAR
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
package/efibootmgr/efibootmgr.mk +2 -2
index 094dd28..b32d9cb 100644
@@ -8,8 +8,8 @@ EFIBOOTMGR_VERSION = 14
 EFIBOOTMGR_SITE = $(call github,rhinstaller,efibootmgr,$(EFIBOOTMGR_VERSION))
 EFIBOOTMGR_LICENSE = GPL-2.0+
 EFIBOOTMGR_LICENSE_FILES = COPYING
-EFIBOOTMGR_DEPENDENCIES = efivar $(if $(BR2_NEEDS_GETTEXT),gettext)
-EFIBOOTMGR_LDFLAGS = $(TARGET_LDFLAGS) $(if $(BR2_NEEDS_GETTEXT),-lintl)
+EFIBOOTMGR_DEPENDENCIES = efivar $(TARGET_NLS_DEPENDENCIES)
+EFIBOOTMGR_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
 
 define EFIBOOTMSR_PATCH_HEADER_PATH
 	$(SED) 's,-I/,-I$(STAGING_DIR)/,' $(@D)/Makefile
Signature · 1 line
2.9.4
#28 lore raw

PATCH 26/100 elfutils: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/elfutils/Config.in   |  1 -
 package/elfutils/elfutils.mk | 11 +++--------
 2 files changed, 3 insertions(+), 9 deletions(-)
package/elfutils/Config.in +0 -1
index 3228319..ad86c31 100644
@@ -14,7 +14,6 @@ config BR2_PACKAGE_ELFUTILS
 	depends on !BR2_bfin
 	select BR2_PACKAGE_ZLIB
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  Libraries/utilities to handle ELF objects (drop in
 	  replacement for libelf).
package/elfutils/elfutils.mk +3 -8
index e43d036..5570a3b 100644
@@ -10,7 +10,7 @@ ELFUTILS_SITE = https://sourceware.org/elfutils/ftp/$(ELFUTILS_VERSION)
 ELFUTILS_INSTALL_STAGING = YES
 ELFUTILS_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
 ELFUTILS_LICENSE_FILES = COPYING-GPLV2 COPYING-LGPLV3
-ELFUTILS_DEPENDENCIES = zlib
+ELFUTILS_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
 HOST_ELFUTILS_DEPENDENCIES = host-zlib host-bzip2 host-xz
 
 # We patch configure.ac
@@ -40,13 +40,8 @@ ELFUTILS_CONF_ENV += \
 	CFLAGS="$(ELFUTILS_CFLAGS)" \
 	CPPFLAGS="$(ELFUTILS_CPPFLAGS)"
 
-ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS)
-
-# Unconditionnally requires gettext.
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-ELFUTILS_DEPENDENCIES += gettext
-ELFUTILS_LDFLAGS += -lintl
-endif
+ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) \
+	$(TARGET_NLS_LIBS)
 
 ELFUTILS_CONF_ENV += \
 	LDFLAGS="$(ELFUTILS_LDFLAGS)"
Signature · 1 line
2.9.4
#29 lore raw

PATCH 27/100 exiv2: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using BR2_SYSTEM_ENABLE_NLS instead of BR2_ENABLE_LOCALE to decide if NLS support should be enabled or not

---
 package/exiv2/exiv2.mk | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
package/exiv2/exiv2.mk +3 -4
index 6bc8848..32029ba 100644
@@ -42,11 +42,10 @@ else
 EXIV2_CONF_OPTS += -DEXIV2_ENABLE_XMP=OFF -DEXIV2_ENABLE_LIBXMP=OFF
 endif
 
-ifeq ($(BR2_ENABLE_LOCALE),y)
+EXIV2_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
+
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
 EXIV2_CONF_OPTS += -DEXIV2_ENABLE_NLS=ON
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-EXIV2_DEPENDENCIES += gettext
-endif
 else
 EXIV2_CONF_OPTS += -DEXIV2_ENABLE_NLS=OFF
 endif
Signature · 1 line
2.9.4
#30 lore raw

PATCH 28/100 fetchmail: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/fetchmail/fetchmail.mk | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
package/fetchmail/fetchmail.mk +2 -6
index 164b2f8..37bbeab 100644
@@ -24,12 +24,8 @@ FETCHMAIL_CONF_OPTS = \
 
 FETCHMAIL_DEPENDENCIES = \
 	ca-certificates \
-	openssl
-
-# libintl is an optional dependency
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-FETCHMAIL_DEPENDENCIES += gettext
-endif
+	openssl \
+	$(TARGET_NLS_DEPENDENCIES)
 
 # fetchmailconf.py script is not (yet) python3-compliant.
 # Prevent the pyc-compilation with python-3 from failing by removing this
Signature · 1 line
2.9.4
#31 lore raw

PATCH 29/100 flex: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/flex/Config.in | 1 -
 package/flex/flex.mk   | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
package/flex/Config.in +0 -1
index 76e8bc7..33d123d 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_FLEX
 	bool "flex"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  A fast lexical analyser generator. A tool for generating
 	  programs that perform pattern-matching on text.
package/flex/flex.mk +1 -2
index 905621e..b782699 100644
@@ -9,8 +9,7 @@ FLEX_SITE = https://github.com/westes/flex/files/981163
 FLEX_INSTALL_STAGING = YES
 FLEX_LICENSE = FLEX
 FLEX_LICENSE_FILES = COPYING
-FLEX_DEPENDENCIES = \
-	$(if $(BR2_PACKAGE_GETTEXT_IF_LOCALE),gettext) host-m4
+FLEX_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) host-m4
 FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4
 HOST_FLEX_DEPENDENCIES = host-m4
 
Signature · 1 line
2.9.4
#32 lore raw

PATCH 30/100 gdbm: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/gdbm/gdbm.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/gdbm/gdbm.mk +1 -4
index 4e3ed76..acd8cd2 100644
@@ -9,10 +9,7 @@ GDBM_SITE = $(BR2_GNU_MIRROR)/gdbm
 GDBM_LICENSE = GPL-3.0+
 GDBM_LICENSE_FILES = COPYING
 GDBM_INSTALL_STAGING = YES
-
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-GDBM_DEPENDENCIES += gettext
-endif
+GDBM_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 ifeq ($(BR2_PACKAGE_READLINE),y)
 GDBM_CONF_OPTS += --with-readline
Signature · 1 line
2.9.4
#33 lore raw

PATCH 31/100 git: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/git/git.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
package/git/git.mk +1 -5
index 9cc88dd..23ace0f 100644
@@ -9,11 +9,7 @@ GIT_SOURCE = git-$(GIT_VERSION).tar.xz
 GIT_SITE = https://www.kernel.org/pub/software/scm/git
 GIT_LICENSE = GPL-2.0, LGPL-2.1+
 GIT_LICENSE_FILES = COPYING LGPL-2.1
-GIT_DEPENDENCIES = zlib host-gettext
-
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-GIT_DEPENDENCIES += gettext
-endif
+GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 GIT_DEPENDENCIES += openssl
Signature · 1 line
2.9.4
#34 lore raw

PATCH 31/100 git: use the new gettext logic

Quoted 14 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/git/git.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
package/git/git.mk +0 -0
index 9cc88dd..23ace0f 100644

package/git/git.mk GIT_SOURCE = git-$(GIT_VERSION).tar.xz · line 12

Quoted 4 lines
package/git/git.mk +0 -1
@@ -9,11 +9,7 @@ GIT_SOURCE = git-$(GIT_VERSION).tar.xz
 GIT_SITE = https://www.kernel.org/pub/software/scm/git
 GIT_LICENSE = GPL-2.0, LGPL-2.1+
 GIT_LICENSE_FILES = COPYING LGPL-2.1
-GIT_DEPENDENCIES = zlib host-gettext

You dropped the host-gettext dependency, was that intentional?

Regards,
Arnout

Quoted 9 lines
package/git/git.mk +1 -4
-
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-GIT_DEPENDENCIES += gettext
-endif
+GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 GIT_DEPENDENCIES += openssl
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#35 lore raw

PATCH 31/100 git: use the new gettext logic

Hello,

Quoted 3 lines · Arnout Vandecappelle
Quoted 1 line

-GIT_DEPENDENCIES = zlib host-gettext

You dropped the host-gettext dependency, was that intentional?

Yes: when NLS support is disabled, host-gettext is not needed. When NLS support is enabled, host-gettext is brought in by TARGET_NLS_DEPENDENCIES in:

Quoted 1 line
Quoted 1 line

+GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#36 lore raw

PATCH 32/100 glib-networking: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/glib-networking/Config.in          | 1 -
 package/glib-networking/glib-networking.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/glib-networking/Config.in +0 -1
index 01d8552..ec29623 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_GLIB_NETWORKING
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  Network-related GIO modules for glib.
 
package/glib-networking/glib-networking.mk +1 -1
index eb75c86..10a3b70 100644
@@ -10,7 +10,7 @@ GLIB_NETWORKING_SITE = http://ftp.gnome.org/pub/gnome/sources/glib-networking/$(
 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) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	host-pkgconf \
 	host-intltool \
 	libglib2
Signature · 1 line
2.9.4
#37 lore raw

PATCH 33/100 gmpc: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/gmpc/Config.in | 1 -
 package/gmpc/gmpc.mk   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/gmpc/Config.in +0 -1
index 43bc642..1aa7425 100644
@@ -6,7 +6,6 @@ config BR2_PACKAGE_GMPC
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBMPD
 	select BR2_PACKAGE_LIBSOUP
package/gmpc/gmpc.mk +1 -1
index 7ba86a7..40b77eb 100644
@@ -13,6 +13,6 @@ GMPC_LICENSE_FILES = COPYING
 GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkgconf host-vala \
 	libglib2 libgtk2 libmpd libsoup sqlite \
 	xlib_libICE xlib_libSM xlib_libX11 \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	$(TARGET_NLS_DEPENDENCIES)
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#38 lore raw

PATCH 34/100 gnuchess: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/gnuchess/Config.in   | 1 -
 package/gnuchess/gnuchess.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/gnuchess/Config.in +0 -1
index 4993b1a..aa446f4 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_GNUCHESS
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_FLEX
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  GNU Chess lets most modern computers play a full game of chess.
 
package/gnuchess/gnuchess.mk +1 -1
index 0103367..1465ab0 100644
@@ -11,6 +11,6 @@ GNUCHESS_LICENSE_FILES = COPYING
 
 GNUCHESS_DEPENDENCIES = host-flex flex
 GNUCHESS_DEPENDENCIES += $(if $(BR2_PACKAGE_READLINE),readline) \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	$(TARGET_NLS_DEPENDENCIES)
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#39 lore raw

PATCH 35/100 grep: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/grep/grep.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
package/grep/grep.mk +1 -5
index 5101dda..a2ef422 100644
@@ -11,11 +11,7 @@ GREP_LICENSE = GPL-3.0+
 GREP_LICENSE_FILES = COPYING
 GREP_CONF_OPTS = --disable-perl-regexp \
 	$(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex)
-
-# Can use libintl if available
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-GREP_DEPENDENCIES += gettext
-endif
+GREP_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 # link with iconv if enabled
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
Signature · 1 line
2.9.4
#40 lore raw

PATCH 36/100 httping: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

---
 package/httping/Config.in  | 1 -
 package/httping/httping.mk | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)
package/httping/Config.in +0 -1
index 6564415..07ff102 100644
@@ -4,7 +4,6 @@ comment "httping needs a toolchain w/ wchar"
 config BR2_PACKAGE_HTTPING
 	bool "httping"
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  Httping is like 'ping' but for http-requests.
 	  Give it an url, and it'll show you how long it takes to connect,
package/httping/httping.mk +3 -3
index e1c686f..649c643 100644
@@ -10,10 +10,10 @@ HTTPING_SITE = http://www.vanheusden.com/httping
 HTTPING_LICENSE = GPL-2.0
 HTTPING_LICENSE_FILES = license.txt
 HTTPING_LDFLAGS = $(TARGET_LDFLAGS) \
-	$(if $(BR2_NEEDS_GETTEXT),-lintl) \
+	$(TARGET_NLS_LIBS) \
 	$(if $(BR2_PACKAGE_LIBICONV),-liconv)
-HTTPING_DEPENDENCIES = host-gettext \
-	$(if $(BR2_NEEDS_GETTEXT),gettext) \
+HTTPING_DEPENDENCIES = \
+	$(TARGET_NLS_DEPENDENCIES) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv) \
 	$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncurses) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
Signature · 1 line
2.9.4
#41 lore raw

PATCH 37/100 json-glib: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/json-glib/Config.in    | 1 -
 package/json-glib/json-glib.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/json-glib/Config.in +0 -1
index ea15295..9df03d9 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_JSON_GLIB
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  JSON-GLib is a library providing serialization and
 	  deserialization support for the JavaScript Object Notation
package/json-glib/json-glib.mk +1 -1
index db22dc9..5ee43d9 100644
@@ -13,7 +13,7 @@ JSON_GLIB_LICENSE_FILES = COPYING
 JSON_GLIB_INSTALL_STAGING = YES
 
 JSON_GLIB_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	host-pkgconf \
 	libglib2
 
Signature · 1 line
2.9.4
#42 lore raw

PATCH 38/100 kbd: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/kbd/Config.in | 1 -
 package/kbd/kbd.mk    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/kbd/Config.in +0 -1
index ab1f1b3..6cf2fc0 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_KBD
 	bool "kbd"
 	# Uses fork()
 	depends on BR2_USE_MMU
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Keytable files and keyboard utilities.
 
package/kbd/kbd.mk +1 -1
index 175a237..a4873f3 100644
@@ -11,7 +11,7 @@ KBD_CONF_OPTS = \
 	--disable-vlock \
 	--disable-tests
 KBD_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	host-pkgconf
 KBD_LICENSE = GPL-2.0+
 KBD_LICENSE_FILES = COPYING
Signature · 1 line
2.9.4
#43 lore raw

PATCH 39/100 lbreakout2: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/lbreakout2/Config.in     |  1 -
 package/lbreakout2/lbreakout2.mk | 10 +++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
package/lbreakout2/Config.in +0 -1
index 221c9e2..6788aca 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_LBREAKOUT2
 	bool "LBreakout2"
 	select BR2_PACKAGE_SDL
 	select BR2_PACKAGE_LIBPNG
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  LBreakout2 is the successor to LBreakout, a breakout-style arcade
 	  game in the manner of Arkanoid. Requires SDL, libpng, and
package/lbreakout2/lbreakout2.mk +3 -7
index 017d562..274c534 100644
@@ -10,15 +10,11 @@ LBREAKOUT2_SITE = http://downloads.sourceforge.net/lgames/lbreakout2/$(LBREAKOUT
 LBREAKOUT2_LICENSE = GPL-2.0+
 LBREAKOUT2_LICENSE_FILES = COPYING
 
-LBREAKOUT2_DEPENDENCIES = sdl libpng
+LBREAKOUT2_DEPENDENCIES = sdl libpng $(TARGET_NLS_DEPENDENCIES)
 
 LBREAKOUT2_CONF_ENV = \
-	SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config"
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-LBREAKOUT2_DEPENDENCIES += gettext
-LBREAKOUT2_CONF_ENV += LIBS=-lintl
-endif
+	SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
+	LIBS=$(TARGET_NLS_LIBS)
 
 ifeq ($(BR2_PACKAGE_LBREAKOUT2_AUDIO),y)
 LBREAKOUT2_DEPENDENCIES += sdl_mixer
Signature · 1 line
2.9.4
#44 lore raw

PATCH 40/100 libconfuse: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/libconfuse/libconfuse.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/libconfuse/libconfuse.mk +1 -4
index 5f1d5cd..07a73c8 100644
@@ -11,10 +11,7 @@ LIBCONFUSE_INSTALL_STAGING = YES
 LIBCONFUSE_CONF_OPTS = --disable-rpath
 LIBCONFUSE_LICENSE = ISC
 LIBCONFUSE_LICENSE_FILES = LICENSE
-
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-LIBCONFUSE_DEPENDENCIES += gettext
-endif
+LIBCONFUSE_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
Signature · 1 line
2.9.4
#45 lore raw

PATCH 41/100 libftdi1: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/libftdi1/libftdi1.mk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
package/libftdi1/libftdi1.mk +2 -3
index deeff39..6b84b95 100644
@@ -28,9 +28,8 @@ LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_LIBFTDI1_FDTI_EEPROM),y)
-# ftdi_eeprom optionally depends on libintl, so make sure gettext is built
-# _before_ libfitdi1 when gettext is enbaled.
-LIBFTDI1_DEPENDENCIES += libconfuse $(if $(BR2_PACKAGE_GETTEXT),gettext)
+# ftdi_eeprom optionally depends on libintl
+LIBFTDI1_DEPENDENCIES += libconfuse $(TARGET_NLS_DEPENDENCIES)
 LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=ON
 else
 LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=OFF
Signature · 1 line
2.9.4
#46 lore raw

PATCH 42/100 libglib2: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/libglib2/Config.in   | 1 -
 package/libglib2/libglib2.mk | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
package/libglib2/Config.in +0 -1
index 62e29ef..ea946ba 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_LIBGLIB2
 	depends on BR2_USE_WCHAR # gettext
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_PCRE
package/libglib2/libglib2.mk +2 -2
index 577dcec..eeceeee 100644
@@ -101,8 +101,8 @@ HOST_LIBGLIB2_CONF_OPTS = \
 	--with-pcre=system
 
 LIBGLIB2_DEPENDENCIES = \
-	host-pkgconf host-libglib2 host-gettext \
-	libffi pcre util-linux zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
+	host-pkgconf host-libglib2 \
+	libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES)
 
 HOST_LIBGLIB2_DEPENDENCIES = \
 	host-gettext \
Signature · 1 line
2.9.4
#47 lore raw

PATCH 42/100 libglib2: use the new gettext logic

Quoted 18 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/libglib2/Config.in   | 1 -
 package/libglib2/libglib2.mk | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
package/libglib2/Config.in +0 -0
index 62e29ef..ea946ba 100644

package/libglib2/Config.in config BR2_PACKAGE_LIBGLIB2 · line 3

Quoted 1 line
package/libglib2/Config.in +0 -0
@@ -3,7 +3,6 @@ config BR2_PACKAGE_LIBGLIB2
 	depends on BR2_USE_WCHAR # gettext

As mentioned IRL: to be checked if this dependency on WCHAR is still needed.

Quoted 11 lines
package/libglib2/Config.in +0 -1
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_PCRE
package/libglib2/libglib2.mk +0 -0
index 577dcec..eeceeee 100644

package/libglib2/libglib2.mk HOST_LIBGLIB2_CONF_OPTS = \ · line 108

Quoted 10 lines
package/libglib2/libglib2.mk +2 -2
@@ -101,8 +101,8 @@ HOST_LIBGLIB2_CONF_OPTS = \
 	--with-pcre=system
 
 LIBGLIB2_DEPENDENCIES = \
-	host-pkgconf host-libglib2 host-gettext \
-	libffi pcre util-linux zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
+	host-pkgconf host-libglib2 \
+	libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES)
 
 HOST_LIBGLIB2_DEPENDENCIES = \
 	host-gettext \

If the target libglib2 doesn't depend on gettext, why does the host one need it?

Both of them independent of this patch, so

Regards,
Arnout

Quoted 1 line
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#48 lore raw

PATCH 43/100 libgpg-error: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/libgpg-error/libgpg-error.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/libgpg-error/libgpg-error.mk +1 -4
index 183654b..2140258 100644
@@ -10,10 +10,7 @@ LIBGPG_ERROR_LICENSE = GPL-2.0+, LGPL-2.1+
 LIBGPG_ERROR_LICENSE_FILES = COPYING COPYING.LIB
 LIBGPG_ERROR_INSTALL_STAGING = YES
 LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config
-
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-LIBGPG_ERROR_DEPENDENCIES += gettext
-endif
+LIBGPG_ERROR_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 define LIBGPG_ERROR_FIX_CROSS_COMPILATION
 	cd $(@D)/src/syscfg && \
Signature · 1 line
2.9.4
#49 lore raw

PATCH 44/100 libidn: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/libidn/Config.in | 1 -
 package/libidn/libidn.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/libidn/Config.in +0 -1
index 7b558c7..20e0e2b 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_LIBIDN
 	bool "libidn"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Libidn's purpose is to encode and decode internationalized
 	  domain names.
package/libidn/libidn.mk +1 -1
index 18e28e0..b96e742 100644
@@ -9,7 +9,7 @@ LIBIDN_SITE = $(BR2_GNU_MIRROR)/libidn
 LIBIDN_INSTALL_STAGING = YES
 LIBIDN_CONF_ENV = EMACS="no"
 LIBIDN_CONF_OPTS = --disable-java --enable-csharp=no
-LIBIDN_DEPENDENCIES = host-pkgconf $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 LIBIDN_LICENSE = GPL-2.0+, GPL-3.0+, LGPL-3.0+
 LIBIDN_LICENSE_FILES = COPYINGv2 COPYINGv3 COPYING.LESSERv3
 
Signature · 1 line
2.9.4
#50 lore raw

PATCH 45/100 libuio: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/libuio/Config.in | 1 -
 package/libuio/libuio.mk | 9 ++-------
 2 files changed, 2 insertions(+), 8 deletions(-)
package/libuio/Config.in +0 -1
index a96df54..97be1e3 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_LIBUIO
 	bool "libuio"
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  libuio is a light-weight C programming library to handle UIO
 	  (Userspace I/O) device discovery and binding task.
package/libuio/libuio.mk +2 -7
index bdd29e3..8f72253 100644
@@ -10,6 +10,8 @@ LIBUIO_SITE = $(call github,Linutronix,libuio,$(LIBUIO_VERSION))
 LIBUIO_LICENSE = LGPL-2.1 (library), GPL-2.0 (programs)
 LIBUIO_LICENSE_FILES = COPYING
 LIBUIO_CONF_OPTS = --with-glib=no --without-werror
+LIBUIO_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
+LIBUIO_LIBS = $(TARGET_NLS_LIBS)
 LIBUIO_INSTALL_STAGING = YES
 
 # Fetched from github, no pre-generated configure script provided
@@ -24,13 +26,6 @@ LIBUIO_DEPENDENCIES += argp-standalone
 LIBUIO_LIBS += -largp
 endif
 
-# libuio pulls in libintl if needed, so ensure we also
-# link against it, otherwise static linking fails
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-LIBUIO_DEPENDENCIES += gettext
-LIBUIO_LIBS += -lintl
-endif
-
 LIBUIO_CONF_ENV += LIBS="$(LIBUIO_LIBS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#51 lore raw

PATCH 46/100 libv4l: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/libv4l/Config.in | 1 -
 package/libv4l/libv4l.mk | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
package/libv4l/Config.in +0 -1
index 638aeff..e7f78dc 100644
@@ -19,7 +19,6 @@ comment "libv4l JPEG support not enabled"
 
 config BR2_PACKAGE_LIBV4L_UTILS
 	bool "v4l-utils tools"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  v4l-utils is a collection of various video4linux and DVB utilities.
 	  Enable this if you want to build the following tools:
package/libv4l/libv4l.mk +1 -3
index b742717..5950c5a 100644
@@ -61,9 +61,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y)
 LIBV4L_CONF_OPTS += --enable-v4l-utils
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-LIBV4L_DEPENDENCIES += gettext
-endif
+LIBV4L_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
 ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy)
 LIBV4L_CONF_OPTS += --enable-qv4l2
 LIBV4L_DEPENDENCIES += qt5base
Signature · 1 line
2.9.4
#52 lore raw

PATCH 47/100 libvips: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection. We adjust the comment explaining the BR2_USE_WCHAR dependency, since gettext is no longer the reason for this dependency.

---
 package/libvips/Config.in  | 3 +--
 package/libvips/libvips.mk | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
package/libvips/Config.in +1 -2
index 87ada51..e16e527 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBVIPS
 	bool "libvips"
-	depends on BR2_USE_WCHAR # gettext, libglib2
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # fork()
 	# C++ support is required to build libvips
@@ -8,7 +8,6 @@ config BR2_PACKAGE_LIBVIPS
 	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_LIBXML2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  libvips is a 2D image processing library. Compared to
 	  similar libraries, libvips runs quickly and uses little
package/libvips/libvips.mk +1 -1
index 974a4be..8078e04 100644
@@ -41,7 +41,7 @@ LIBVIPS_CONF_OPTS = \
 LIBVIPS_INSTALL_STAGING = YES
 LIBVIPS_DEPENDENCIES = \
 	host-pkgconf libglib2 \
-	libxml2 $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	libxml2 $(TARGET_NLS_DEPENDENCIES)
 
 # --disable-cxx is broken upstream
 # https://github.com/jcupitt/libvips/issues/231
Signature · 1 line
2.9.4
#53 lore raw

PATCH 48/100 lightning: remove -lintl linking

In reply to Thomas Petazzoni

This is not needed: libbfd is now properly linked against libintl, so libintl is pulled in automatically.

---
 package/lightning/lightning.mk | 2 --
 1 file changed, 2 deletions(-)
package/lightning/lightning.mk +0 -2
index 0c2a101..2b4931b 100644
@@ -13,8 +13,6 @@ LIGHTNING_INSTALL_STAGING = YES
 ifeq ($(BR2_PACKAGE_LIGHTNING_DISASSEMBLER),y)
 LIGHTNING_DEPENDENCIES += binutils zlib
 LIGHTNING_CONF_OPTS += --enable-disassembler
-# binutils libraries are not explicitly linked against gettext
-LIGHTNING_CONF_ENV += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
 endif
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#54 lore raw

PATCH 49/100 linux-pam: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/linux-pam/Config.in    | 1 -
 package/linux-pam/linux-pam.mk | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)
package/linux-pam/Config.in +0 -1
index ab7cf55..33e5154 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_LINUX_PAM
 	depends on !BR2_STATIC_LIBS
 	depends on !BR2_TOOLCHAIN_USES_MUSL
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_FLEX
 	help
 	  A Security Framework that Provides Authentication for Applications
package/linux-pam/linux-pam.mk +3 -6
index fb2f99c..5c80e78 100644
@@ -16,15 +16,12 @@ LINUX_PAM_CONF_OPTS = \
 	--disable-regenerate-docu \
 	--enable-securedir=/lib/security \
 	--libdir=/lib
-LINUX_PAM_DEPENDENCIES = flex host-flex host-pkgconf
+LINUX_PAM_DEPENDENCIES = flex host-flex host-pkgconf \
+	$(TARGET_NLS_DEPENDENCIES)
 LINUX_PAM_AUTORECONF = YES
 LINUX_PAM_LICENSE = BSD-3-Clause
 LINUX_PAM_LICENSE_FILES = Copyright
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-LINUX_PAM_DEPENDENCIES += gettext
-LINUX_PAM_MAKE_OPTS += LIBS=-lintl
-endif
+LINUX_PAM_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)
 
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 LINUX_PAM_CONF_OPTS += --enable-selinux
Signature · 1 line
2.9.4
#55 lore raw

PATCH 50/100 linux-tools: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection. The BR2_USE_WCHAR dependency was only needed for gettext, so it is no longer needed.

---
 package/linux-tools/Config.in              | 6 ------
 package/linux-tools/linux-tool-cpupower.mk | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)
package/linux-tools/Config.in +0 -6
index db9ed9f..9d5bf7a 100644
@@ -8,18 +8,12 @@ config BR2_PACKAGE_LINUX_TOOLS
 config BR2_PACKAGE_LINUX_TOOLS_CPUPOWER
 	bool "cpupower"
 	depends on !BR2_bfin # pciutils
-	depends on BR2_USE_WCHAR || !BR2_NEEDS_GETTEXT # gettext
 	select BR2_PACKAGE_LINUX_TOOLS
 	select BR2_PACKAGE_PCIUTILS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  cpupower is a collection of tools to examine and tune power
 	  saving related features of your processor.
 
-comment "cpupower needs a toolchain w/ wchar"
-	depends on !BR2_bfin
-	depends on !BR2_USE_WCHAR && BR2_NEEDS_GETTEXT
-
 config BR2_PACKAGE_LINUX_TOOLS_GPIO
 	bool "gpio"
 	select BR2_PACKAGE_LINUX_TOOLS
package/linux-tools/linux-tool-cpupower.mk +2 -2
index 9958cff..2a2d3e0 100644
@@ -6,12 +6,12 @@
 
 LINUX_TOOLS += cpupower
 
-CPUPOWER_DEPENDENCIES = pciutils $(if $(BR2_NEEDS_GETTEXT),gettext)
+CPUPOWER_DEPENDENCIES = pciutils $(TARGET_NLS_DEPENDENCIES)
 
 CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \
 	CPUFREQ_BENCH=false \
 	NLS=false \
-	$(if $(BR2_NEEDS_GETTEXT),LDFLAGS=-lintl) \
+	LDFLAGS=$(TARGET_NLS_LIBS) \
 	DEBUG=false
 
 define CPUPOWER_BUILD_CMDS
Signature · 1 line
2.9.4
#56 lore raw

PATCH 51/100 lshw: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

- using BR2_SYSTEM_ENABLE_NLS instead of BR2_ENABLE_LOCALE to decide whether NLS support is enabled or not

---
 package/lshw/Config.in | 1 -
 package/lshw/lshw.mk   | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)
package/lshw/Config.in +0 -1
index 8cc935a..83b7ffb 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_LSHW
 	bool "lshw"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  lshw (Hardware Lister) is a small tool to provide
 	  detailed information on the hardware configuration of the machine.
package/lshw/lshw.mk +3 -3
index eb39611..43b937b 100644
@@ -10,7 +10,7 @@ LSHW_LICENSE = GPL-2.0
 LSHW_LICENSE_FILES = COPYING
 
 LSHW_CFLAGS = $(TARGET_CFLAGS)
-ifeq ($(BR2_ENABLE_LOCALE),)
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
 LSHW_CFLAGS += -DNONLS
 endif
 
@@ -18,8 +18,8 @@ LSHW_MAKE_OPTS = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \
 	RPM_OPT_FLAGS="$(LSHW_CFLAGS)" all
 LSHW_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
-	LIBS="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
-LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	LIBS=$(TARGET_NLS_LIBS)
+LSHW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 define LSHW_BUILD_CMDS
 	$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPTS)
Signature · 1 line
2.9.4
#57 lore raw

PATCH 52/100 ltris: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/ltris/Config.in | 1 -
 package/ltris/ltris.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/ltris/Config.in +0 -1
index bf73489..7d9dc04 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_LTRIS
 	bool "LTris"
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_SDL
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  LTris is a tetris clone, using SDL. It optionally requires
 	  SDL_mixer for audio support. A display with minimum 640x480
package/ltris/ltris.mk +2 -6
index 8f12ab1..fb0d4c3 100644
@@ -9,7 +9,8 @@ LTRIS_VERSION = 1.0.19
 LTRIS_LICENSE = GPL-2.0+
 LTRIS_LICENSE_FILES = COPYING
 
-LTRIS_DEPENDENCIES = sdl
+LTRIS_DEPENDENCIES = sdl $(TARGET_NLS_DEPENDENCIES)
+LTRIS_LIBS = $(TARGET_NLS_LIBS)
 
 LTRIS_CONF_ENV = \
 	SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
@@ -25,9 +26,4 @@ else
 LTRIS_CONF_OPTS += --disable-sound
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-LTRIS_DEPENDENCIES += gettext
-LTRIS_LIBS += -lintl
-endif
-
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#58 lore raw

PATCH 53/100 madplay: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/madplay/Config.in  | 1 -
 package/madplay/madplay.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/madplay/Config.in +0 -1
index d83fac6..3baeaa0 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_MADPLAY
 	bool "madplay"
 	select BR2_PACKAGE_LIBMAD
 	select BR2_PACKAGE_LIBID3TAG
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Command-line front-end to libmad, a high-quality MPEG audio decoder.
 	  It currently supports MPEG-1 and the MPEG-2 extension to lower
package/madplay/madplay.mk +1 -1
index 4ae95ab..e72e2f8 100644
@@ -9,7 +9,7 @@ MADPLAY_SITE = http://downloads.sourceforge.net/project/mad/madplay/$(MADPLAY_VE
 MADPLAY_LICENSE = GPL-2.0+
 MADPLAY_LICENSE_FILES = COPYING COPYRIGHT
 MADPLAY_LIBTOOL_PATCH = NO
-MADPLAY_DEPENDENCIES = libmad libid3tag $(if $(BR2_PACKAGE_GETTEXT),gettext)
+MADPLAY_DEPENDENCIES = libmad libid3tag $(TARGET_NLS_DEPENDENCIES)
 
 # Check if ALSA is built, then we should configure after alsa-lib so
 # ./configure can find alsa-lib.
Signature · 1 line
2.9.4
#59 lore raw

PATCH 54/100 make: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/make/Config.in | 1 -
 package/make/make.mk   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/make/Config.in +0 -1
index f576b7b..e8aa912 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_MAKE
 	bool "make"
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_GETTEXT 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.
package/make/make.mk +1 -1
index 41a7023..5717628 100644
@@ -7,7 +7,7 @@
 MAKE_VERSION = 4.2.1
 MAKE_SOURCE = make-$(MAKE_VERSION).tar.bz2
 MAKE_SITE = $(BR2_GNU_MIRROR)/make
-MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+MAKE_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 MAKE_LICENSE = GPL-3.0+
 MAKE_LICENSE_FILES = COPYING
 
Signature · 1 line
2.9.4
#60 lore raw

PATCH 55/100 mcrypt: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/mcrypt/Config.in | 1 -
 package/mcrypt/mcrypt.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/mcrypt/Config.in +0 -1
index 58567cd..ab2888b 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_MCRYPT
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_LIBMCRYPT
 	select BR2_PACKAGE_LIBMHASH
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  MCrypt is a replacement for the old crypt() package and crypt(1)
 	  command, with extensions.
package/mcrypt/mcrypt.mk +1 -1
index 03a1719..f98895f 100644
@@ -9,7 +9,7 @@ MCRYPT_SITE = http://downloads.sourceforge.net/project/mcrypt/MCrypt/$(MCRYPT_VE
 MCRYPT_DEPENDENCIES = libmcrypt libmhash \
 	$(if $(BR2_PACKAGE_ZLIB),zlib) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv) \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	$(TARGET_NLS_DEPENDENCIES)
 MCRYPT_CONF_OPTS = --with-libmcrypt-prefix=$(STAGING_DIR)/usr
 MCRYPT_LICENSE = GPL-3.0
 MCRYPT_LICENSE_FILES = COPYING
Signature · 1 line
2.9.4
#61 lore raw

PATCH 56/100 midori: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/midori/Config.in | 1 -
 package/midori/midori.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/midori/Config.in +0 -1
index 840d689..0c7f8ba 100644
@@ -19,7 +19,6 @@ config BR2_PACKAGE_MIDORI
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_SQLITE
 	select BR2_PACKAGE_WEBKITGTK
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Midori is a lightweight web browser based on WebKit
package/midori/midori.mk +1 -1
index 395e72e..1755f12 100644
@@ -22,7 +22,7 @@ MIDORI_DEPENDENCIES = \
 	libxml2 \
 	sqlite \
 	webkitgtk \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 MIDORI_CONF_OPTS = \
Signature · 1 line
2.9.4
#62 lore raw

PATCH 57/100 minidlna: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/minidlna/Config.in   | 1 -
 package/minidlna/minidlna.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/minidlna/Config.in +0 -1
index c900143..a8311af 100644
@@ -13,7 +13,6 @@ config BR2_PACKAGE_MINIDLNA
 	select BR2_PACKAGE_LIBEXIF
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_SQLITE
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  MiniDLNA (aka ReadyDLNA) is server software with the aim of being
 	  fully compliant with DLNA/UPnP-AV clients.
package/minidlna/minidlna.mk +1 -1
index 4fa5545..d0d9136 100644
@@ -10,7 +10,7 @@ MINIDLNA_LICENSE = GPL-2.0, BSD-3-Clause
 MINIDLNA_LICENSE_FILES = COPYING LICENCE.miniupnpd
 
 MINIDLNA_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-gettext \
+	$(TARGET_NLS_DEPENDENCIES) \
 	ffmpeg flac libvorbis libogg libid3tag libexif jpeg sqlite \
 	host-xutil_makedepend
 
Signature · 1 line
2.9.4
#63 lore raw

PATCH 58/100 ndisc6: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/ndisc6/Config.in | 1 -
 package/ndisc6/ndisc6.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/ndisc6/Config.in +0 -1
index 321bfbc..a397ea6 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_NDISC6
 	bool "ndisc6 tools"
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  NDisc6 is a small collection of useful tools for IPv6 networking
 
package/ndisc6/ndisc6.mk +2 -6
index 8326fc7..3ab8306 100644
@@ -7,15 +7,11 @@
 NDISC6_VERSION = 1.0.2
 NDISC6_SOURCE = ndisc6-$(NDISC6_VERSION).tar.bz2
 NDISC6_SITE = http://www.remlab.net/files/ndisc6
-NDISC6_CONF_ENV = CC="$(TARGET_CC) -std=gnu99"
+NDISC6_CONF_ENV = CC="$(TARGET_CC) -std=gnu99" LIBS=$(TARGET_NLS_LIBS)
 NDISC6_CONF_OPTS = --disable-rpath --disable-suid-install
 NDISC6_LICENSE = GPL-2.0 or GPL-3.0
 NDISC6_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-NDISC6_DEPENDENCIES += gettext
-NDISC6_CONF_ENV += LIBS="-lintl"
-endif
+NDISC8_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 NDISC6_BIN_ += dnssort # perl script
 NDISC6_BIN_$(BR2_PACKAGE_NDISC6_NAME2ADDR) += name2addr addr2name
Signature · 1 line
2.9.4
#64 lore raw

PATCH 59/100 net-tools: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

- using BR2_SYSTEM_ENABLE_NLS instead of BR2_ENABLE_LOCALE to decide if NLS support should be enabled or not

---
 package/net-tools/Config.in    | 1 -
 package/net-tools/net-tools.mk | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)
package/net-tools/Config.in +0 -1
index 3980b7e..5e24bd1 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_NET_TOOLS
 	bool "net-tools"
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  A collection of programs that form the base set of the NET-3
 	  networking distribution for the Linux operating system.
package/net-tools/net-tools.mk +3 -3
index 5720fcc..57a3eb4 100644
@@ -6,7 +6,7 @@
 
 NET_TOOLS_VERSION = 3f170bff115303e92319791cbd56371e33dcbf6d
 NET_TOOLS_SITE = git://git.code.sf.net/p/net-tools/code
-NET_TOOLS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+NET_TOOLS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 NET_TOOLS_LICENSE = GPL-2.0+
 NET_TOOLS_LICENSE_FILES = COPYING
 
@@ -20,7 +20,7 @@ define NET_TOOLS_CONFIGURE_CMDS
 endef
 
 # Enable I18N when appropiate
-ifeq ($(BR2_ENABLE_LOCALE),y)
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
 define NET_TOOLS_ENABLE_I18N
 	$(SED) 's:I18N 0:I18N 1:' $(@D)/config.h
 endef
@@ -35,7 +35,7 @@ NET_TOOLS_POST_CONFIGURE_HOOKS += NET_TOOLS_ENABLE_I18N NET_TOOLS_ENABLE_IPV6
 
 define NET_TOOLS_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) \
-		LIBS="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)" \
+		LIBS=$(TARGET_NLS_LIBS) \
 		$(MAKE) -C $(@D)
 endef
 
Signature · 1 line
2.9.4
#65 lore raw

PATCH 60/100 newt: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/newt/Config.in | 1 -
 package/newt/newt.mk   | 6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)
package/newt/Config.in +0 -1
index a221615..c59af1c 100644
@@ -5,7 +5,6 @@ config BR2_PACKAGE_NEWT
 	depends on !BR2_STATIC_LIBS # unconditionally creates .so
 	select BR2_PACKAGE_SLANG
 	select BR2_PACKAGE_POPT
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Programming library for color text mode, widget based user interfaces.
 
package/newt/newt.mk +4 -2
index 1764bbc..456dd69 100644
@@ -7,8 +7,10 @@
 NEWT_VERSION = 0.52.19
 NEWT_SITE = https://pagure.io/releases/newt
 NEWT_INSTALL_STAGING = YES
-NEWT_DEPENDENCIES = popt slang \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+NEWT_DEPENDENCIES = popt slang $(TARGET_NLS_DEPENDENCIES)
+# Force to use libintl, otherwise it finds gettext functions in the C
+# library, and does not link against libintl.
+NEWT_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
 NEWT_CONF_OPTS = --without-python --without-tcl
 NEWT_MAKE = $(MAKE1)
 NEWT_LICENSE = GPL-2.0
Signature · 1 line
2.9.4
#66 lore raw

PATCH 61/100 nftables: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/nftables/Config.in   | 1 -
 package/nftables/nftables.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/nftables/Config.in +0 -1
index d0a1b89..7c0abe0 100644
@@ -5,7 +5,6 @@ config BR2_PACKAGE_NFTABLES
 	select BR2_PACKAGE_GMP
 	select BR2_PACKAGE_LIBMNL
 	select BR2_PACKAGE_LIBNFTNL
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  nftables is the project that aims to replace the existing
 	  {ip,ip6,arp,eb}tables framework.
package/nftables/nftables.mk +1 -1
index 7263ec7..d1e6055 100644
@@ -8,7 +8,7 @@ NFTABLES_VERSION = 0.7
 NFTABLES_SOURCE = nftables-$(NFTABLES_VERSION).tar.bz2
 NFTABLES_SITE = http://www.netfilter.org/projects/nftables/files
 NFTABLES_DEPENDENCIES = gmp libmnl libnftnl host-bison host-flex \
-	host-pkgconf $(if $(BR2_NEEDS_GETTEXT),gettext)
+	host-pkgconf $(TARGET_NLS_DEPENDENCIES)
 NFTABLES_LICENSE = GPL-2.0
 NFTABLES_LICENSE_FILES = COPYING
 
Signature · 1 line
2.9.4
#67 lore raw

PATCH 62/100 pango: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/pango/Config.in | 1 -
 package/pango/pango.mk  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/pango/Config.in +0 -1
index 7813c4e..dd2117a 100644
@@ -11,7 +11,6 @@ config BR2_PACKAGE_PANGO
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_HARFBUZZ
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
 	help
 	  Pango is a library for laying out and rendering of text, with an
package/pango/pango.mk +1 -1
index 2f2d580..7556f0b 100644
@@ -17,7 +17,7 @@ PANGO_CONF_OPTS = --enable-explicit-deps=no
 HOST_PANGO_CONF_OPTS = --enable-explicit-deps=no
 
 PANGO_DEPENDENCIES = \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	host-pkgconf \
 	libglib2 \
 	cairo \
Signature · 1 line
2.9.4
#68 lore raw

PATCH 63/100 php: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection. Thanks to this, we can drop the BR2_USE_WCHAR dependency

---
 package/php/Config.ext | 5 -----
 package/php/php.mk     | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
package/php/Config.ext +0 -5
index bb6ada6..5fe3513 100644
@@ -164,14 +164,9 @@ comment "Human language and character encoding support"
 
 config BR2_PACKAGE_PHP_EXT_GETTEXT
 	bool "Gettext"
-	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  Gettext support
 
-comment "Gettext support needs a toolchain w/ wchar"
-	depends on !BR2_USE_WCHAR
-
 config BR2_PACKAGE_PHP_EXT_ICONV
 	bool "iconv"
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
package/php/php.mk +1 -1
index fe531a4..1a1ed21 100644
@@ -160,7 +160,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
 PHP_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
-PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
+PHP_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
Signature · 1 line
2.9.4
#69 lore raw

PATCH 63/100 php: use the new gettext logic

Quoted 19 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection. Thanks to this, we can drop the BR2_USE_WCHAR dependency

---
 package/php/Config.ext | 5 -----
 package/php/php.mk     | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
package/php/Config.ext +0 -0
index bb6ada6..5fe3513 100644

package/php/Config.ext comment "Human language and character encoding support" · line 168

Quoted 5 lines
package/php/Config.ext +0 -2
@@ -164,14 +164,9 @@ comment "Human language and character encoding support"
 
 config BR2_PACKAGE_PHP_EXT_GETTEXT
 	bool "Gettext"
-	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT

I was going to say "shouldn't this depend on ENABLE_NLS", but of course it does
make sense to have this extension even if you don't have full NLS. However, in that case you probably want the full-fledged gettext (otherwise there isn't much point in having this extension). So the idea is that you would have NLS just for PHP and not for all the other packages - which is a very valid use case IMO.

So, I think here we would need to keep the dependency on WCHAR and the select
of gettext.

Quoted 14 lines
package/php/Config.ext +0 -3
 	help
 	  Gettext support
 
-comment "Gettext support needs a toolchain w/ wchar"
-	depends on !BR2_USE_WCHAR
-
 config BR2_PACKAGE_PHP_EXT_ICONV
 	bool "iconv"
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
package/php/php.mk +0 -0
index fe531a4..1a1ed21 100644

package/php/php.mk endif · line 163

Quoted 5 lines
package/php/php.mk +1 -1
@@ -160,7 +160,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
 PHP_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
-PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
+PHP_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)

Since the gettext extension doesn't depend on ENABLE_NLS, you can't use
NLS_DEPENDENCIES here - otherwise you don't get the full gettext so the gettext extension is pretty useless.

Bottom line: either the extension depends on ENABLE_NLS, or you have to repeat
the BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL handling.

Regards,
Arnout

Quoted 4 lines
package/php/php.mk +0 -0
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#70 lore raw

PATCH 64/100 popt: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/popt/popt.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/popt/popt.mk +1 -4
index 3ab5388..99c5138 100644
@@ -11,10 +11,7 @@ POPT_LICENSE = MIT
 POPT_LICENSE_FILES = COPYING
 POPT_AUTORECONF = YES
 POPT_GETTEXTIZE = YES
-
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-POPT_DEPENDENCIES += gettext
-endif
+POPT_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 POPT_CONF_ENV = ac_cv_va_copy=yes
 
Signature · 1 line
2.9.4
#71 lore raw

PATCH 65/100 powertop: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/powertop/Config.in   | 1 -
 package/powertop/powertop.mk | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)
package/powertop/Config.in +0 -1
index a532302..36701f8 100644
@@ -7,7 +7,6 @@ config BR2_PACKAGE_POWERTOP
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_PCIUTILS
 	select BR2_PACKAGE_LIBNL
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  A tool to diagnose issues with power consumption and power management
 
package/powertop/powertop.mk +3 -6
index 62b716f..ce7a118 100644
@@ -7,14 +7,11 @@
 POWERTOP_VERSION = 2.9
 POWERTOP_SITE = https://01.org/sites/default/files/downloads/powertop
 POWERTOP_SOURCE = powertop-v$(POWERTOP_VERSION).tar.gz
-POWERTOP_DEPENDENCIES = pciutils ncurses libnl host-gettext host-pkgconf
+POWERTOP_DEPENDENCIES = pciutils ncurses libnl host-pkgconf \
+	$(TARGET_NLS_DEPENDENCIES)
 POWERTOP_LICENSE = GPL-2.0
 POWERTOP_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-POWERTOP_DEPENDENCIES += gettext
-POWERTOP_CONF_ENV += LIBS='-lintl'
-endif
+POWERTOP_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
 
 # Help powertop at finding the right ncurses library depending on
 # which one is available.
Signature · 1 line
2.9.4
#72 lore raw

PATCH 66/100 procps-ng: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/procps-ng/Config.in    | 1 -
 package/procps-ng/procps-ng.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/procps-ng/Config.in +0 -1
index 553bea1..6ff8983 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_PROCPS_NG
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Standard informational utilities and process-handling tools.
 	  Provides things like kill, ps, uptime, free, top, etc...
package/procps-ng/procps-ng.mk +2 -6
index 0ab3139..22ebc1a 100644
@@ -10,7 +10,8 @@ PROCPS_NG_SITE = http://downloads.sourceforge.net/project/procps-ng/Production
 PROCPS_NG_LICENSE = GPL-2.0+, LGPL-2.0+ (libproc and libps)
 PROCPS_NG_LICENSE_FILES = COPYING COPYING.LIB
 PROCPS_NG_INSTALL_STAGING = YES
-PROCPS_NG_DEPENDENCIES = ncurses host-pkgconf
+PROCPS_NG_DEPENDENCIES = ncurses host-pkgconf $(TARGET_NLS_DEPENDENCIES)
+PROCPS_NG_CONF_OPTS = LIBS=$(TARGET_NLS_LIBS)
 # For 0002-use-pkgconfig-for-ncursesw-cflags.patch
 PROCPS_NG_AUTORECONF = YES
 PROCPS_NG_GETTEXTIZE = YES
@@ -21,11 +22,6 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 PROCPS_NG_DEPENDENCIES += busybox
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-PROCPS_NG_DEPENDENCIES += gettext
-PROCPS_NG_CONF_OPTS += LIBS=-lintl
-endif
-
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 PROCPS_NG_DEPENDENCIES += systemd
 PROCPS_NG_CONF_OPTS += --with-systemd
Signature · 1 line
2.9.4
#73 lore raw

PATCH 67/100 psmisc: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/psmisc/Config.in | 1 -
 package/psmisc/psmisc.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/psmisc/Config.in +0 -1
index 2b66bcf..0d1d061 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_PSMISC
 	bool "psmisc"
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Helpful /proc related utilities such as pstree, fuser, and killall
 
package/psmisc/psmisc.mk +1 -1
index 408c047..3d9a804 100644
@@ -9,7 +9,7 @@ PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc
 PSMISC_SOURCE = psmisc-$(PSMISC_VERSION).tar.xz
 PSMISC_LICENSE = GPL-2.0
 PSMISC_LICENSE_FILES = COPYING
-PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+PSMISC_DEPENDENCIES = ncurses $(TARGET_NLS_DEPENDENCIES)
 # Patching Makefile.am
 PSMISC_AUTORECONF = YES
 
Signature · 1 line
2.9.4
#74 lore raw

PATCH 68/100 pv: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/pv/Config.in | 1 -
 package/pv/pv.mk     | 8 +-------
 2 files changed, 1 insertion(+), 8 deletions(-)
package/pv/Config.in +0 -1
index d732296..671f78e 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_PV
 	bool "pv"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Pipe Viewer - is a terminal-based tool for
 	  monitoring the progress of data through a
package/pv/pv.mk +1 -7
index 2279805..0ef5a6f 100644
@@ -9,13 +9,7 @@ PV_SOURCE = pv-$(PV_VERSION).tar.bz2
 PV_SITE = http://www.ivarch.com/programs/sources
 PV_LICENSE = Artistic-2.0
 PV_LICENSE_FILES = doc/COPYING
-
-# pv configure script is somewhat stupid: if it cannot find the host
-# gettext tool msgfmt, it concludes that gettext is not available, and
-# provides its own minimal version. Unfortunately, this minimal
-# version conflicts with the available target gettext. We fix this by
-# ensuring that host-gettext is built if gettext support is enabled;
-PV_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext host-gettext)
+PV_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 # --relax linker option is enabled by default on sparc/sparc64
 # architectures, and it can't be used together with -r option, so
Signature · 1 line
2.9.4
#75 lore raw

PATCH 69/100 python: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/python/python.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
package/python/python.mk +1 -5
index d3f7b31..8724d8c 100644
@@ -54,16 +54,12 @@ HOST_PYTHON_CONF_ENV += \
 # MAKE1 has shown to workaround the problem.
 HOST_PYTHON_MAKE = $(MAKE1)
 
-PYTHON_DEPENDENCIES = host-python libffi
+PYTHON_DEPENDENCIES = host-python libffi $(TARGET_NLS_DEPENDENCIES)
 
 HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
 
 PYTHON_INSTALL_STAGING = YES
 
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-PYTHON_DEPENDENCIES += gettext
-endif
-
 ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)
 PYTHON_DEPENDENCIES += readline
 else
Signature · 1 line
2.9.4
#76 lore raw

PATCH 70/100 quota: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/quota/Config.in | 1 -
 package/quota/quota.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/quota/Config.in +0 -1
index c8ab0d7..051a765 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_QUOTA
 	depends on BR2_USE_WCHAR
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Implementation of the disk quota system.
package/quota/quota.mk +2 -6
index d3b8755..5bd9013 100644
@@ -6,18 +6,14 @@
 
 QUOTA_VERSION = 4.01
 QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(QUOTA_VERSION)
-QUOTA_DEPENDENCIES = host-gettext
+QUOTA_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 QUOTA_AUTORECONF = YES
 QUOTA_LICENSE = GPL-2.0+
 QUOTA_CONF_OPTS = --disable-strip-binaries
+QUOTA_LIBS = $(TARGET_NLS_LIBS)
 
 QUOTA_CFLAGS = $(TARGET_CFLAGS)
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-QUOTA_DEPENDENCIES += gettext
-QUOTA_LIBS += -lintl
-endif
-
 ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
 QUOTA_DEPENDENCIES += e2fsprogs
 QUOTA_CONF_OPTS += --enable-ext2direct
Signature · 1 line
2.9.4
#77 lore raw

PATCH 71/100 rhash: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/rhash/Config.in | 1 -
 package/rhash/rhash.mk  | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)
package/rhash/Config.in +0 -1
index 46f6ca7..2ddcb00 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_RHASH
 	bool "rhash"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  LibRHash is a professional, portable, thread-safe C library
 	  for computing a wide variety of hash sums, such as CRC32,
package/rhash/rhash.mk +3 -6
index 6cfc271..53f49d8 100644
@@ -10,12 +10,9 @@ RHASH_SITE = https://sourceforge.net/projects/rhash/files/rhash/$(RHASH_VERSION)
 RHASH_LICENSE = MIT
 RHASH_LICENSE_FILES = COPYING
 RHASH_INSTALL_STAGING = YES
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-RHASH_DEPENDENCIES += gettext
-RHASH_ADDCFLAGS += -DUSE_GETTEXT
-RHASH_ADDLDFLAGS += -lintl
-endif
+RHASH_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
+RHASH_ADDLDFLAGS = $(TARGET_NLS_LIBS)
+RHASH_ADDCFLAGS = $(if $(BR2_SYSTEM_ENABLE_NLS),-DUSE_GETTEXT)
 
 ifeq ($(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yx)
 RHASH_DEPENDENCIES += openssl
Signature · 1 line
2.9.4
#78 lore raw

PATCH 71/100 rhash: use the new gettext logic

Quoted 10 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

Regards,
Arnout

Quoted 37 lines
---
 package/rhash/Config.in | 1 -
 package/rhash/rhash.mk  | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)
package/rhash/Config.in +0 -1
index 46f6ca7..2ddcb00 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_RHASH
 	bool "rhash"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  LibRHash is a professional, portable, thread-safe C library
 	  for computing a wide variety of hash sums, such as CRC32,
package/rhash/rhash.mk +3 -6
index 6cfc271..53f49d8 100644
@@ -10,12 +10,9 @@ RHASH_SITE = https://sourceforge.net/projects/rhash/files/rhash/$(RHASH_VERSION)
 RHASH_LICENSE = MIT
 RHASH_LICENSE_FILES = COPYING
 RHASH_INSTALL_STAGING = YES
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-RHASH_DEPENDENCIES += gettext
-RHASH_ADDCFLAGS += -DUSE_GETTEXT
-RHASH_ADDLDFLAGS += -lintl
-endif
+RHASH_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
+RHASH_ADDLDFLAGS = $(TARGET_NLS_LIBS)
+RHASH_ADDCFLAGS = $(if $(BR2_SYSTEM_ENABLE_NLS),-DUSE_GETTEXT)
 
 ifeq ($(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yx)
 RHASH_DEPENDENCIES += openssl
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#79 lore raw

PATCH 72/100 rpm: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- pass --with-libintl-prefix only when a separate libintl library is available

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/rpm/Config.in | 1 -
 package/rpm/rpm.mk    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
package/rpm/Config.in +0 -1
index 9b4c8a7..aa857ef 100644
@@ -12,7 +12,6 @@ config BR2_PACKAGE_RPM
 	select BR2_PACKAGE_BEECRYPT if !BR2_PACKAGE_LIBNSS
 	select BR2_PACKAGE_BERKELEYDB
 	select BR2_PACKAGE_FILE
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_ZLIB
 	help
package/rpm/rpm.mk +2 -2
index 317ec14..c81a110 100644
@@ -11,6 +11,7 @@ RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
 RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib
 RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
 RPM_LICENSE_FILES = COPYING
+RPM_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
 # 0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
 # 0002-configure-ac-correct-stack-protector-check.patch
@@ -42,8 +43,7 @@ RPM_CONF_OPTS += --with-beecrypt
 RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/beecrypt
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-RPM_DEPENDENCIES += gettext
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
 RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
 else
 RPM_CONF_OPTS += --without-libintl-prefix
Signature · 1 line
2.9.4
#80 lore raw

PATCH 72/100 rpm: use the new gettext logic

Quoted 33 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- pass --with-libintl-prefix only when a separate libintl library is available

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/rpm/Config.in | 1 -
 package/rpm/rpm.mk    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
package/rpm/Config.in +0 -1
index 9b4c8a7..aa857ef 100644
@@ -12,7 +12,6 @@ config BR2_PACKAGE_RPM
 	select BR2_PACKAGE_BEECRYPT if !BR2_PACKAGE_LIBNSS
 	select BR2_PACKAGE_BERKELEYDB
 	select BR2_PACKAGE_FILE
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_ZLIB
 	help
package/rpm/rpm.mk +0 -0
index 317ec14..c81a110 100644

package/rpm/rpm.mk RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x · line 14

Quoted 4 lines
package/rpm/rpm.mk +1 -0
@@ -11,6 +11,7 @@ RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
 RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib
 RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
 RPM_LICENSE_FILES = COPYING
+RPM_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)

+=

Quoted 5 lines
package/rpm/rpm.mk +0 -0
 # 0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
 # 0002-configure-ac-correct-stack-protector-check.patch

package/rpm/rpm.mk RPM_CONF_OPTS += --with-beecrypt · line 49

Quoted 9 lines
package/rpm/rpm.mk +1 -2
@@ -42,8 +43,7 @@ RPM_CONF_OPTS += --with-beecrypt
 RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/beecrypt
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-RPM_DEPENDENCIES += gettext
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
 RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
 else
 RPM_CONF_OPTS += --without-libintl-prefix

A bit lower you have the following comment:

# RPM, when using NLS, requires GNU gettext's _nl_msg_cat_cntr, which is not

# provided in musl.

I believe that that bit should be removed completely since now we're actually
using GNU gettext when NLS is enabled.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#81 lore raw

PATCH 73/100 rrdtool: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/rrdtool/Config.in  | 1 -
 package/rrdtool/rrdtool.mk | 6 +-----
 2 files changed, 1 insertion(+), 6 deletions(-)
package/rrdtool/Config.in +0 -1
index 3d8c0c6..631ed32 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_RRDTOOL
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  RRDtool is the OpenSource industry standard, high performance
 	  data logging and graphing system for time series data.
package/rrdtool/rrdtool.mk +1 -5
index 028b7cb..ea5c892 100644
@@ -8,7 +8,7 @@ RRDTOOL_VERSION = 1.6.0
 RRDTOOL_SITE = http://oss.oetiker.ch/rrdtool/pub
 RRDTOOL_LICENSE = GPL-2.0+ with FLOSS license exceptions as explained in COPYRIGHT
 RRDTOOL_LICENSE_FILES = COPYRIGHT LICENSE
-RRDTOOL_DEPENDENCIES = host-pkgconf libglib2
+RRDTOOL_DEPENDENCIES = host-pkgconf libglib2 $(TARGET_NLS_DEPENDENCIES)
 # autoreconf needed to avoid link failure due to missing -lintl,
 # gettextize needed as a consequence of autoreconf
 RRDTOOL_AUTORECONF = YES
@@ -25,10 +25,6 @@ RRDTOOL_CONF_OPTS = \
 	--disable-ruby \
 	--disable-tcl
 
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-RRDTOOL_DEPENDENCIES += gettext
-endif
-
 ifeq ($(BR2_PACKAGE_RRDTOOL_RRDGRAPH),y)
 RRDTOOL_DEPENDENCIES += cairo pango
 else
Signature · 1 line
2.9.4
#82 lore raw

PATCH 74/100 samba4: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/samba4/samba4.mk | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
package/samba4/samba4.mk +2 -7
index 93c45da..86546e9 100644
@@ -15,7 +15,8 @@ SAMBA4_DEPENDENCIES = \
 	e2fsprogs popt python zlib \
 	$(if $(BR2_PACKAGE_LIBAIO),libaio) \
 	$(if $(BR2_PACKAGE_LIBCAP),libcap) \
-	$(if $(BR2_PACKAGE_READLINE),readline)
+	$(if $(BR2_PACKAGE_READLINE),readline) \
+	$(TARGET_NLS_DEPENDENCIES)
 
 ifeq ($(BR2_PACKAGE_ACL),y)
 SAMBA4_CONF_OPTS += --with-acl-support
@@ -46,12 +47,6 @@ else
 SAMBA4_CONF_OPTS += --without-fam
 endif
 
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-SAMBA4_DEPENDENCIES += gettext
-else
-SAMBA4_CONF_OPTS += --without-gettext
-endif
-
 ifeq ($(BR2_PACKAGE_GNUTLS),y)
 SAMBA4_CONF_OPTS += --enable-gnutls
 SAMBA4_DEPENDENCIES += gnutls
Signature · 1 line
2.9.4
#83 lore raw

PATCH 75/100 sshfs: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/sshfs/Config.in | 1 -
 package/sshfs/sshfs.mk  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/sshfs/Config.in +0 -1
index 54aa831..54e92c6 100644
@@ -6,7 +6,6 @@ config BR2_PACKAGE_SSHFS
 	depends on !BR2_STATIC_LIBS # libfuse
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_OPENSSH
 	help
package/sshfs/sshfs.mk +1 -1
index 1288318..ee96ad6 100644
@@ -10,7 +10,7 @@ SSHFS_LICENSE = GPL-2.0
 SSHFS_LICENSE_FILES = COPYING
 SSHFS_DEPENDENCIES = \
 	libglib2 libfuse openssh \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	$(TARGET_NLS_DEPENDENCIES) \
 	$(if $(BR2_ENABLE_LOCALE),,libiconv)
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#84 lore raw

PATCH 76/100 sysstat: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/sysstat/Config.in  | 1 -
 package/sysstat/sysstat.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/sysstat/Config.in +0 -1
index 923c48a..442b787 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_SYSSTAT
 	bool "sysstat"
 	depends on BR2_USE_MMU 	# fork()
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  The sysstat utilities are a collection of performance
 	  monitoring tools for Linux. These include sar, sadf, mpstat,
package/sysstat/sysstat.mk +2 -6
index bd73214..e4ba662 100644
@@ -8,14 +8,10 @@ SYSSTAT_VERSION = 11.4.4
 SYSSTAT_SOURCE = sysstat-$(SYSSTAT_VERSION).tar.xz
 SYSSTAT_SITE = http://pagesperso-orange.fr/sebastien.godard
 SYSSTAT_CONF_OPTS = --disable-file-attr --disable-sensors
-SYSSTAT_DEPENDENCIES = host-gettext
+SYSSTAT_DEPENDENCIES = host-gettext $(TARGET_NLS_DEPENDENCIES)
 SYSSTAT_LICENSE = GPL-2.0+
 SYSSTAT_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-SYSSTAT_DEPENDENCIES += gettext
-SYSSTAT_MAKE_OPTS += LFLAGS="$(TARGET_LDFLAGS) -lintl"
-endif
+SYSSTAT_MAKE_OPTS += LFLAGS="$(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)"
 
 # The isag tool is a post processing script that depends on tcl/tk
 # among other things. So we don't install it.
Signature · 1 line
2.9.4
#85 lore raw

PATCH 77/100 tpm-tools: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/tpm-tools/Config.in    | 1 -
 package/tpm-tools/tpm-tools.mk | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
package/tpm-tools/Config.in +0 -1
index 091f424..e115687 100644
@@ -5,7 +5,6 @@ config BR2_PACKAGE_TPM_TOOLS
 	depends on !BR2_arc # trousers
 	select BR2_PACKAGE_TROUSERS
 	select BR2_PACKAGE_OPENSSL
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Tools to manage and diagnose a TPM
 
package/tpm-tools/tpm-tools.mk +1 -2
index c90edbb..4dbf50a 100644
@@ -9,8 +9,7 @@ TPM_TOOLS_SITE = http://downloads.sourceforge.net/project/trousers/tpm-tools/$(T
 TPM_TOOLS_STRIP_COMPONENTS = 2
 TPM_TOOLS_LICENSE = Common Public License Version 1.0
 TPM_TOOLS_LICENSE_FILES = LICENSE
-TPM_TOOLS_DEPENDENCIES = trousers openssl \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+TPM_TOOLS_DEPENDENCIES = trousers openssl $(TARGET_NLS_DEPENDENCIES)
 # configure.in and lib/Makefile.am is patched
 TPM_TOOLS_AUTORECONF = YES
 TPM_TOOLS_GETTEXTIZE = YES
Signature · 1 line
2.9.4
#86 lore raw

PATCH 78/100 ushare: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

- using BR2_SYSTEM_ENABLE_NLS instead of BR2_ENABLE_LOCALE to decide if NLS support should be enabled or not

---
 package/ushare/Config.in |  1 -
 package/ushare/ushare.mk | 10 +++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
package/ushare/Config.in +0 -1
index 70bf24a..c3475b8 100644
@@ -6,7 +6,6 @@ config BR2_PACKAGE_USHARE
 	# linking.
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LIBUPNP
-	select BR2_PACKAGE_GETTEXT 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
package/ushare/ushare.mk +3 -7
index 32aa445..bb194f6 100644
@@ -7,9 +7,10 @@
 USHARE_VERSION = 1.1a
 USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2
 USHARE_SITE = http://ushare.geexbox.org/releases
-USHARE_DEPENDENCIES = host-pkgconf libupnp
+USHARE_DEPENDENCIES = host-pkgconf libupnp $(TARGET_NLS_DEPENDENCIES)
 USHARE_LICENSE = GPL-2.0+
 USHARE_LICENSE_FILES = COPYING
+USHARE_LDFLAGS = $(TARGET_NLS_LIBS)
 
 USHARE_CONF_OPTS = \
 	--prefix=/usr \
@@ -18,12 +19,7 @@ USHARE_CONF_OPTS = \
 	--sysconfdir=/etc \
 	--disable-strip
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-USHARE_DEPENDENCIES += gettext
-USHARE_LDFLAGS += -lintl
-endif
-
-ifeq ($(BR2_ENABLE_LOCALE),)
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
 USHARE_CONF_OPTS += --disable-nls
 endif
 
Signature · 1 line
2.9.4
#87 lore raw

PATCH 79/100 util-linux: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/util-linux/Config.in     | 1 -
 package/util-linux/util-linux.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/util-linux/Config.in +0 -1
index 6ba239e..cba590c 100644
@@ -1,6 +1,5 @@
 menuconfig BR2_PACKAGE_UTIL_LINUX
 	bool "util-linux"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Various useful/essential linux libraries and utilities.
 
package/util-linux/util-linux.mk +2 -6
index d55ee7c..61e3e63 100644
@@ -17,7 +17,7 @@ UTIL_LINUX_AUTORECONF = YES
 UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid)
 UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3
 UTIL_LINUX_INSTALL_STAGING = YES
-UTIL_LINUX_DEPENDENCIES = host-pkgconf
+UTIL_LINUX_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
 # uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support
 # (used in logger.c), and the common default is N.
 UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
@@ -25,6 +25,7 @@ UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
 UTIL_LINUX_CONF_OPTS += \
 	--disable-rpath \
 	--disable-makeinstall-chown
+UTIL_LINUX_LIBS = $(TARGET_NLS_LIBS)
 
 # system depends on util-linux so we enable systemd support
 # (which needs systemd to be installed)
@@ -62,11 +63,6 @@ endif
 UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
 endif
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-UTIL_LINUX_DEPENDENCIES += gettext
-UTIL_LINUX_LIBS += -lintl
-endif
-
 ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
 UTIL_LINUX_DEPENDENCIES += libcap-ng
 endif
Signature · 1 line
2.9.4
#88 lore raw

PATCH 79/100 util-linux: use the new gettext logic

Quoted 71 lines

From: "Thomas Petazzoni" <[email protected]>
To: "Buildroot List" <[email protected]>
Cc: "Thomas Petazzoni" <[email protected]>
Sent: Tuesday, July 4, 2017 11:48:59 AM
Subject: [Buildroot] [PATCH 079/100] util-linux: use the new gettext logic

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
package/util-linux/Config.in | 1 -
package/util-linux/util-linux.mk | 8 ++------

2 files changed, 2 insertions(+), 7 deletions(-)
package/util-linux/Config.in +0 -0
index 6ba239e..cba590c 100644
@@ -1,6 +1,5 @@

menuconfig BR2_PACKAGE_UTIL_LINUX
bool "util-linux"

package/util-linux/Config.in +0 -1
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE

help
Various useful/essential linux libraries and utilities.

package/util-linux/util-linux.mk +0 -0
index d55ee7c..61e3e63 100644
@@ -17,7 +17,7 @@ UTIL_LINUX_AUTORECONF = YES
 UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk,
 libmount), BSD-3-Clause (libuuid)

UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3
UTIL_LINUX_INSTALL_STAGING = YES

package/util-linux/util-linux.mk +1 -1
-UTIL_LINUX_DEPENDENCIES = host-pkgconf
+UTIL_LINUX_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)

# uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support # (used in logger.c), and the common default is N. UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \

package/util-linux/util-linux.mk +1 -0
@@ -25,6 +25,7 @@ UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
 UTIL_LINUX_CONF_OPTS += \
 	--disable-rpath \
 	--disable-makeinstall-chown
+UTIL_LINUX_LIBS = $(TARGET_NLS_LIBS)
 
 # system depends on util-linux so we enable systemd support
 # (which needs systemd to be installed)
@@ -62,11 +63,6 @@ endif

UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses endif

package/util-linux/util-linux.mk +0 -5
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-UTIL_LINUX_DEPENDENCIES += gettext
-UTIL_LINUX_LIBS += -lintl
-endif
-

ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
UTIL_LINUX_DEPENDENCIES += libcap-ng
endif
--
2.9.4

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#89 lore raw

PATCH 80/100 vdr: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/vdr/Config.in | 1 -
 package/vdr/vdr.mk    | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)
package/vdr/Config.in +0 -1
index d32c642..65117f5 100644
@@ -7,7 +7,6 @@ config BR2_PACKAGE_VDR
 	depends on !BR2_TOOLCHAIN_USES_MUSL # _nl_msg_cat_cntr
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_JPEG
package/vdr/vdr.mk +3 -6
index 6c46566..242c579 100644
@@ -14,7 +14,8 @@ VDR_DEPENDENCIES = \
 	freetype \
 	fontconfig \
 	jpeg \
-	libcap
+	libcap \
+	$(TARGET_NLS_DEPENDENCIES)
 
 VDR_INCLUDE_DIRS = -I$(STAGING_DIR)/usr/include/freetype2
 VDR_MAKE_FLAGS = \
@@ -22,11 +23,7 @@ VDR_MAKE_FLAGS = \
 	PLUGINLIBDIR=/usr/lib/vdr \
 	PREFIX=/usr \
 	VIDEODIR=/var/lib/vdr
-
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-VDR_DEPENDENCIES += gettext
-VDR_LDFLAGS += -lintl
-endif
+VDR_LDFLAGS = $(TARGET_NLS_LIBS)
 
 ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y)
 VDR_DEPENDENCIES += libfribidi
Signature · 1 line
2.9.4
#90 lore raw

PATCH 81/100 vim: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/vim/Config.in | 1 -
 package/vim/vim.mk    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/vim/Config.in +0 -1
index b851627..1469be8 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_VIM
 	depends on BR2_USE_WCHAR
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  VIM Text editor
 
package/vim/vim.mk +1 -1
index ec49460..c235a08 100644
@@ -8,7 +8,7 @@ VIM_VERSION = v8.0.0329
 VIM_SITE = $(call github,vim,vim,$(VIM_VERSION))
 # Win over busybox vi since vim is more feature-rich
 VIM_DEPENDENCIES = \
-	ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
+	ncurses $(TARGET_NLS_DEPENDENCIES) \
 	$(if $(BR2_PACKAGE_BUSYBOX),busybox)
 VIM_SUBDIR = src
 VIM_CONF_ENV = \
Signature · 1 line
2.9.4
#91 lore raw

PATCH 82/100 whois: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/whois/Config.in | 1 -
 package/whois/whois.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/whois/Config.in +0 -1
index 0fbaf90..8e62ddf 100644
@@ -2,7 +2,6 @@ config BR2_PACKAGE_WHOIS
 	bool "whois"
 	depends on BR2_USE_WCHAR # gettext
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  Improved whois client.
 
package/whois/whois.mk +2 -6
index 24b6b69..b773499 100644
@@ -8,17 +8,13 @@ WHOIS_VERSION = 5.2.14
 WHOIS_SITE = http://snapshot.debian.org/archive/debian/20161230T032015Z/pool/main/w/whois
 WHOIS_SOURCE = whois_$(WHOIS_VERSION).tar.xz
 # take precedence over busybox implementation
-WHOIS_DEPENDENCIES = host-gettext $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+WHOIS_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) $(TARGET_NLS_DEPENDENCIES)
 WHOIS_MAKE_ENV = $(TARGET_MAKE_ENV)
 WHOIS_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
 	LIBS="$(WHOIS_EXTRA_LIBS)"
 WHOIS_LICENSE = GPL-2.0+
 WHOIS_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-WHOIS_DEPENDENCIES += gettext
-WHOIS_EXTRA_LIBS += -lintl
-endif
+WHOIS_EXTRA_LIBS = $(TARGET_NLS_LIBS)
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 WHOIS_DEPENDENCIES += libiconv
Signature · 1 line
2.9.4
#92 lore raw

PATCH 82/100 whois: use the new gettext logic

Quoted 20 lines · Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- using TARGET_NLS_LIBS to force linking against libintl

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/whois/Config.in | 1 -
 package/whois/whois.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
package/whois/Config.in +0 -0
index 0fbaf90..8e62ddf 100644

package/whois/Config.in config BR2_PACKAGE_WHOIS · line 3

Quoted 2 lines
package/whois/Config.in +0 -0
@@ -2,7 +2,6 @@ config BR2_PACKAGE_WHOIS
 	bool "whois"
 	depends on BR2_USE_WCHAR # gettext

Should be checked if this is still needed.

Regards,
Arnout

Quoted 30 lines
package/whois/Config.in +0 -1
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  Improved whois client.
 
package/whois/whois.mk +2 -6
index 24b6b69..b773499 100644
@@ -8,17 +8,13 @@ WHOIS_VERSION = 5.2.14
 WHOIS_SITE = http://snapshot.debian.org/archive/debian/20161230T032015Z/pool/main/w/whois
 WHOIS_SOURCE = whois_$(WHOIS_VERSION).tar.xz
 # take precedence over busybox implementation
-WHOIS_DEPENDENCIES = host-gettext $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+WHOIS_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) $(TARGET_NLS_DEPENDENCIES)
 WHOIS_MAKE_ENV = $(TARGET_MAKE_ENV)
 WHOIS_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
 	LIBS="$(WHOIS_EXTRA_LIBS)"
 WHOIS_LICENSE = GPL-2.0+
 WHOIS_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-WHOIS_DEPENDENCIES += gettext
-WHOIS_EXTRA_LIBS += -lintl
-endif
+WHOIS_EXTRA_LIBS = $(TARGET_NLS_LIBS)
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 WHOIS_DEPENDENCIES += libiconv
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#93 lore raw

PATCH 83/100 xlib_libXpm: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext.

---
 package/x11r7/xlib_libXpm/xlib_libXpm.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
package/x11r7/xlib_libXpm/xlib_libXpm.mk +1 -2
index c8c5496..e781a8b 100644
@@ -13,8 +13,7 @@ XLIB_LIBXPM_INSTALL_STAGING = YES
 # we patch configure.ac
 XLIB_LIBXPM_AUTORECONF = YES
 XLIB_LIBXPM_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xproto_xproto \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext) \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv) \
-	host-gettext
+	$(TARGET_NLS_DEPENDENCIES)
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#94 lore raw

PATCH 84/100 xscreensaver: use the new gettext logic

In reply to Thomas Petazzoni

This commit switches to use the new gettext logic, which involves:

- using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext

- dropping BR2_PACKAGE_GETTEXT selection

---
 package/xscreensaver/Config.in       | 1 -
 package/xscreensaver/xscreensaver.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
package/xscreensaver/Config.in +0 -1
index 5213ce3..032eab2 100644
@@ -11,7 +11,6 @@ config BR2_PACKAGE_XSCREENSAVER
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XLIB_LIBXT
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  XScreenSaver is the standard screen saver collection shipped on most
 	  Linux and Unix systems running the X11 Window System.
package/xscreensaver/xscreensaver.mk +1 -1
index 77c37a9..34b1163 100644
@@ -12,7 +12,7 @@ XSCREENSAVER_LICENSE = MIT-like, GPL-2.0+
 XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h
 
 XSCREENSAVER_DEPENDENCIES = jpeg libglade libgtk2 xlib_libX11 xlib_libXt \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext) host-intltool
+	$(TARGET_NLS_DEPENDENCIES) host-intltool
 
 # otherwise we end up with host include/library dirs passed to the
 # compiler/linker
Signature · 1 line
2.9.4
#95 lore raw

PATCH 85/100 e2fsprogs: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code in e2fsprogs that was handling this.

---
 package/e2fsprogs/e2fsprogs.mk | 6 ------
 1 file changed, 6 deletions(-)
package/e2fsprogs/e2fsprogs.mk +0 -6
index 84af7ab..75e9213 100644
@@ -77,12 +77,6 @@ HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_header_magic_h=no \
 	ac_cv_lib_magic_magic_file=no
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_STATIC_LIBS),yy)
-# util-linux libuuid pulls in libintl if needed, so ensure we also
-# link against it, otherwise static linking fails
-E2FSPROGS_CONF_ENV += LIBS=-lintl
-endif
-
 E2FSPROGS_MAKE_OPTS = LDCONFIG=true
 
 E2FSPROGS_INSTALL_STAGING_OPTS = \
Signature · 1 line
2.9.4
#96 lore raw

PATCH 85/100 e2fsprogs: remove libintl static linking handling

Quoted 5 lines · Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code in e2fsprogs that was handling this.

Regards,
Arnout

Quoted 22 lines
---
 package/e2fsprogs/e2fsprogs.mk | 6 ------
 1 file changed, 6 deletions(-)
package/e2fsprogs/e2fsprogs.mk +0 -6
index 84af7ab..75e9213 100644
@@ -77,12 +77,6 @@ HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_header_magic_h=no \
 	ac_cv_lib_magic_magic_file=no
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_STATIC_LIBS),yy)
-# util-linux libuuid pulls in libintl if needed, so ensure we also
-# link against it, otherwise static linking fails
-E2FSPROGS_CONF_ENV += LIBS=-lintl
-endif
-
 E2FSPROGS_MAKE_OPTS = LDCONFIG=true
 
 E2FSPROGS_INSTALL_STAGING_OPTS = \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#97 lore raw

PATCH 86/100 gnuchess: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the patch that was handling this.

---
 .../0001-fix-static-build-with-uClibc.patch        | 47 ----------------------
 1 file changed, 47 deletions(-)
 delete mode 100644 package/gnuchess/0001-fix-static-build-with-uClibc.patch
package/gnuchess/0001-fix-static-build-with-uClibc.patch deleted +0 -47
deleted file mode 100644
index 20a0835..0000000
@@ -1,47 +0,0 @@
-From 5bb2bc6384024c2344ef5cc6785131b382c38170 Mon Sep 17 00:00:00 2001
-From: Romain Naour <[email protected]>
-Date: Sun, 10 May 2015 22:19:03 +0200
-Subject: [PATCH] fix static build with uClibc
-
-uClibc doesn't provide lintl which should be provided
-by gettext. If gnuchess is linked statically, -lintl should
-be placed after libfrontend.a libadapter.a libengine.a.
-
-Fixes:
-http://autobuild.buildroot.net/results/dcb/dcb1c0eb7212bd8d1e0d8b51fd517b73b7569cea/
-
-Signed-off-by: Romain Naour <[email protected]>
----
- src/Makefile.am | 2 +-
- src/Makefile.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index ba90bce..fc02543 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -34,7 +34,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
- DISTCLEANFILES = *~
- 
- SUBDIRS = frontend adapter engine
--gnuchess_LDADD = $(LIBINTL) frontend/libfrontend.a adapter/libadapter.a engine/libengine.a
-+gnuchess_LDADD = frontend/libfrontend.a adapter/libadapter.a engine/libengine.a $(LIBINTL)
- 
- configmake.h: Makefile
- 	rm -f $@-t $@
-diff --git a/src/Makefile.in b/src/Makefile.in
-index 9460bfd..424da52 100644
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -395,7 +395,7 @@ AM_LDFLAGS = $(PTHREAD_LDFLAGS) $(PTHREAD_LIBS)
- AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
- DISTCLEANFILES = *~
- SUBDIRS = frontend adapter engine
--gnuchess_LDADD = $(LIBINTL) frontend/libfrontend.a adapter/libadapter.a engine/libengine.a
-+gnuchess_LDADD = frontend/libfrontend.a adapter/libadapter.a engine/libengine.a $(LIBINTL)
- BUILT_SOURCES = configmake.h
- CLEANFILES = configmake.h configmake.h-t
- all: $(BUILT_SOURCES) config.h
--- 
-1.9.3
-
Signature · 1 line
2.9.4
#98 lore raw

PATCH 87/100 gptfdisk: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code that was handling this.

---
 package/gptfdisk/gptfdisk.mk | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
package/gptfdisk/gptfdisk.mk +2 -7
index 9c94421..c5826df 100644
@@ -22,13 +22,8 @@ GPTFDISK_DEPENDENCIES += ncurses
 endif
 
 ifeq ($(BR2_STATIC_LIBS),y)
-# gptfdisk dependencies may link against libintl/libiconv, so we need
-# to do so as well when linking statically
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-GPTFDISK_DEPENDENCIES += gettext
-GPTFDISK_LDLIBS += -lintl
-endif
-
+# gptfdisk dependencies may link against libiconv, so we need to do so
+# as well when linking statically
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 GPTFDISK_DEPENDENCIES += libiconv
 GPTFDISK_LDLIBS += -liconv
Signature · 1 line
2.9.4
#99 lore raw

PATCH 88/100 iputils: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code that was handling this.

---
 package/iputils/iputils.mk | 7 -------
 1 file changed, 7 deletions(-)
package/iputils/iputils.mk +0 -7
index 57dc660..b20cd12 100644
@@ -36,13 +36,6 @@ endif
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 IPUTILS_MAKE_OPTS += USE_GCRYPT=yes
 IPUTILS_DEPENDENCIES += libgcrypt
-# When gettext is enabled (BR2_PACKAGE_GETTEXT=y), and provides libintl
-# (BR2_NEEDS_GETTEXT=y), libgpg-error will link with libintl, and libgpg-error
-# is pulled in by libgcrypt. Since iputils doesn't use libtool, we have to link
-# with libintl explicitly for static linking.
-ifeq ($(BR2_STATIC_LIBS)$(BR2_NEEDS_GETTEXT)$(BR2_PACKAGE_GETTEXT),yyy)
-IPUTILS_MAKE_OPTS += ADDLIB='-lintl'
-endif
 else
 IPUTILS_MAKE_OPTS += USE_GCRYPT=no
 endif
Signature · 1 line
2.9.4
#100 lore raw

PATCH 89/100 net-tools: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Patch 0001-Makefile-fix-static-linking-issue-with-lintl.patch was added to allow passing -lintl through LIBS, in a place that works for static linking.

However, for dynamic linking, we can simply pass -lintl through the existing LDFLAGS variable, as it was done prior to commit 38bfd129c64a9cfd82c4fa4c797afadf12a6ffaa ("package/net-tools: fix static linking issue with lintl").

This commit does that and gets rid of the now useless patch.

---
 ...efile-fix-static-linking-issue-with-lintl.patch | 79 ----------------------
 ...1-iptunnel.c-do-not-include-netinet-ip.h.patch} |  0
 package/net-tools/net-tools.mk                     |  2 +-
 3 files changed, 1 insertion(+), 80 deletions(-)
 delete mode 100644 package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch
 rename package/net-tools/{0002-iptunnel.c-do-not-include-netinet-ip.h.patch => 0001-iptunnel.c-do-not-include-netinet-ip.h.patch} (100%)
package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch deleted +0 -79
deleted file mode 100644
index a2d674e..0000000
@@ -1,79 +0,0 @@
-From a2076079a409141704701ec17a205d89e5b24052 Mon Sep 17 00:00:00 2001
-From: Romain Naour <[email protected]>
-Date: Sat, 28 May 2016 20:45:02 +0200
-Subject: [PATCH] Makefile: fix static linking issue with lintl
-
-When net-tools are build with uClibc-ng and statically linked,
-some tools like hostname and route needs to link with -lintl.
-
-Adding -lintl in LDFLAGS place the library before object files:
-arm-linux-gcc -O2 -g -Wall -fno-strict-aliasing   -static -lintl -Llib -o hostname hostname.o
-
-Add $(LIBS) after object files in the Makefile to place -lintl correctly.
-
-Fixes:
-http://autobuild.buildroot.net/results/134/1345b6d366125320b89512e7ce7f142f1a03acf8
-
-Ref:
-http://lists.busybox.net/pipermail/buildroot/2016-May/162216.html
-
-Signed-off-by: Romain Naour <[email protected]>
----
- Makefile | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 171123d..a2baf79 100644
---- a/Makefile
-+++ b/Makefile
-@@ -158,37 +158,37 @@ subdirs:	libdir
- 		@for i in $(SUBDIRS:$(NET_LIB_PATH)/=); do $(MAKE) -C $$i || exit $$? ; done
- 
- ifconfig:	$(NET_LIB) ifconfig.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(LIBS) $(NLIB)
- 
- nameif:		$(NET_LIB) nameif.o
- 		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB)
- 
- hostname:	hostname.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(LIBS) $(DNLIB)
- 
- route:		$(NET_LIB) route.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(LIBS) $(NLIB)
- 
- arp:		$(NET_LIB) arp.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(LIBS) $(NLIB)
- 
- rarp:		$(NET_LIB) rarp.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(LIBS) $(NLIB)
- 
- slattach:	$(NET_LIB) slattach.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(LIBS) $(NLIB)
- 
- plipconfig:	$(NET_LIB) plipconfig.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(LIBS) $(NLIB)
- 
- netstat:	$(NET_LIB) netstat.o statistics.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(NLIB) $(SELIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(LIBS) $(NLIB) $(SELIB)
- 
- iptunnel:	$(NET_LIB) iptunnel.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(LIBS) $(NLIB)
- 
- ipmaddr:	$(NET_LIB) ipmaddr.o
--		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(NLIB)
-+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(LIBS) $(NLIB)
- 
- mii-tool:	$(NET_LIB) mii-tool.o
- 		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB)
--- 
-2.5.5
-
package/net-tools/0001-iptunnel.c-do-not-include-netinet-ip.h.patch renamed from package/net-tools/0002-iptunnel.c-do-not-include-netinet-ip.h.patch +0 -0
similarity index 100%
rename from package/net-tools/0002-iptunnel.c-do-not-include-netinet-ip.h.patch
rename to package/net-tools/0001-iptunnel.c-do-not-include-netinet-ip.h.patch
package/net-tools/net-tools.mk +1 -1
index 57a3eb4..bc87290 100644
@@ -35,7 +35,7 @@ NET_TOOLS_POST_CONFIGURE_HOOKS += NET_TOOLS_ENABLE_I18N NET_TOOLS_ENABLE_IPV6
 
 define NET_TOOLS_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) \
-		LIBS=$(TARGET_NLS_LIBS) \
+		LDFLAGS="$(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)" \
 		$(MAKE) -C $(@D)
 endef
 
Signature · 1 line
2.9.4
#101 lore raw

PATCH 90/100 oprofile: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code that was handling this.

---
 package/oprofile/oprofile.mk | 6 ------
 1 file changed, 6 deletions(-)
package/oprofile/oprofile.mk +0 -6
index d86b8c5..4e0278e 100644
@@ -41,12 +41,6 @@ ifeq ($(BR2_PACKAGE_LIBPFM4),y)
 OPROFILE_DEPENDENCIES += libpfm4
 endif
 
-# When gettext is enabled, popt links with -lintl, specifies it in its
-# popt.pc and has done so for the past 6+ years. But oprofile does not
-# use pkconfig to find popt, so misses -lintl, which is important for
-# a static build. We have to do the call to pkgconfig manually...
-OPROFILE_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs popt`"
-
 ifeq ($(BR2_STATIC_LIBS),)
 define OPROFILE_INSTALL_SHARED_LIBRARY
 	$(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile
Signature · 1 line
2.9.4
#102 lore raw

PATCH 91/100 parted: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the patch that was handling this.

---
 ...musl.patch => 0003-fix-includes-for-musl.patch} |  0
 package/parted/0003-fix-static-link-uuid.patch     | 48 ----------------------
 2 files changed, 48 deletions(-)
 rename package/parted/{0004-fix-includes-for-musl.patch => 0003-fix-includes-for-musl.patch} (100%)
 delete mode 100644 package/parted/0003-fix-static-link-uuid.patch
package/parted/0003-fix-includes-for-musl.patch renamed from package/parted/0004-fix-includes-for-musl.patch +0 -0
similarity index 100%
rename from package/parted/0004-fix-includes-for-musl.patch
rename to package/parted/0003-fix-includes-for-musl.patch
package/parted/0003-fix-static-link-uuid.patch deleted +0 -48

48 lines not on this page · raw message

Signature · 1 line
2.9.4
#103 lore raw

PATCH 92/100 perl: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the patch that was handling this.

---
 .../0001-fix-static-build-with-gdbm-gettext.patch    | 20 --------------------
 1 file changed, 20 deletions(-)
 delete mode 100644 package/perl/0001-fix-static-build-with-gdbm-gettext.patch
package/perl/0001-fix-static-build-with-gdbm-gettext.patch deleted +0 -20
deleted file mode 100644
index ca6bf01..0000000
@@ -1,20 +0,0 @@
-fix static build with gdbm + gettext
-
-see doc http://perldoc.perl.org/ExtUtils/MakeMaker.html#LIBS
-
-Signed-off-by: Francois Perrad <[email protected]>
-
-index: b/ext/GDBM_File/Makefile.PL
-===================================================================
---- a/ext/GDBM_File/Makefile.PL
-+++ b/ext/GDBM_File/Makefile.PL
-@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
- use ExtUtils::Constant 0.11 'WriteConstants';
- WriteMakefile(
-     NAME => 'GDBM_File',
--    LIBS => ["-lgdbm", "-ldbm"],
-+    LIBS => ["-lgdbm -lintl", "-lgdbm", "-ldbm"],
-     XSPROTOARG => '-noprototypes', 		# XXX remove later?
-     VERSION_FROM => 'GDBM_File.pm',
-     realclean => {FILES=> 'const-c.inc const-xs.inc'},
-
Signature · 1 line
2.9.4
#104 lore raw

PATCH 93/100 popt: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the patch that was handling this.

---
 ...-the-libintl-library-to-the-Libs.private-.patch | 47 ----------------------
 1 file changed, 47 deletions(-)
 delete mode 100644 package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch
package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch deleted +0 -47
deleted file mode 100644
index 9b0b07e..0000000
@@ -1,47 +0,0 @@
-From 470755ccc353b59107c957972d908cbde4942c8d Mon Sep 17 00:00:00 2001
-From: Fabio Porcedda <[email protected]>
-Date: Sun, 1 Mar 2015 21:13:48 +0100
-Subject: [PATCH] popt.pc: add the libintl library to the Libs.private field
-
-If static linking and libintl is used, the program that uses the popt
-library needs to link to the libintl library too so add the libintl
-library to the libs.private field because is useful for programs that call
-  pkg-config --static --libs popt
-they get the libintl library too:
-  -L<...> -lpopt -lintl
-
-This patch was already sent upstream:
-http://rpm5.org/community/popt-devel/0294.html
-
-Signed-off-by: Fabio Porcedda <[email protected]>
----
- configure.ac | 1 +
- popt.pc.in   | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index e8eb238..816d272 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -90,6 +90,7 @@ popt_sysconfdir="${sysconfdir}"
- eval "popt_sysconfdir=\"${popt_sysconfdir}\"" # expand contained ${prefix}
- AC_DEFINE_UNQUOTED([POPT_SYSCONFDIR], ["$popt_sysconfdir"], [Full path to default POPT configuration directory])
- 
-+AC_SUBST([POPT_PKGCONFIG_LIBS_PRIVATE],"$LIBINTL")
- 
- # Define a (hope) portable Libs pkgconfig directive that 
- # - Don't harm if the default library search path include ${libdir}
-diff --git a/popt.pc.in b/popt.pc.in
-index a86437c..0acfdb9 100644
---- a/popt.pc.in
-+++ b/popt.pc.in
-@@ -6,5 +6,6 @@ includedir=@includedir@
- Name: popt
- Version: @VERSION@
- Description: popt library.
-+Libs.private: @POPT_PKGCONFIG_LIBS_PRIVATE@
- Libs: @POPT_PKGCONFIG_LIBS@
- Cflags: -I${includedir}
--- 
-2.3.1
-
Signature · 1 line
2.9.4
#105 lore raw

PATCH 94/100 qt: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the patch that was handling this.

---
 ...form-socklen_t-on-other-C-libraries-than.patch} |   0
 ...-inclusion-order-when-building-statically.patch | 105 ---------------------
 ...ith-ldl-option-only-when-it-is-supported.patch} |   0
 ...12-OpenGL-EGL-Avoid-X11-header-collision.patch} |   0
 4 files changed, 105 deletions(-)
 rename package/qt/{0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch => 0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch} (100%)
 delete mode 100644 package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch
 rename package/qt/{0012-Link-with-ldl-option-only-when-it-is-supported.patch => 0011-Link-with-ldl-option-only-when-it-is-supported.patch} (100%)
 rename package/qt/{0013-OpenGL-EGL-Avoid-X11-header-collision.patch => 0012-OpenGL-EGL-Avoid-X11-header-collision.patch} (100%)
package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch renamed from package/qt/0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch +0 -0
similarity index 100%
rename from package/qt/0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
rename to package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch deleted +0 -105

105 lines not on this page · raw message

package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch renamed from package/qt/0012-Link-with-ldl-option-only-when-it-is-supported.patch +0 -0
similarity index 100%
rename from package/qt/0012-Link-with-ldl-option-only-when-it-is-supported.patch
rename to package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch
package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch renamed from package/qt/0013-OpenGL-EGL-Avoid-X11-header-collision.patch +0 -0
similarity index 100%
rename from package/qt/0013-OpenGL-EGL-Avoid-X11-header-collision.patch
rename to package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch
Signature · 1 line
2.9.4
#106 lore raw

PATCH 95/100 util-linux: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code that was handling this.

---
 package/util-linux/util-linux.mk | 8 --------
 1 file changed, 8 deletions(-)
package/util-linux/util-linux.mk +0 -8
index 61e3e63..4c2b1f6 100644
@@ -223,13 +223,5 @@ endif
 
 UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_UTIL_LINUX_LIBUUID),yy)
-define UTIL_LINUX_TWEAK_UUID_PC
-	$(SED) '/Libs\.private: .*/d' $(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc
-	printf "Libs.private: -lintl\n" >>$(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc
-endef
-UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_TWEAK_UUID_PC
-endif
-
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
Signature · 1 line
2.9.4
#107 lore raw

PATCH 96/100 xfsprogs: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the patch and special code that was handling this.

---
 .../0004-build-add-EXTRALIBS-to-link-with.patch    | 53 ----------------------
 package/xfsprogs/xfsprogs.mk                       | 17 -------
 2 files changed, 70 deletions(-)
 delete mode 100644 package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch
package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch deleted +0 -53
deleted file mode 100644
index 8ff0580..0000000
@@ -1,53 +0,0 @@
-From 1e9bb2fba94bc508659f1667bf95501324849bb9 Mon Sep 17 00:00:00 2001
-From: "Yann E. MORIN" <[email protected]>
-Date: Sun, 26 Feb 2017 12:04:54 +0100
-Subject: [PATCH] build: add EXTRALIBS to link with
-
-When doing a uClibc static build, the build fails to link:
-    http://autobuild.buildroot.org/results/503/50314716a9f72e8bb238e52e9dc342c68f7e0b8b/build-end.log
-
-The cause is due to:
-  - xfsprogs links dome programs with util-linux' libblkid
-  - util-linux' libblkid is linked to util-linux' libuuid
-  - util-linux' libuuid uses i18n functions when locales are enabled
-  - uClibc does not provide i18n functions
-  - i18n functions are provided by libintl from libintl from gettext
-
-util-linux installs pkg-config files for thos two libs. However,
-xfsprogs does not use pkg-config to find libblkid or libuuid, thus it
-misses the Libs.private field from libuid.
-
-In this case, it is necessary to pass LIBS=-lintl at configure time, so
-that configure correctly finds libblkid.
-
-Still, this is not enough, because the build will not use LIBS during
-the link phase.
-
-We fix that last bit by adding EXTRALIBS to the libraries to link with,
-so that it is possible to pass EXTRALIBS=-lintl at build time:
-
-    $ ./configure [...] LIBS=-lintl
-    $ make EXTRALIBS=-lintl
-
-Signed-off-by: "Yann E. MORIN" <[email protected]>
-Cc: Waldemar Brodkorb <[email protected]>
----
- include/buildmacros | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/buildmacros b/include/buildmacros
-index a7c5d8a..dd62d80 100644
---- a/include/buildmacros
-+++ b/include/buildmacros
-@@ -11,7 +11,7 @@ BUILDRULES = $(TOPDIR)/include/buildrules
- 
- LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS)
- LTLDFLAGS += $(LOADERFLAGS)
--LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB)
-+LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB) $(EXTRALIBS)
- 
- MAKEOPTS = --no-print-directory Q=$(Q)
- SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
--- 
-2.7.4
-
package/xfsprogs/xfsprogs.mk +0 -17
index ed56d34..2f708f1 100644
@@ -18,23 +18,6 @@ XFSPROGS_CONF_OPTS = \
 	INSTALL_GROUP=root \
 	--enable-static
 
-# xfsprogs links some of its programs to libs from util-linux, which use
-# i18n functions. For shared-only builds, that's automatically pulled in.
-# Static builds need some help, though...
-#
-# No need to depend on gettext in this case: xfsprogs does not use it for
-# itself; util-linux does need it and has it in its own dependencies.
-#
-# xfsprogs' buildsystem uses hand-made Makefiles, not automake, and they
-# do not use the LIBS variable set by configure. So we use EXTRALIBS that
-# is added by our patch.
-#
-# It is not needed to propagate the EXTRALIBS to the install step.
-ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS)$(BR2_NEEDS_GETTEXT_IF_LOCALE),yy)
-XFSPROGS_CONF_OPTS += LIBS=-lintl
-XFSPROGS_MAKE_OPTS = EXTRALIBS=-lintl
-endif
-
 XFSPROGS_INSTALL_TARGET_OPTS = DIST_ROOT=$(TARGET_DIR) install
 
 $(eval $(autotools-package))
Signature · 1 line
2.9.4
#108 lore raw

PATCH 97/100 xmlstarlet: remove libintl static linking handling

In reply to Thomas Petazzoni

We no longer support building the full-blown libintl in static linking scenarios, as it causes too many problems. Therefore, remove the special code that was handling this.

---
 package/xmlstarlet/xmlstarlet.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/xmlstarlet/xmlstarlet.mk +1 -1
index 091c371..9920dcf 100644
@@ -19,7 +19,7 @@ XMLSTARLET_CONF_OPTS += \
 
 ifeq ($(BR2_STATIC_LIBS),y)
 XMLSTARLET_CONF_OPTS += --enable-static-libs
-XMLSTARLET_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libxml-2.0 libexslt` $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
+XMLSTARLET_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libxml-2.0 libexslt`"
 else
 XMLSTARLET_CONF_OPTS += --disable-static-libs
 endif
Signature · 1 line
2.9.4
#109 lore raw

PATCH 98/100 toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE}

In reply to Thomas Petazzoni

Now that all packages have been migrated to the new gettext logic, we can remove the BR2_NEEDS_GETTEXT and BR2_NEEDS_GETTEXT_IF_LOCALE variables.

---
 package/gettext/Config.in     |  1 -
 toolchain/toolchain-common.in | 14 --------------
 2 files changed, 15 deletions(-)
package/gettext/Config.in +0 -1
index 0dea03d..60f8d4f 100644
@@ -22,5 +22,4 @@ config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL
 endif
 
 comment "gettext needs a toolchain w/ wchar"
-	depends on BR2_NEEDS_GETTEXT
 	depends on !BR2_USE_WCHAR
toolchain/toolchain-common.in +0 -14
index 56de9ed..1e4182e 100644
@@ -74,20 +74,6 @@ config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
 
 	  Note: the full set of gconv libs are ~8MiB (on ARM).
 
-# glibc and eglibc directly include gettext, so a separatly compiled
-# 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.
-
-config BR2_NEEDS_GETTEXT
-	bool
-	default y if BR2_TOOLCHAIN_USES_UCLIBC
-
-config BR2_NEEDS_GETTEXT_IF_LOCALE
-	bool
-	default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
-
 # This boolean is true if the toolchain provides a built-in full
 # featured gettext implementation (glibc), and false if only a stub
 # gettext implementation is provided (uclibc, musl)
Signature · 1 line
2.9.4
#110 lore raw

PATCH 98/100 toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE}

Quoted 5 lines · Thomas Petazzoni

Now that all packages have been migrated to the new gettext logic, we can remove the BR2_NEEDS_GETTEXT and BR2_NEEDS_GETTEXT_IF_LOCALE variables.

Regards,
Arnout

Quoted 41 lines
---
 package/gettext/Config.in     |  1 -
 toolchain/toolchain-common.in | 14 --------------
 2 files changed, 15 deletions(-)
package/gettext/Config.in +0 -1
index 0dea03d..60f8d4f 100644
@@ -22,5 +22,4 @@ config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL
 endif
 
 comment "gettext needs a toolchain w/ wchar"
-	depends on BR2_NEEDS_GETTEXT
 	depends on !BR2_USE_WCHAR
toolchain/toolchain-common.in +0 -14
index 56de9ed..1e4182e 100644
@@ -74,20 +74,6 @@ config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
 
 	  Note: the full set of gconv libs are ~8MiB (on ARM).
 
-# glibc and eglibc directly include gettext, so a separatly compiled
-# 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.
-
-config BR2_NEEDS_GETTEXT
-	bool
-	default y if BR2_TOOLCHAIN_USES_UCLIBC
-
-config BR2_NEEDS_GETTEXT_IF_LOCALE
-	bool
-	default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
-
 # This boolean is true if the toolchain provides a built-in full
 # featured gettext implementation (glibc), and false if only a stub
 # gettext implementation is provided (uclibc, musl)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#111 lore raw

PATCH 99/100 docs/manual: update gettext details

In reply to Thomas Petazzoni

The way gettext is handled in Buildroot has significantly changed, with changes visible to packages. This commit updates the relevant section of the manual to document how packages should now interact with the gettext support.

---
 docs/manual/adding-packages-gettext.txt | 83 +++++++++++++++++----------------
 1 file changed, 42 insertions(+), 41 deletions(-)
docs/manual/adding-packages-gettext.txt +42 -41
index c955b1f..e9c6968 100644
@@ -7,53 +7,54 @@ Many packages that support internationalization use the gettext
 library. Dependencies for this library are fairly complicated and
 therefore, deserve some explanation.
 
-The 'uClibc' C library doesn't implement gettext functionality;
-therefore with this C library, a separate gettext must be compiled,
-which is provided by the additional +libintl+ library, part of the
+The 'glibc' C library integrates a full-blown implementation of
+'gettext', supporting translation. Native Language Support is
+therefore built-in in 'glibc'.
+
+On the other hand, the 'uClibc' and 'musl' C libraries only provide a
+stub implementation of the gettext functionality, which allows to
+compile libraries and programs using gettext functions, but without
+providing the translation capabilities of a full-blown gettext
+implementation. With such C libraries, if real Native Language Support
+is necessary, it can be provided by the +libintl+ library of the
 +gettext+ package.
 
-On the other hand, the 'glibc' C library does integrate its own
-gettext library functions, so it is not necessary to build a separate
-+libintl+ library.
+Due to this, and in order to make sure that Native Language Support is
+properly handled, packages in Buildroot that can use NLS support
+should:
 
-However, certain packages need some gettext utilities on the target,
+1. Ensure NLS support is enabled when +BR2_SYSTEM_ENABLE_NLS=y+. This
+   is done automatically for 'autotools' packages and therefore should
+   only be done for packages using other package infrastructures.
+
+1. Add +$(TARGET_NLS_DEPENDENCIES)+ to the package
+   +<pkg>_DEPENDENCIES+ variable. This addition should be done
+   unconditionally: the value of this variable is automatically
+   adjusted by the core infrastructure to contain the relevant list of
+   packages. If NLS support is disabled, this variable is empty. If
+   NLS support is enabled, this variable contains +host-gettext+ so
+   that tools needed to compile translation files are available on the
+   host. In addition, if 'uClibc' or 'musl' are used, this variable
+   also contains +gettext+ in order to get the full-blown 'gettext'
+   implementation.
+
+1. If needed, add +$(TARGET_NLS_LIBS)+ to the linker flags, so that
+   the package gets linked with +libintl+. This is generally not
+   needed with 'autotools' packages as they usually detect
+   automatically that they should link with +libintl+. However,
+   packages using other build systems, or problematic autotools-based
+   packages may need this. +$(TARGET_NLS_LIBS)+ should be added
+   unconditionally to the linker flags, as the core automatically
+   makes it empty or defined to +-lintl+ depending on the
+   configuration.
+
+No changes should be made to the +Config.in+ file to support NLS.
+
+Finally, certain packages need some gettext utilities on the target,
 such as the +gettext+ program itself, which allows to retrieve
-translated strings, from the command line.
-
-Additionally, some packages (such as +libglib2+) do require gettext
-functions unconditionally, while other packages (in general, those who
-support +--disable-nls+) only require gettext functions when locale
-support is enabled.
-
-Therefore, Buildroot defines two configuration options:
-
-* +BR2_NEEDS_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
-  doesn't provide its own gettext implementation and if locale support
-  is enabled
-
-Packages that need gettext only when locale support is enabled should:
-
-* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ in the
-  +Config.in+ file;
-
-* use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
-  +DEPENDENCIES+ variable in the +.mk+ file.
-
-Packages that unconditionally need gettext (which should be very rare)
+translated strings, from the command line. In such a case, the package
 should:
 
-* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ in the +Config.in+
-  file;
-
-* use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
-  +DEPENDENCIES+ variable in the +.mk+ file.
-
-Packages that need the +gettext+ utilities on the target (should be
-rare) should:
-
 * use +select BR2_PACKAGE_GETTEXT+ in their +Config.in+ file,
   indicating in a comment above that it's a runtime dependency only.
 
Signature · 1 line
2.9.4
#112 lore raw

PATCH 99/100 docs/manual: update gettext details

Quoted 6 lines · Thomas Petazzoni

The way gettext is handled in Buildroot has significantly changed, with changes visible to packages. This commit updates the relevant section of the manual to document how packages should now interact with the gettext support.

Regards,
Arnout

Quoted 105 lines
---
 docs/manual/adding-packages-gettext.txt | 83 +++++++++++++++++----------------
 1 file changed, 42 insertions(+), 41 deletions(-)
docs/manual/adding-packages-gettext.txt +42 -41
index c955b1f..e9c6968 100644
@@ -7,53 +7,54 @@ Many packages that support internationalization use the gettext
 library. Dependencies for this library are fairly complicated and
 therefore, deserve some explanation.
 
-The 'uClibc' C library doesn't implement gettext functionality;
-therefore with this C library, a separate gettext must be compiled,
-which is provided by the additional +libintl+ library, part of the
+The 'glibc' C library integrates a full-blown implementation of
+'gettext', supporting translation. Native Language Support is
+therefore built-in in 'glibc'.
+
+On the other hand, the 'uClibc' and 'musl' C libraries only provide a
+stub implementation of the gettext functionality, which allows to
+compile libraries and programs using gettext functions, but without
+providing the translation capabilities of a full-blown gettext
+implementation. With such C libraries, if real Native Language Support
+is necessary, it can be provided by the +libintl+ library of the
 +gettext+ package.
 
-On the other hand, the 'glibc' C library does integrate its own
-gettext library functions, so it is not necessary to build a separate
-+libintl+ library.
+Due to this, and in order to make sure that Native Language Support is
+properly handled, packages in Buildroot that can use NLS support
+should:
 
-However, certain packages need some gettext utilities on the target,
+1. Ensure NLS support is enabled when +BR2_SYSTEM_ENABLE_NLS=y+. This
+   is done automatically for 'autotools' packages and therefore should
+   only be done for packages using other package infrastructures.
+
+1. Add +$(TARGET_NLS_DEPENDENCIES)+ to the package
+   +<pkg>_DEPENDENCIES+ variable. This addition should be done
+   unconditionally: the value of this variable is automatically
+   adjusted by the core infrastructure to contain the relevant list of
+   packages. If NLS support is disabled, this variable is empty. If
+   NLS support is enabled, this variable contains +host-gettext+ so
+   that tools needed to compile translation files are available on the
+   host. In addition, if 'uClibc' or 'musl' are used, this variable
+   also contains +gettext+ in order to get the full-blown 'gettext'
+   implementation.
+
+1. If needed, add +$(TARGET_NLS_LIBS)+ to the linker flags, so that
+   the package gets linked with +libintl+. This is generally not
+   needed with 'autotools' packages as they usually detect
+   automatically that they should link with +libintl+. However,
+   packages using other build systems, or problematic autotools-based
+   packages may need this. +$(TARGET_NLS_LIBS)+ should be added
+   unconditionally to the linker flags, as the core automatically
+   makes it empty or defined to +-lintl+ depending on the
+   configuration.
+
+No changes should be made to the +Config.in+ file to support NLS.
+
+Finally, certain packages need some gettext utilities on the target,
 such as the +gettext+ program itself, which allows to retrieve
-translated strings, from the command line.
-
-Additionally, some packages (such as +libglib2+) do require gettext
-functions unconditionally, while other packages (in general, those who
-support +--disable-nls+) only require gettext functions when locale
-support is enabled.
-
-Therefore, Buildroot defines two configuration options:
-
-* +BR2_NEEDS_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
-  doesn't provide its own gettext implementation and if locale support
-  is enabled
-
-Packages that need gettext only when locale support is enabled should:
-
-* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ in the
-  +Config.in+ file;
-
-* use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
-  +DEPENDENCIES+ variable in the +.mk+ file.
-
-Packages that unconditionally need gettext (which should be very rare)
+translated strings, from the command line. In such a case, the package
 should:
 
-* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ in the +Config.in+
-  file;
-
-* use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
-  +DEPENDENCIES+ variable in the +.mk+ file.
-
-Packages that need the +gettext+ utilities on the target (should be
-rare) should:
-
 * use +select BR2_PACKAGE_GETTEXT+ in their +Config.in+ file,
   indicating in a comment above that it's a runtime dependency only.
 
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#113 lore raw

PATCH 100/100 CHANGES: add details on the gettext revamp

In reply to Thomas Petazzoni

The gettext revamp has some user-visible changes, so this commit updates the CHANGES file to document them.

---
 CHANGES | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
CHANGES +19 -0
index cf4b22b..7b98e84 100644
@@ -1,3 +1,22 @@
+2017.08-rc1, To be released
+
+	Major revamp of the gettext handling, with user-visible
+	effect:
+
+	  - prior to this revamp, when BR2_ENABLE_LOCALE=y, each
+	    package could decide to enable or not NLS support. When
+	    BR2_ENABLE_LOCALE was disabled, NLS support was forced off
+	    by passing --disable-nls to packages.
+
+	  - after this revamp, a new BR2_SYSTEM_ENABLE_NLS option
+            controls whether NLS support should be enabled or not in
+            packages. This option defaults to disabled, which means
+            that now, NLS support is by default disabled in all
+            packages.
+
+	Therefore, if you need NLS support in packages, you must now
+	explicitly enable the BR2_SYSTEM_ENABLE_NLS option.
+
 2017.05, Released May 31st, 2017
 
 	Minor fixes.
Signature · 1 line
2.9.4
#114 lore raw

PATCH 100/100 CHANGES: add details on the gettext revamp

Quoted 4 lines · Thomas Petazzoni

The gettext revamp has some user-visible changes, so this commit updates the CHANGES file to document them.

Regards,
Arnout

Quoted 32 lines
---
 CHANGES | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
CHANGES +19 -0
index cf4b22b..7b98e84 100644
@@ -1,3 +1,22 @@
+2017.08-rc1, To be released
+
+	Major revamp of the gettext handling, with user-visible
+	effect:
+
+	  - prior to this revamp, when BR2_ENABLE_LOCALE=y, each
+	    package could decide to enable or not NLS support. When
+	    BR2_ENABLE_LOCALE was disabled, NLS support was forced off
+	    by passing --disable-nls to packages.
+
+	  - after this revamp, a new BR2_SYSTEM_ENABLE_NLS option
+            controls whether NLS support should be enabled or not in
+            packages. This option defaults to disabled, which means
+            that now, NLS support is by default disabled in all
+            packages.
+
+	Therefore, if you need NLS support in packages, you must now
+	explicitly enable the BR2_SYSTEM_ENABLE_NLS option.
+
 2017.05, Released May 31st, 2017
 
 	Minor fixes.
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#115 lore raw

cover Rework of the gettext handling

In reply to Thomas Petazzoni

Hello,

Quoted 4 lines · Thomas Petazzoni

Thomas Petazzoni (100):
libglib2: disable compiler warnings
flex: remove bogus comment
lvm2: force disable NLS support

Quoted 8 lines

ushare: do not use the DISABLE_NLS variable
uclibc: enable libintl stubs
toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT
gettext: force build libintl if needed
package: rename DISABLE_NLS to NLS_OPTS
system: introduce BR2_SYSTEM_ENABLE_NLS package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES,LIBS} package/Makefile.in: fix musl handling

I've applied those 11 initial patches, and kicked off a rebuild of the toolchains, so that all our uClibc toolchains have the stub gettext implementation. Then I will proceed with applying the remainder of the series.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com