All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory
@ 2017-05-19 21:04 Thomas Petazzoni
  2017-05-19 21:04 ` [Buildroot] [PATCH 2/2] fetchmail: adjust zlib handling Thomas Petazzoni
  2017-05-31 21:05 ` [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-05-19 21:04 UTC (permalink / raw)
  To: buildroot

Even when locales are enabled, gettext is not mandatory to build
fetchmail, i.e the following defconfig builds fine:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.02-1096-g54a5333.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_8=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_FETCHMAIL=y

However, if gettext provides libintl, it gets used. Therefore this
commit moves gettext from a mandatory dependency to an optional
dependency.

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

diff --git a/package/fetchmail/Config.in b/package/fetchmail/Config.in
index 1e829a0..7c14176 100644
--- a/package/fetchmail/Config.in
+++ b/package/fetchmail/Config.in
@@ -4,7 +4,6 @@ config BR2_PACKAGE_FETCHMAIL
 	select BR2_PACKAGE_CA_CERTIFICATES
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_ZLIB
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Fetchmail - the mail-retrieval daemon
 	  Client daemon to move mail from POP and IMAP to your local computer
diff --git a/package/fetchmail/fetchmail.mk b/package/fetchmail/fetchmail.mk
index 2c3786f..49ce0d3 100644
--- a/package/fetchmail/fetchmail.mk
+++ b/package/fetchmail/fetchmail.mk
@@ -20,8 +20,12 @@ FETCHMAIL_CONF_OPTS = \
 
 FETCHMAIL_DEPENDENCIES = \
 	ca-certificates \
-	openssl \
-	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+	openssl
+
+# libintl is an optional dependency
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+FETCHMAIL_DEPENDENCIES += gettext
+endif
 
 # fetchmailconf.py script is not (yet) python3-compliant.
 # Prevent the pyc-compilation with python-3 from failing by removing this
-- 
2.7.4

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

* [Buildroot] [PATCH 2/2] fetchmail: adjust zlib handling
  2017-05-19 21:04 [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory Thomas Petazzoni
@ 2017-05-19 21:04 ` Thomas Petazzoni
  2017-05-31 21:05 ` [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-05-19 21:04 UTC (permalink / raw)
  To: buildroot

fetchmail itself does not need zlib, there is no reference to it in its
source, so the "select BR2_PACKAGE_ZLIB" is not necessary. Moreover,
"zlib" was not added to FETCHMAIL_DEPENDENCIES (but was anyway in the
dependency chain through openssl).

In addition, LIBS="-lz" is only needed in static linking configurations,
to help fetchmail's configure script find OpenSSL (it doesn't use
pkg-config unfortunately).

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

diff --git a/package/fetchmail/Config.in b/package/fetchmail/Config.in
index 7c14176..62f4f84 100644
--- a/package/fetchmail/Config.in
+++ b/package/fetchmail/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_FETCHMAIL
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_CA_CERTIFICATES
 	select BR2_PACKAGE_OPENSSL
-	select BR2_PACKAGE_ZLIB
 	help
 	  Fetchmail - the mail-retrieval daemon
 	  Client daemon to move mail from POP and IMAP to your local computer
diff --git a/package/fetchmail/fetchmail.mk b/package/fetchmail/fetchmail.mk
index 49ce0d3..164b2f8 100644
--- a/package/fetchmail/fetchmail.mk
+++ b/package/fetchmail/fetchmail.mk
@@ -13,7 +13,11 @@ FETCHMAIL_LICENSE_FILES = COPYING
 FETCHMAIL_AUTORECONF = YES
 FETCHMAIL_GETTEXTIZE = YES
 
+# needed to help fetchmail detecting the availability of openssl,
+# because it doesn't use pkg-config
+ifeq ($(BR2_STATIC_LIBS),y)
 FETCHMAIL_CONF_ENV += LIBS="-lz"
+endif
 
 FETCHMAIL_CONF_OPTS = \
 	--with-ssl=$(STAGING_DIR)/usr
-- 
2.7.4

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

* [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory
  2017-05-19 21:04 [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory Thomas Petazzoni
  2017-05-19 21:04 ` [Buildroot] [PATCH 2/2] fetchmail: adjust zlib handling Thomas Petazzoni
@ 2017-05-31 21:05 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-05-31 21:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 19 May 2017 23:04:40 +0200, Thomas Petazzoni wrote:
> Even when locales are enabled, gettext is not mandatory to build
> fetchmail, i.e the following defconfig builds fine:
> 
> BR2_arm=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.02-1096-g54a5333.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_GCC_4_8=y
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
> BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> BR2_PACKAGE_FETCHMAIL=y
> 
> However, if gettext provides libintl, it gets used. Therefore this
> commit moves gettext from a mandatory dependency to an optional
> dependency.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/fetchmail/Config.in    | 1 -
>  package/fetchmail/fetchmail.mk | 8 ++++++--
>  2 files changed, 6 insertions(+), 3 deletions(-)

Both applied to next.

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

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

end of thread, other threads:[~2017-05-31 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19 21:04 [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory Thomas Petazzoni
2017-05-19 21:04 ` [Buildroot] [PATCH 2/2] fetchmail: adjust zlib handling Thomas Petazzoni
2017-05-31 21:05 ` [Buildroot] [PATCH 1/2] fetchmail: gettext is not mandatory 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.