All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 000/100] Rework of the gettext handling
@ 2017-07-04 14:47 Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 001/100] libglib2: disable compiler warnings Thomas Petazzoni
                   ` (100 more replies)
  0 siblings, 101 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

-- 
2.9.4

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

* [Buildroot] [PATCH 001/100] libglib2: disable compiler warnings
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 002/100] flex: remove bogus comment Thomas Petazzoni
                   ` (99 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/libglib2/libglib2.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index d6b18dd..577dcec 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 002/100] flex: remove bogus comment
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 001/100] libglib2: disable compiler warnings Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 003/100] lvm2: force disable NLS support Thomas Petazzoni
                   ` (98 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/flex/flex.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/flex/flex.mk b/package/flex/flex.mk
index aa6c026..905621e 100644
--- a/package/flex/flex.mk
+++ b/package/flex/flex.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 003/100] lvm2: force disable NLS support
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 001/100] libglib2: disable compiler warnings Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 002/100] flex: remove bogus comment Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 004/100] ushare: do not use the DISABLE_NLS variable Thomas Petazzoni
                   ` (97 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/lvm2/lvm2.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/lvm2/lvm2.mk b/package/lvm2/lvm2.mk
index 9a422fe..f5cd0b5 100644
--- a/package/lvm2/lvm2.mk
+++ b/package/lvm2/lvm2.mk
@@ -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.
-- 
2.9.4

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

* [Buildroot] [PATCH 004/100] ushare: do not use the DISABLE_NLS variable
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 003/100] lvm2: force disable NLS support Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 005/100] uclibc: enable libintl stubs Thomas Petazzoni
                   ` (96 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/ushare/ushare.mk | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
index 3a5f178..32aa445 100644
--- a/package/ushare/ushare.mk
+++ b/package/ushare/ushare.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 005/100] uclibc: enable libintl stubs
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 004/100] ushare: do not use the DISABLE_NLS variable Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 006/100] toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT Thomas Petazzoni
                   ` (95 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/uclibc/uClibc-ng.config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/uclibc/uClibc-ng.config b/package/uclibc/uClibc-ng.config
index f0a876f..5beb2bd 100644
--- a/package/uclibc/uClibc-ng.config
+++ b/package/uclibc/uClibc-ng.config
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 006/100] toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 005/100] uclibc: enable libintl stubs Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 007/100] gettext: force build libintl if needed Thomas Petazzoni
                   ` (94 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 toolchain/Config.in           | 1 +
 toolchain/toolchain-common.in | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 6aaf68b..15ee335 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -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
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index ed993dd..56de9ed 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 007/100] gettext: force build libintl if needed
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 006/100] toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 008/100] package: rename DISABLE_NLS to NLS_OPTS Thomas Petazzoni
                   ` (93 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/gettext/Config.in  | 8 ++++++++
 package/gettext/gettext.mk | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index 7871a48..18bfda6 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -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
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 498dfab..454ad29 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 008/100] package: rename DISABLE_NLS to NLS_OPTS
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 007/100] gettext: force build libintl if needed Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 009/100] system: introduce BR2_SYSTEM_ENABLE_NLS Thomas Petazzoni
                   ` (92 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/Makefile.in      | 4 ++--
 package/pkg-autotools.mk | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 8087bde..4a5b3af 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -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)
diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index e215382..ba1f4d9 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -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) \
 	)
-- 
2.9.4

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

* [Buildroot] [PATCH 009/100] system: introduce BR2_SYSTEM_ENABLE_NLS
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 008/100] package: rename DISABLE_NLS to NLS_OPTS Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 010/100] package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES, LIBS} Thomas Petazzoni
                   ` (91 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/Makefile.in       |  4 ++--
 package/gettext/Config.in |  1 +
 system/Config.in          | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 4a5b3af..462b7ca 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -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
diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index 18bfda6..0dea03d 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -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
 
diff --git a/system/Config.in b/system/Config.in
index 8588839..828df42 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 010/100] package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES, LIBS}
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 009/100] system: introduce BR2_SYSTEM_ENABLE_NLS Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 011/100] package/Makefile.in: fix musl handling Thomas Petazzoni
                   ` (90 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/Makefile.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/Makefile.in b/package/Makefile.in
index 462b7ca..d30da3f 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 011/100] package/Makefile.in: fix musl handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 010/100] package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES, LIBS} Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 012/100] alsa-utils: use new gettext logic Thomas Petazzoni
                   ` (89 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/Makefile.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index d30da3f..b98333f 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 012/100] alsa-utils: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (10 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 011/100] package/Makefile.in: fix musl handling Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 15:23   ` Arnout Vandecappelle
  2017-07-04 14:47 ` [Buildroot] [PATCH 013/100] avahi: " Thomas Petazzoni
                   ` (88 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/alsa-utils/Config.in     |  1 -
 package/alsa-utils/alsa-utils.mk | 13 +++++--------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
index 1d42f2e..d3fd18d 100644
--- a/package/alsa-utils/Config.in
+++ b/package/alsa-utils/Config.in
@@ -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.
diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk
index f0b964a..e9fd942 100644
--- a/package/alsa-utils/alsa-utils.mk
+++ b/package/alsa-utils/alsa-utils.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 013/100] avahi: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (11 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 012/100] alsa-utils: use new gettext logic Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 15:33   ` Arnout Vandecappelle
  2017-07-04 14:47 ` [Buildroot] [PATCH 014/100] axel: use the " Thomas Petazzoni
                   ` (87 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/avahi/Config.in | 1 -
 package/avahi/avahi.mk  | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/avahi/Config.in b/package/avahi/Config.in
index a6b4ac8..5e303d0 100644
--- a/package/avahi/Config.in
+++ b/package/avahi/Config.in
@@ -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.
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index a356a08..94b6292 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -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 * - - -
-- 
2.9.4

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

* [Buildroot] [PATCH 014/100] axel: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (12 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 013/100] avahi: " Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 015/100] binutils: " Thomas Petazzoni
                   ` (86 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/axel/Config.in |  1 -
 package/axel/axel.mk   | 12 +++---------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/package/axel/Config.in b/package/axel/Config.in
index aea85bf..6e709cf 100644
--- a/package/axel/Config.in
+++ b/package/axel/Config.in
@@ -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.
 
diff --git a/package/axel/axel.mk b/package/axel/axel.mk
index e89a946..60bf5e4 100644
--- a/package/axel/axel.mk
+++ b/package/axel/axel.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 015/100] binutils: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (13 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 014/100] axel: use the " Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 016/100] clamav: use " Thomas Petazzoni
                   ` (85 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/binutils/Config.in   | 1 -
 package/binutils/binutils.mk | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/binutils/Config.in b/package/binutils/Config.in
index 360dd5e..e17a8ec 100644
--- a/package/binutils/Config.in
+++ b/package/binutils/Config.in
@@ -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
 
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 0dc20a0..c64ec47 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 016/100] clamav: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (14 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 015/100] binutils: " Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 017/100] coreutils: use the " Thomas Petazzoni
                   ` (84 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/clamav/Config.in | 1 -
 package/clamav/clamav.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/clamav/Config.in b/package/clamav/Config.in
index a962103..bc934ea 100644
--- a/package/clamav/Config.in
+++ b/package/clamav/Config.in
@@ -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
diff --git a/package/clamav/clamav.mk b/package/clamav/clamav.mk
index 23dee0a..5429abb 100644
--- a/package/clamav/clamav.mk
+++ b/package/clamav/clamav.mk
@@ -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 = \
-- 
2.9.4

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

* [Buildroot] [PATCH 017/100] coreutils: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (15 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 016/100] clamav: use " Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 018/100] cryptsetup: use " Thomas Petazzoni
                   ` (83 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/coreutils/coreutils.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index 14b952f..6a8a31b 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -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)
-- 
2.9.4

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

* [Buildroot] [PATCH 018/100] cryptsetup: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (16 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 017/100] coreutils: use the " Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:47 ` [Buildroot] [PATCH 019/100] curlftpfs: " Thomas Petazzoni
                   ` (82 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/cryptsetup/Config.in     | 1 -
 package/cryptsetup/cryptsetup.mk | 7 ++-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/package/cryptsetup/Config.in b/package/cryptsetup/Config.in
index 3ca23ba..5cd4676 100644
--- a/package/cryptsetup/Config.in
+++ b/package/cryptsetup/Config.in
@@ -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.
diff --git a/package/cryptsetup/cryptsetup.mk b/package/cryptsetup/cryptsetup.mk
index 787331c..5496583 100644
--- a/package/cryptsetup/cryptsetup.mk
+++ b/package/cryptsetup/cryptsetup.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 019/100] curlftpfs: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (17 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 018/100] cryptsetup: use " Thomas Petazzoni
@ 2017-07-04 14:47 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 020/100] diffutils: " Thomas Petazzoni
                   ` (81 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/curlftpfs/Config.in    | 1 -
 package/curlftpfs/curlftpfs.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/curlftpfs/Config.in b/package/curlftpfs/Config.in
index 986faf1..c8c432f 100644
--- a/package/curlftpfs/Config.in
+++ b/package/curlftpfs/Config.in
@@ -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
diff --git a/package/curlftpfs/curlftpfs.mk b/package/curlftpfs/curlftpfs.mk
index 585dbf2..584d01a 100644
--- a/package/curlftpfs/curlftpfs.mk
+++ b/package/curlftpfs/curlftpfs.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 020/100] diffutils: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (18 preceding siblings ...)
  2017-07-04 14:47 ` [Buildroot] [PATCH 019/100] curlftpfs: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 021/100] ding-libs: use the " Thomas Petazzoni
                   ` (80 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/diffutils/Config.in    | 1 -
 package/diffutils/diffutils.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/diffutils/Config.in b/package/diffutils/Config.in
index 97cb38b..3c38f25 100644
--- a/package/diffutils/Config.in
+++ b/package/diffutils/Config.in
@@ -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.
 
diff --git a/package/diffutils/diffutils.mk b/package/diffutils/diffutils.mk
index 4662e2b..6e5b9b6 100644
--- a/package/diffutils/diffutils.mk
+++ b/package/diffutils/diffutils.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 021/100] ding-libs: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (19 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 020/100] diffutils: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 022/100] dnsmasq: use " Thomas Petazzoni
                   ` (79 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/ding-libs/Config.in    | 6 ------
 package/ding-libs/ding-libs.mk | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/package/ding-libs/Config.in b/package/ding-libs/Config.in
index d397f29..6dc2a80 100644
--- a/package/ding-libs/Config.in
+++ b/package/ding-libs/Config.in
@@ -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
diff --git a/package/ding-libs/ding-libs.mk b/package/ding-libs/ding-libs.mk
index 4b045be..e9508cc 100644
--- a/package/ding-libs/ding-libs.mk
+++ b/package/ding-libs/ding-libs.mk
@@ -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)
-- 
2.9.4

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

* [Buildroot] [PATCH 022/100] dnsmasq: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (20 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 021/100] ding-libs: use the " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 023/100] dos2unix: " Thomas Petazzoni
                   ` (78 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/dnsmasq/Config.in  | 1 -
 package/dnsmasq/dnsmasq.mk | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in
index 936b1de..8921fc6 100644
--- a/package/dnsmasq/Config.in
+++ b/package/dnsmasq/Config.in
@@ -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
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index c6f15e2..00a59da 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 023/100] dos2unix: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (21 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 022/100] dnsmasq: use " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 024/100] dropwatch: " Thomas Petazzoni
                   ` (77 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/dos2unix/Config.in   |  1 -
 package/dos2unix/dos2unix.mk | 15 +++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/package/dos2unix/Config.in b/package/dos2unix/Config.in
index 6945f52..cfb5ba4 100644
--- a/package/dos2unix/Config.in
+++ b/package/dos2unix/Config.in
@@ -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
 
diff --git a/package/dos2unix/dos2unix.mk b/package/dos2unix/dos2unix.mk
index 3540ec8..87525fb 100644
--- a/package/dos2unix/dos2unix.mk
+++ b/package/dos2unix/dos2unix.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 024/100] dropwatch: use new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (22 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 023/100] dos2unix: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 025/100] efibootmgr: use the " Thomas Petazzoni
                   ` (76 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/dropwatch/dropwatch.mk | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk
index e08a0c1..692a6e8 100644
--- a/package/dropwatch/dropwatch.mk
+++ b/package/dropwatch/dropwatch.mk
@@ -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) \
-- 
2.9.4

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

* [Buildroot] [PATCH 025/100] efibootmgr: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (23 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 024/100] dropwatch: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 026/100] elfutils: " Thomas Petazzoni
                   ` (75 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/efibootmgr/Config.in     | 7 ++-----
 package/efibootmgr/efibootmgr.mk | 4 ++--
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in
index 57874fc..1096b9d 100644
--- a/package/efibootmgr/Config.in
+++ b/package/efibootmgr/Config.in
@@ -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
diff --git a/package/efibootmgr/efibootmgr.mk b/package/efibootmgr/efibootmgr.mk
index 094dd28..b32d9cb 100644
--- a/package/efibootmgr/efibootmgr.mk
+++ b/package/efibootmgr/efibootmgr.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 026/100] elfutils: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (24 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 025/100] efibootmgr: use the " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 027/100] exiv2: " Thomas Petazzoni
                   ` (74 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/elfutils/Config.in   |  1 -
 package/elfutils/elfutils.mk | 11 +++--------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/package/elfutils/Config.in b/package/elfutils/Config.in
index 3228319..ad86c31 100644
--- a/package/elfutils/Config.in
+++ b/package/elfutils/Config.in
@@ -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).
diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
index e43d036..5570a3b 100644
--- a/package/elfutils/elfutils.mk
+++ b/package/elfutils/elfutils.mk
@@ -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)"
-- 
2.9.4

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

* [Buildroot] [PATCH 027/100] exiv2: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (25 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 026/100] elfutils: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 028/100] fetchmail: " Thomas Petazzoni
                   ` (73 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/exiv2/exiv2.mk | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/exiv2/exiv2.mk b/package/exiv2/exiv2.mk
index 6bc8848..32029ba 100644
--- a/package/exiv2/exiv2.mk
+++ b/package/exiv2/exiv2.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 028/100] fetchmail: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (26 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 027/100] exiv2: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 029/100] flex: " Thomas Petazzoni
                   ` (72 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/fetchmail/fetchmail.mk | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/package/fetchmail/fetchmail.mk b/package/fetchmail/fetchmail.mk
index 164b2f8..37bbeab 100644
--- a/package/fetchmail/fetchmail.mk
+++ b/package/fetchmail/fetchmail.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 029/100] flex: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (27 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 028/100] fetchmail: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 030/100] gdbm: " Thomas Petazzoni
                   ` (71 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/flex/Config.in | 1 -
 package/flex/flex.mk   | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/flex/Config.in b/package/flex/Config.in
index 76e8bc7..33d123d 100644
--- a/package/flex/Config.in
+++ b/package/flex/Config.in
@@ -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.
diff --git a/package/flex/flex.mk b/package/flex/flex.mk
index 905621e..b782699 100644
--- a/package/flex/flex.mk
+++ b/package/flex/flex.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 030/100] gdbm: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (28 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 029/100] flex: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 031/100] git: " Thomas Petazzoni
                   ` (70 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gdbm/gdbm.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/gdbm/gdbm.mk b/package/gdbm/gdbm.mk
index 4e3ed76..acd8cd2 100644
--- a/package/gdbm/gdbm.mk
+++ b/package/gdbm/gdbm.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 031/100] git: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (29 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 030/100] gdbm: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 21:59   ` Arnout Vandecappelle
  2017-07-04 14:48 ` [Buildroot] [PATCH 032/100] glib-networking: " Thomas Petazzoni
                   ` (69 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/git/git.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/git/git.mk b/package/git/git.mk
index 9cc88dd..23ace0f 100644
--- a/package/git/git.mk
+++ b/package/git/git.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 032/100] glib-networking: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (30 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 031/100] git: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 033/100] gmpc: " Thomas Petazzoni
                   ` (68 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/glib-networking/Config.in          | 1 -
 package/glib-networking/glib-networking.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/glib-networking/Config.in b/package/glib-networking/Config.in
index 01d8552..ec29623 100644
--- a/package/glib-networking/Config.in
+++ b/package/glib-networking/Config.in
@@ -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.
 
diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk
index eb75c86..10a3b70 100644
--- a/package/glib-networking/glib-networking.mk
+++ b/package/glib-networking/glib-networking.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 033/100] gmpc: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (31 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 032/100] glib-networking: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 034/100] gnuchess: " Thomas Petazzoni
                   ` (67 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gmpc/Config.in | 1 -
 package/gmpc/gmpc.mk   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/gmpc/Config.in b/package/gmpc/Config.in
index 43bc642..1aa7425 100644
--- a/package/gmpc/Config.in
+++ b/package/gmpc/Config.in
@@ -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
diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk
index 7ba86a7..40b77eb 100644
--- a/package/gmpc/gmpc.mk
+++ b/package/gmpc/gmpc.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 034/100] gnuchess: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (32 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 033/100] gmpc: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 035/100] grep: " Thomas Petazzoni
                   ` (66 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gnuchess/Config.in   | 1 -
 package/gnuchess/gnuchess.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/gnuchess/Config.in b/package/gnuchess/Config.in
index 4993b1a..aa446f4 100644
--- a/package/gnuchess/Config.in
+++ b/package/gnuchess/Config.in
@@ -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.
 
diff --git a/package/gnuchess/gnuchess.mk b/package/gnuchess/gnuchess.mk
index 0103367..1465ab0 100644
--- a/package/gnuchess/gnuchess.mk
+++ b/package/gnuchess/gnuchess.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 035/100] grep: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (33 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 034/100] gnuchess: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 036/100] httping: " Thomas Petazzoni
                   ` (65 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/grep/grep.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/grep/grep.mk b/package/grep/grep.mk
index 5101dda..a2ef422 100644
--- a/package/grep/grep.mk
+++ b/package/grep/grep.mk
@@ -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)
-- 
2.9.4

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

* [Buildroot] [PATCH 036/100] httping: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (34 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 035/100] grep: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 037/100] json-glib: " Thomas Petazzoni
                   ` (64 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/httping/Config.in  | 1 -
 package/httping/httping.mk | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/httping/Config.in b/package/httping/Config.in
index 6564415..07ff102 100644
--- a/package/httping/Config.in
+++ b/package/httping/Config.in
@@ -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,
diff --git a/package/httping/httping.mk b/package/httping/httping.mk
index e1c686f..649c643 100644
--- a/package/httping/httping.mk
+++ b/package/httping/httping.mk
@@ -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) \
-- 
2.9.4

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

* [Buildroot] [PATCH 037/100] json-glib: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (35 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 036/100] httping: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 038/100] kbd: " Thomas Petazzoni
                   ` (63 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/json-glib/Config.in    | 1 -
 package/json-glib/json-glib.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/json-glib/Config.in b/package/json-glib/Config.in
index ea15295..9df03d9 100644
--- a/package/json-glib/Config.in
+++ b/package/json-glib/Config.in
@@ -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
diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk
index db22dc9..5ee43d9 100644
--- a/package/json-glib/json-glib.mk
+++ b/package/json-glib/json-glib.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 038/100] kbd: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (36 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 037/100] json-glib: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 039/100] lbreakout2: " Thomas Petazzoni
                   ` (62 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/kbd/Config.in | 1 -
 package/kbd/kbd.mk    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/kbd/Config.in b/package/kbd/Config.in
index ab1f1b3..6cf2fc0 100644
--- a/package/kbd/Config.in
+++ b/package/kbd/Config.in
@@ -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.
 
diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk
index 175a237..a4873f3 100644
--- a/package/kbd/kbd.mk
+++ b/package/kbd/kbd.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 039/100] lbreakout2: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (37 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 038/100] kbd: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 040/100] libconfuse: " Thomas Petazzoni
                   ` (61 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lbreakout2/Config.in     |  1 -
 package/lbreakout2/lbreakout2.mk | 10 +++-------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/package/lbreakout2/Config.in b/package/lbreakout2/Config.in
index 221c9e2..6788aca 100644
--- a/package/lbreakout2/Config.in
+++ b/package/lbreakout2/Config.in
@@ -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
diff --git a/package/lbreakout2/lbreakout2.mk b/package/lbreakout2/lbreakout2.mk
index 017d562..274c534 100644
--- a/package/lbreakout2/lbreakout2.mk
+++ b/package/lbreakout2/lbreakout2.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 040/100] libconfuse: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (38 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 039/100] lbreakout2: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 041/100] libftdi1: " Thomas Petazzoni
                   ` (60 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libconfuse/libconfuse.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/libconfuse/libconfuse.mk b/package/libconfuse/libconfuse.mk
index 5f1d5cd..07a73c8 100644
--- a/package/libconfuse/libconfuse.mk
+++ b/package/libconfuse/libconfuse.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 041/100] libftdi1: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (39 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 040/100] libconfuse: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 042/100] libglib2: " Thomas Petazzoni
                   ` (59 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libftdi1/libftdi1.mk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
index deeff39..6b84b95 100644
--- a/package/libftdi1/libftdi1.mk
+++ b/package/libftdi1/libftdi1.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 042/100] libglib2: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (40 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 041/100] libftdi1: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 15:44   ` Arnout Vandecappelle
  2017-07-04 14:48 ` [Buildroot] [PATCH 043/100] libgpg-error: " Thomas Petazzoni
                   ` (58 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libglib2/Config.in   | 1 -
 package/libglib2/libglib2.mk | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index 62e29ef..ea946ba 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -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
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 577dcec..eeceeee 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -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 \
-- 
2.9.4

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

* [Buildroot] [PATCH 043/100] libgpg-error: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (41 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 042/100] libglib2: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 044/100] libidn: " Thomas Petazzoni
                   ` (57 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libgpg-error/libgpg-error.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/libgpg-error/libgpg-error.mk b/package/libgpg-error/libgpg-error.mk
index 183654b..2140258 100644
--- a/package/libgpg-error/libgpg-error.mk
+++ b/package/libgpg-error/libgpg-error.mk
@@ -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 && \
-- 
2.9.4

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

* [Buildroot] [PATCH 044/100] libidn: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (42 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 043/100] libgpg-error: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 045/100] libuio: " Thomas Petazzoni
                   ` (56 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libidn/Config.in | 1 -
 package/libidn/libidn.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/libidn/Config.in b/package/libidn/Config.in
index 7b558c7..20e0e2b 100644
--- a/package/libidn/Config.in
+++ b/package/libidn/Config.in
@@ -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.
diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk
index 18e28e0..b96e742 100644
--- a/package/libidn/libidn.mk
+++ b/package/libidn/libidn.mk
@@ -9,7 +9,7 @@ LIBIDN_SITE = $(BR2_GNU_MIRROR)/libidn
 LIBIDN_INSTALL_STAGING = YES
 LIBIDN_CONF_ENV = EMACS="no"
 LIBIDN_CONF_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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 045/100] libuio: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (43 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 044/100] libidn: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 046/100] libv4l: " Thomas Petazzoni
                   ` (55 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libuio/Config.in | 1 -
 package/libuio/libuio.mk | 9 ++-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/package/libuio/Config.in b/package/libuio/Config.in
index a96df54..97be1e3 100644
--- a/package/libuio/Config.in
+++ b/package/libuio/Config.in
@@ -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.
diff --git a/package/libuio/libuio.mk b/package/libuio/libuio.mk
index bdd29e3..8f72253 100644
--- a/package/libuio/libuio.mk
+++ b/package/libuio/libuio.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 046/100] libv4l: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (44 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 045/100] libuio: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 047/100] libvips: " Thomas Petazzoni
                   ` (54 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libv4l/Config.in | 1 -
 package/libv4l/libv4l.mk | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
index 638aeff..e7f78dc 100644
--- a/package/libv4l/Config.in
+++ b/package/libv4l/Config.in
@@ -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:
diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
index b742717..5950c5a 100644
--- a/package/libv4l/libv4l.mk
+++ b/package/libv4l/libv4l.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 047/100] libvips: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (45 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 046/100] libv4l: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 048/100] lightning: remove -lintl linking Thomas Petazzoni
                   ` (53 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libvips/Config.in  | 3 +--
 package/libvips/libvips.mk | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/libvips/Config.in b/package/libvips/Config.in
index 87ada51..e16e527 100644
--- a/package/libvips/Config.in
+++ b/package/libvips/Config.in
@@ -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
diff --git a/package/libvips/libvips.mk b/package/libvips/libvips.mk
index 974a4be..8078e04 100644
--- a/package/libvips/libvips.mk
+++ b/package/libvips/libvips.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 048/100] lightning: remove -lintl linking
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (46 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 047/100] libvips: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 049/100] linux-pam: use the new gettext logic Thomas Petazzoni
                   ` (52 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lightning/lightning.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/lightning/lightning.mk b/package/lightning/lightning.mk
index 0c2a101..2b4931b 100644
--- a/package/lightning/lightning.mk
+++ b/package/lightning/lightning.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 049/100] linux-pam: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (47 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 048/100] lightning: remove -lintl linking Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 050/100] linux-tools: " Thomas Petazzoni
                   ` (51 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/linux-pam/Config.in    | 1 -
 package/linux-pam/linux-pam.mk | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in
index ab7cf55..33e5154 100644
--- a/package/linux-pam/Config.in
+++ b/package/linux-pam/Config.in
@@ -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
diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk
index fb2f99c..5c80e78 100644
--- a/package/linux-pam/linux-pam.mk
+++ b/package/linux-pam/linux-pam.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 050/100] linux-tools: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (48 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 049/100] linux-pam: use the new gettext logic Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 051/100] lshw: " Thomas Petazzoni
                   ` (50 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/linux-tools/Config.in              | 6 ------
 package/linux-tools/linux-tool-cpupower.mk | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index db9ed9f..9d5bf7a 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -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
diff --git a/package/linux-tools/linux-tool-cpupower.mk b/package/linux-tools/linux-tool-cpupower.mk
index 9958cff..2a2d3e0 100644
--- a/package/linux-tools/linux-tool-cpupower.mk
+++ b/package/linux-tools/linux-tool-cpupower.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 051/100] lshw: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (49 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 050/100] linux-tools: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 052/100] ltris: " Thomas Petazzoni
                   ` (49 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lshw/Config.in | 1 -
 package/lshw/lshw.mk   | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/lshw/Config.in b/package/lshw/Config.in
index 8cc935a..83b7ffb 100644
--- a/package/lshw/Config.in
+++ b/package/lshw/Config.in
@@ -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.
diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
index eb39611..43b937b 100644
--- a/package/lshw/lshw.mk
+++ b/package/lshw/lshw.mk
@@ -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)
-- 
2.9.4

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

* [Buildroot] [PATCH 052/100] ltris: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (50 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 051/100] lshw: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 053/100] madplay: " Thomas Petazzoni
                   ` (48 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/ltris/Config.in | 1 -
 package/ltris/ltris.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/ltris/Config.in b/package/ltris/Config.in
index bf73489..7d9dc04 100644
--- a/package/ltris/Config.in
+++ b/package/ltris/Config.in
@@ -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
diff --git a/package/ltris/ltris.mk b/package/ltris/ltris.mk
index 8f12ab1..fb0d4c3 100644
--- a/package/ltris/ltris.mk
+++ b/package/ltris/ltris.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 053/100] madplay: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (51 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 052/100] ltris: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 054/100] make: " Thomas Petazzoni
                   ` (47 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/madplay/Config.in  | 1 -
 package/madplay/madplay.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/madplay/Config.in b/package/madplay/Config.in
index d83fac6..3baeaa0 100644
--- a/package/madplay/Config.in
+++ b/package/madplay/Config.in
@@ -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
diff --git a/package/madplay/madplay.mk b/package/madplay/madplay.mk
index 4ae95ab..e72e2f8 100644
--- a/package/madplay/madplay.mk
+++ b/package/madplay/madplay.mk
@@ -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.
-- 
2.9.4

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

* [Buildroot] [PATCH 054/100] make: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (52 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 053/100] madplay: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 055/100] mcrypt: " Thomas Petazzoni
                   ` (46 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/make/Config.in | 1 -
 package/make/make.mk   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/make/Config.in b/package/make/Config.in
index f576b7b..e8aa912 100644
--- a/package/make/Config.in
+++ b/package/make/Config.in
@@ -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.
diff --git a/package/make/make.mk b/package/make/make.mk
index 41a7023..5717628 100644
--- a/package/make/make.mk
+++ b/package/make/make.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 055/100] mcrypt: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (53 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 054/100] make: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 056/100] midori: " Thomas Petazzoni
                   ` (45 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/mcrypt/Config.in | 1 -
 package/mcrypt/mcrypt.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/mcrypt/Config.in b/package/mcrypt/Config.in
index 58567cd..ab2888b 100644
--- a/package/mcrypt/Config.in
+++ b/package/mcrypt/Config.in
@@ -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.
diff --git a/package/mcrypt/mcrypt.mk b/package/mcrypt/mcrypt.mk
index 03a1719..f98895f 100644
--- a/package/mcrypt/mcrypt.mk
+++ b/package/mcrypt/mcrypt.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 056/100] midori: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (54 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 055/100] mcrypt: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 057/100] minidlna: " Thomas Petazzoni
                   ` (44 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/midori/Config.in | 1 -
 package/midori/midori.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/midori/Config.in b/package/midori/Config.in
index 840d689..0c7f8ba 100644
--- a/package/midori/Config.in
+++ b/package/midori/Config.in
@@ -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
diff --git a/package/midori/midori.mk b/package/midori/midori.mk
index 395e72e..1755f12 100644
--- a/package/midori/midori.mk
+++ b/package/midori/midori.mk
@@ -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 = \
-- 
2.9.4

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

* [Buildroot] [PATCH 057/100] minidlna: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (55 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 056/100] midori: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 058/100] ndisc6: " Thomas Petazzoni
                   ` (43 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/minidlna/Config.in   | 1 -
 package/minidlna/minidlna.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/minidlna/Config.in b/package/minidlna/Config.in
index c900143..a8311af 100644
--- a/package/minidlna/Config.in
+++ b/package/minidlna/Config.in
@@ -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.
diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk
index 4fa5545..d0d9136 100644
--- a/package/minidlna/minidlna.mk
+++ b/package/minidlna/minidlna.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 058/100] ndisc6: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (56 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 057/100] minidlna: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 059/100] net-tools: " Thomas Petazzoni
                   ` (42 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/ndisc6/Config.in | 1 -
 package/ndisc6/ndisc6.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/ndisc6/Config.in b/package/ndisc6/Config.in
index 321bfbc..a397ea6 100644
--- a/package/ndisc6/Config.in
+++ b/package/ndisc6/Config.in
@@ -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
 
diff --git a/package/ndisc6/ndisc6.mk b/package/ndisc6/ndisc6.mk
index 8326fc7..3ab8306 100644
--- a/package/ndisc6/ndisc6.mk
+++ b/package/ndisc6/ndisc6.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 059/100] net-tools: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (57 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 058/100] ndisc6: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 060/100] newt: " Thomas Petazzoni
                   ` (41 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/net-tools/Config.in    | 1 -
 package/net-tools/net-tools.mk | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/net-tools/Config.in b/package/net-tools/Config.in
index 3980b7e..5e24bd1 100644
--- a/package/net-tools/Config.in
+++ b/package/net-tools/Config.in
@@ -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.
diff --git a/package/net-tools/net-tools.mk b/package/net-tools/net-tools.mk
index 5720fcc..57a3eb4 100644
--- a/package/net-tools/net-tools.mk
+++ b/package/net-tools/net-tools.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 060/100] newt: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (58 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 059/100] net-tools: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 061/100] nftables: " Thomas Petazzoni
                   ` (40 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/newt/Config.in | 1 -
 package/newt/newt.mk   | 6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/newt/Config.in b/package/newt/Config.in
index a221615..c59af1c 100644
--- a/package/newt/Config.in
+++ b/package/newt/Config.in
@@ -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.
 
diff --git a/package/newt/newt.mk b/package/newt/newt.mk
index 1764bbc..456dd69 100644
--- a/package/newt/newt.mk
+++ b/package/newt/newt.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 061/100] nftables: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (59 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 060/100] newt: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 062/100] pango: " Thomas Petazzoni
                   ` (39 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/nftables/Config.in   | 1 -
 package/nftables/nftables.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/nftables/Config.in b/package/nftables/Config.in
index d0a1b89..7c0abe0 100644
--- a/package/nftables/Config.in
+++ b/package/nftables/Config.in
@@ -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.
diff --git a/package/nftables/nftables.mk b/package/nftables/nftables.mk
index 7263ec7..d1e6055 100644
--- a/package/nftables/nftables.mk
+++ b/package/nftables/nftables.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 062/100] pango: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (60 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 061/100] nftables: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 063/100] php: " Thomas Petazzoni
                   ` (38 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pango/Config.in | 1 -
 package/pango/pango.mk  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/pango/Config.in b/package/pango/Config.in
index 7813c4e..dd2117a 100644
--- a/package/pango/Config.in
+++ b/package/pango/Config.in
@@ -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
diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index 2f2d580..7556f0b 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -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 \
-- 
2.9.4

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

* [Buildroot] [PATCH 063/100] php: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (61 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 062/100] pango: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 17:05   ` Arnout Vandecappelle
  2017-07-04 14:48 ` [Buildroot] [PATCH 064/100] popt: " Thomas Petazzoni
                   ` (37 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/php/Config.ext | 5 -----
 package/php/php.mk     | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/package/php/Config.ext b/package/php/Config.ext
index bb6ada6..5fe3513 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -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
diff --git a/package/php/php.mk b/package/php/php.mk
index fe531a4..1a1ed21 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -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)
-- 
2.9.4

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

* [Buildroot] [PATCH 064/100] popt: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (62 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 063/100] php: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 065/100] powertop: " Thomas Petazzoni
                   ` (36 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/popt/popt.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/popt/popt.mk b/package/popt/popt.mk
index 3ab5388..99c5138 100644
--- a/package/popt/popt.mk
+++ b/package/popt/popt.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 065/100] powertop: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (63 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 064/100] popt: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 066/100] procps-ng: " Thomas Petazzoni
                   ` (35 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/powertop/Config.in   | 1 -
 package/powertop/powertop.mk | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/package/powertop/Config.in b/package/powertop/Config.in
index a532302..36701f8 100644
--- a/package/powertop/Config.in
+++ b/package/powertop/Config.in
@@ -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
 
diff --git a/package/powertop/powertop.mk b/package/powertop/powertop.mk
index 62b716f..ce7a118 100644
--- a/package/powertop/powertop.mk
+++ b/package/powertop/powertop.mk
@@ -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.
-- 
2.9.4

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

* [Buildroot] [PATCH 066/100] procps-ng: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (64 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 065/100] powertop: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 067/100] psmisc: " Thomas Petazzoni
                   ` (34 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/procps-ng/Config.in    | 1 -
 package/procps-ng/procps-ng.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/procps-ng/Config.in b/package/procps-ng/Config.in
index 553bea1..6ff8983 100644
--- a/package/procps-ng/Config.in
+++ b/package/procps-ng/Config.in
@@ -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...
diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk
index 0ab3139..22ebc1a 100644
--- a/package/procps-ng/procps-ng.mk
+++ b/package/procps-ng/procps-ng.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 067/100] psmisc: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (65 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 066/100] procps-ng: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 068/100] pv: " Thomas Petazzoni
                   ` (33 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/psmisc/Config.in | 1 -
 package/psmisc/psmisc.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/psmisc/Config.in b/package/psmisc/Config.in
index 2b66bcf..0d1d061 100644
--- a/package/psmisc/Config.in
+++ b/package/psmisc/Config.in
@@ -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
 
diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk
index 408c047..3d9a804 100644
--- a/package/psmisc/psmisc.mk
+++ b/package/psmisc/psmisc.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 068/100] pv: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (66 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 067/100] psmisc: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 069/100] python: " Thomas Petazzoni
                   ` (32 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pv/Config.in | 1 -
 package/pv/pv.mk     | 8 +-------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/package/pv/Config.in b/package/pv/Config.in
index d732296..671f78e 100644
--- a/package/pv/Config.in
+++ b/package/pv/Config.in
@@ -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
diff --git a/package/pv/pv.mk b/package/pv/pv.mk
index 2279805..0ef5a6f 100644
--- a/package/pv/pv.mk
+++ b/package/pv/pv.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 069/100] python: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (67 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 068/100] pv: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 070/100] quota: " Thomas Petazzoni
                   ` (31 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/python/python.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/python/python.mk b/package/python/python.mk
index d3f7b31..8724d8c 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 070/100] quota: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (68 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 069/100] python: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 071/100] rhash: " Thomas Petazzoni
                   ` (30 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/quota/Config.in | 1 -
 package/quota/quota.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/quota/Config.in b/package/quota/Config.in
index c8ab0d7..051a765 100644
--- a/package/quota/Config.in
+++ b/package/quota/Config.in
@@ -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.
diff --git a/package/quota/quota.mk b/package/quota/quota.mk
index d3b8755..5bd9013 100644
--- a/package/quota/quota.mk
+++ b/package/quota/quota.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 071/100] rhash: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (69 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 070/100] quota: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 16:06   ` Arnout Vandecappelle
  2017-07-04 14:48 ` [Buildroot] [PATCH 072/100] rpm: " Thomas Petazzoni
                   ` (29 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/rhash/Config.in | 1 -
 package/rhash/rhash.mk  | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/package/rhash/Config.in b/package/rhash/Config.in
index 46f6ca7..2ddcb00 100644
--- a/package/rhash/Config.in
+++ b/package/rhash/Config.in
@@ -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,
diff --git a/package/rhash/rhash.mk b/package/rhash/rhash.mk
index 6cfc271..53f49d8 100644
--- a/package/rhash/rhash.mk
+++ b/package/rhash/rhash.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 072/100] rpm: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (70 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 071/100] rhash: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 16:09   ` Arnout Vandecappelle
  2017-07-04 14:48 ` [Buildroot] [PATCH 073/100] rrdtool: " Thomas Petazzoni
                   ` (28 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/rpm/Config.in | 1 -
 package/rpm/rpm.mk    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/rpm/Config.in b/package/rpm/Config.in
index 9b4c8a7..aa857ef 100644
--- a/package/rpm/Config.in
+++ b/package/rpm/Config.in
@@ -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
diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk
index 317ec14..c81a110 100644
--- a/package/rpm/rpm.mk
+++ b/package/rpm/rpm.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 073/100] rrdtool: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (71 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 072/100] rpm: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 074/100] samba4: " Thomas Petazzoni
                   ` (27 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/rrdtool/Config.in  | 1 -
 package/rrdtool/rrdtool.mk | 6 +-----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/package/rrdtool/Config.in b/package/rrdtool/Config.in
index 3d8c0c6..631ed32 100644
--- a/package/rrdtool/Config.in
+++ b/package/rrdtool/Config.in
@@ -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.
diff --git a/package/rrdtool/rrdtool.mk b/package/rrdtool/rrdtool.mk
index 028b7cb..ea5c892 100644
--- a/package/rrdtool/rrdtool.mk
+++ b/package/rrdtool/rrdtool.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 074/100] samba4: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (72 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 073/100] rrdtool: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 075/100] sshfs: " Thomas Petazzoni
                   ` (26 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/samba4/samba4.mk | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk
index 93c45da..86546e9 100644
--- a/package/samba4/samba4.mk
+++ b/package/samba4/samba4.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 075/100] sshfs: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (73 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 074/100] samba4: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 076/100] sysstat: " Thomas Petazzoni
                   ` (25 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/sshfs/Config.in | 1 -
 package/sshfs/sshfs.mk  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in
index 54aa831..54e92c6 100644
--- a/package/sshfs/Config.in
+++ b/package/sshfs/Config.in
@@ -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
diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk
index 1288318..ee96ad6 100644
--- a/package/sshfs/sshfs.mk
+++ b/package/sshfs/sshfs.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 076/100] sysstat: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (74 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 075/100] sshfs: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 077/100] tpm-tools: " Thomas Petazzoni
                   ` (24 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/sysstat/Config.in  | 1 -
 package/sysstat/sysstat.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in
index 923c48a..442b787 100644
--- a/package/sysstat/Config.in
+++ b/package/sysstat/Config.in
@@ -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,
diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk
index bd73214..e4ba662 100644
--- a/package/sysstat/sysstat.mk
+++ b/package/sysstat/sysstat.mk
@@ -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.
-- 
2.9.4

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

* [Buildroot] [PATCH 077/100] tpm-tools: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (75 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 076/100] sysstat: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 078/100] ushare: " Thomas Petazzoni
                   ` (23 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/tpm-tools/Config.in    | 1 -
 package/tpm-tools/tpm-tools.mk | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/tpm-tools/Config.in b/package/tpm-tools/Config.in
index 091f424..e115687 100644
--- a/package/tpm-tools/Config.in
+++ b/package/tpm-tools/Config.in
@@ -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
 
diff --git a/package/tpm-tools/tpm-tools.mk b/package/tpm-tools/tpm-tools.mk
index c90edbb..4dbf50a 100644
--- a/package/tpm-tools/tpm-tools.mk
+++ b/package/tpm-tools/tpm-tools.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 078/100] ushare: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (76 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 077/100] tpm-tools: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 14:48 ` [Buildroot] [PATCH 079/100] util-linux: " Thomas Petazzoni
                   ` (22 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/ushare/Config.in |  1 -
 package/ushare/ushare.mk | 10 +++-------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/package/ushare/Config.in b/package/ushare/Config.in
index 70bf24a..c3475b8 100644
--- a/package/ushare/Config.in
+++ b/package/ushare/Config.in
@@ -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
diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
index 32aa445..bb194f6 100644
--- a/package/ushare/ushare.mk
+++ b/package/ushare/ushare.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 079/100] util-linux: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (77 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 078/100] ushare: " Thomas Petazzoni
@ 2017-07-04 14:48 ` Thomas Petazzoni
  2017-07-04 17:03   ` Carlos Santos
  2017-07-04 14:49 ` [Buildroot] [PATCH 080/100] vdr: " Thomas Petazzoni
                   ` (21 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:48 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/util-linux/Config.in     | 1 -
 package/util-linux/util-linux.mk | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 6ba239e..cba590c 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -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.
 
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index d55ee7c..61e3e63 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 080/100] vdr: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (78 preceding siblings ...)
  2017-07-04 14:48 ` [Buildroot] [PATCH 079/100] util-linux: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 081/100] vim: " Thomas Petazzoni
                   ` (20 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/vdr/Config.in | 1 -
 package/vdr/vdr.mk    | 9 +++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/package/vdr/Config.in b/package/vdr/Config.in
index d32c642..65117f5 100644
--- a/package/vdr/Config.in
+++ b/package/vdr/Config.in
@@ -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
diff --git a/package/vdr/vdr.mk b/package/vdr/vdr.mk
index 6c46566..242c579 100644
--- a/package/vdr/vdr.mk
+++ b/package/vdr/vdr.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 081/100] vim: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (79 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 080/100] vdr: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 082/100] whois: " Thomas Petazzoni
                   ` (19 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/vim/Config.in | 1 -
 package/vim/vim.mk    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/vim/Config.in b/package/vim/Config.in
index b851627..1469be8 100644
--- a/package/vim/Config.in
+++ b/package/vim/Config.in
@@ -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
 
diff --git a/package/vim/vim.mk b/package/vim/vim.mk
index ec49460..c235a08 100644
--- a/package/vim/vim.mk
+++ b/package/vim/vim.mk
@@ -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 = \
-- 
2.9.4

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

* [Buildroot] [PATCH 082/100] whois: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (80 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 081/100] vim: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 16:19   ` Arnout Vandecappelle
  2017-07-04 14:49 ` [Buildroot] [PATCH 083/100] xlib_libXpm: " Thomas Petazzoni
                   ` (18 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/whois/Config.in | 1 -
 package/whois/whois.mk  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/whois/Config.in b/package/whois/Config.in
index 0fbaf90..8e62ddf 100644
--- a/package/whois/Config.in
+++ b/package/whois/Config.in
@@ -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.
 
diff --git a/package/whois/whois.mk b/package/whois/whois.mk
index 24b6b69..b773499 100644
--- a/package/whois/whois.mk
+++ b/package/whois/whois.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 083/100] xlib_libXpm: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (81 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 082/100] whois: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 084/100] xscreensaver: " Thomas Petazzoni
                   ` (17 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/x11r7/xlib_libXpm/xlib_libXpm.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/x11r7/xlib_libXpm/xlib_libXpm.mk b/package/x11r7/xlib_libXpm/xlib_libXpm.mk
index c8c5496..e781a8b 100644
--- a/package/x11r7/xlib_libXpm/xlib_libXpm.mk
+++ b/package/x11r7/xlib_libXpm/xlib_libXpm.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 084/100] xscreensaver: use the new gettext logic
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (82 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 083/100] xlib_libXpm: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 085/100] e2fsprogs: remove libintl static linking handling Thomas Petazzoni
                   ` (16 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/xscreensaver/Config.in       | 1 -
 package/xscreensaver/xscreensaver.mk | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/xscreensaver/Config.in b/package/xscreensaver/Config.in
index 5213ce3..032eab2 100644
--- a/package/xscreensaver/Config.in
+++ b/package/xscreensaver/Config.in
@@ -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.
diff --git a/package/xscreensaver/xscreensaver.mk b/package/xscreensaver/xscreensaver.mk
index 77c37a9..34b1163 100644
--- a/package/xscreensaver/xscreensaver.mk
+++ b/package/xscreensaver/xscreensaver.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 085/100] e2fsprogs: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (83 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 084/100] xscreensaver: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 16:21   ` Arnout Vandecappelle
  2017-07-04 14:49 ` [Buildroot] [PATCH 086/100] gnuchess: " Thomas Petazzoni
                   ` (15 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/e2fsprogs/e2fsprogs.mk | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index 84af7ab..75e9213 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -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 = \
-- 
2.9.4

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

* [Buildroot] [PATCH 086/100] gnuchess: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (84 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 085/100] e2fsprogs: remove libintl static linking handling Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 087/100] gptfdisk: " Thomas Petazzoni
                   ` (14 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../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

diff --git a/package/gnuchess/0001-fix-static-build-with-uClibc.patch b/package/gnuchess/0001-fix-static-build-with-uClibc.patch
deleted file mode 100644
index 20a0835..0000000
--- a/package/gnuchess/0001-fix-static-build-with-uClibc.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 5bb2bc6384024c2344ef5cc6785131b382c38170 Mon Sep 17 00:00:00 2001
-From: Romain Naour <romain.naour@openwide.fr>
-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 <romain.naour@openwide.fr>
----
- 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
-
-- 
2.9.4

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

* [Buildroot] [PATCH 087/100] gptfdisk: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (85 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 086/100] gnuchess: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 088/100] iputils: " Thomas Petazzoni
                   ` (13 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gptfdisk/gptfdisk.mk | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/package/gptfdisk/gptfdisk.mk b/package/gptfdisk/gptfdisk.mk
index 9c94421..c5826df 100644
--- a/package/gptfdisk/gptfdisk.mk
+++ b/package/gptfdisk/gptfdisk.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 088/100] iputils: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (86 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 087/100] gptfdisk: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 089/100] net-tools: " Thomas Petazzoni
                   ` (12 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/iputils/iputils.mk | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk
index 57dc660..b20cd12 100644
--- a/package/iputils/iputils.mk
+++ b/package/iputils/iputils.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 089/100] net-tools: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (87 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 088/100] iputils: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 090/100] oprofile: " Thomas Petazzoni
                   ` (11 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...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%)

diff --git a/package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch b/package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch
deleted file mode 100644
index a2d674e..0000000
--- a/package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From a2076079a409141704701ec17a205d89e5b24052 Mon Sep 17 00:00:00 2001
-From: Romain Naour <romain.naour@gmail.com>
-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 <romain.naour@gmail.com>
----
- 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
-
diff --git a/package/net-tools/0002-iptunnel.c-do-not-include-netinet-ip.h.patch b/package/net-tools/0001-iptunnel.c-do-not-include-netinet-ip.h.patch
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
diff --git a/package/net-tools/net-tools.mk b/package/net-tools/net-tools.mk
index 57a3eb4..bc87290 100644
--- a/package/net-tools/net-tools.mk
+++ b/package/net-tools/net-tools.mk
@@ -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
 
-- 
2.9.4

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

* [Buildroot] [PATCH 090/100] oprofile: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (88 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 089/100] net-tools: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 091/100] parted: " Thomas Petazzoni
                   ` (10 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/oprofile/oprofile.mk | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk
index d86b8c5..4e0278e 100644
--- a/package/oprofile/oprofile.mk
+++ b/package/oprofile/oprofile.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 091/100] parted: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (89 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 090/100] oprofile: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 092/100] perl: " Thomas Petazzoni
                   ` (9 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...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

diff --git a/package/parted/0004-fix-includes-for-musl.patch b/package/parted/0003-fix-includes-for-musl.patch
similarity index 100%
rename from package/parted/0004-fix-includes-for-musl.patch
rename to package/parted/0003-fix-includes-for-musl.patch
diff --git a/package/parted/0003-fix-static-link-uuid.patch b/package/parted/0003-fix-static-link-uuid.patch
deleted file mode 100644
index d6ec2cf..0000000
--- a/package/parted/0003-fix-static-link-uuid.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-configure: use pkg-config to find libuuid
-
-In some conditions, libuuid may be linked with -lintl. This can be the
-case on uClibc when locales are enabled.
-
-When doing a shared link, this dependency is automatically pulled in via
-a DT_NEEDED ELF tag
-
-For a static link, there is no such mechanism to pull in dependent
-libraries.
-
-Currently, the check for libuuid is done with AC_CHECK_LIB, but this
-does not handle dependencies, and thus a stattic build fails.
-
-Use pkg-config to find libuuid, that automatically pulls in the
-dependencies of libuuid, if any.
-
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-
----
-Note: of course, that relies on the fact that libuuid installs a proper
-.pc file; a patch will be submitted upstream shortly.
-
-But even considering the current situation, where libuuid does not
-provide a proper .pc file (yet), this patch does not change the
-behaviour we've had so far; it is a bet on the future! ;-)
-
-diff -durN parted-3.1.orig/configure.ac parted-3.1/configure.ac
---- parted-3.1.orig/configure.ac	2014-11-29 16:27:49.520560137 +0100
-+++ parted-3.1/configure.ac	2014-11-29 16:32:50.799702049 +0100
-@@ -313,16 +313,7 @@
- AC_SUBST([DL_LIBS])
- 
- dnl Check for libuuid
--UUID_LIBS=""
--AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"],
--	[AC_MSG_ERROR(dnl
--[GNU Parted requires libuuid - a part of the util-linux-ng package (but
--usually distributed separately in libuuid-devel, uuid-dev or similar)
--This can probably be found on your distribution's CD or FTP site or at:
--    http://userweb.kernel.org/~kzak/util-linux-ng/
--Note: originally, libuuid was part of the e2fsprogs package.  Later, it
--moved to util-linux-ng-2.16, and that package is now the preferred source.])])
--AC_SUBST([UUID_LIBS])
-+PKG_CHECK_MODULES([UUID],[uuid])
- 
- dnl Check for libdevmapper
- DM_LIBS=
-- 
2.9.4

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

* [Buildroot] [PATCH 092/100] perl: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (90 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 091/100] parted: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 093/100] popt: " Thomas Petazzoni
                   ` (8 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../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

diff --git a/package/perl/0001-fix-static-build-with-gdbm-gettext.patch b/package/perl/0001-fix-static-build-with-gdbm-gettext.patch
deleted file mode 100644
index ca6bf01..0000000
--- a/package/perl/0001-fix-static-build-with-gdbm-gettext.patch
+++ /dev/null
@@ -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 <francois.perrad@gadz.org>
-
-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'},
-
-- 
2.9.4

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

* [Buildroot] [PATCH 093/100] popt: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (91 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 092/100] perl: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 094/100] qt: " Thomas Petazzoni
                   ` (7 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-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

diff --git a/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch b/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch
deleted file mode 100644
index 9b0b07e..0000000
--- a/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 470755ccc353b59107c957972d908cbde4942c8d Mon Sep 17 00:00:00 2001
-From: Fabio Porcedda <fabio.porcedda@gmail.com>
-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 <fabio.porcedda@gmail.com>
----
- 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
-
-- 
2.9.4

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

* [Buildroot] [PATCH 094/100] qt: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (92 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 093/100] popt: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 095/100] util-linux: " Thomas Petazzoni
                   ` (6 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...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%)

diff --git a/package/qt/0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch b/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
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
diff --git a/package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch b/package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch
deleted file mode 100644
index f6163fa..0000000
--- a/package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 7a912823158a4113256c3113a34c38d6b241d275 Mon Sep 17 00:00:00 2001
-From: Alexey Brodkin <abrodkin@synopsys.com>
-Date: Wed, 13 Jan 2016 20:15:36 +0300
-Subject: [PATCH] Fix library inclusion order when building statically
-
-When building application statically it's important to keep
-libraries we're linking against in order. Otherwise if libA depends on
-libB but it is mentioned after libB in linker command line
-there will be unresolved symbols.
-
-Consider real example - configuration of Qt with glib for static build.
-Initially reported by Buildroot autobuilder here:
-http://autobuild.buildroot.net/results/174/174c6e47eb761f9897275b6fedff742ace2f3081
-
-What happens here:
-
-[1] Qt's configuration script tries to build glib test app
-    (in config.tests/unix/glib)
-
-[2] For that it first asks which libs to use during linkage this way:
-    QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
-
-    In our case we're getting something like this:
-    -L/.../sysroot/usr/lib -lintl -lgthread-2.0 -pthread -lglib-2.0 \
-    -lintl -pthread -lintl
-
-    Note "-lintl" is mentioned 3 times because libgthread depends on
-    libthread and both of them plus libglib all depend on libintl - so
-    we're getting "lintl" for each separate library mentioned above.
-
-[3] Now we execute "compileTest" for real heavy lifting this way:
-    compileTest unix/glib "Glib" $QT_CFLAGS_GLIB $QT_LIBS_GLIB ...
-
-[4] compileTest (the one for unix) parses command-line passed to it
-    groups all entries with "-l" prefix and puts them in LFLAGS
-    variable. And finally executes qmake passing it that kind of
-    construction:
-    $OUTDIR/bin/qmake ..."LIBS*=$LFLAGS"
-
-[5] When qmake sees construction "MYVAR*=MYVAL" it populates MYVAR with
-    unique values from MYVAL string.
-
-[6] As a result qmake generated Makefile with the following:
-    LIBS = $(SUBLIBS) -pthread -L/.../sysroot/usr/lib -lintl -lgthread-2.0 \
-    -lglib-2.0
-
-[7] And essentially on attempt to link glib test app a failure happens
-    because libglib needs libintl, i.e. "-lintl" must follow "-lglib-2.0":
--------------------->8------------------
-linking glib
-
-g++ -static -Wl,-O1 -o glib glib.o -pthread -L/.../sysroot/usr/lib \
--lintl -lgthread-2.0 -lglib-2.0
-
-/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function '_g_dgettext_should_translate':
-ggettext.c:(.text+0x28): undefined reference to `libintl_textdomain'
-ggettext.c:(.text+0x36): undefined reference to `libintl_gettext'
-/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `ensure_gettext_initialized':
-ggettext.c:(.text+0xe6): undefined reference to `libintl_bindtextdomain'
-ggettext.c:(.text+0xf6): undefined reference to `libintl_bind_textdomain_codeset'
-/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dgettext':
-ggettext.c:(.text+0x148): undefined reference to `libintl_dgettext'
-/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dcgettext':
-ggettext.c:(.text+0x2dc): undefined reference to `libintl_dcgettext'
-/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dngettext':
-ggettext.c:(.text+0x32a): undefined reference to `libintl_dngettext'
-collect2: error: ld returned 1 exit status
-Makefile:99: recipe for target 'glib' failed
-make: *** [glib] Error 1
-
-Glib disabled.
-Glib support cannot be enabled due to functionality tests!
- Turn on verbose messaging (-v) to ./configure to see the final report.
- If you believe this message is in error you may use the continue
- switch (-continue) to ./configure to continue.
--------------------->8------------------
-
-Solution to this problem is simple we have to pass all libraries exactly
-in order of their initial mention by upper layers.
-
-Change-Id: I7ff00901031a8eb85b4fbd7889b0e0c02be806bb
-
-This fix was sent to Qt Gerrit for review here:
-https://codereview.qt-project.org/#/c/145967/
-
----
- config.tests/unix/compile.test | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
-index f484f03..dac0a4f 100755
---- a/config.tests/unix/compile.test
-+++ b/config.tests/unix/compile.test
-@@ -73,7 +73,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
- rm -f "$EXE" "${EXE}.exe"
- 
- echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache"
--"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
-+"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
- 
- if [ "$VERBOSE" = "yes" ]; then
-     $MAKE
--- 
-2.4.3
-
diff --git a/package/qt/0012-Link-with-ldl-option-only-when-it-is-supported.patch b/package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch
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
diff --git a/package/qt/0013-OpenGL-EGL-Avoid-X11-header-collision.patch b/package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch
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
-- 
2.9.4

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

* [Buildroot] [PATCH 095/100] util-linux: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (93 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 094/100] qt: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 096/100] xfsprogs: " Thomas Petazzoni
                   ` (5 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/util-linux/util-linux.mk | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 61e3e63..4c2b1f6 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 096/100] xfsprogs: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (94 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 095/100] util-linux: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 097/100] xmlstarlet: " Thomas Petazzoni
                   ` (4 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../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

diff --git a/package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch b/package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch
deleted file mode 100644
index 8ff0580..0000000
--- a/package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 1e9bb2fba94bc508659f1667bf95501324849bb9 Mon Sep 17 00:00:00 2001
-From: "Yann E. MORIN" <yann.morin.1998@free.fr>
-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" <yann.morin.1998@free.fr>
-Cc: Waldemar Brodkorb <wbx@openadk.org>
----
- 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
-
diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk
index ed56d34..2f708f1 100644
--- a/package/xfsprogs/xfsprogs.mk
+++ b/package/xfsprogs/xfsprogs.mk
@@ -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))
-- 
2.9.4

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

* [Buildroot] [PATCH 097/100] xmlstarlet: remove libintl static linking handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (95 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 096/100] xfsprogs: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 14:49 ` [Buildroot] [PATCH 098/100] toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE} Thomas Petazzoni
                   ` (3 subsequent siblings)
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/xmlstarlet/xmlstarlet.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk
index 091c371..9920dcf 100644
--- a/package/xmlstarlet/xmlstarlet.mk
+++ b/package/xmlstarlet/xmlstarlet.mk
@@ -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
-- 
2.9.4

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

* [Buildroot] [PATCH 098/100] toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (96 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 097/100] xmlstarlet: " Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 16:22   ` Arnout Vandecappelle
  2017-07-04 14:49 ` [Buildroot] [PATCH 099/100] docs/manual: update gettext details Thomas Petazzoni
                   ` (2 subsequent siblings)
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gettext/Config.in     |  1 -
 toolchain/toolchain-common.in | 14 --------------
 2 files changed, 15 deletions(-)

diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index 0dea03d..60f8d4f 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -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
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 56de9ed..1e4182e 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -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)
-- 
2.9.4

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

* [Buildroot] [PATCH 099/100] docs/manual: update gettext details
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (97 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 098/100] toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE} Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 16:49   ` Arnout Vandecappelle
  2017-07-04 14:49 ` [Buildroot] [PATCH 100/100] CHANGES: add details on the gettext revamp Thomas Petazzoni
  2017-07-04 17:22 ` [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 docs/manual/adding-packages-gettext.txt | 83 +++++++++++++++++----------------
 1 file changed, 42 insertions(+), 41 deletions(-)

diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt
index c955b1f..e9c6968 100644
--- a/docs/manual/adding-packages-gettext.txt
+++ b/docs/manual/adding-packages-gettext.txt
@@ -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.
 
-- 
2.9.4

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

* [Buildroot] [PATCH 100/100] CHANGES: add details on the gettext revamp
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (98 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 099/100] docs/manual: update gettext details Thomas Petazzoni
@ 2017-07-04 14:49 ` Thomas Petazzoni
  2017-07-04 16:50   ` Arnout Vandecappelle
  2017-07-04 17:22 ` [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
  100 siblings, 1 reply; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 14:49 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 CHANGES | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/CHANGES b/CHANGES
index cf4b22b..7b98e84 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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.
-- 
2.9.4

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

* [Buildroot] [PATCH 012/100] alsa-utils: use new gettext logic
  2017-07-04 14:47 ` [Buildroot] [PATCH 012/100] alsa-utils: use new gettext logic Thomas Petazzoni
@ 2017-07-04 15:23   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 15:23 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:47, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/alsa-utils/Config.in     |  1 -
>  package/alsa-utils/alsa-utils.mk | 13 +++++--------
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
> index 1d42f2e..d3fd18d 100644
> --- a/package/alsa-utils/Config.in
> +++ b/package/alsa-utils/Config.in
> @@ -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.
> diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk
> index f0b964a..e9fd942 100644
> --- a/package/alsa-utils/alsa-utils.mk
> +++ b/package/alsa-utils/alsa-utils.mk
> @@ -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
> 

-- 
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

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

* [Buildroot] [PATCH 013/100] avahi: use new gettext logic
  2017-07-04 14:47 ` [Buildroot] [PATCH 013/100] avahi: " Thomas Petazzoni
@ 2017-07-04 15:33   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 15:33 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:47, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout


> ---
>  package/avahi/Config.in | 1 -
>  package/avahi/avahi.mk  | 6 +++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/package/avahi/Config.in b/package/avahi/Config.in
> index a6b4ac8..5e303d0 100644
> --- a/package/avahi/Config.in
> +++ b/package/avahi/Config.in
> @@ -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.
> diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
> index a356a08..94b6292 100644
> --- a/package/avahi/avahi.mk
> +++ b/package/avahi/avahi.mk
> @@ -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 * - - -
> 

-- 
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

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

* [Buildroot] [PATCH 042/100] libglib2: use the new gettext logic
  2017-07-04 14:48 ` [Buildroot] [PATCH 042/100] libglib2: " Thomas Petazzoni
@ 2017-07-04 15:44   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 15:44 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:48, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/libglib2/Config.in   | 1 -
>  package/libglib2/libglib2.mk | 4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
> index 62e29ef..ea946ba 100644
> --- a/package/libglib2/Config.in
> +++ b/package/libglib2/Config.in
> @@ -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.

>  	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
> diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
> index 577dcec..eeceeee 100644
> --- a/package/libglib2/libglib2.mk
> +++ b/package/libglib2/libglib2.mk
> @@ -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

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


 Regards,
 Arnout

> 

-- 
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

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

* [Buildroot] [PATCH 071/100] rhash: use the new gettext logic
  2017-07-04 14:48 ` [Buildroot] [PATCH 071/100] rhash: " Thomas Petazzoni
@ 2017-07-04 16:06   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:06 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:48, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/rhash/Config.in | 1 -
>  package/rhash/rhash.mk  | 9 +++------
>  2 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/package/rhash/Config.in b/package/rhash/Config.in
> index 46f6ca7..2ddcb00 100644
> --- a/package/rhash/Config.in
> +++ b/package/rhash/Config.in
> @@ -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,
> diff --git a/package/rhash/rhash.mk b/package/rhash/rhash.mk
> index 6cfc271..53f49d8 100644
> --- a/package/rhash/rhash.mk
> +++ b/package/rhash/rhash.mk
> @@ -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
> 

-- 
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

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

* [Buildroot] [PATCH 072/100] rpm: use the new gettext logic
  2017-07-04 14:48 ` [Buildroot] [PATCH 072/100] rpm: " Thomas Petazzoni
@ 2017-07-04 16:09   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:09 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:48, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/rpm/Config.in | 1 -
>  package/rpm/rpm.mk    | 4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/package/rpm/Config.in b/package/rpm/Config.in
> index 9b4c8a7..aa857ef 100644
> --- a/package/rpm/Config.in
> +++ b/package/rpm/Config.in
> @@ -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
> diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk
> index 317ec14..c81a110 100644
> --- a/package/rpm/rpm.mk
> +++ b/package/rpm/rpm.mk
> @@ -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
> 

 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

-- 
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

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

* [Buildroot] [PATCH 082/100] whois: use the new gettext logic
  2017-07-04 14:49 ` [Buildroot] [PATCH 082/100] whois: " Thomas Petazzoni
@ 2017-07-04 16:19   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:19 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:49, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/whois/Config.in | 1 -
>  package/whois/whois.mk  | 8 ++------
>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/package/whois/Config.in b/package/whois/Config.in
> index 0fbaf90..8e62ddf 100644
> --- a/package/whois/Config.in
> +++ b/package/whois/Config.in
> @@ -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

>  	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
> -	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
>  	help
>  	  Improved whois client.
>  
> diff --git a/package/whois/whois.mk b/package/whois/whois.mk
> index 24b6b69..b773499 100644
> --- a/package/whois/whois.mk
> +++ b/package/whois/whois.mk
> @@ -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
> 

-- 
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

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

* [Buildroot] [PATCH 085/100] e2fsprogs: remove libintl static linking handling
  2017-07-04 14:49 ` [Buildroot] [PATCH 085/100] e2fsprogs: remove libintl static linking handling Thomas Petazzoni
@ 2017-07-04 16:21   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:21 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:49, Thomas Petazzoni wrote:
> 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.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/e2fsprogs/e2fsprogs.mk | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
> index 84af7ab..75e9213 100644
> --- a/package/e2fsprogs/e2fsprogs.mk
> +++ b/package/e2fsprogs/e2fsprogs.mk
> @@ -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 = \
> 

-- 
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

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

* [Buildroot] [PATCH 098/100] toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE}
  2017-07-04 14:49 ` [Buildroot] [PATCH 098/100] toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE} Thomas Petazzoni
