From 563a451aff3891c4231d0ea13cc20caa06f59399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= Date: Mon, 8 Aug 2022 01:22:56 +0100 Subject: [PATCH] gsoap: update to 2.8.122. --- srcpkgs/gsoap/patches/0000.patch | 46 +++++++++++++++++ srcpkgs/gsoap/patches/libressl.patch | 14 ------ srcpkgs/gsoap/patches/musl-fixes.patch | 69 ++++++++++++++++++++++++++ srcpkgs/gsoap/template | 32 ++++++------ 4 files changed, 132 insertions(+), 29 deletions(-) create mode 100644 srcpkgs/gsoap/patches/0000.patch delete mode 100644 srcpkgs/gsoap/patches/libressl.patch create mode 100644 srcpkgs/gsoap/patches/musl-fixes.patch diff --git a/srcpkgs/gsoap/patches/0000.patch b/srcpkgs/gsoap/patches/0000.patch new file mode 100644 index 000000000000..377495fabe13 --- /dev/null +++ b/srcpkgs/gsoap/patches/0000.patch @@ -0,0 +1,46 @@ +From 40ff781754421f47455af52293821e054bccfd84 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= +Date: Mon, 8 Aug 2022 23:24:14 +0100 +Subject: [PATCH 1/1] b + +--- + gsoap/stdsoap2.c | 5 +++++ + gsoap/stdsoap2.cpp | 6 ++++++ + 2 files changed, 11 insertions(+) + +diff --git a/gsoap/stdsoap2.c b/gsoap/stdsoap2.c +index 7fa381e..bacd3fb 100644 +--- a/gsoap/stdsoap2.c ++++ b/gsoap/stdsoap2.c +@@ -62,6 +62,11 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com + # define _GNU_SOURCE 1 + #endif + ++#ifdef _GNU_SOURCE ++#undef _GNU_SOURCE ++#define _POSIX_C_SOURCE 1 ++#endif ++ + #include "stdsoap2.h" + + #if GSOAP_VERSION != GSOAP_LIB_VERSION +diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp +index 7fa381e..7c97486 100644 +--- a/gsoap/stdsoap2.cpp ++++ b/gsoap/stdsoap2.cpp +@@ -62,6 +62,12 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com + # define _GNU_SOURCE 1 + #endif + ++#ifdef _GNU_SOURCE ++#undef _GNU_SOURCE ++#endif ++#define _POSIX_C_SOURCE 1 ++ ++ + #include "stdsoap2.h" + + #if GSOAP_VERSION != GSOAP_LIB_VERSION +-- +2.37.1 + diff --git a/srcpkgs/gsoap/patches/libressl.patch b/srcpkgs/gsoap/patches/libressl.patch deleted file mode 100644 index e725fb30d744..000000000000 --- a/srcpkgs/gsoap/patches/libressl.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp -index cd48626..8bbf676 100644 ---- a/gsoap/stdsoap2.cpp -+++ b/gsoap/stdsoap2.cpp -@@ -4453,7 +4453,7 @@ ssl_auth_init(struct soap *soap) - /* enable all TSLv1 protocols and disable SSLv3 by default if no SSL/TLS flags are set */ - if ((soap->ssl_flags & SOAP_SSLv3_TLSv1) == 0) - soap->ssl_flags |= SOAP_TLSv1; --#if OPENSSL_VERSION_NUMBER >= 0x10101000L -+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER) - if ((soap->ssl_flags & SOAP_SSLv3)) - minv = SSL3_VERSION; - else if ((soap->ssl_flags & SOAP_TLSv1_0)) - diff --git a/srcpkgs/gsoap/patches/musl-fixes.patch b/srcpkgs/gsoap/patches/musl-fixes.patch new file mode 100644 index 000000000000..cf29b9701f30 --- /dev/null +++ b/srcpkgs/gsoap/patches/musl-fixes.patch @@ -0,0 +1,69 @@ +From: https://git.alpinelinux.org/aports/plain/community/gsoap/musl-fixes.patch + +--- a/gsoap/stdsoap2.c ++++ b/gsoap/stdsoap2.c +@@ -5125,7 +5125,7 @@ + hostent = NULL; + soap->errnum = h_errno; + } +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && defined(HAVE_GETHOSTBYNAME_R) ++#elif defined(HAVE_GETHOSTBYNAME_R) + while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) + { + if (tmpbuf != soap->tmpbuf) +@@ -5140,8 +5140,6 @@ + if (!tmpbuf) + break; + } +-#elif defined(HAVE_GETHOSTBYNAME_R) +- hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); + #elif defined(VXWORKS) + /* vxWorks compatible */ + /* If the DNS resolver library resolvLib has been configured in the vxWorks + +--- a/gsoap/stdsoap2.cpp ++++ b/gsoap/stdsoap2.cpp +@@ -5092,7 +5092,7 @@ + { + #if (defined(_AIX43) || defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R) + struct hostent_data ht_data; +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && defined(HAVE_GETHOSTBYNAME_R) ++#elif defined(HAVE_GETHOSTBYNAME_R) + int r; + char *tmpbuf = soap->tmpbuf; + size_t tmplen = sizeof(soap->tmpbuf); +@@ -5125,7 +5125,7 @@ + hostent = NULL; + soap->errnum = h_errno; + } +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && defined(HAVE_GETHOSTBYNAME_R) ++#elif defined(HAVE_GETHOSTBYNAME_R) + while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) + { + if (tmpbuf != soap->tmpbuf) +@@ -5140,8 +5140,6 @@ + if (!tmpbuf) + break; + } +-#elif defined(HAVE_GETHOSTBYNAME_R) +- hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); + #elif defined(VXWORKS) + /* vxWorks compatible */ + /* If the DNS resolver library resolvLib has been configured in the vxWorks +--- a/gsoap/stdsoap2.cpp ++++ b/gsoap/stdsoap2.cpp +@@ -22618,13 +22618,9 @@ + { + #ifndef WIN32 + # ifdef HAVE_STRERROR_R +-# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) + err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ + if (err != 0) + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); +-# else +- return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */ +-# endif + # else + return strerror(err); + # endif + diff --git a/srcpkgs/gsoap/template b/srcpkgs/gsoap/template index c0cf0340566b..924226830c4f 100644 --- a/srcpkgs/gsoap/template +++ b/srcpkgs/gsoap/template @@ -1,32 +1,34 @@ # Template file for 'gsoap' pkgname=gsoap -version=2.8.91 -revision=3 +version=2.8.122 +revision=1 wrksrc="gsoap-${version%.*}" build_style=gnu-configure -configure_args="--enable-ipv6" -hostmakedepends="unzip flex autoconf" +configure_args="--enable-ipv6 --enable-c-locale" +hostmakedepends="automake unzip flex autoconf" makedepends="openssl-devel zlib-devel" short_desc="Toolkit for SOAP and REST Web Services and XML-Based Applications" maintainer="Enno Boland " license="gSOAP-1.3b, GPL-2.0-only" homepage="http://www.cs.fsu.edu/~engelen/soap.html" distfiles="${SOURCEFORGE_SITE}/gsoap2/gsoap_${version}.zip" -checksum=2ca21b5ab2b40d899566c559f71a1d51ed7eac3f00160ab78060027a3ee6488f +checksum=3eb8486c986b44071bb5f19ef7b990791f819bb267c0bf640e95bd991070fad8 disable_parallel_build=yes -CFLAGS="-fcommon" +# CXXFLAGS="-D_POSIX_C_SOURCE=200112L -U_GNU_SOURCE" -if [ "$CROSS_BUILD" ]; then - hostmakedepends+=" gsoap" -fi +# if [ "$CROSS_BUILD" ]; then +# hostmakedepends+=" gsoap" +# fi -pre_build() { - if [ "$CROSS_BUILD" ]; then - # run host 'soapcpp2' - sed -i 's|^\(SOAP = \).*|\1soapcpp2|' gsoap/wsdl/Makefile - fi -} +# pre_build() { +# # if [ "$CROSS_BUILD" ]; then +# # # run host 'soapcpp2' +# # sed -i 's|^\(SOAP = \).*|\1soapcpp2|' gsoap/wsdl/Makefile +# # fi + +# autoreconf -vif +# } post_install() { vlicense license.pdf