wvstreams is a C++ networking library which is added here because
it's used by wvdial. Upstream for this library is dead, so we
download the package from storage.googleapis.com.

To make it compile the debian patches are added.

WvStreams uses autoconf, but not automake which for us means
that parallel build is broken. Disable parallel build for now.

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 .../0001-Fix-FTBFS-with-gcc-4.7.patch              | 50 +++++++++++++++
 .../0002-fix-FTBFS-with-OpenSSL-1.0.patch          | 21 +++++++
 .../0003-fix-FTBFS-with-glibc-2.12.patch           | 37 +++++++++++
 .../0004-Fix-compilation-with-gcc-6.patch          | 45 ++++++++++++++
 patches/wvstreams-4.6.1/series                     |  7 +++
 rules/wvstreams.in                                 | 11 ++++
 rules/wvstreams.make                               | 71 ++++++++++++++++++++++
 7 files changed, 242 insertions(+)
 create mode 100644 patches/wvstreams-4.6.1/0001-Fix-FTBFS-with-gcc-4.7.patch
 create mode 100644 
patches/wvstreams-4.6.1/0002-fix-FTBFS-with-OpenSSL-1.0.patch
 create mode 100644 patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
 create mode 100644 
patches/wvstreams-4.6.1/0004-Fix-compilation-with-gcc-6.patch
 create mode 100644 patches/wvstreams-4.6.1/series
 create mode 100644 rules/wvstreams.in
 create mode 100644 rules/wvstreams.make