@ 2017-07-04 16:22   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:22 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:49, Thomas Petazzoni wrote:
> 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.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/gettext/Config.in     |  1 -
>  toolchain/toolchain-common.in | 14 --------------
>  2 files changed, 15 deletions(-)
> 
> diff --git a/package/gettext/Config.in b/package/gettext/Config.in
> index 0dea03d..60f8d4f 100644
> --- a/package/gettext/Config.in
> +++ b/package/gettext/Config.in
> @@ -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
> diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
> index 56de9ed..1e4182e 100644
> --- a/toolchain/toolchain-common.in
> +++ b/toolchain/toolchain-common.in
> @@ -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)
> 

-- 
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

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

* [Buildroot] [PATCH 099/100] docs/manual: update gettext details
  2017-07-04 14:49 ` [Buildroot] [PATCH 099/100] docs/manual: update gettext details Thomas Petazzoni
@ 2017-07-04 16:49   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:49 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:49, Thomas Petazzoni wrote:
> 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.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  docs/manual/adding-packages-gettext.txt | 83 +++++++++++++++++----------------
>  1 file changed, 42 insertions(+), 41 deletions(-)
> 
> diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt
> index c955b1f..e9c6968 100644
> --- a/docs/manual/adding-packages-gettext.txt
> +++ b/docs/manual/adding-packages-gettext.txt
> @@ -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.
>  
> 

-- 
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

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

* [Buildroot] [PATCH 100/100] CHANGES: add details on the gettext revamp
  2017-07-04 14:49 ` [Buildroot] [PATCH 100/100] CHANGES: add details on the gettext revamp Thomas Petazzoni
