summaryrefslogtreecommitdiff
path: root/libraries/wvstreams
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2021-02-16 20:34:34 +0100
committerRobby Workman <rworkman@slackbuilds.org>2021-04-18 00:09:04 -0500
commit4ed258d353416c40002ba4d70961d290dbfa685b (patch)
treef72955aafa7771ad01ce60d3985dec736edc5d13 /libraries/wvstreams
parent7e0f77651b30f3cc4cfddb9434d7502bd6fc4778 (diff)
downloadslackbuilds-4ed258d353416c40002ba4d70961d290dbfa685b.tar.gz
libraries/wvstreams: Apply debian patches, cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/wvstreams')
-rw-r--r--libraries/wvstreams/patches/01_kfreebsd_ftbfs.diff28
-rw-r--r--libraries/wvstreams/patches/02_doc_path.diff24
-rw-r--r--libraries/wvstreams/patches/03_html_sgml.diff18
-rw-r--r--libraries/wvstreams/patches/04_signed_request.diff18
-rw-r--r--libraries/wvstreams/patches/05_gcc-4.7.diff19
-rw-r--r--libraries/wvstreams/patches/05_gcc.diff41
-rw-r--r--libraries/wvstreams/patches/06_buildflags.diff34
-rw-r--r--libraries/wvstreams/patches/07_openssl-1.0.diff18
-rw-r--r--libraries/wvstreams/patches/08_glibc-2.12.diff30
-rw-r--r--libraries/wvstreams/patches/09_readline.diff16
-rw-r--r--libraries/wvstreams/patches/10_typos.diff39
-rw-r--r--libraries/wvstreams/patches/11_gcc-6.patch42
-rw-r--r--libraries/wvstreams/patches/12_increase_task_stack.patch15
-rw-r--r--libraries/wvstreams/patches/13_wvstreams_openssl1.1.patch539
-rw-r--r--libraries/wvstreams/patches/14_cross.diff53
-rw-r--r--libraries/wvstreams/patches/15_Fix-narrowing-conversion-error.patch29
-rw-r--r--libraries/wvstreams/patches/16_wvstreams-4.6.1-parallel-make.patch (renamed from libraries/wvstreams/patches/wvstreams-4.6.1-parallel-make.patch)0
-rw-r--r--libraries/wvstreams/patches/wvstreams-4.6.1-gcc47.patch10
-rw-r--r--libraries/wvstreams/wvstreams.SlackBuild39
19 files changed, 937 insertions, 75 deletions
diff --git a/libraries/wvstreams/patches/01_kfreebsd_ftbfs.diff b/libraries/wvstreams/patches/01_kfreebsd_ftbfs.diff
new file mode 100644
index 0000000000..5b98ae2919
--- /dev/null
+++ b/libraries/wvstreams/patches/01_kfreebsd_ftbfs.diff
@@ -0,0 +1,28 @@
+Description: fix FTBFS on kFreeBSD
+Author: Petr Salinger <Petr.Salinger@seznam.cz>
+Bug-Debian: http://bugs.debian.org/537883
+Forwarded: no
+Last-Update: 2013-10-30
+
+--- a/utils/wvcrash.cc
++++ b/utils/wvcrash.cc
+@@ -26,7 +26,7 @@
+ #endif
+
+ // FIXME: this file mostly only works in Linux
+-#ifdef __linux
++#if 1
+
+ # include <execinfo.h>
+ #include <unistd.h>
+--- a/utils/wvcrashbase.cc
++++ b/utils/wvcrashbase.cc
+@@ -66,7 +66,7 @@
+
+
+ // FIXME: leaving of a will and catching asserts mostly only works in Linux
+-#ifdef __linux
++#if 1
+
+ #ifdef __USE_GNU
+ static const char *argv0 = program_invocation_short_name;
diff --git a/libraries/wvstreams/patches/02_doc_path.diff b/libraries/wvstreams/patches/02_doc_path.diff
new file mode 100644
index 0000000000..9f3ebdad7e
--- /dev/null
+++ b/libraries/wvstreams/patches/02_doc_path.diff
@@ -0,0 +1,24 @@
+Description: use new /usr/share/sgml location for docbook.dsl
+Author: Matthias Klose <doko@debian.org>
+Forwarded: no
+Last-Update: 2013-10-30
+
+--- a/Docs/sgmlmanual/Makefile
++++ b/Docs/sgmlmanual/Makefile
+@@ -88,14 +88,14 @@
+ $(MAKE) dirimages htmlimages
+ rm -f $@
+ jade -t rtf -o $*.rtf.tmp \
+- -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl $<
++ -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl $<
+ cat $*.rtf.tmp | sed 's,"img/\(.*\)\.[^.]*","img.tmp/\1.gif",g' >$@
+ rm -f $*.rtf.tmp
+
+ %.tex: %.sgml
+ rm -f $@
+ jade -t tex -o $*.tex.tmp \
+- -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl $<
++ -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl $<
+ cat $*.tex.tmp | sed 's,{img/\(.*\)\.[^.]*},{img.tmp/\1.eps},g' >$@
+ rm -f $*.tex.tmp
+
diff --git a/libraries/wvstreams/patches/03_html_sgml.diff b/libraries/wvstreams/patches/03_html_sgml.diff
new file mode 100644
index 0000000000..85e6ab2cee
--- /dev/null
+++ b/libraries/wvstreams/patches/03_html_sgml.diff
@@ -0,0 +1,18 @@
+Description: use .html extension for HTML documentation files
+ Define %html-ext% to ".html" while building HTML documentation, since current
+ docbook-dsssl appears to default to ".htm".
+Author: Matthias Klose <doko@debian.org>
+Forwarded: no
+Last-Update: 2013-10-30
+
+--- a/Docs/sgmlmanual/HTML.dsl
++++ b/Docs/sgmlmanual/HTML.dsl
+@@ -10,7 +10,7 @@
+ ;; your stuff goes here...
+ ;;(define %gentext-nav-use-ff% 1)
+ (define %use-id-as-filename% 1)
+-
++(define %html-ext% ".html")
+
+ </style-specification-body>
+ </style-specification>
diff --git a/libraries/wvstreams/patches/04_signed_request.diff b/libraries/wvstreams/patches/04_signed_request.diff
new file mode 100644
index 0000000000..354c85a65f
--- /dev/null
+++ b/libraries/wvstreams/patches/04_signed_request.diff
@@ -0,0 +1,18 @@
+Description: fix return type checking of X509_REQ_verify
+Author: Moritz Mühlenhoff <jmm@debian.org>
+Bug: https://code.google.com/p/wvstreams/issues/detail?id=40
+Bug-Debian: http://bugs.debian.org/513539
+Forwarded: yes
+Last-Update: 2013-10-30
+
+--- a/crypto/wvx509.cc
++++ b/crypto/wvx509.cc
+@@ -325,7 +325,7 @@
+ }
+
+ int verify_result = X509_REQ_verify(certreq, pk);
+- if (verify_result == 0)
++ if (verify_result == 0 || verify_result == -1)
+ {
+ debug(WvLog::Warning, "Self signed request failed");
+ X509_REQ_free(certreq);
diff --git a/libraries/wvstreams/patches/05_gcc-4.7.diff b/libraries/wvstreams/patches/05_gcc-4.7.diff
new file mode 100644
index 0000000000..45f53c5bb8
--- /dev/null
+++ b/libraries/wvstreams/patches/05_gcc-4.7.diff
@@ -0,0 +1,19 @@
+Description: Fix FTBFS with gcc-4.7
+ Small header include change. This is borderlinde cosmetic, but still needed
+ to prevent the FTBFS.
+Author: Paul Tagliamonte <paultag@ubuntu.com>
+Origin: vendor
+Bug: https://code.google.com/p/wvstreams/issues/detail?id=34
+Bug-Debian: http://bugs.debian.org/667418
+Last-Update: 2013-10-30
+
+--- a/utils/wvuid.cc
++++ b/utils/wvuid.cc
+@@ -33,6 +33,7 @@
+
+ #else // not WIN32
+
++#include <unistd.h>
+
+ WvString wv_username_from_uid(wvuid_t uid)
+ {
diff --git a/libraries/wvstreams/patches/05_gcc.diff b/libraries/wvstreams/patches/05_gcc.diff
deleted file mode 100644
index 8e4fd03298..0000000000
--- a/libraries/wvstreams/patches/05_gcc.diff
+++ /dev/null
@@ -1,41 +0,0 @@
-Index: wvstreams-4.6.1/crypto/wvx509.cc
-===================================================================
---- wvstreams-4.6.1.orig/crypto/wvx509.cc 2011-05-20 00:02:38.119136584 +0200
-+++ wvstreams-4.6.1/crypto/wvx509.cc 2011-05-20 00:02:26.035136589 +0200
-@@ -1157,7 +1157,7 @@
-
- if (ext)
- {
-- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
-+ X509V3_EXT_METHOD *method = (X509V3_EXT_METHOD *)X509V3_EXT_get(ext);
- if (!method)
- {
- WvDynBuf buf;
-Index: wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc
-===================================================================
---- wvstreams-4.6.1.orig/ipstreams/wvunixdgsocket.cc 2011-05-20 00:02:38.391136584 +0200
-+++ wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc 2011-05-20 00:02:35.283136585 +0200
-@@ -1,8 +1,6 @@
- #include "wvunixdgsocket.h"
--#ifdef MACOS
- #include <sys/types.h>
- #include <sys/stat.h>
--#endif
-
- WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms)
- : socketfile(filename)
-Index: wvstreams-4.6.1/streams/wvatomicfile.cc
-===================================================================
---- wvstreams-4.6.1.orig/streams/wvatomicfile.cc 2011-05-20 00:02:38.223136584 +0200
-+++ wvstreams-4.6.1/streams/wvatomicfile.cc 2011-05-20 00:02:31.619136587 +0200
-@@ -10,10 +10,7 @@
- #include "wvatomicfile.h"
- #include "wvfileutils.h"
- #include "wvstrutils.h"
--
--#ifdef MACOS
- #include <sys/stat.h>
--#endif
-
- WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode)
- : tmp_file(WvString::null)
diff --git a/libraries/wvstreams/patches/06_buildflags.diff b/libraries/wvstreams/patches/06_buildflags.diff
new file mode 100644
index 0000000000..0ddaf7069f
--- /dev/null
+++ b/libraries/wvstreams/patches/06_buildflags.diff
@@ -0,0 +1,34 @@
+Description: build flags support
+ Don't force -O2 optimization. Make build logs verbose.
+Author: Matthias Klose <doko@debian.org>
+Forwarded: not-needed
+Last-Update: 2013-10-30
+
+--- a/gen-cc
++++ b/gen-cc
+@@ -15,6 +15,11 @@
+ shift
+ shift
+
++ echo $CC \$MODE -o \$BASE.o \$BASE.$EXT \\
++ -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\
++ $CPPFLAGS \\
++ $CFLAGS \\
++ "\$@"
+ $CC \$MODE -o \$BASE.o \$BASE.$EXT \\
+ -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\
+ $CPPFLAGS \\
+--- a/wvrules-posix.mk
++++ b/wvrules-posix.mk
+@@ -35,11 +35,6 @@
+ # Default compiler we use for linking
+ WVLINK_CC = $(CXX)
+
+-ifneq ("$(enable_optimization)", "no")
+- CXXFLAGS+=-O2
+- CFLAGS+=-O2
+-endif
+-
+ ifneq ("$(enable_warnings)", "no")
+ CXXFLAGS+=-Wall -Woverloaded-virtual
+ CFLAGS+=-Wall
diff --git a/libraries/wvstreams/patches/07_openssl-1.0.diff b/libraries/wvstreams/patches/07_openssl-1.0.diff
new file mode 100644
index 0000000000..fd2099d318
--- /dev/null
+++ b/libraries/wvstreams/patches/07_openssl-1.0.diff
@@ -0,0 +1,18 @@
+Description: fix FTBFS with OpenSSL 1.0
+Author: Luca Falavigna <dktrkranz@debian.org>
+Bug: https://code.google.com/p/wvstreams/issues/detail?id=27
+Bug-Debian: http://bugs.debian.org/621990
+Forwarded: no
+Last-Update: 2013-10-30
+
+--- a/crypto/wvx509.cc
++++ b/crypto/wvx509.cc
+@@ -1157,7 +1157,7 @@
+
+ if (ext)
+ {
+- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++ X509V3_EXT_METHOD *method = (X509V3_EXT_METHOD *)X509V3_EXT_get(ext);
+ if (!method)
+ {
+ WvDynBuf buf;
diff --git a/libraries/wvstreams/patches/08_glibc-2.12.diff b/libraries/wvstreams/patches/08_glibc-2.12.diff
new file mode 100644
index 0000000000..f9e1d6beaf
--- /dev/null
+++ b/libraries/wvstreams/patches/08_glibc-2.12.diff
@@ -0,0 +1,30 @@
+Description: fix FTBFS with glibc 2.12
+Author: Luca Falavigna <dktrkranz@debian.org>
+Bug: https://code.google.com/p/wvstreams/issues/detail?id=28
+Forwarded: no
+Last-Update: 2013-10-30
+
+--- a/ipstreams/wvunixdgsocket.cc
++++ b/ipstreams/wvunixdgsocket.cc
+@@ -1,8 +1,6 @@
+ #include "wvunixdgsocket.h"
+-#ifdef MACOS
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#endif
+
+ WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms)
+ : socketfile(filename)
+--- a/streams/wvatomicfile.cc
++++ b/streams/wvatomicfile.cc
+@@ -10,10 +10,7 @@
+ #include "wvatomicfile.h"
+ #include "wvfileutils.h"
+ #include "wvstrutils.h"
+-
+-#ifdef MACOS
+ #include <sys/stat.h>
+-#endif
+
+ WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode)
+ : tmp_file(WvString::null)
diff --git a/libraries/wvstreams/patches/09_readline.diff b/libraries/wvstreams/patches/09_readline.diff
new file mode 100644
index 0000000000..3902436ae3
--- /dev/null
+++ b/libraries/wvstreams/patches/09_readline.diff
@@ -0,0 +1,16 @@
+Description: make it possible to disable readline
+Author: Jakub Wilk <jwilk@debian.org>
+Bug: https://code.google.com/p/wvstreams/issues/detail?id=38
+Forwarded: no
+Last-Update: 2013-10-30
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,6 +59,7 @@
+
+ AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus], [DBUS]))
+ AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl], [OpenSSL >= 0.9.7 (required)]))
++AC_ARG_WITH(readline, AC_HELP_STRING([--with-readline], [readline]))
+ AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam], [PAM]))
+ AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl], [Tcl]))
+ AC_ARG_WITH(qt, AC_HELP_STRING([--with-qt], [Qt]))
diff --git a/libraries/wvstreams/patches/10_typos.diff b/libraries/wvstreams/patches/10_typos.diff
new file mode 100644
index 0000000000..56245e38dc
--- /dev/null
+++ b/libraries/wvstreams/patches/10_typos.diff
@@ -0,0 +1,39 @@
+Description: fix typos
+Author: Jakub Wilk <jwilk@debian.org>
+Bug: https://code.google.com/p/wvstreams/issues/detail?id=39
+Forwared: not-needed
+Last-Update: 2013-10-30
+
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -745,7 +745,7 @@
+ "wvtestmain ''" actually still runs all the tests, so skip the warning.
+
+ wvtest.cc prints a message "WARNING: WvTest: only ran tests starting
+- with specifed prefix(es)" if you give it any parameters restricting the
++ with specified prefix(es)" if you give it any parameters restricting the
+ tests to be run. But 'make runtests' actually sometimes provides an
+ existing but empty parameter, which doesn't restrict anything because *any*
+ test starts with the empty string. So suppress the warning in that case;
+--- a/utils/wvtest.cc
++++ b/utils/wvtest.cc
+@@ -252,7 +252,7 @@
+
+ if (prefixes && *prefixes && **prefixes)
+ printf("WvTest: WARNING: only ran tests starting with "
+- "specifed prefix(es).\n");
++ "specified prefix(es).\n");
+ else
+ printf("WvTest: ran all tests.\n");
+ printf("WvTest: %d test%s, %d failure%s.\n",
+--- a/uniconf/tests/uni.8.subst
++++ b/uniconf/tests/uni.8.subst
+@@ -78,7 +78,7 @@
+ .SH COMMANDS
+ .TP
+ get
+-Retreive the
++Retrieve the
+ .I VALUE
+ associated with the provided
+ .I KEY
diff --git a/libraries/wvstreams/patches/11_gcc-6.patch b/libraries/wvstreams/patches/11_gcc-6.patch
new file mode 100644
index 0000000000..b084887ba7
--- /dev/null
+++ b/libraries/wvstreams/patches/11_gcc-6.patch
@@ -0,0 +1,42 @@
+Description: Fix compilation with gcc-6
+Author: Gert Wollny <gw.fossdev@gmail.com>
+Last-Updated: 2016-07-26
+Forwarded: No
+Bug-Debian: https://bugs.debian.org/811659
+Bug-Debian: https://bugs.debian.org/831146
+
+--- a/streams/wvstream.cc
++++ b/streams/wvstream.cc
+@@ -907,9 +907,9 @@
+
+ if (forceable)
+ {
+- si.wants.readable = readcb;
+- si.wants.writable = writecb;
+- si.wants.isexception = exceptcb;
++ si.wants.readable = static_cast<bool>(readcb);
++ si.wants.writable = static_cast<bool>(writecb);
++ si.wants.isexception = static_cast<bool>(exceptcb);
+ }
+ else
+ {
+@@ -1019,7 +1019,8 @@
+
+ IWvStream::SelectRequest WvStream::get_select_request()
+ {
+- return IWvStream::SelectRequest(readcb, writecb, exceptcb);
++ return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb),
++ static_cast<bool>(exceptcb));
+ }
+
+
+@@ -1107,7 +1108,8 @@
+ // inefficient, because if the alarm was expired then pre_select()
+ // returned true anyway and short-circuited the previous select().
+ TRACE("hello-%p\n", this);
+- return !alarm_was_ticking || select(0, readcb, writecb, exceptcb);
++ return !alarm_was_ticking || select(0, static_cast<bool>(readcb),
++ static_cast<bool>(writecb), static_cast<bool>(exceptcb));
+ }
+
+
diff --git a/libraries/wvstreams/patches/12_increase_task_stack.patch b/libraries/wvstreams/patches/12_increase_task_stack.patch
new file mode 100644
index 0000000000..e8d7d5d52c
--- /dev/null
+++ b/libraries/wvstreams/patches/12_increase_task_stack.patch
@@ -0,0 +1,15 @@
+Description: Increase the task stack to work around stack corruption
+Author: Karol Ossowski <karol.ossowski@gmail.com>
+Bug-Debian: https://bugs.debian.org/863039
+
+--- wvstreams-4.6.1.orig/utils/wvtask.cc
++++ wvstreams-4.6.1/utils/wvtask.cc
+@@ -429,7 +429,7 @@ void WvTaskMan::_stackmaster()
+ total = (val+1) * (size_t)1024;
+
+ if (!use_shared_stack())
+- total = 1024; // enough to save the do_task stack frame
++ total = 2048; // enough to save the do_task stack frame
+
+ // set up a stack frame for the new task. This runs once
+ // per get_stack.
diff --git a/libraries/wvstreams/patches/13_wvstreams_openssl1.1.patch b/libraries/wvstreams/patches/13_wvstreams_openssl1.1.patch
new file mode 100644
index 0000000000..caa39fdadc
--- /dev/null
+++ b/libraries/wvstreams/patches/13_wvstreams_openssl1.1.patch
@@ -0,0 +1,539 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Port to OpenSSL 1.1
+Bug-Debian: https://bugs.debian.org/859791
+Forwarded: https://github.com/apenwarr/wvstreams/pull/2
+
+diff --git a/crypto/wvcrl.cc b/crypto/wvcrl.cc
+index fa00c76..880ad85 100644
+--- a/crypto/wvcrl.cc
++++ b/crypto/wvcrl.cc
+@@ -357,31 +357,19 @@ bool WvCRL::isrevoked(WvStringParm serial_number) const
+ ASN1_INTEGER *serial = serial_to_int(serial_number);
+ if (serial)
+ {
+- X509_REVOKED mayberevoked;
+- mayberevoked.serialNumber = serial;
+- if (crl->crl->revoked)
+- {
+- int idx = sk_X509_REVOKED_find(crl->crl->revoked,
+- &mayberevoked);
+- ASN1_INTEGER_free(serial);
+- if (idx >= 0)
+- {
+- debug("Certificate is revoked.\n");
+- return true;
+- }
+- else
+- {
+- debug("Certificate is not revoked.\n");
+- return false;
+- }
+- }
+- else
+- {
+- ASN1_INTEGER_free(serial);
+- debug("CRL does not have revoked list.\n");
+- return false;
+- }
+-
++ X509_REVOKED *revoked_entry = NULL;
++ int idx = X509_CRL_get0_by_serial(crl, &revoked_entry, serial);
++ ASN1_INTEGER_free(serial);
++ if (idx >= 1 || revoked_entry)
++ {
++ debug("Certificate is revoked.\n");
++ return true;
++ }
++ else
++ {
++ debug("Certificate is not revoked.\n");
++ return false;
++ }
+ }
+ else
+ debug(WvLog::Warning, "Can't convert serial number to ASN1 format. "
+diff --git a/crypto/wvdiffiehellman.cc b/crypto/wvdiffiehellman.cc
+index 7c0bf32..15cd104 100644
+--- a/crypto/wvdiffiehellman.cc
++++ b/crypto/wvdiffiehellman.cc
+@@ -39,24 +39,25 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen,
+ {
+ int problems;
+ int check;
+- {
++
+ info = DH_new();
+- info->p = BN_bin2bn(_key, _keylen, NULL);
++ BIGNUM *p = BN_bin2bn(_key, _keylen, NULL);
+ // info->p->top = 0;
+ // info->p->dmax = _keylen * 8 / BN_BITS2;
+ // info->p->neg = 0;
+ // info->p->flags = 0;
+
+- info->g = BN_new();
+- BN_set_word(info->g, generator);
++ BIGNUM *g = BN_new();
++ BN_set_word(g, generator);
+ // info->g->d = &generator;
+ // info->g->top = 0;
+ // info->g->dmax = 1;
+ // info->g->neg = 0;
+ // info->g->flags = 0;
+- }
+
+- check = BN_mod_word(info->p, 24);
++ DH_set0_pqg(info, p, NULL, g);
++
++ check = BN_mod_word(p, 24);
+ DH_check(info, &problems);
+ if (problems & DH_CHECK_P_NOT_PRIME)
+ log(WvLog::Error, "Using a composite number for authentication.\n");
+@@ -64,7 +65,7 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen,
+ log(WvLog::Error,"Using an unsafe prime number for authentication.\n");
+ if (problems & DH_NOT_SUITABLE_GENERATOR)
+ log(WvLog::Error, "Can you just use 2 instead of %s (%s)!!\n",
+- BN_bn2hex(info->g), check);
++ BN_bn2hex(g), check);
+ if (problems & DH_UNABLE_TO_CHECK_GENERATOR)
+ log(WvLog::Notice, "Using a strange argument for diffie-hellman.\n");
+ DH_generate_key(info);
+@@ -72,18 +73,23 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen,
+
+ int WvDiffieHellman::pub_key_len()
+ {
+- return BN_num_bytes(info->pub_key);
++ const BIGNUM *pub_key = NULL;
++ DH_get0_key(info, &pub_key, NULL);
++ return BN_num_bytes(pub_key);
+ }
+
+ int WvDiffieHellman::get_public_value(WvBuf &outbuf, int len)
+ {
+- int key_len = BN_num_bytes(info->pub_key);
++ const BIGNUM *pub_key = NULL;
++ DH_get0_key(info, &pub_key, NULL);
++
++ int key_len = BN_num_bytes(pub_key);
+ if (key_len < len)
+ len = key_len;
+
+ // alloca is stack allocated, don't free it.
+ unsigned char *foo = (unsigned char*)alloca(key_len);
+- BN_bn2bin(info->pub_key, foo);
++ BN_bn2bin(pub_key, foo);
+ outbuf.put(foo, len);
+
+ return len;
+@@ -91,8 +97,10 @@ int WvDiffieHellman::get_public_value(WvBuf &outbuf, int len)
+
+ bool WvDiffieHellman::create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf)
+ {
++ const BIGNUM *pub_key = NULL;
++ DH_get0_key(info, &pub_key, NULL);
+ unsigned char *foo = (unsigned char *)alloca(DH_size(info));
+- log("My public value\n%s\nYour public value\n%s\n",BN_bn2hex(info->pub_key),
++ log("My public value\n%s\nYour public value\n%s\n",BN_bn2hex(pub_key),
+ hexdump_buffer(inbuf.peek(0, in_len), in_len, false));
+ int len = DH_compute_key (foo, BN_bin2bn(inbuf.get(in_len), in_len, NULL),
+ info);
+diff --git a/crypto/wvdigest.cc b/crypto/wvdigest.cc
+index 150edee..73ebb5d 100644
+--- a/crypto/wvdigest.cc
++++ b/crypto/wvdigest.cc
+@@ -13,10 +13,10 @@
+
+ /***** WvEVPMDDigest *****/
+
+-WvEVPMDDigest::WvEVPMDDigest(const env_md_st *_evpmd) :
++WvEVPMDDigest::WvEVPMDDigest(const EVP_MD*_evpmd) :
+ evpmd(_evpmd), active(false)
+ {
+- evpctx = new EVP_MD_CTX;
++ evpctx = EVP_MD_CTX_new();
+ _reset();
+ }
+
+@@ -24,7 +24,7 @@ WvEVPMDDigest::WvEVPMDDigest(const env_md_st *_evpmd) :
+ WvEVPMDDigest::~WvEVPMDDigest()
+ {
+ cleanup();
+- delete evpctx;
++ EVP_MD_CTX_free(evpctx);
+ }
+
+
+@@ -60,7 +60,7 @@ bool WvEVPMDDigest::_reset()
+ // the typecast is necessary for API compatibility with different
+ // versions of openssl. None of them *actually* change the contents of
+ // the pointer.
+- EVP_DigestInit(evpctx, (env_md_st *)evpmd);
++ EVP_DigestInit(evpctx, evpmd);
+ active = true;
+ return true;
+ }
+@@ -79,7 +79,7 @@ void WvEVPMDDigest::cleanup()
+
+ size_t WvEVPMDDigest::digestsize() const
+ {
+- return EVP_MD_size((env_md_st *)evpmd);
++ return EVP_MD_size(evpmd);
+ }
+
+
+@@ -104,14 +104,14 @@ WvHMACDigest::WvHMACDigest(WvEVPMDDigest *_digest,
+ {
+ key = new unsigned char[keysize];
+ memcpy(key, _key, keysize);
+- hmacctx = new HMAC_CTX;
++ hmacctx = HMAC_CTX_new();
+ _reset();
+ }
+
+ WvHMACDigest::~WvHMACDigest()
+ {
+ cleanup();
+- delete hmacctx;
++ HMAC_CTX_free(hmacctx);
+ deletev key;
+ delete digest;
+ }
+@@ -145,7 +145,7 @@ bool WvHMACDigest::_finish(WvBuf &outbuf)
+ bool WvHMACDigest::_reset()
+ {
+ cleanup();
+- HMAC_Init(hmacctx, key, keysize, (env_md_st *)digest->getevpmd());
++ HMAC_Init(hmacctx, key, keysize, digest->getevpmd());
+ active = true;
+ return true;
+ }
+diff --git a/crypto/wvocsp.cc b/crypto/wvocsp.cc
+index ddb2de4..7d5da07 100644
+--- a/crypto/wvocsp.cc
++++ b/crypto/wvocsp.cc
+@@ -118,9 +118,10 @@ bool WvOCSPResp::check_nonce(const WvOCSPReq &req) const
+
+ bool WvOCSPResp::signedbycert(const WvX509 &cert) const
+ {
+- EVP_PKEY *skey = X509_get_pubkey(cert.cert);
+- int i = OCSP_BASICRESP_verify(bs, skey, 0);
+- EVP_PKEY_free(skey);
++ STACK_OF(X509) *sk = sk_X509_new_null();
++ sk_X509_push(sk, cert.cert);
++ int i = OCSP_basic_verify(bs, sk, NULL, OCSP_NOVERIFY);
++ sk_X509_free(sk);
+
+ if(i > 0)
+ return true;
+@@ -131,33 +132,15 @@ bool WvOCSPResp::signedbycert(const WvX509 &cert) const
+
+ WvX509 WvOCSPResp::get_signing_cert() const
+ {
+- if (!bs || !sk_X509_num(bs->certs))
++ const STACK_OF(X509) *certs = OCSP_resp_get0_certs(bs);
++ if (!bs || !sk_X509_num(certs))
+ return WvX509();
+
+- // note: the following bit of code is taken almost verbatim from
+- // ocsp_vfy.c in OpenSSL 0.9.8. Copyright and attribution should
+- // properly belong to them
+-
+- OCSP_RESPID *id = bs->tbsResponseData->responderId;
+-
+- if (id->type == V_OCSP_RESPID_NAME)
+- {
+- X509 *x = X509_find_by_subject(bs->certs, id->value.byName);
+- if (x)
+- return WvX509(X509_dup(x));
++ X509 *signer = NULL;
++ if (OCSP_resp_get0_signer(bs, &signer, NULL) == 1) {
++ return WvX509(X509_dup(signer));
+ }
+
+- if (id->value.byKey->length != SHA_DIGEST_LENGTH) return NULL;
+- unsigned char tmphash[SHA_DIGEST_LENGTH];
+- unsigned char *keyhash = id->value.byKey->data;
+- for (int i = 0; i < sk_X509_num(bs->certs); i++)
+- {
+- X509 *x = sk_X509_value(bs->certs, i);
+- X509_pubkey_digest(x, EVP_sha1(), tmphash, NULL);
+- if(!memcmp(keyhash, tmphash, SHA_DIGEST_LENGTH))
+- return WvX509(X509_dup(x));
+- }
+-
+ return WvX509();
+ }
+
+diff --git a/crypto/wvx509.cc b/crypto/wvx509.cc
+index 70c9fa0..5e5f9be 100644
+--- a/crypto/wvx509.cc
++++ b/crypto/wvx509.cc
+@@ -974,7 +974,7 @@ static void add_aia(WvStringParm type, WvString identifier,
+ sk_ACCESS_DESCRIPTION_push(ainfo, acc);
+ acc->method = OBJ_txt2obj(type.cstr(), 0);
+ acc->location->type = GEN_URI;
+- acc->location->d.ia5 = M_ASN1_IA5STRING_new();
++ acc->location->d.ia5 = ASN1_IA5STRING_new();
+ unsigned char *cident
+ = reinterpret_cast<unsigned char *>(identifier.edit());
+ ASN1_STRING_set(acc->location->d.ia5, cident, identifier.len());
+@@ -1059,7 +1059,7 @@ void WvX509::set_crl_urls(WvStringList &urls)
+ GENERAL_NAMES *uris = GENERAL_NAMES_new();
+ GENERAL_NAME *uri = GENERAL_NAME_new();
+ uri->type = GEN_URI;
+- uri->d.ia5 = M_ASN1_IA5STRING_new();
++ uri->d.ia5 = ASN1_IA5STRING_new();
+ unsigned char *cident
+ = reinterpret_cast<unsigned char *>(i().edit());
+ ASN1_STRING_set(uri->d.ia5, cident, i().len());
+@@ -1158,10 +1158,11 @@ WvString WvX509::get_extension(int nid) const
+ if (ext)
+ {
+ X509V3_EXT_METHOD *method = (X509V3_EXT_METHOD *)X509V3_EXT_get(ext);
++ ASN1_OCTET_STRING *ext_data_str = X509_EXTENSION_get_data(ext);
+ if (!method)
+ {
+ WvDynBuf buf;
+- buf.put(ext->value->data, ext->value->length);
++ buf.put(ext_data_str->data, ext_data_str->length);
+ retval = buf.getstr();
+ }
+ else
+@@ -1172,21 +1173,21 @@ WvString WvX509::get_extension(int nid) const
+ // even though it's const (at least as of version 0.9.8e).
+ // gah.
+ #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
+- const unsigned char * ext_value_data = ext->value->data;
++ const unsigned char * ext_value_data = ext_data_str->data;
+ #else
+ unsigned char *ext_value_data = ext->value->data;
+ #endif
+ if (method->it)
+ {
+ ext_data = ASN1_item_d2i(NULL, &ext_value_data,
+- ext->value->length,
++ ext_data_str->length,
+ ASN1_ITEM_ptr(method->it));
+ TRACE("Applied generic conversion!\n");
+ }
+ else
+ {
+ ext_data = method->d2i(NULL, &ext_value_data,
+- ext->value->length);
++ ext_data_str->length);
+ TRACE("Applied method specific conversion!\n");
+ }
+
+@@ -1321,13 +1322,13 @@ bool WvX509::verify(WvBuf &original, WvStringParm signature) const
+ return false;
+
+ /* Verify the signature */
+- EVP_MD_CTX sig_ctx;
+- EVP_VerifyInit(&sig_ctx, EVP_sha1());
+- EVP_VerifyUpdate(&sig_ctx, original.peek(0, original.used()),
++ EVP_MD_CTX *sig_ctx = EVP_MD_CTX_new();
++ EVP_VerifyInit(sig_ctx, EVP_sha1());
++ EVP_VerifyUpdate(sig_ctx, original.peek(0, original.used()),
+ original.used());
+- int sig_err = EVP_VerifyFinal(&sig_ctx, sig_buf, sig_size, pk);
++ int sig_err = EVP_VerifyFinal(sig_ctx, sig_buf, sig_size, pk);
+ EVP_PKEY_free(pk);
+- EVP_MD_CTX_cleanup(&sig_ctx); // Again, not my fault...
++ EVP_MD_CTX_free(sig_ctx); // Again, not my fault...
+ if (sig_err != 1)
+ {
+ debug("Verify failed!\n");
+@@ -1446,19 +1447,19 @@ void WvX509::set_ski()
+ {
+ CHECK_CERT_EXISTS_SET("ski");
+
+- ASN1_OCTET_STRING *oct = M_ASN1_OCTET_STRING_new();
+- ASN1_BIT_STRING *pk = cert->cert_info->key->public_key;
++ ASN1_OCTET_STRING *oct = ASN1_OCTET_STRING_new();
++ ASN1_BIT_STRING *pk = X509_get0_pubkey_bitstr(cert);
+ unsigned char pkey_dig[EVP_MAX_MD_SIZE];
+ unsigned int diglen;
+
+ EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL);
+
+- M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen);
++ ASN1_OCTET_STRING_set(oct, pkey_dig, diglen);
+ X509_EXTENSION *ext = X509V3_EXT_i2d(NID_subject_key_identifier, 0,
+ oct);
+ X509_add_ext(cert, ext, -1);
+ X509_EXTENSION_free(ext);
+- M_ASN1_OCTET_STRING_free(oct);
++ ASN1_OCTET_STRING_free(oct);
+ }
+
+
+diff --git a/crypto/wvx509mgr.cc b/crypto/wvx509mgr.cc
+index f249eec..156d3a4 100644
+--- a/crypto/wvx509mgr.cc
++++ b/crypto/wvx509mgr.cc
+@@ -350,6 +350,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const
+ return false;
+ }
+
++ uint32_t ex_flags = X509_get_extension_flags(cert);
++ uint32_t ex_kusage = X509_get_key_usage(cert);
+ if (cert == unsignedcert.cert)
+ {
+ debug("Self Signing!\n");
+@@ -362,8 +364,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const
+ return false;
+ }
+ #endif
+- else if (!((cert->ex_flags & EXFLAG_KUSAGE) &&
+- (cert->ex_kusage & KU_KEY_CERT_SIGN)))
++ else if (!((ex_flags & EXFLAG_KUSAGE) &&
++ (ex_kusage & KU_KEY_CERT_SIGN)))
+ {
+ debug("This Certificate is not allowed to sign certificates!\n");
+ return false;
+@@ -390,6 +392,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const
+
+ bool WvX509Mgr::signcrl(WvCRL &crl) const
+ {
++ uint32_t ex_flags = X509_get_extension_flags(cert);
++ uint32_t ex_kusage = X509_get_key_usage(cert);
+ if (!isok() || !crl.isok())
+ {
+ debug(WvLog::Warning, "Asked to sign CRL, but certificate or CRL (or "
+@@ -403,12 +407,12 @@ bool WvX509Mgr::signcrl(WvCRL &crl) const
+ "CRLs!\n");
+ return false;
+ }
+- else if (!((cert->ex_flags & EXFLAG_KUSAGE) &&
+- (cert->ex_kusage & KU_CRL_SIGN)))
++ else if (!((ex_flags & EXFLAG_KUSAGE) &&
++ (ex_kusage & KU_CRL_SIGN)))
+ {
+ debug("Certificate not allowed to sign CRLs! (%s %s)\n",
+- (cert->ex_flags & EXFLAG_KUSAGE),
+- (cert->ex_kusage & KU_CRL_SIGN));
++ (ex_flags & EXFLAG_KUSAGE),
++ (ex_kusage & KU_CRL_SIGN));
+ return false;
+ }
+ #endif
+@@ -454,7 +458,6 @@ WvString WvX509Mgr::sign(WvBuf &data) const
+ {
+ assert(rsa);
+
+- EVP_MD_CTX sig_ctx;
+ unsigned char sig_buf[4096];
+
+ EVP_PKEY *pk = EVP_PKEY_new();
+@@ -467,20 +470,22 @@ WvString WvX509Mgr::sign(WvBuf &data) const
+ return WvString::null;
+ }
+
+- EVP_SignInit(&sig_ctx, EVP_sha1());
+- EVP_SignUpdate(&sig_ctx, data.peek(0, data.used()), data.used());
++ EVP_MD_CTX *sig_ctx = EVP_MD_CTX_new();
++ EVP_SignInit(sig_ctx, EVP_sha1());
++ EVP_SignUpdate(sig_ctx, data.peek(0, data.used()), data.used());
+ unsigned int sig_len = sizeof(sig_buf);
+- int sig_err = EVP_SignFinal(&sig_ctx, sig_buf,
++ int sig_err = EVP_SignFinal(sig_ctx, sig_buf,
+ &sig_len, pk);
+ if (sig_err != 1)
+ {
+ debug("Error while signing.\n");
+ EVP_PKEY_free(pk);
++ EVP_MD_CTX_free(sig_ctx);
+ return WvString::null;
+ }
+
+ EVP_PKEY_free(pk);
+- EVP_MD_CTX_cleanup(&sig_ctx); // this isn't my fault ://
++ EVP_MD_CTX_free(sig_ctx); // this isn't my fault ://
+ WvDynBuf buf;
+ buf.put(sig_buf, sig_len);
+ debug("Signature size: %s\n", buf.used());
+diff --git a/include/wvdiffiehellman.h b/include/wvdiffiehellman.h
+index af75ffa..a2d001f 100644
+--- a/include/wvdiffiehellman.h
++++ b/include/wvdiffiehellman.h
+@@ -27,7 +27,7 @@ public:
+ bool create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf);
+
+ protected:
+- struct dh_st *info;
++ DH *info;
+ BN_ULONG generator;
+
+ private:
+diff --git a/include/wvdigest.h b/include/wvdigest.h
+index fdc39bd..f2eed40 100644
+--- a/include/wvdigest.h
++++ b/include/wvdigest.h
+@@ -9,10 +9,8 @@
+
+ #include "wvencoder.h"
+ #include <stdint.h>
++#include <openssl/evp.h>
+
+-struct env_md_st;
+-struct env_md_ctx_st;
+-struct hmac_ctx_st;
+
+ /**
+ * Superclass for all message digests.
+@@ -45,8 +43,8 @@ public:
+ class WvEVPMDDigest : public WvDigest
+ {
+ friend class WvHMACDigest;
+- const env_md_st *evpmd;
+- env_md_ctx_st *evpctx;
++ const EVP_MD *evpmd;
++ EVP_MD_CTX *evpctx;
+ bool active;
+
+ public:
+@@ -54,13 +52,13 @@ public:
+ virtual size_t digestsize() const;
+
+ protected:
+- WvEVPMDDigest(const env_md_st *_evpmd);
++ WvEVPMDDigest(const EVP_MD *_evpmd);
+ virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf,
+ bool flush); // consumes input
+ virtual bool _finish(WvBuf &outbuf); // outputs digest
+ virtual bool _reset(); // supported: resets digest value
+
+- const env_md_st *getevpmd()
++ const EVP_MD *getevpmd()
+ { return evpmd; }
+
+ private:
+@@ -104,7 +102,7 @@ class WvHMACDigest : public WvDigest
+ WvEVPMDDigest *digest;
+ unsigned char *key;
+ size_t keysize;
+- hmac_ctx_st *hmacctx;
++ HMAC_CTX *hmacctx;
+ bool active;
+
+ public:
+diff --git a/include/wvtripledes.h b/include/wvtripledes.h
+index 185fe8a..a442e7a 100644
+--- a/include/wvtripledes.h
++++ b/include/wvtripledes.h
+@@ -70,11 +70,11 @@ protected:
+
+ private:
+ Mode mode;
+- des_cblock key;
+- des_key_schedule deskey1;
+- des_key_schedule deskey2;
+- des_key_schedule deskey3;
+- des_cblock ivec; // initialization vector
++ DES_cblock key;
++ DES_key_schedule deskey1;
++ DES_key_schedule deskey2;
++ DES_key_schedule deskey3;
++ DES_cblock ivec; // initialization vector
+ int ivecoff; // current offset into initvec
+ };
+
diff --git a/libraries/wvstreams/patches/14_cross.diff b/libraries/wvstreams/patches/14_cross.diff
new file mode 100644
index 0000000000..35e815f944
--- /dev/null
+++ b/libraries/wvstreams/patches/14_cross.diff
@@ -0,0 +1,53 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: prefix pkg-config with $ac_tool_prefix to support cross compilation
+
+Index: wvstreams-4.6.1/configure.ac
+===================================================================
+--- wvstreams-4.6.1.orig/configure.ac
++++ wvstreams-4.6.1/configure.ac
+@@ -345,8 +345,8 @@
+ LDFLAGS="$LDFLAGS_save"
+
+ # Detect pkg-config
+-AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
+-if test "$PKGCONFIG" = "no"; then
++PKG_PROG_PKG_CONFIG
++if test "x$PKG_CONFIG" = "x"; then
+ AC_MSG_WARN([pkg-config is not installed])
+ fi
+
+@@ -370,10 +370,10 @@
+ if test "$with_dbus" != "no"; then
+ if test "$with_dbus" = "" -o "$with_dbus" = "yes"; then
+ AC_MSG_CHECKING([Checking that D-Bus version greater than 1.2.14 installed.])
+- if pkg-config --atleast-version 1.2.14 dbus-1; then
+- WV_APPEND(CPPFLAGS, [`pkg-config --cflags dbus-1`])
+- WV_APPEND(LDFLAGS, [`pkg-config --libs-only-L dbus-1`])
+- LIBS_DBUS=`pkg-config --libs-only-l dbus-1`
++ if $PKG_CONFIG --atleast-version 1.2.14 dbus-1; then
++ WV_APPEND(CPPFLAGS, [`$PKG_CONFIG --cflags dbus-1`])
++ WV_APPEND(LDFLAGS, [`$PKG_CONFIG --libs-only-L dbus-1`])
++ LIBS_DBUS=`$PKG_CONFIG --libs-only-l dbus-1`
+ AC_MSG_RESULT([yes])
+ else
+ with_dbus=no
+@@ -497,7 +497,7 @@
+ CPPFLAGS_save="$CPPFLAGS"
+ LDFLAGS_save="$LDFLAGS"
+ LIBS_save="$LIBS"
+- for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH $(pkg-config --variable=prefix qt-mt); do
++ for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH $($PKG_CONFIG --variable=prefix qt-mt); do
+ eval wv_qtdir="$wv_qtdir"
+ CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include -I$wv_qtdir/include/qt3"
+ LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib"
+Index: wvstreams-4.6.1/autogen.sh
+===================================================================
+--- wvstreams-4.6.1.orig/autogen.sh
++++ wvstreams-4.6.1/autogen.sh
+@@ -1,5 +1,6 @@
+ #!/bin/sh
+ set -e
++aclocal
+ autoheader
+ autoconf
+ (cd argp && autoconf)
diff --git a/libraries/wvstreams/patches/15_Fix-narrowing-conversion-error.patch b/libraries/wvstreams/patches/15_Fix-narrowing-conversion-error.patch
new file mode 100644
index 0000000000..fc9abd8e63
--- /dev/null
+++ b/libraries/wvstreams/patches/15_Fix-narrowing-conversion-error.patch
@@ -0,0 +1,29 @@
+From c86c524f951f6e973473bfee76fd5366368b2cbc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Dec 2019 09:32:41 -0800
+Subject: [PATCH] Fix narrowing conversion error
+
+xplc/moduleloader.cc: In static member function 'static Module* Module::loadModule(const char*)': xplc/moduleloader.cc:67:14: error: narrowing conversion of '-1' from 'int' to 'unsigned int' [-Wnarrowing] 67 | case (int)-1: | ^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ xplc/moduleloader.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xplc/moduleloader.cc b/xplc/moduleloader.cc
+index 02dd9a4..c53f5d2 100644
+--- a/xplc/moduleloader.cc
++++ b/xplc/moduleloader.cc
+@@ -62,7 +62,7 @@ Module* Module::loadModule(const char* modulename) {
+ return NULL;
+ }
+
+- switch(moduleinfo->version_major) {
++ switch((int)moduleinfo->version_major) {
+ #ifdef UNSTABLE
+ case -1:
+ /* nothing to do */
+--
+2.24.1
+
diff --git a/libraries/wvstreams/patches/wvstreams-4.6.1-parallel-make.patch b/libraries/wvstreams/patches/16_wvstreams-4.6.1-parallel-make.patch
index 5ad79fd7a9..5ad79fd7a9 100644
--- a/libraries/wvstreams/patches/wvstreams-4.6.1-parallel-make.patch
+++ b/libraries/wvstreams/patches/16_wvstreams-4.6.1-parallel-make.patch
diff --git a/libraries/wvstreams/patches/wvstreams-4.6.1-gcc47.patch b/libraries/wvstreams/patches/wvstreams-4.6.1-gcc47.patch
deleted file mode 100644
index 3d67048324..0000000000
--- a/libraries/wvstreams/patches/wvstreams-4.6.1-gcc47.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- wvstreams-4.6.1-dist/include/wvuid.h 2012-01-05 10:18:58.713661236 +0100
-+++ wvstreams-4.6.1/include/wvuid.h 2012-01-05 10:27:42.198435328 +0100
-@@ -7,6 +7,7 @@
- #ifndef __WVUID_H
- #define __WVUID_H
-
-+#include <unistd.h>
- #include "wvstring.h"
-
- #if WIN32
diff --git a/libraries/wvstreams/wvstreams.SlackBuild b/libraries/wvstreams/wvstreams.SlackBuild
index 562bb05d11..2cbe84c6b1 100644
--- a/libraries/wvstreams/wvstreams.SlackBuild
+++ b/libraries/wvstreams/wvstreams.SlackBuild
@@ -11,7 +11,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -22,8 +22,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -46,26 +46,17 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# patch to allow parallel builds
-patch -p1 < $CWD/patches/wvstreams-4.6.1-parallel-make.patch
-
-# patch for gcc-4.7
-# https://code.google.com/p/wvstreams/issues/detail?id=34
-patch -p1 < $CWD/patches/wvstreams-4.6.1-gcc47.patch
-# another patch for gcc and glibc > 2.12.0 from debian
-patch -p1 < $CWD/patches/05_gcc.diff
-
-# configure doesn't support disabling static libraries
-# Don't manually remove them either, as wvdial won't build then :)
-# Added more flags to avoid aborting when building with gcc-4.7.x
-# https://bugs.gentoo.org/show_bug.cgi?id=419971
-CFLAGS="$SLKCFLAGS -fno-tree-dce -fno-optimize-sibling-calls" \
-CXXFLAGS="$SLKCFLAGS -fno-tree-dce -fno-optimize-sibling-calls" \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Apply debian patches
+for i in $CWD/patches/*; do patch -p1 < $i ; done
+
+./autogen.sh
+
+CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -78,7 +69,7 @@ CXXFLAGS="$SLKCFLAGS -fno-tree-dce -fno-optimize-sibling-calls" \
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Let's not clobber the config file