package/exim: Add optional OpenSSL support
PATCH 1/2 package/exim: Add optional OpenSSL support
--- package/exim/exim.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/exim/exim.mk +9 -0
@@ -62,6 +62,14 @@ define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV endef endif +ifeq ($(BR2_PACKAGE_OPENSSL),y) +EXIM_DEPENDENCIES += openssl +define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL + $(call exim-config-change,SUPPORT_TLS,yes) + $(call exim-config-change,TLS_LIBS,-lssl -lcrypto) +endef +endif + # this specific toolchain lacks libnsl ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12),y) define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE
@@ -89,6 +97,7 @@ define EXIM_CONFIGURE_CMDS $(EXIM_USE_DEFAULT_CONFIG_FILE) $(EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT) $(EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV) + $(EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL) $(EXIM_CONFIGURE_TOOLCHAIN) endef endif # CUSTOM_CONFIG
Signature · 1 line
1.7.10.4
PATCH 2/2 package/exim: Add optional libiconv support
--- package/exim/exim.mk | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
package/exim/exim.mk +13 -1
@@ -44,7 +44,6 @@ define EXIM_USE_DEFAULT_CONFIG_FILE $(call exim-config-change,TRANSPORT_LMTP,yes) $(call exim-config-change,PCRE_LIBS,-lpcre) $(call exim-config-change,PCRE_CONFIG,no) - $(call exim-config-change,HAVE_ICONV,no) $(call exim-config-unset,EXIM_MONITOR) endef
@@ -62,6 +61,18 @@ define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV endef endif +ifeq ($(BR2_PACKAGE_LIBICONV),y) +EXIM_DEPENDENCIES += libiconv +define EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV + $(call exim-config-change,HAVE_ICONV,yes) + $(call exim-config-add,EXTRALIBS_EXIM,-liconv) +endef +else +define EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV + $(call exim-config-change,HAVE_ICONV,no) +endef +endif + ifeq ($(BR2_PACKAGE_OPENSSL),y) EXIM_DEPENDENCIES += openssl define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL
@@ -97,6 +108,7 @@ define EXIM_CONFIGURE_CMDS $(EXIM_USE_DEFAULT_CONFIG_FILE) $(EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT) $(EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV) + $(EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV) $(EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL) $(EXIM_CONFIGURE_TOOLCHAIN) endef
Signature · 1 line
1.7.10.4
PATCH 2/2 package/exim: Add optional libiconv support
Dear Bernd Kuhls,
package/exim/exim.mk define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV · line 74
Quoted 11 lines · Bernd Kuhls
package/exim/exim.mk +11
-0+ifeq ($(BR2_PACKAGE_LIBICONV),y) +EXIM_DEPENDENCIES += libiconv +define EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV + $(call exim-config-change,HAVE_ICONV,yes) + $(call exim-config-add,EXTRALIBS_EXIM,-liconv) +endef +else +define EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV + $(call exim-config-change,HAVE_ICONV,no) +endef +endif
This is actually not correct: you can very well have iconv() available with libiconv.
libiconv is only a replacement library providing iconv() when the C library doesn't provide, which only happens when using uClibc with locales disabled.
So I think your patch should probably look like:
# We have iconv() support either if the toolchain has locale support or
# if libiconv is enabled. Both cannot be true at the same time since # libiconv is only available when the toolchain doesn't provide locale # support. In the case where iconv is provided by libiconv, we need to # link explicitly with libiconv.
ifeq ($(BR2_PACKAGE_LIBICONV)$(BR2_ENABLE_LOCALE),y)EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV += $(call exim-config-change,HAVE_ICONV,yes) EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV += $(if $(BR2_PACKAGE_LIBICONV),$(call exim-config-add,EXTRALIBS_EXIM,-liconv)) elseEXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV += $(call exim-config-change,HAVE_ICONV,no)
endif
Could you test something like that with a non-locale enabled toolchain config, a non-locale enabled toolchain config that has libiconv enabled, and a locale-enabled toolchain?
In the mean time, I'll mark your patch as Changes Requested.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 package/exim: Add optional OpenSSL support
In reply to Bernd KuhlsBernd, All,
On 2015-04-11 20:01 +0200, Bernd Kuhls spake thusly:
Quoted 11 lines
Signed-off-by Bernd Kuhls <[email protected]>--- package/exim/exim.mk | 9 +++++++++ 1 file changed, 9 insertions(+)package/exim/exim.mk +0
-0
package/exim/exim.mk define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV · line 69
Quoted 8 lines
package/exim/exim.mk +5
-0@@ -62,6 +62,14 @@ define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV endef endif +ifeq ($(BR2_PACKAGE_OPENSSL),y) +EXIM_DEPENDENCIES += openssl +define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL + $(call exim-config-change,SUPPORT_TLS,yes) + $(call exim-config-change,TLS_LIBS,-lssl -lcrypto)
I would prefer we use pkg-config. From doc/spec.txt:
If you have pkg-config available, then instead you can just use:
SUPPORT_TLS=yes
USE_OPENSSL_PC=openssl
Of course, you'll have to add host-pkgconf to exim's dependencies.
Regards,
Yann E. MORIN.
Quoted 21 lines
package/exim/exim.mk +4
-0+endef +endif + # this specific toolchain lacks libnsl ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12),y) define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE@@ -89,6 +97,7 @@ define EXIM_CONFIGURE_CMDS $(EXIM_USE_DEFAULT_CONFIG_FILE) $(EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT) $(EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV) + $(EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL) $(EXIM_CONFIGURE_TOOLCHAIN) endef endif # CUSTOM_CONFIGSignature · 6 lines
1.7.10.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'