From de4ed9178e42c807aed1c06e7fea62600c6e0363 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 19 Oct 2019 14:05:02 -0700 Subject: [PATCH] emailrelay: Update to 2.1 Remove uClibc++ reference. This requires C++11 features not provided by uClibc++. Added size optimizations as this package is huge. Cleaned up Makefile for consistency between packages. Refreshed patches. Signed-off-by: Rosen Penev --- mail/emailrelay/Makefile | 21 ++++++++----------- mail/emailrelay/patches/010-openssl-1.1.patch | 15 +++++-------- .../patches/020-openssl-engine.patch | 10 --------- 3 files changed, 14 insertions(+), 32 deletions(-) delete mode 100644 mail/emailrelay/patches/020-openssl-engine.patch diff --git a/mail/emailrelay/Makefile b/mail/emailrelay/Makefile index 089abb323..e6e81f63e 100644 --- a/mail/emailrelay/Makefile +++ b/mail/emailrelay/Makefile @@ -8,20 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=emailrelay -PKG_VERSION:=2.0 -PKG_RELEASE:=4 +PKG_VERSION:=2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION) -PKG_HASH:=0b3a98edfdc8deaf2b3d14e2d2a7fa8402f6703d83ac7458653994124de6a587 +PKG_HASH:=dcb1fc0cbb3d5407554685616e7ef691f30f733b4484979be0794c9d5f563762 + PKG_MAINTAINER:=Federico Di Marco +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -#include $(INCLUDE_DIR)/uclibc++.mk # $(CXX_DEPENDS) include $(INCLUDE_DIR)/package.mk define Package/emailrelay @@ -82,11 +81,6 @@ CONFIGURE_ARGS += \ --disable-testing \ --disable-windows -# Workaround for https://sourceforge.net/p/emailrelay/bugs/38/ -# This should be fixed in the next release. -CONFIGURE_VARS += \ - ac_cv_search_pam_end=no - ifeq ($(CONFIG_EMAILRELAY_SSL),y) CONFIGURE_ARGS += \ --with-openssl @@ -100,6 +94,9 @@ ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y) --enable-debug=yes endif +TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_CXXFLAGS += -Wl,--gc-sections,--as-needed + define Package/emailrelay/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/ diff --git a/mail/emailrelay/patches/010-openssl-1.1.patch b/mail/emailrelay/patches/010-openssl-1.1.patch index fb745e59e..5bba1abbb 100644 --- a/mail/emailrelay/patches/010-openssl-1.1.patch +++ b/mail/emailrelay/patches/010-openssl-1.1.patch @@ -1,24 +1,20 @@ -diff --git a/src/gssl/gssl_openssl.cpp b/src/gssl/gssl_openssl.cpp -index 0e9b73b..49927db 100644 --- a/src/gssl/gssl_openssl.cpp +++ b/src/gssl/gssl_openssl.cpp -@@ -52,10 +52,14 @@ GSsl::OpenSSL::LibraryImp::LibraryImp( G::StringArray & library_config , Library +@@ -51,10 +51,12 @@ GSsl::OpenSSL::LibraryImp::LibraryImp( G::StringArray & library_config , Library m_verbose(verbose) , m_config(library_config) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_load_error_strings() ; SSL_library_init() ; -- int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ; +- int rc = RAND_status() ; G_IGNORE_VARIABLE(int,rc) ; OpenSSL_add_all_digests() ; -+#else -+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL) ; +#endif -+ int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ; ++ int rc = RAND_status() ; G_IGNORE_VARIABLE(int,rc) ; // allocate a slot for a pointer from SSL to ProtocolImp m_index = SSL_get_ex_new_index( 0 , nullptr , nullptr , nullptr , nullptr ) ; -@@ -73,15 +77,21 @@ GSsl::OpenSSL::LibraryImp::~LibraryImp() +@@ -72,15 +74,21 @@ GSsl::OpenSSL::LibraryImp::~LibraryImp() void GSsl::OpenSSL::LibraryImp::cleanup() { @@ -26,8 +22,7 @@ index 0e9b73b..49927db 100644 // ffs... ERR_free_strings() ; RAND_cleanup() ; -- CRYPTO_cleanup_all_ex_data(); -+ CRYPTO_cleanup_all_ex_data() ; + CRYPTO_cleanup_all_ex_data(); +#endif } diff --git a/mail/emailrelay/patches/020-openssl-engine.patch b/mail/emailrelay/patches/020-openssl-engine.patch deleted file mode 100644 index d10d69478..000000000 --- a/mail/emailrelay/patches/020-openssl-engine.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/gssl/gssl_openssl.cpp -+++ b/src/gssl/gssl_openssl.cpp -@@ -32,7 +32,6 @@ - #include - #include - #include --#include - #include - #include - #include