@ 2017-07-04 16:50   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 16:50 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:49, Thomas Petazzoni wrote:
> The gettext revamp has some user-visible changes, so this commit
> updates the CHANGES file to document them.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  CHANGES | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/CHANGES b/CHANGES
> index cf4b22b..7b98e84 100644
> --- a/CHANGES
> +++ b/CHANGES
> @@ -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.
> 

-- 
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

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

* [Buildroot] [PATCH 079/100] util-linux: use the new gettext logic
  2017-07-04 14:48 ` [Buildroot] [PATCH 079/100] util-linux: " Thomas Petazzoni
@ 2017-07-04 17:03   ` Carlos Santos
  0 siblings, 0 replies; 116+ messages in thread
From: Carlos Santos @ 2017-07-04 17:03 UTC (permalink / raw)
  To: buildroot

> From: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> To: "Buildroot List" <buildroot@uclibc.org>
> Cc: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/util-linux/Config.in     | 1 -
> package/util-linux/util-linux.mk | 8 ++------
> 2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
> index 6ba239e..cba590c 100644
> --- a/package/util-linux/Config.in
> +++ b/package/util-linux/Config.in
> @@ -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.
> 
> diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
> index d55ee7c..61e3e63 100644
> --- a/package/util-linux/util-linux.mk
> +++ b/package/util-linux/util-linux.mk
> @@ -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
> --
> 2.9.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Reviewed-by: Carlos Santos <casantos@datacom.ind.br>

-- 
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

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

* [Buildroot] [PATCH 063/100] php: use the new gettext logic
  2017-07-04 14:48 ` [Buildroot] [PATCH 063/100] php: " Thomas Petazzoni
@ 2017-07-04 17:05   ` Arnout Vandecappelle
  0 siblings, 0 replies; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 17:05 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:48, Thomas Petazzoni wrote:
> 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
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/php/Config.ext | 5 -----
>  package/php/php.mk     | 2 +-
>  2 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/package/php/Config.ext b/package/php/Config.ext
> index bb6ada6..5fe3513 100644
> --- a/package/php/Config.ext
> +++ b/package/php/Config.ext
> @@ -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.

>  	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
> diff --git a/package/php/php.mk b/package/php/php.mk
> index fe531a4..1a1ed21 100644
> --- a/package/php/php.mk
> +++ b/package/php/php.mk
> @@ -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

>  endif
>  
>  ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
> 

-- 
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

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

* [Buildroot] [PATCH 000/100] Rework of the gettext handling
  2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
                   ` (99 preceding siblings ...)
  2017-07-04 14:49 ` [Buildroot] [PATCH 100/100] CHANGES: add details on the gettext revamp Thomas Petazzoni
@ 2017-07-04 17:22 ` Thomas Petazzoni
  100 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 17:22 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  4 Jul 2017 16:47:40 +0200, Thomas Petazzoni wrote:

> 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

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 031/100] git: use the new gettext logic
  2017-07-04 14:48 ` [Buildroot] [PATCH 031/100] git: " Thomas Petazzoni
@ 2017-07-04 21:59   ` Arnout Vandecappelle
  2017-07-04 23:28     ` Thomas Petazzoni
  0 siblings, 1 reply; 116+ messages in thread
From: Arnout Vandecappelle @ 2017-07-04 21:59 UTC (permalink / raw)
  To: buildroot



On 04-07-17 16:48, Thomas Petazzoni wrote:
> This commit switches to use the new gettext logic, which involves
> using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies
> on gettext/host-gettext.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/git/git.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/package/git/git.mk b/package/git/git.mk
> index 9cc88dd..23ace0f 100644
> --- a/package/git/git.mk
> +++ b/package/git/git.mk
> @@ -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

> -
> -ifeq ($(BR2_PACKAGE_GETTEXT),y)
> -GIT_DEPENDENCIES += gettext
> -endif
> +GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
>  
>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  GIT_DEPENDENCIES += openssl
> 

-- 
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

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

* [Buildroot] [PATCH 031/100] git: use the new gettext logic
  2017-07-04 21:59   ` Arnout Vandecappelle
@ 2017-07-04 23:28     ` Thomas Petazzoni
  0 siblings, 0 replies; 116+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 23:28 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 4 Jul 2017 23:59:27 +0200, Arnout Vandecappelle wrote:

> > -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:

> > +GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)

Best regards,

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

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

end of thread, other threads:[~2017-07-04 23:28 UTC | newest]

Thread overview: 116+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04 14:47 [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 001/100] libglib2: disable compiler warnings Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 002/100] flex: remove bogus comment Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 003/100] lvm2: force disable NLS support Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 004/100] ushare: do not use the DISABLE_NLS variable Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 005/100] uclibc: enable libintl stubs Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 006/100] toolchain: introduce BR2_TOOLCHAIN_HAS_FULL_GETTEXT Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 007/100] gettext: force build libintl if needed Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 008/100] package: rename DISABLE_NLS to NLS_OPTS Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 009/100] system: introduce BR2_SYSTEM_ENABLE_NLS Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 010/100] package/Makefile.in: introduce TARGET_NLS_{DEPENDENCIES, LIBS} Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 011/100] package/Makefile.in: fix musl handling Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 012/100] alsa-utils: use new gettext logic Thomas Petazzoni
2017-07-04 15:23   ` Arnout Vandecappelle
2017-07-04 14:47 ` [Buildroot] [PATCH 013/100] avahi: " Thomas Petazzoni
2017-07-04 15:33   ` Arnout Vandecappelle
2017-07-04 14:47 ` [Buildroot] [PATCH 014/100] axel: use the " Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 015/100] binutils: " Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 016/100] clamav: use " Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 017/100] coreutils: use the " Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 018/100] cryptsetup: use " Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH 019/100] curlftpfs: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 020/100] diffutils: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 021/100] ding-libs: use the " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 022/100] dnsmasq: use " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 023/100] dos2unix: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 024/100] dropwatch: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 025/100] efibootmgr: use the " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 026/100] elfutils: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 027/100] exiv2: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 028/100] fetchmail: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 029/100] flex: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 030/100] gdbm: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 031/100] git: " Thomas Petazzoni
2017-07-04 21:59   ` Arnout Vandecappelle
2017-07-04 23:28     ` Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 032/100] glib-networking: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 033/100] gmpc: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 034/100] gnuchess: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 035/100] grep: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 036/100] httping: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 037/100] json-glib: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 038/100] kbd: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 039/100] lbreakout2: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 040/100] libconfuse: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 041/100] libftdi1: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 042/100] libglib2: " Thomas Petazzoni
2017-07-04 15:44   ` Arnout Vandecappelle
2017-07-04 14:48 ` [Buildroot] [PATCH 043/100] libgpg-error: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 044/100] libidn: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 045/100] libuio: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 046/100] libv4l: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 047/100] libvips: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 048/100] lightning: remove -lintl linking Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 049/100] linux-pam: use the new gettext logic Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 050/100] linux-tools: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 051/100] lshw: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 052/100] ltris: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 053/100] madplay: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 054/100] make: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 055/100] mcrypt: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 056/100] midori: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 057/100] minidlna: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 058/100] ndisc6: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 059/100] net-tools: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 060/100] newt: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 061/100] nftables: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 062/100] pango: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 063/100] php: " Thomas Petazzoni
2017-07-04 17:05   ` Arnout Vandecappelle
2017-07-04 14:48 ` [Buildroot] [PATCH 064/100] popt: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 065/100] powertop: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 066/100] procps-ng: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 067/100] psmisc: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 068/100] pv: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 069/100] python: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 070/100] quota: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 071/100] rhash: " Thomas Petazzoni
2017-07-04 16:06   ` Arnout Vandecappelle
2017-07-04 14:48 ` [Buildroot] [PATCH 072/100] rpm: " Thomas Petazzoni
2017-07-04 16:09   ` Arnout Vandecappelle
2017-07-04 14:48 ` [Buildroot] [PATCH 073/100] rrdtool: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 074/100] samba4: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 075/100] sshfs: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 076/100] sysstat: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 077/100] tpm-tools: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 078/100] ushare: " Thomas Petazzoni
2017-07-04 14:48 ` [Buildroot] [PATCH 079/100] util-linux: " Thomas Petazzoni
2017-07-04 17:03   ` Carlos Santos
2017-07-04 14:49 ` [Buildroot] [PATCH 080/100] vdr: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 081/100] vim: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 082/100] whois: " Thomas Petazzoni
2017-07-04 16:19   ` Arnout Vandecappelle
2017-07-04 14:49 ` [Buildroot] [PATCH 083/100] xlib_libXpm: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 084/100] xscreensaver: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 085/100] e2fsprogs: remove libintl static linking handling Thomas Petazzoni
2017-07-04 16:21   ` Arnout Vandecappelle
2017-07-04 14:49 ` [Buildroot] [PATCH 086/100] gnuchess: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 087/100] gptfdisk: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 088/100] iputils: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 089/100] net-tools: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 090/100] oprofile: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 091/100] parted: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 092/100] perl: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 093/100] popt: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 094/100] qt: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 095/100] util-linux: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 096/100] xfsprogs: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 097/100] xmlstarlet: " Thomas Petazzoni
2017-07-04 14:49 ` [Buildroot] [PATCH 098/100] toolchain: drop BR2_NEEDS_GETTEXT{, _IF_LOCALE} Thomas Petazzoni
2017-07-04 16:22   ` Arnout Vandecappelle
2017-07-04 14:49 ` [Buildroot] [PATCH 099/100] docs/manual: update gettext details Thomas Petazzoni
2017-07-04 16:49   ` Arnout Vandecappelle
2017-07-04 14:49 ` [Buildroot] [PATCH 100/100] CHANGES: add details on the gettext revamp Thomas Petazzoni
2017-07-04 16:50   ` Arnout Vandecappelle
2017-07-04 17:22 ` [Buildroot] [PATCH 000/100] Rework of the gettext handling Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.