summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2018-05-10 10:41:49 +0200
committer Matteo Bernardini2018-06-09 09:38:54 +0200
commite9d00bc365dbba8008ced84cd957222e03cddb80 (patch)
tree1551ba2756e7f33aacf27e639436f87f544bbfa0
parent81c344443219574587ae3d6bccb8f19c1bd346af (diff)
downloadold.slackbuilds-wvstreams.tar.gz
libraries/wvstreams: Patch for gcc >= 6.x. and to use openssl-1.0.x.wvstreams
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--libraries/wvstreams/patches/0001-Use-explicit-cast-and-prevent-compiler-error.patch50
-rw-r--r--libraries/wvstreams/patches/05_gcc.diff13
-rw-r--r--libraries/wvstreams/patches/openssl-buildfix.patch16
-rw-r--r--libraries/wvstreams/wvstreams.SlackBuild9
4 files changed, 74 insertions, 14 deletions
diff --git a/libraries/wvstreams/patches/0001-Use-explicit-cast-and-prevent-compiler-error.patch b/libraries/wvstreams/patches/0001-Use-explicit-cast-and-prevent-compiler-error.patch
new file mode 100644
index 0000000000..3932ddb949
--- /dev/null
+++ b/libraries/wvstreams/patches/0001-Use-explicit-cast-and-prevent-compiler-error.patch
@@ -0,0 +1,50 @@
+From 32ecfa8e89306ace726f7ad14f2b09c2aa1b96c4 Mon Sep 17 00:00:00 2001
+From: Michal Sekletar <msekleta@redhat.com>
+Date: Tue, 9 Feb 2016 21:02:59 +0100
+Subject: [PATCH] Use explicit cast and prevent compiler error
+
+---
+ streams/wvstream.cc | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/streams/wvstream.cc b/streams/wvstream.cc
+index 4564f3c..76565b4 100644
+--- a/streams/wvstream.cc
++++ b/streams/wvstream.cc
+@@ -907,9 +907,9 @@ void WvStream::_build_selectinfo(SelectInfo &si, time_t msec_timeout,
+
+ 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,7 @@ bool WvStream::_select(time_t msec_timeout, bool readable, bool writable,
+
+ 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 +1107,10 @@ bool WvStream::continue_select(time_t msec_timeout)
+ // 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));
+ }
+
+
+--
+2.5.0
+
diff --git a/libraries/wvstreams/patches/05_gcc.diff b/libraries/wvstreams/patches/05_gcc.diff
index 8e4fd03298..616843d4ae 100644
--- a/libraries/wvstreams/patches/05_gcc.diff
+++ b/libraries/wvstreams/patches/05_gcc.diff
@@ -1,16 +1,3 @@
-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
diff --git a/libraries/wvstreams/patches/openssl-buildfix.patch b/libraries/wvstreams/patches/openssl-buildfix.patch
new file mode 100644
index 0000000000..3f76e5f697
--- /dev/null
+++ b/libraries/wvstreams/patches/openssl-buildfix.patch
@@ -0,0 +1,16 @@
+diff -Naur wvstreams-4.6.1.orig/crypto/wvx509.cc wvstreams-4.6.1/crypto/wvx509.cc
+--- wvstreams-4.6.1.orig/crypto/wvx509.cc 2008-10-23 22:23:49.000000000 +0200
++++ wvstreams-4.6.1/crypto/wvx509.cc 2018-05-10 09:25:27.106684000 +0200
+@@ -1157,7 +1157,11 @@
+
+ if (ext)
+ {
+- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++#else
++ X509V3_EXT_METHOD *method = (X509V3_EXT_METHOD *)X509V3_EXT_get(ext);
++#endif
+ if (!method)
+ {
+ WvDynBuf buf;
diff --git a/libraries/wvstreams/wvstreams.SlackBuild b/libraries/wvstreams/wvstreams.SlackBuild
index 562bb05d11..fe600b62c9 100644
--- a/libraries/wvstreams/wvstreams.SlackBuild
+++ b/libraries/wvstreams/wvstreams.SlackBuild
@@ -59,13 +59,20 @@ patch -p1 < $CWD/patches/wvstreams-4.6.1-parallel-make.patch
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
+# another one for gcc-6.x from fedora
+patch -p1 < $CWD/patches/0001-Use-explicit-cast-and-prevent-compiler-error.patch
+# disable a warning (just for readability during build)
+sed -i "s|_BSD_SOURCE|_DEFAULT_SOURCE|" wvrules.mk
+# Fix build against openssl
+patch -p1 < $CWD/patches/openssl-buildfix.patch
# 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
+LIBS="-L/usr/lib${LIBDIRSUFFIX}/openssl-1.0" \
CFLAGS="$SLKCFLAGS -fno-tree-dce -fno-optimize-sibling-calls" \
-CXXFLAGS="$SLKCFLAGS -fno-tree-dce -fno-optimize-sibling-calls" \
+CXXFLAGS="$SLKCFLAGS -fno-tree-dce -fno-optimize-sibling-calls -I/usr/include/openssl-1.0" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \