[ptxdist] [PATCH 1/2] wvstreams: Add package

2017-10-16 Thread Sascha Hauer
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 
---
 .../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 0..3d0684666
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0001-Fix-FTBFS-with-gcc-4.7.patch
@@ -0,0 +1,50 @@
+From: Paul Tagliamonte 
+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 
+ #include 
+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 
+ 
+ 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 0..0e58167dd
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0002-fix-FTBFS-with-OpenSSL-1.0.patch
@@ -0,0 +1,21 @@
+From: Luca Falavigna 
+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 0..af1dfcfc6
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
@@ -0,0 +1,37 @@
+From: Luca Falavigna 
+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 
+ #include 
+-#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

Re: [ptxdist] [PATCH 1/2] wvstreams: Add package

2017-10-16 Thread Sascha Hauer
[PATCH v2] this is.

Changes since v1:

- integrated comments from Michael

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 1/2] wvstreams: Add package

2017-09-29 Thread Sascha Hauer
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 
---
 .../0001-Fix-FTBFS-with-gcc-4.7.patch  | 54 
 .../0002-fix-FTBFS-with-OpenSSL-1.0.patch  | 25 ++
 .../0003-fix-FTBFS-with-glibc-2.12.patch   | 41 
 .../0004-Fix-compilation-with-gcc-6.patch  | 49 +++
 patches/wvstreams-4.6.1/series |  4 ++
 rules/wvstreams.in | 11 +
 rules/wvstreams.make   | 57 ++
 7 files changed, 241 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 0..b8597d29a
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0001-Fix-FTBFS-with-gcc-4.7.patch
@@ -0,0 +1,54 @@
+From 912004e2faa35c95558a04b8d7ac7d132676d92f Mon Sep 17 00:00:00 2001
+From: Paul Tagliamonte 
+Date: Thu, 28 Sep 2017 15:50:05 +0200
+Subject: [PATCH 1/4] 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 0417759..d5e1d87 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 
+ #include 
+diff --git a/utils/wvcrashbase.cc b/utils/wvcrashbase.cc
+index 8d67027..53e2037 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 7fa1035..709a484 100644
+--- a/utils/wvuid.cc
 b/utils/wvuid.cc
+@@ -33,6 +33,7 @@ wvuid_t wvgetuid()
+ 
+ #else // not WIN32
+ 
++#include 
+ 
+ WvString wv_username_from_uid(wvuid_t uid)
+ {
+-- 
+2.11.0
+
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 0..d308bc93c
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0002-fix-FTBFS-with-OpenSSL-1.0.patch
@@ -0,0 +1,25 @@
+From f6a5f6c664be64c04d4e70c7a69993401318f36a Mon Sep 17 00:00:00 2001
+From: Luca Falavigna 
+Date: Thu, 28 Sep 2017 15:51:26 +0200
+Subject: [PATCH 2/4] 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 93dae06..41fa742 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;
+-- 
+2.11.0
+
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 0..183583aab
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
@@ -0,0 +1,41 @@
+From 013d7fc99cafd215a18ee2e3ad15c4428242 Mon Sep 17 00:00:00 2001
+From: Luca Falavigna 
+Date: Thu, 28 Sep 2017 15:52:12 +0200
+Subject: [PATCH 3/4] 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 41d2911..c8b539f 100644
+--- a/ipstreams/wvunixdgsocket.cc
 b/ipstreams/wvunixdgsocket.cc
+@@ -1,8 +1,6 @@
+ #include "wvunixdgsocket.h"
+-#ifdef MACOS
+ #include 
+ #include 
+-#endif
+ 
+