From 27bf261bbe25c67bbc360f91db1d5c05bd1170ef Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sat, 20 May 2017 23:34:12 +0200 Subject: [PATCH] gsoap: update to 2.8.46. --- srcpkgs/gsoap/patches/fix-libressl.patch | 43 ------------------------ srcpkgs/gsoap/patches/libressl.patch | 40 ++++++++++++++++++++++ srcpkgs/gsoap/patches/musl-fixes.patch | 22 ++++++++++++ srcpkgs/gsoap/template | 9 ++--- 4 files changed, 65 insertions(+), 49 deletions(-) delete mode 100644 srcpkgs/gsoap/patches/fix-libressl.patch create mode 100644 srcpkgs/gsoap/patches/libressl.patch create mode 100644 srcpkgs/gsoap/patches/musl-fixes.patch diff --git a/srcpkgs/gsoap/patches/fix-libressl.patch b/srcpkgs/gsoap/patches/fix-libressl.patch deleted file mode 100644 index a8bdfb6e370..00000000000 --- a/srcpkgs/gsoap/patches/fix-libressl.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- gsoap/plugin/smdevp.c.orig 2017-01-15 20:09:56.876555589 +0100 -+++ gsoap/plugin/smdevp.c 2017-01-15 20:10:50.012509531 +0100 -@@ -306,6 +306,40 @@ the digest or signature produced. - extern "C" { - #endif - -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) -+static EVP_MD_CTX *EVP_MD_CTX_new(void) -+{ -+ EVP_MD_CTX *ctx = (EVP_MD_CTX *)malloc(sizeof(*ctx)); -+ if (ctx != NULL) -+ EVP_MD_CTX_init(ctx); -+ return ctx; -+} -+ -+static void EVP_MD_CTX_free(EVP_MD_CTX *ctx) -+{ -+ if (ctx != NULL) { -+ EVP_MD_CTX_cleanup(ctx); -+ free(ctx); -+ } -+} -+ -+static HMAC_CTX *HMAC_CTX_new(void) -+{ -+ HMAC_CTX *ctx = (HMAC_CTX *)malloc(sizeof(*ctx)); -+ if (ctx != NULL) -+ HMAC_CTX_init(ctx); -+ return ctx; -+} -+ -+static void HMAC_CTX_free(HMAC_CTX *ctx) -+{ -+ if (ctx != NULL) { -+ HMAC_CTX_cleanup(ctx); -+ free(ctx); -+ } -+} -+#endif -+ - /******************************************************************************\ - * - * Static protos diff --git a/srcpkgs/gsoap/patches/libressl.patch b/srcpkgs/gsoap/patches/libressl.patch new file mode 100644 index 00000000000..71ff17383c7 --- /dev/null +++ b/srcpkgs/gsoap/patches/libressl.patch @@ -0,0 +1,40 @@ +diff --git a/gsoap/plugin/smdevp.c b/gsoap/plugin/smdevp.c +index a42d7be..193f470 100644 +--- gsoap/plugin/smdevp.c ++++ gsoap/plugin/smdevp.c +@@ -479,7 +479,7 @@ soap_smd_init(struct soap *soap, struct soap_smd_data *data, int alg, const void + /* allocate and init the OpenSSL HMAC or EVP_MD context */ + if ((alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) + { +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + data->ctx = (void*)SOAP_MALLOC(soap, sizeof(HMAC_CTX)); + if (data->ctx) + HMAC_CTX_init((HMAC_CTX*)data->ctx); +@@ -489,7 +489,7 @@ soap_smd_init(struct soap *soap, struct soap_smd_data *data, int alg, const void + } + else + { +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + data->ctx = (void*)SOAP_MALLOC(soap, sizeof(EVP_MD_CTX)); + if (data->ctx) + EVP_MD_CTX_init((EVP_MD_CTX*)data->ctx); +@@ -642,7 +642,7 @@ soap_smd_final(struct soap *soap, struct soap_smd_data *data, char *buf, int *le + *len = (int)n; + } + /* cleanup */ +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) + HMAC_CTX_cleanup((HMAC_CTX*)data->ctx); + else +@@ -687,7 +687,7 @@ soap_smd_check(struct soap *soap, struct soap_smd_data *data, int ok, const char + } + if (data->ctx) + { +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_VERSION_NUMBER) + if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) + HMAC_CTX_cleanup((HMAC_CTX*)data->ctx); + else diff --git a/srcpkgs/gsoap/patches/musl-fixes.patch b/srcpkgs/gsoap/patches/musl-fixes.patch new file mode 100644 index 00000000000..9ac981727e8 --- /dev/null +++ b/srcpkgs/gsoap/patches/musl-fixes.patch @@ -0,0 +1,22 @@ +--- ./gsoap/stdsoap2.cpp.orig ++++ ./gsoap/stdsoap2.cpp +@@ -18691,7 +18691,7 @@ + { + #ifndef WIN32 + # ifdef HAVE_STRERROR_R +-# if defined(_GNU_SOURCE) && !defined(__ANDROID__) ++# if defined(_GNU_SOURCE) && !defined(__ANDROID__) && defined(__GLIBC__) + return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */ + # else + strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ +--- ./gsoap/stdsoap2.h.orig ++++ ./gsoap/stdsoap2.h +@@ -943,7 +943,7 @@ + # endif + #elif defined(SOCKLEN_T) + # define SOAP_SOCKLEN_T SOCKLEN_T +-#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) || defined(_XOPEN_SOURCE) ++#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) || defined(_XOPEN_SOURCE) || defined (LINUX) + # define SOAP_SOCKLEN_T socklen_t + #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) + # define SOAP_SOCKLEN_T int diff --git a/srcpkgs/gsoap/template b/srcpkgs/gsoap/template index 5855363ec8b..e35526cc82f 100644 --- a/srcpkgs/gsoap/template +++ b/srcpkgs/gsoap/template @@ -1,6 +1,6 @@ # Template file for 'gsoap' pkgname=gsoap -version=2.8.45 +version=2.8.46 revision=1 build_style=gnu-configure hostmakedepends="unzip flex autoconf" @@ -13,13 +13,10 @@ maintainer="Enno Boland " license="GPL-3" homepage="http://www.cs.fsu.edu/~engelen/soap.html" distfiles="${SOURCEFORGE_SITE}/gsoap2/gsoap_${version}.zip" -checksum=81946d1ecd99ea414383d5f090e6b292908ff3ac0211cb097a1d1d54e9808bce +checksum=3083818fb42b9e7251daf21728132db15354eb8c14060c2dc6949dafbec976be wrksrc="${pkgname}-${version%.*}" disable_parallel_build=yes - -case "$XBPS_TARGET_MACHINE" in - *-musl) broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/11649/steps/shell_3/logs/stdio";; -esac +configure_args=" --enable-ipv6" gsoap-devel_package() { depends="gsoap>=${version}_${revision} $makedepends"