diff --git a/patches/wvstreams-4.6.1/0001-Fix-FTBFS-with-gcc-4.7.patch 
b/patches/wvstreams-4.6.1/0001-Fix-FTBFS-with-gcc-4.7.patch
new file mode 100644
index 000000000..3d0684666
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0001-Fix-FTBFS-with-gcc-4.7.patch
@@ -0,0 +1,50 @@
+From: Paul Tagliamonte <paul...@ubuntu.com>
+Date: Thu, 28 Sep 2017 15:50:05 +0200
+Subject: [PATCH] Fix FTBFS with gcc-4.7
+
+Small header include change. This is borderlinde cosmetic, but still
+needed to prevent the FTBFS.
+---
+ utils/wvcrash.cc     | 2 +-
+ utils/wvcrashbase.cc | 2 +-
+ utils/wvuid.cc       | 1 +
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/utils/wvcrash.cc b/utils/wvcrash.cc
+index 04177598278a..d5e1d8772f92 100644
+--- 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>
+diff --git a/utils/wvcrashbase.cc b/utils/wvcrashbase.cc
+index 8d6702707da2..53e2037827fd 100644
+--- a/utils/wvcrashbase.cc
++++ b/utils/wvcrashbase.cc
+@@ -66,7 +66,7 @@ const char *wvcrash_ring_buffer_get()
+ 
+ 
+ // 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/utils/wvuid.cc b/utils/wvuid.cc
+index 7fa10353dc9c..709a484ab35d 100644
+--- a/utils/wvuid.cc
++++ b/utils/wvuid.cc
+@@ -33,6 +33,7 @@ wvuid_t wvgetuid()
+ 
+ #else // not WIN32
+ 
++#include <unistd.h>
+ 
+ WvString wv_username_from_uid(wvuid_t uid)
+ {
diff --git a/patches/wvstreams-4.6.1/0002-fix-FTBFS-with-OpenSSL-1.0.patch 
b/patches/wvstreams-4.6.1/0002-fix-FTBFS-with-OpenSSL-1.0.patch
new file mode 100644
index 000000000..0e58167dd
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0002-fix-FTBFS-with-OpenSSL-1.0.patch
@@ -0,0 +1,21 @@
+From: Luca Falavigna <dktrkr...@debian.org>
+Date: Thu, 28 Sep 2017 15:51:26 +0200
+Subject: [PATCH] fix FTBFS with OpenSSL 1.0
+
+---
+ crypto/wvx509.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/crypto/wvx509.cc b/crypto/wvx509.cc
+index 93dae06f9ef6..41fa7428a1f9 100644
+--- a/crypto/wvx509.cc
++++ b/crypto/wvx509.cc
+@@ -1157,7 +1157,7 @@ WvString WvX509::get_extension(int nid) const
+         
+         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/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch 
b/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
new file mode 100644
index 000000000..af1dfcfc6
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
@@ -0,0 +1,37 @@
+From: Luca Falavigna <dktrkr...@debian.org>
+Date: Thu, 28 Sep 2017 15:52:12 +0200
+Subject: [PATCH] fix FTBFS with glibc 2.12
+
+---
+ ipstreams/wvunixdgsocket.cc | 2 --
+ streams/wvatomicfile.cc     | 3 ---
+ 2 files changed, 5 deletions(-)
+
+diff --git a/ipstreams/wvunixdgsocket.cc b/ipstreams/wvunixdgsocket.cc
+index 41d2911f71ff..c8b539f80795 100644
+--- 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)
+diff --git a/streams/wvatomicfile.cc b/streams/wvatomicfile.cc
+index 65ae202ff387..e249a149f7bd 100644
+--- 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/patches/wvstreams-4.6.1/0004-Fix-compilation-with-gcc-6.patch 
b/patches/wvstreams-4.6.1/0004-Fix-compilation-with-gcc-6.patch
new file mode 100644
index 000000000..c253129f4
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0004-Fix-compilation-with-gcc-6.patch
@@ -0,0 +1,45 @@
+From: Gert Wollny <gw.foss...@gmail.com>
+Date: Thu, 28 Sep 2017 15:53:36 +0200
+Subject: [PATCH] Fix compilation with gcc-6
+
+---
+ streams/wvstream.cc | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/streams/wvstream.cc b/streams/wvstream.cc
+index 4564f3ce873d..5a3c0705aadb 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,8 @@ 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 +1108,8 @@ 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));
+ }
+ 
+ 
diff --git a/patches/wvstreams-4.6.1/series b/patches/wvstreams-4.6.1/series
new file mode 100644
index 000000000..b7477ef11
--- /dev/null
+++ b/patches/wvstreams-4.6.1/series
@@ -0,0 +1,7 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Fix-FTBFS-with-gcc-4.7.patch
+0002-fix-FTBFS-with-OpenSSL-1.0.patch
+0003-fix-FTBFS-with-glibc-2.12.patch
+0004-Fix-compilation-with-gcc-6.patch
+# c2f1282f6ba8e36353ea9f2195704504  - git-ptx-patches magic
diff --git a/rules/wvstreams.in b/rules/wvstreams.in
new file mode 100644
index 000000000..2f3f60b83
--- /dev/null
+++ b/rules/wvstreams.in
@@ -0,0 +1,11 @@
+## SECTION=system_libraries
+
+config WVSTREAMS
+       tristate
+       prompt "wvstreams"
+       select ZLIB
+       select OPENSSL
+       help
+         WvStreams aims to be an efficient, secure, and easy-to-use library
+         for doing network and systems applications development in C++.
+         Mainly needed for the wvdial tool.
diff --git a/rules/wvstreams.make b/rules/wvstreams.make
new file mode 100644
index 000000000..f5c3220ac
--- /dev/null
+++ b/rules/wvstreams.make
@@ -0,0 +1,71 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.ha...@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_WVSTREAMS) += wvstreams
+
+#
+# Paths and names
+#
+WVSTREAMS_VERSION      := 4.6.1
+WVSTREAMS_MD5          := 2760dac31a43d452a19a3147bfde571c
+WVSTREAMS              := wvstreams-$(WVSTREAMS_VERSION)
+WVSTREAMS_SUFFIX       := tar.gz
+WVSTREAMS_URL          := 
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/${WVSTREAMS}.$(WVSTREAMS_SUFFIX)
+WVSTREAMS_SOURCE       := $(SRCDIR)/$(WVSTREAMS).$(WVSTREAMS_SUFFIX)
+WVSTREAMS_DIR          := $(BUILDDIR)/$(WVSTREAMS)
+WVSTREAMS_LICENSE      := GPLv2
+
+#
+# autoconf
+#
+WVSTREAMS_CONF_TOOL    := autoconf
+WVSTREAMS_CONF_OPT     := \
+       $(CROSS_AUTOCONF_USR) \
+       --disable-debug \
+       --enable-fatal-warnings \
+       --disable-optimization \
+       --disable-resolver-fork \
+       --disable-delete-detector \
+       --disable-warnings \
+       --disable-testgui \
+       --without-dbus \
+       --without-pam \
+       --without-tcl \
+       --without-qt \
+       --without-valgrind
+
+WVSTREAMS_MAKE_PAR := NO
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/wvstreams.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, wvstreams)
+       @$(call install_fixup, wvstreams,PRIORITY,optional)
+       @$(call install_fixup, wvstreams,SECTION,base)
+       @$(call install_fixup, wvstreams,AUTHOR,"Sascha Hauer 
<s.ha...@pengutronix.de>")
+       @$(call install_fixup, wvstreams,DESCRIPTION,missing)
+
+       @$(call install_lib, wvstreams, 0, 0, 0644, libuniconf)
+       @$(call install_lib, wvstreams, 0, 0, 0644, libwvbase)
+       @$(call install_lib, wvstreams, 0, 0, 0644, libwvstreams)
+       @$(call install_lib, wvstreams, 0, 0, 0644, libwvutils)
+
+       @$(call install_finish, wvstreams)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to