Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/19] Make all package using gettext rely on BR2_NEEDS_GETTEXT
Date: Sat, 22 May 2010 10:27:15 +0200	[thread overview]
Message-ID: <87k4qwqr30.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <87ocg8qti8.fsf@macbook.be.48ers.dk> (Peter Korsgaard's message of "Sat, 22 May 2010 09:34:55 +0200")

>>>>> "Peter" == Peter Korsgaard <jacmet@uclibc.org> writes:

 Thomas> So we have two cases :

 Thomas> * Packages like Avahi. They understand --disable-nls and therefore
 Thomas> when locale support is not enabled, they don't need gettext.

 Thomas> * Packages like libglib2. They don't understand --disable-nls, so even
 Thomas> when locale is not enabled, they need gettext. libglib2 builds
 Thomas> fine in the previous situation, where BR2_NEEDS_GETTEXT was set
 Thomas> to yes as soon as an uClibc toolchain was used (regardless of
 Thomas> whether BR2_ENABLE_LOCALE is set or not). So it is possible to build
 Thomas> libglib2 with a !BR2_ENABLE_LOCALE toolchain, but it requires
 Thomas> gettext to be built.

 Peter> We could handle it in several different ways:
 Peter> - Make gettext a dummy kconfig/make target when glibc is used
 Peter> - Make BR2_NEEDS_GETTEXT simply be always enabled on uclibc and then
 Peter>   - select gettext if BR2_NEEDS_GETTEXT (and depends on BR2_USE_WCHAR)
 Peter>     for stuff like libglib2
 Peter>   - select getttext if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) for
 Peter>     stuff like avahi

Thinking a bit more about it, the easiest might just be to introduce two
symbols, one for each of the cases, E.G.:

diff --git a/toolchain/Config.in.2 b/toolchain/Config.in.2
index fc6759d..233303a 100644
--- a/toolchain/Config.in.2
+++ b/toolchain/Config.in.2
@@ -56,13 +56,16 @@ config BR2_ENABLE_LOCALE_WHITELIST
          will be available on the target - That purely depends on the
          support for that locale in the selected packages.
 
+config BR2_TOOLCHAIN_HAS_GETTEXT
+       bool
+       default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
+
 # uClibc toolchains require a separatly-compiled gettext/libintl when
 # locale support is enabled. This isn't necessary with glibc
 #  toolchains as glibc includes gettext/libintl.
 config BR2_NEEDS_GETTEXT
        bool
-       default y if (BR2_TOOLCHAIN_BUILDROOT && BR2_ENABLE_LOCALE)
-       default y if (BR2_TOOLCHAIN_EXTERNAL_UCLIBC && BR2_ENABLE_LOCALE)
+       default y if (!BR2_TOOLCHAIN_HAS_GETTEXT && BR2_ENABLE_LOCALE)
 
 config BR2_USE_WCHAR
        bool "Enable WCHAR support"

And then let stuff like glib2 do:

    select GETTEXT if !BR2_TOOLCHAIN_HAS_GETTEXT (and depend on wchar)

And stuff like avahi stays:

    select GETTEXT if BR2_NEEDS_GETTEXT

The BR2_TOOLCHAIN_HAS_GETTEXT unfortunately needs to be used in it's
negative form, but I cannot think of a good name in the reverse form
that clearly seperates it from BR2_NEEDS_GETTEXT.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2010-05-22  8:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  8:08 [Buildroot] [pull request] Pull request for branch 2010-05-15-fixes Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 01/19] Add a BR2_NEEDS_GETTEXT option Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 02/19] Make all package using gettext rely on BR2_NEEDS_GETTEXT Thomas Petazzoni
2010-05-21 19:56   ` Peter Korsgaard
2010-05-21 22:11     ` Thomas Petazzoni
2010-05-22  7:34       ` Peter Korsgaard
2010-05-22  8:27         ` Peter Korsgaard [this message]
2010-05-21  8:08 ` [Buildroot] [PATCH 03/19] libcap: fix build failure Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 04/19] libcgicc: fix package after autotools infrastructure conversion Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 05/19] ltrace: fix build failure Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 06/19] gettext: make only available if BR2_NEEDS_GETTEXT is set Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 07/19] external toolchain: check BR2_INSTALL_LIBSTDCPP Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 08/19] iconv: disallow selection when BR2_ENABLE_LOCALE is enabled Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 09/19] lmbench: needs BR2_INET_RPC Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 10/19] startup-notification: add dependency on xlib_libX11 Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 11/19] ntp: fix build failure Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 12/19] samba: only require libiconv if !BR2_ENABLE_LOCALE Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 13/19] pango: run pango-querymodules on the target instead of on the host Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 14/19] cairo: remove host variant Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 15/19] mutt: fix build and convert to autotools Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 16/19] lvm2: do not override CC and similar variables Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 17/19] uemacs: don't forget CFLAGS at link time Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 18/19] vpnc: pass " Thomas Petazzoni
2010-05-21  8:08 ` [Buildroot] [PATCH 19/19] netsnmp: disable build with external toolchain Thomas Petazzoni
2010-05-21 18:38 ` [Buildroot] [pull request] Pull request for branch 2010-05-15-fixes Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4qwqr30.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox