mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] wvstreams: Add package
@ 2017-10-16 12:15 Sascha Hauer
  2017-10-16 12:15 ` [ptxdist] [PATCH 2/2] wvdial: " Sascha Hauer
  2017-10-16 12:16 ` [ptxdist] [PATCH 1/2] wvstreams: " Sascha Hauer
  0 siblings, 2 replies; 7+ messages in thread
From: Sascha Hauer @ 2017-10-16 12:15 UTC (permalink / raw)
  To: ptxdist

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.hauer@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 <paultag@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 <dktrkranz@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 <dktrkranz@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.fossdev@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.hauer@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.hauer@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH 2/2] wvdial: Add package
  2017-10-16 12:15 [ptxdist] [PATCH 1/2] wvstreams: Add package Sascha Hauer
@ 2017-10-16 12:15 ` Sascha Hauer
  2017-10-16 12:36   ` Ladislav Michl
  2017-10-16 12:16 ` [ptxdist] [PATCH 1/2] wvstreams: " Sascha Hauer
  1 sibling, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2017-10-16 12:15 UTC (permalink / raw)
  To: ptxdist

Back in the good old days wvdial was used to easily connect
a modem to the internet without having to write chat scripts
manually. Some people still use modems, so add support for
wvdial to ptxdist.

The original wvdial uses a homebrew build system not suitable
for cross compilation, so we replace it with autoconf/automake.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 patches/wvdial-1.61/0001-remove-build-files.patch  | 552 +++++++++++++++++++++
 .../0002-Add-autoconf-automake-files.patch         | 292 +++++++++++
 patches/wvdial-1.61/autogen.sh                     |  27 +
 patches/wvdial-1.61/series                         |   2 +
 rules/wvdial.in                                    |  34 ++
 rules/wvdial.make                                  |  66 +++
 6 files changed, 973 insertions(+)
 create mode 100644 patches/wvdial-1.61/0001-remove-build-files.patch
 create mode 100644 patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
 create mode 100755 patches/wvdial-1.61/autogen.sh
 create mode 100644 patches/wvdial-1.61/series
 create mode 100644 rules/wvdial.in
 create mode 100644 rules/wvdial.make

diff --git a/patches/wvdial-1.61/0001-remove-build-files.patch b/patches/wvdial-1.61/0001-remove-build-files.patch
new file mode 100644
index 000000000..6c561c08e
--- /dev/null
+++ b/patches/wvdial-1.61/0001-remove-build-files.patch
@@ -0,0 +1,552 @@
+From 451b4b47aca6c7e6e2daaf1e6941b327f8a6efbe Mon Sep 17 00:00:00 2001
+From: Sascha Hauer <s.hauer@pengutronix.de>
+Date: Fri, 29 Sep 2017 09:04:00 +0200
+Subject: [PATCH 1/2] remove build files
+
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+---
+ Makefile.in        |  74 ----------------
+ config.defaults.mk |  35 --------
+ configure          |  13 ---
+ gen-cc             |  26 ------
+ wvrules-posix.mk   |  96 ---------------------
+ wvrules.mk         | 248 -----------------------------------------------------
+ 6 files changed, 492 deletions(-)
+ delete mode 100644 Makefile.in
+ delete mode 100644 config.defaults.mk
+ delete mode 100755 configure
+ delete mode 100755 gen-cc
+ delete mode 100644 wvrules-posix.mk
+ delete mode 100644 wvrules.mk
+
+diff --git a/Makefile.in b/Makefile.in
+deleted file mode 100644
+index ebe8c94..0000000
+--- a/Makefile.in
++++ /dev/null
+@@ -1,74 +0,0 @@
+-WVPACKAGE_NAME=@PACKAGE_NAME@
+-WVPACKAGE_STRING=@PACKAGE_STRING@
+-WVPACKAGE_TARNAME=@PACKAGE_TARNAME@
+-WVPACKAGE_VERSION=@PACKAGE_VERSION@
+-
+-prefix=/usr/local
+-WVSTREAMS_INC=
+-WVSTREAMS_LIB=
+-WVSTREAMS_BIN=$(prefix)/bin
+-WVSTREAMS_SRC=.
+-
+-PC_CFLAGS=$(shell pkg-config --cflags libwvstreams)
+-ifeq ($(PC_CFLAGS),)
+- $(error WvStreams does not appear to be installed)
+-endif
+-CPPFLAGS+=$(PC_CFLAGS)
+-
+-PC_LIBS=$(shell pkg-config --libs libwvstreams)
+-ifeq ($(PC_LIBS),)
+- $(error WvStreams does not appear to be installed)
+-endif
+-LIBS+=$(PC_LIBS)
+-
+-BINDIR=${prefix}/bin
+-MANDIR=${prefix}/share/man
+-PPPDIR=/etc/ppp/peers
+-
+-include wvrules.mk
+-
+-default: all papchaptest
+-all: wvdial.a wvdial wvdialconf pppmon
+-
+-wvdial.a: wvdialer.o wvmodemscan.o wvpapchap.o wvdialbrain.o \
+-	wvdialmon.o
+-
+-wvdial wvdialconf papchaptest pppmon: \
+-  LDFLAGS+=-luniconf -lwvstreams -lwvutils -lwvbase
+-
+-wvdial wvdialconf papchaptest pppmon: wvdial.a
+-
+-install-bin: all
+-	[ -d ${BINDIR}      ] || install -d ${BINDIR}
+-	[ -d ${PPPDIR}      ] || install -d ${PPPDIR}
+-	install -m 0755 wvdial wvdialconf ${BINDIR}
+-	cp ppp.provider ${PPPDIR}/wvdial
+-	cp ppp.provider-pipe ${PPPDIR}/wvdial-pipe
+-
+-install-man:
+-	[ -d ${MANDIR}/man1 ] || install -d ${MANDIR}/man1
+-	[ -d ${MANDIR}/man5 ] || install -d ${MANDIR}/man5
+-	install -m 0644 wvdial.1 wvdialconf.1 ${MANDIR}/man1
+-	install -m 0644 wvdial.conf.5 ${MANDIR}/man5
+-
+-install: install-bin install-man
+-
+-uninstall-bin:
+-	rm -f ${BINDIR}/wvdial ${BINDIR}/wvdialconf
+-	rm -f ${PPPDIR}/wvdial
+-	rm -f ${PPPDIR}/wvdial-pipe
+-
+-uninstall-man:
+-	rm -f ${MANDIR}/man1/wvdial.1 ${MANDIR}/man1/wvdialconf.1
+-	rm -f ${MANDIR}/man5/wvdial.conf.5
+-
+-uninstall: uninstall-bin uninstall-man
+-
+-clean:
+-	rm -f wvdial wvdialconf wvdialmon papchaptest pppmon
+-
+-distclean:
+-	rm -f version.h Makefile
+-
+-.PHONY: clean all install-bin install-man install uninstall-bin uninstall-man \
+-	uninstall
+diff --git a/config.defaults.mk b/config.defaults.mk
+deleted file mode 100644
+index 1210f10..0000000
+--- a/config.defaults.mk
++++ /dev/null
+@@ -1,35 +0,0 @@
+-COMPILER_STANDARD=posix
+-EXEEXT=
+-INSTALL=/usr/bin/install -c
+-INSTALL_DATA=${INSTALL} -m 644
+-INSTALL_PROGRAM=${INSTALL}
+-INSTALL_SCRIPT=${INSTALL}
+-LN_S=ln -s
+-LN=ln
+-MOC=/usr/bin/moc
+-
+-LIBS_DBUS=-ldbus-1
+-LIBS_QT=-lqt-mt
+-LIBS_PAM=-lpam
+-LIBS_TCL=
+-
+-prefix=/usr/local
+-datadir=${prefix}/share
+-includedir=${prefix}/include
+-infodir=${prefix}/share/info
+-localstatedir=${prefix}/var
+-mandir=${prefix}/share/man
+-sharedstatedir=${prefix}/com
+-sysconfdir=${prefix}/etc
+-
+-exec_prefix=${prefix}
+-bindir=${exec_prefix}/bin
+-libdir=${exec_prefix}/lib
+-libexecdir=${exec_prefix}/libexec
+-sbindir=${exec_prefix}/sbin
+-
+-enable_debug=yes
+-enable_optimization=no
+-enable_resolver_fork=
+-enable_warnings=
+-enable_testgui=
+diff --git a/configure b/configure
+deleted file mode 100755
+index b878db2..0000000
+--- a/configure
++++ /dev/null
+@@ -1,13 +0,0 @@
+-#!/bin/sh
+-
+-PACKAGE_NAME=wvdial
+-PACKAGE_VERSION=1.61
+-
+-sed -e "s/@PACKAGE_NAME@/$PACKAGE_NAME/g" \
+-    -e "s/@PACKAGE_TARNAME@/$PACKAGE_NAME/g" \
+-    -e "s/@PACKAGE_STRING@/$PACKAGE_NAME $PACKAGE_VERSION/g" \
+-    -e "s/@PACKAGE_VERSION@/$PACKAGE_VERSION/g" \
+-    Makefile.in > Makefile
+-
+-sed -e "s/@PACKAGE_VERSION@/$PACKAGE_VERSION/g" version.h.in > version.h
+-
+diff --git a/gen-cc b/gen-cc
+deleted file mode 100755
+index 3793350..0000000
+--- a/gen-cc
++++ /dev/null
+@@ -1,26 +0,0 @@
+-#!/bin/sh -e
+-OUTFILE=$1
+-EXT=$2
+-echo "* Generating $OUTFILE" >&2
+-TEMPFILE=gencc-$$.tmp
+-
+-cat >$TEMPFILE <<-EOF 
+-	#!/bin/sh
+-	set -e
+-	
+-	MODE=\$1
+-	BASE=\$2
+-	DIR=\$(dirname \$BASE)
+-	DEPFILE=\$(dirname \$BASE)/.\$(basename \$BASE .o).d
+-	shift
+-	shift
+-	
+-	$CC \$MODE -o \$BASE.o \$BASE.$EXT \\
+-	        -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\
+-	        $CPPFLAGS \\
+-	        $CFLAGS \\
+-	        "\$@"
+-EOF
+-
+-chmod a+x $TEMPFILE
+-mv $TEMPFILE $OUTFILE
+diff --git a/wvrules-posix.mk b/wvrules-posix.mk
+deleted file mode 100644
+index dfb2ed4..0000000
+--- a/wvrules-posix.mk
++++ /dev/null
+@@ -1,96 +0,0 @@
+-ifdef _WIN32
+-  LIBWVSTATIC=$(WVSTREAMS_LIB)/libwvstatic.a
+-  LIBWVBASE=$(LIBWVSTATIC)
+-  LIBWVUTILS=$(LIBWVSTATIC)
+-  LIBWVSTREAMS=$(LIBWVSTATIC)
+-  LIBUNICONF=$(LIBWVSTATIC)
+-  LIBWVDBUS=$(LIBWVSTATIC) $(LIBS_DBUS)
+-  LIBWVQT=$(LIBWVSTATIC)
+-  LIBWVTEST=$(WVSTREAMS_LIB)/libwvtest.a $(LIBWVUTILS)
+-else
+-  LIBWVSTATIC=$(WVSTREAMS_LIB)/libwvstatic.a
+-  LIBWVBASE=$(WVSTREAMS_LIB)/libwvbase.so
+-  LIBWVUTILS=$(WVSTREAMS_LIB)/libwvutils.so $(LIBWVBASE)
+-  LIBWVSTREAMS=$(WVSTREAMS_LIB)/libwvstreams.so $(LIBWVUTILS)
+-  LIBUNICONF=$(WVSTREAMS_LIB)/libuniconf.so $(LIBWVSTREAMS)
+-ifneq ("$(with_dbus)", "no")
+-  LIBWVDBUS=$(WVSTREAMS_LIB)/libwvdbus.so $(LIBWVSTREAMS)
+-endif
+-ifneq ("$(with_qt)", "no")
+-  LIBWVQT=$(WVSTREAMS_LIB)/libwvqt.so $(LIBWVSTREAMS)
+-endif
+-  LIBWVTEST=$(WVSTREAMS_LIB)/libwvtest.a $(LIBWVUTILS)
+-endif
+-
+-#
+-# Initial C compilation flags
+-#
+-INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH))
+-
+-CPPFLAGS += $(CPPOPTS)
+-CFLAGS += $(COPTS)
+-CXXFLAGS += $(CXXOPTS)
+-LDFLAGS += $(LDOPTS) -L$(WVSTREAMS_LIB)
+-
+-# 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
+-endif
+-
+-DEBUG:=$(filter-out no 0,$(enable_debug))
+-ifdef DEBUG
+-  CPPFLAGS += -ggdb -DDEBUG=1 $(patsubst %,-DDEBUG_%,$(DEBUG))
+-  LDFLAGS += -ggdb
+-else
+-  CPPFLAGS += -DDEBUG=0
+-  LDFLAGS += 
+-endif
+-
+-define wvlink_ar
+-	$(LINK_MSG)set -e; rm -f $1 $(patsubst %.a,%.libs,$1); \
+-	echo $2 $($1-EXTRA) >$(patsubst %.a,%.libs,$1); \
+-	$(AR) q $1 $(filter %.o,$2 $($1-EXTRA)); \
+-	for d in "" $(filter %.libs,$2 $($1-EXTRA)); do \
+-	    if [ "$$d" == "" ]; then \
+-		continue; \
+-	    fi; \
+-	    cd $$(dirname "$$d"); \
+-	    for c in $$(cat $$(basename "$$d")); do \
+-		if echo $$c | grep -q "\.list$$"; then \
+-		    for i in $$(cat $$c); do \
+-			$(AR) q $(shell pwd)/$1 $$i; \
+-		    done; \
+-		else \
+-		    $(AR) q $(shell pwd)/$1 $$c; \
+-		fi; \
+-	    done; \
+-	    cd $(shell pwd); \
+-	done; \
+-	for l in "" $(filter %.list,$2 $($1-EXTRA)); do \
+-	    if [ "$$l" == "" ]; then \
+-		continue; \
+-	    fi; \
+-	    for i in $$(cat $$l); do \
+-		$(AR) q $1 $$(dirname "$$l")/$$i; \
+-	    done; \
+-	done; \
+-	$(AR) s $1
+-endef
+-
+-CC: FORCE
+-	@CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+-	  $(WVSTREAMS_SRC)/gen-cc CC c
+-
+-CXX: FORCE
+-	@CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+-	  $(WVSTREAMS_SRC)/gen-cc CXX cc
+-
+-wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS)
+diff --git a/wvrules.mk b/wvrules.mk
+deleted file mode 100644
+index e2ab15f..0000000
+--- a/wvrules.mk
++++ /dev/null
+@@ -1,248 +0,0 @@
+-# wvrules.mk
+-#
+-# Copyright (C) 1998-2007 by Avery Pennarun <apenwarr@alumnit.ca>
+-#   and contributors.
+-#   Use, distribute, modify, and redistribute freely.  (But if you're nice,
+-#   you'll send all your changes back to me.)
+-#
+-# This is a complicated-looking set of Makefile rules that should make your
+-# own Makefiles simpler, by providing for several useful features (like
+-# autodependencies and a 'clean' target) without any extra effort.
+-#
+-# It will only work with GNU make.
+-#
+-
+-# we need a default rule, since the 'includes' below can cause trouble
+-.PHONY: default all
+-default: all
+-
+-all: CC CXX
+-
+-# if WVSTREAMS_SRC is set assume everything else is set.
+-# For packages that use WvStreams use WVSTREAMS_SRC=. for distribution.
+-ifneq ($(WVSTREAMS),)
+-  WVSTREAMS_SRC=$(WVSTREAMS)
+-  WVSTREAMS_LIB=$(WVSTREAMS)
+-  WVSTREAMS_INC=$(WVSTREAMS)/include
+-  WVSTREAMS_BIN=$(WVSTREAMS)
+-endif
+-export WVSTREAMS WVSTREAMS_SRC WVSTREAMS_LIB WVSTREAMS_INC WVSTREAMS_BIN
+-
+-SHELL=/bin/bash
+-
+-include $(WVSTREAMS_SRC)/config.defaults.mk
+--include $(WVSTREAMS_SRC)/config.mk
+--include $(WVSTREAMS_SRC)/config.overrides.mk
+--include $(WVSTREAMS_SRC)/local.mk
+-
+-ifeq (${EXEEXT},.exe)
+-  _WIN32=_WIN32
+-  XPATH += $(WVSTREAMS)/win32 $(WVSTREAMS)/win32/cominclude
+-  AR=i586-mingw32msvc-ar
+-  LIBS += -lssl -lcrypto -lz -lole32 -lrpcrt4 -lwsock32 -lgdi32 -limagehlp \
+-  	  -lxplc-cxx -lxplc -lstdc++
+-else
+-  CFLAGS += -fPIC
+-  CXXFLAGS += -fPIC
+-endif
+-
+-include $(WVSTREAMS_SRC)/wvrules-$(COMPILER_STANDARD).mk
+-
+-ifeq (${WVTESTRUN},)
+-  WVTESTRUN=$(WVSTREAMS_BIN)/wvtestrunner.pl
+-endif
+-
+-# macros that expand to the object files in the given directories
+-objects=$(sort $(foreach type,c cc,$(call objects_$(type),$1)))
+-objects_c=$(filter-out $(WV_EXCLUDES), \
+-		$(patsubst %.c,%.o,$(wildcard $(addsuffix /*.c,$1))))
+-objects_cc=$(filter-out $(WV_EXCLUDES), \
+-		$(patsubst %.cc,%.o,$(wildcard $(addsuffix /*.cc,$1))))
+-tests_cc=$(filter-out $(WV_EXCLUDES), \
+-		$(patsubst %.cc,%,$(wildcard $(addsuffix /*.cc,$1))))
+-
+-# default "test" rule does nothing...
+-.PHONY: test runtests
+-test:
+-runtests:
+-
+-%/test:
+-	$(MAKE) -C $(dir $@) test
+-
+-INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH))
+-CPPFLAGS+=$(INCFLAGS) \
+-	-D_BSD_SOURCE -D_GNU_SOURCE $(OSDEFINE) \
+-	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+-	-DUNSTABLE
+-
+-ifeq ($(VERBOSE),1)
+-  COMPILE_MSG :=
+-  LINK_MSG :=
+-  DEPEND_MSG :=
+-  SYMLINK_MSG :=
+-else
+-  COMPILE_MSG = @echo compiling $@...;
+-  LINK_MSG = @echo linking $@...;
+-  #DEPEND_MSG = @echo "   depending $@...";
+-  DEPEND_MSG := @
+-  SYMLINK_MSG := @
+-endif
+-
+-# any rule that depends on FORCE will always run
+-.PHONY: FORCE
+-FORCE:
+-
+-ifeq ($(LN_S),)
+-  LN_S := ln -s
+-endif
+-ifeq ($(LN),)
+-  LN := ln
+-endif
+-
+-# Create symbolic links
+-# usage: $(wvlns,source,dest)
+-wvlns=$(SYMLINK_MSG)$(LN_S) -f $1 $2
+-
+-# Create hard links
+-# usage: $(wvln,source,dest)
+-wvln=$(SYMLINK_MSG)$(LN) -f $1 $2
+-
+-# usage: $(wvcc,outfile,infile,stem,extra_cflags,mode)
+-#    eg: $(wvcc,foo.o,foo.cc,foo,-fPIC,-c)
+-
+-define wvcc
+-	./CC $(if $5,$5,-c) $3 $($1-CFLAGS) $($1-CPPFLAGS) $4
+-endef
+-
+-define wvcxx
+-	./CXX $(if $5,$5,-c) $3 $($1-CXXFLAGS) $($1-CPPFLAGS) $4
+-endef
+-
+-%.so: SONAME=$@$(if $(SO_VERSION),.$(SO_VERSION))
+-
+-wvsoname=$(if $($1-SONAME),$($1-SONAME),$(if $(SONAME),$(SONAME),$1))
+-ifdef _WIN32
+-  define wvlink_so
+-	@echo "Skipping $@ on win32 (can't build shared libraries)"
+-  endef
+-else
+-  define wvlink_so
+-	$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -Wl,-z,defs -Wl,-soname,$(call wvsoname,$1) -shared -o $1 $(filter %.o %.a %.so,$2) $($1-LIBS) $(LIBS) $(XX_LIBS)
+-	$(if $(filter-out $(call wvsoname,$1),$1),$(call wvlns,$1,$(call wvsoname,$1)))
+-  endef
+-endif
+-
+-../%.so:;	@echo "Shared library $@ does not exist!"; exit 1
+-../%.a:;	@echo "Library $@ does not exist!"; exit 1
+-../%.o:;	@echo "Object $@ does not exist!"; exit 1
+-/%.a:;		@echo "Library $@ does not exist!"; exit 1
+-
+-%.o: %.c;	$(call wvcc ,$@,$<,$*)
+-%.fpic.o: %.c;	$(call wvcc ,$@,$<,$*,-fPIC)
+-%.o: %.cc;	$(call wvcxx,$@,$<,$*)
+-%.fpic.o: %.cc;	$(call wvcxx,$@,$<,$*,-fPIC)
+-%.o: %.cpp;	$(call wvcxx,$@,$<,$*)
+-%.fpic.o:%.cpp; $(call wvcxx,$@,$<,$*,-fPIC)
+-%.s: %.c;	$(call wvcc ,$@,$<,$*,,-S)
+-%.s: %.cc;	$(call wvcxx,$@,$<,$*,,-S)
+-%.s: %.cpp;	$(call wvcxx,$@,$<,$*,,-S)
+-%.E: %.c;	$(call wvcc,$@,$<,$*,,-E)
+-%.E: %.cc;	$(call wvcxx,$@,$<,$*,,-E)
+-%.E: %.cpp;	$(call wvcxx,$@,$<,$*,,-E)
+-
+-%.moc: %.h;	moc -o $@ $<
+-
+-%: %.o;		$(call wvlink,$@,$^) 
+-%.t: %.t.o;	$(call wvlink,$@,$(call reverse,$(filter %.o,$^)) $(filter-out %.o,$^) $(LIBWVTEST))
+-%.a %.libs:;	$(call wvlink_ar,$@,$^)
+-%.so:;		$(call wvlink_so,$@,$^)
+-
+-# Force objects to be built before final binaries	
+-$(addsuffix .o,$(basename $(wildcard *.c) $(wildcard *.cc) $(wildcard *.cpp))):
+-
+-%.gz: FORCE %
+-	@rm -f $@
+-	gzip -f $*
+-	@ls -l $@
+-
+-#
+-# We automatically generate header dependencies for .c and .cc files.  The
+-# dependencies are stored in the file ".filename.d", and we include them
+-# automatically here if they exist.
+-#
+--include $(shell find . -name '.*.d') /dev/null
+-
+-
+-#
+-# A macro for compiling subdirectories listed in the SUBDIRS variable.
+-# Tries to make the target ($@) in each subdir, unless the target is called
+-# "subdirs" in which case it makes "all" in each subdir.
+-#
+-define subdirs_func
+-	+@OLDDIR="$$(pwd)"; set -e; \
+-	for d in __fx__ $2; do \
+-		if [ "$$d" = "__fx__" ]; then continue; fi; \
+-		cd "$$d"; \
+-		echo ; \
+-		echo "--> Making $1 in $$(pwd)..."; \
+-		$(MAKE) --no-print-directory $1 || exit 1; \
+-		cd "$$OLDDIR"; \
+-	done
+-	@echo
+-	@echo "--> Back in $$(pwd)..."
+-endef
+-
+-subdirs = $(call subdirs_func,$(subst subdirs,all,$(if $1,$1,$@)),$(if $2,$2,$(SUBDIRS)))
+-
+-define shell_reverse
+-	revlist="" ; \
+-	for word in $(1) ; do \
+-		revlist="$${word} $${revlist}"; \
+-	done ; \
+-	echo "$${revlist}"
+-endef
+-reverse = $(shell $(call shell_reverse,$(1)))
+-
+-clean_subdirs = $(call subdirs,clean,$(call reverse,$(SUBDIRS)),keep)
+-
+-%: %/Makefile FORCE
+-	@cd "$@"; echo; echo "--> Making all in $$(pwd)..."; \
+-		$(MAKE) --no-print-directory all
+-
+-subdirs: ${SUBDIRS}
+-
+-#
+-# Auto-clean rule.  Feel free to append to this in your own directory, by
+-# defining your own "clean" and/or "distclean" rules.
+-#
+-.PHONY: clean _wvclean
+-
+-clean: _wvclean
+-
+-_wvclean:
+-	@echo '--> Cleaning $(shell pwd)...'
+-	@rm -f *~ *.tmp *.o *.a *.so *.so.* *.libs *.dll *.lib *.moc *.d .*.d .depend \
+-		 .\#* .tcl_paths pkgIndex.tcl gmon.out core build-stamp \
+-		 CC CXX \
+-		 wvtestmain
+-	@rm -f $(patsubst %.t.cc,%.t,$(wildcard *.t.cc) $(wildcard t/*.t.cc)) \
+-		t/*.o t/*~ t/.*.d t/.\#*
+-	@rm -f valgrind.log.pid*
+-	@rm -f semantic.cache tags
+-	@rm -rf debian/tmp
+-
+-dist-hook:
+-
+-PKGDIR=$(WVPACKAGE_TARNAME)-$(WVPACKAGE_VERSION)
+-
+-dist: dist-hook
+-	@echo '--> Making dist in ../build/$(PKGDIR)...'
+-	@test -d ../build || mkdir ../build
+-	@rsync -a --delete --force '$(shell pwd)/' '../build/$(PKGDIR)'
+-	cd ../build/$(PKGDIR) && git clean -d -f -x
+-	cd ../build/$(PKGDIR) && git log > ChangeLog
+-	@find '../build/$(PKGDIR)' -name .git -type d -print0 | xargs -0 rm -rf --
+-	@find '../build/$(PKGDIR)' -name .gitignore -type f -print0 | xargs -0 rm -f --
+-	@rm -f '../build/$(PKGDIR).tar.gz'
+-	@cd ../build; tar -zcf '$(PKGDIR).tar.gz' '$(PKGDIR)'
+-	@echo '--> Created tarball in ../build/$(PKGDIR).tar.gz.'
+-- 
+2.11.0
+
diff --git a/patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch b/patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
new file mode 100644
index 000000000..7db523796
--- /dev/null
+++ b/patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
@@ -0,0 +1,292 @@
+From 11b27016243b7a995faf914cac3bf8ac91ec6be8 Mon Sep 17 00:00:00 2001
+From: Sascha Hauer <s.hauer@pengutronix.de>
+Date: Fri, 29 Sep 2017 09:12:45 +0200
+Subject: [PATCH 2/2] Add autoconf/automake files
+
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+---
+ Makefile.am   | 51 +++++++++++++++++++++++++++++++
+ autogen.sh    | 27 +++++++++++++++++
+ configure.ac  | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ m4/.gitignore |  5 ++++
+ wvdial.cc     |  4 +--
+ wvdialconf.cc |  4 +--
+ wvdialer.cc   |  4 +--
+ 7 files changed, 185 insertions(+), 6 deletions(-)
+ create mode 100644 Makefile.am
+ create mode 100755 autogen.sh
+ create mode 100644 configure.ac
+ create mode 100644 m4/.gitignore
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..b548922
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,51 @@
++EXTRA_DIST =
++CLEANFILES =
++ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
++AM_MAKEFLAGS = --no-print-directory
++
++AM_CPPFLAGS = \
++	-include $(top_builddir)/config.h \
++	-DSYSCONFDIR=\""$(sysconfdir)"\" \
++	-I${top_srcdir}/src
++
++AM_CXXFLAGS = \
++	${WVSTREAMS_CFLAGS} \
++	${WVUTILS_CFLAGS} \
++	${UNICONF_CFLAGS} \
++	${WVBASE_CFLAGS}
++
++AM_CFLAGS = ${my_CFLAGS} \
++	-fvisibility=hidden \
++	-ffunction-sections \
++	-fdata-sections
++
++AM_LDFLAGS = \
++	-Wl,--gc-sections \
++	-Wl,--as-needed \
++	${WVSTREAMS_LIBS} \
++	${WVUTILS_LIBS} \
++	${UNICONF_LIBS} \
++	${WVBASE_LIBS}
++
++noinst_LIBRARIES = libwvdial.a
++libwvdial_a_SOURCES =  wvdialer.cc \
++			wvdialer.h \
++			wvdialmon.cc \
++			wvdialmon.h \
++			wvdialbrain.cc \
++			wvdialbrain.h \
++			wvpapchap.cc \
++			wvpapchap.h \
++			wvmodemscan.cc \
++			wvmodemscan.h
++
++bin_PROGRAMS = wvdial papchaptest pppmon
++
++wvdial_SOURCES = wvdial.cc
++wvdial_LDADD = libwvdial.a
++
++papchaptest_SOURCES = papchaptest.cc
++papchaptest_LDADD = libwvdial.a
++
++pppmon_SOURCES = pppmon.cc
++pppmon_LDADD = libwvdial.a
+diff --git a/autogen.sh b/autogen.sh
+new file mode 100755
+index 0000000..16c0eb3
+--- /dev/null
++++ b/autogen.sh
+@@ -0,0 +1,27 @@
++#!/bin/sh
++
++set -e
++
++if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
++        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
++        chmod +x .git/hooks/pre-commit && \
++        echo "Activated pre-commit hook."
++fi
++
++autoreconf --install --symlink
++
++libdir() {
++        echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
++}
++
++args="--prefix=/usr \
++--sysconfdir=/etc \
++--libdir=$(libdir /usr/lib)"
++
++echo
++echo "----------------------------------------------------------------"
++echo "Initialized build system. For a common configuration please run:"
++echo "----------------------------------------------------------------"
++echo
++echo "./configure CFLAGS='-g -O0' $args"
++echo
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..13858b0
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,96 @@
++AC_PREREQ(2.60)
++AC_INIT([wvdial],
++        [1.61],
++        [s.hauer@pengutronix.de],
++        [wvdial],
++        [http://www.pengutronix.de])
++AC_CONFIG_SRCDIR([wvdial.cc])
++AC_CONFIG_AUX_DIR([build-aux])
++AM_INIT_AUTOMAKE([
++	check-news
++	foreign
++	1.11
++	-Wall
++	-Wno-portability
++	silent-rules
++	tar-pax
++	no-dist-gzip
++	dist-xz
++	subdir-objects
++])
++AC_PROG_CC_STDC
++AC_PROG_CXX
++AC_USE_SYSTEM_EXTENSIONS
++AC_SYS_LARGEFILE
++AC_CONFIG_MACRO_DIR([m4])
++AM_SILENT_RULES([yes])
++LT_INIT([
++	disable-static
++	pic-only
++])
++AC_PREFIX_DEFAULT([/usr])
++
++AC_PROG_SED
++AC_PROG_MKDIR_P
++
++PKG_CHECK_MODULES(WVSTREAMS, [ libwvstreams >= 4.6.1 ])
++PKG_CHECK_MODULES(UNICONF, [ libuniconf >= 4.6.1 ])
++PKG_CHECK_MODULES(WVUTILS, [ libwvutils >= 4.6.1 ])
++PKG_CHECK_MODULES(WVBASE, [ libwvbase >= 4.6.1 ])
++
++AC_ARG_ENABLE([logging],
++        AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
++        [], enable_logging=yes)
++AS_IF([test "x$enable_logging" = "xyes"], [
++        AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
++])
++
++AC_ARG_ENABLE([debug],
++        AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
++        [], [enable_debug=no])
++AS_IF([test "x$enable_debug" = "xyes"], [
++        AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
++])
++
++AC_CHECK_FUNCS([ \
++	__secure_getenv \
++	secure_getenv\
++])
++
++my_CFLAGS="\
++-Wall \
++-Wchar-subscripts \
++-Wformat-security \
++-Wmissing-declarations \
++-Wmissing-prototypes \
++-Wnested-externs \
++-Wpointer-arith \
++-Wshadow \
++-Wsign-compare \
++-Wstrict-prototypes \
++-Wtype-limits \
++"
++AC_SUBST([my_CFLAGS])
++
++AC_CONFIG_HEADERS(config.h)
++AC_CONFIG_FILES([
++        Makefile
++])
++
++AC_OUTPUT
++AC_MSG_RESULT([
++        $PACKAGE $VERSION
++        =====
++
++        prefix:                 ${prefix}
++        sysconfdir:             ${sysconfdir}
++        libdir:                 ${libdir}
++        includedir:             ${includedir}
++
++        compiler:               ${CC}
++        cflags:                 ${CFLAGS}
++        ldflags:                ${LDFLAGS}
++
++        logging:                ${enable_logging}
++        debug:                  ${enable_debug}
++])
+diff --git a/m4/.gitignore b/m4/.gitignore
+new file mode 100644
+index 0000000..38066dd
+--- /dev/null
++++ b/m4/.gitignore
+@@ -0,0 +1,5 @@
++libtool.m4
++ltoptions.m4
++ltsugar.m4
++ltversion.m4
++lt~obsolete.m4
+diff --git a/wvdial.cc b/wvdial.cc
+index 3152be4..e6c6504 100644
+--- a/wvdial.cc
++++ b/wvdial.cc
+@@ -9,7 +9,7 @@
+ 
+ #include "wvargs.h"
+ #include "wvdialer.h"
+-#include "version.h"
++#include "config.h"
+ #include "wvlog.h"
+ #include "wvlogrcv.h"
+ #include "wvlogfile.h"
+@@ -102,7 +102,7 @@ int main(int argc, char **argv)
+     signal(SIGHUP, signalhandler);
+ 
+     WvArgs args;
+-    args.set_version("WvDial " WVDIAL_VER_STRING "\n"
++    args.set_version("WvDial " VERSION "\n"
+ 		     "Copyright (c) 1997-2005 Net Integration Technologies, "
+ 		     "Inc.");
+     args.set_help_header("An intelligent PPP dialer.");
+diff --git a/wvdialconf.cc b/wvdialconf.cc
+index de25ac0..273038b 100644
+--- a/wvdialconf.cc
++++ b/wvdialconf.cc
+@@ -10,7 +10,7 @@
+ #include "wvfile.h"
+ #include "wvmodemscan.h"
+ #include "wvstrutils.h"
+-#include "version.h"
++#include "config.h"
+ #include <ctype.h>
+ 
+ 
+@@ -54,7 +54,7 @@ int main(int argc, char **argv)
+     WvString conffilename("/etc/wvdial.conf");
+ 
+     WvArgs args;
+-    args.set_version("WvDialConf " WVDIAL_VER_STRING "\n"
++    args.set_version("WvDialConf " VERSION "\n"
+ 		     "Copyright (c) 1997-2005 Net Integration Technologies, "
+ 		     "Inc.");
+     args.set_help_header("Create or update a WvDial configuration file");
+diff --git a/wvdialer.cc b/wvdialer.cc
+index eae6952..2892210 100644
+--- a/wvdialer.cc
++++ b/wvdialer.cc
+@@ -7,7 +7,7 @@
+  */
+ 
+ #include "wvdialer.h"
+-#include "version.h"
++#include "config.h"
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -83,7 +83,7 @@ WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode )
+     sect_list = _sect_list;
+     chat_mode = _chat_mode;
+     
+-    log("WvDial: Internet dialer version " WVDIAL_VER_STRING "\n");
++    log("WvDial: Internet dialer version " VERSION "\n");
+ 
+     // Ensure all sections in sect_list actually exist, warning if not.
+     WvStringList::Iter iter(*sect_list);
+-- 
+2.11.0
+
diff --git a/patches/wvdial-1.61/autogen.sh b/patches/wvdial-1.61/autogen.sh
new file mode 100755
index 000000000..16c0eb380
--- /dev/null
+++ b/patches/wvdial-1.61/autogen.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
+        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
+        chmod +x .git/hooks/pre-commit && \
+        echo "Activated pre-commit hook."
+fi
+
+autoreconf --install --symlink
+
+libdir() {
+        echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
+}
+
+args="--prefix=/usr \
+--sysconfdir=/etc \
+--libdir=$(libdir /usr/lib)"
+
+echo
+echo "----------------------------------------------------------------"
+echo "Initialized build system. For a common configuration please run:"
+echo "----------------------------------------------------------------"
+echo
+echo "./configure CFLAGS='-g -O0' $args"
+echo
diff --git a/patches/wvdial-1.61/series b/patches/wvdial-1.61/series
new file mode 100644
index 000000000..4efc62ad1
--- /dev/null
+++ b/patches/wvdial-1.61/series
@@ -0,0 +1,2 @@
+0001-remove-build-files.patch
+0002-Add-autoconf-automake-files.patch
diff --git a/rules/wvdial.in b/rules/wvdial.in
new file mode 100644
index 000000000..ace9f15d7
--- /dev/null
+++ b/rules/wvdial.in
@@ -0,0 +1,34 @@
+## SECTION=networking
+
+menuconfig WVDIAL
+	tristate
+	select WVSTREAMS
+	prompt "wvdial                        "
+	help
+	  intelligent Point-to-Point Protocol dialer
+
+	  WvDial sacrifices some of the flexibility of programs like "chat" in
+	  order to make dialup configuration easier. With WvDial, modems are
+	  detected automatically and only three additional parameters are
+	  required: the telephone number, username, and password. WvDial knows
+	  enough to dial with most modems and log in to most servers without
+	  any other help.
+	  
+	  In particular, a "chat script" is not required to handle the most common situations.
+
+if WVDIAL
+
+config WVDIAL_WVDIAL
+	bool
+	prompt "install wvdial"
+
+config WVDIAL_PPPMON
+	bool
+	prompt "install pppmon"
+
+config WVDIAL_PAPCHAPTEST
+	bool
+	prompt "install papchaptest"
+
+endif
+	
diff --git a/rules/wvdial.make b/rules/wvdial.make
new file mode 100644
index 000000000..a8209fe01
--- /dev/null
+++ b/rules/wvdial.make
@@ -0,0 +1,66 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@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_WVDIAL) += wvdial
+
+#
+# Paths and names
+#
+WVDIAL_VERSION	:= 1.61
+WVDIAL_MD5	:= 124676b98f9bbd1c0366fdc0d2848bc9
+WVDIAL		:= wvdial-$(WVDIAL_VERSION)
+WVDIAL_SUFFIX	:= tar.gz
+WVDIAL_URL	:= http://http.debian.net/debian/pool/main/w/wvdial/wvdial_1.61.orig.$(WVDIAL_SUFFIX)
+WVDIAL_SOURCE	:= $(SRCDIR)/$(WVDIAL).$(WVDIAL_SUFFIX)
+WVDIAL_DIR	:= $(BUILDDIR)/$(WVDIAL)
+WVDIAL_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+WVDIAL_CONF_TOOL	:= autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/wvdial.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, wvdial)
+	@$(call install_fixup, wvdial,PRIORITY,optional)
+	@$(call install_fixup, wvdial,SECTION,base)
+	@$(call install_fixup, wvdial,AUTHOR,"Sascha Hauer <s.hauer@pengutronix.de>")
+	@$(call install_fixup, wvdial,DESCRIPTION,missing)
+
+ifdef PTXCONF_WVDIAL_WVDIAL
+	@$(call install_copy, wvdial, 0, 0, 0755, -, /usr/bin/wvdial)
+endif
+
+ifdef PTXCONF_WVDIAL_PPPMON
+	@$(call install_copy, wvdial, 0, 0, 0755, -, /usr/bin/pppmon)
+endif
+
+ifdef PTXCONF_WVDIAL_PAPCHAPTEST
+	@$(call install_copy, wvdial, 0, 0, 0755, -, /usr/bin/papchaptest)
+endif
+
+	@$(call install_finish, wvdial)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH 1/2] wvstreams: Add package
  2017-10-16 12:15 [ptxdist] [PATCH 1/2] wvstreams: Add package Sascha Hauer
  2017-10-16 12:15 ` [ptxdist] [PATCH 2/2] wvdial: " Sascha Hauer
@ 2017-10-16 12:16 ` Sascha Hauer
  1 sibling, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2017-10-16 12:16 UTC (permalink / raw)
  To: ptxdist

[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-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH 2/2] wvdial: Add package
  2017-10-16 12:15 ` [ptxdist] [PATCH 2/2] wvdial: " Sascha Hauer
@ 2017-10-16 12:36   ` Ladislav Michl
  2017-10-16 12:42     ` Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Ladislav Michl @ 2017-10-16 12:36 UTC (permalink / raw)
  To: ptxdist

On Mon, Oct 16, 2017 at 02:15:30PM +0200, Sascha Hauer wrote:
> Back in the good old days wvdial was used to easily connect
> a modem to the internet without having to write chat scripts
> manually. Some people still use modems, so add support for
> wvdial to ptxdist.

What is the advantage using it over ModemManager in the good
recent days (except size and legacy reasons)?
This is serious question, I'm ready to kick ModemManager
if this proves to be a better solution.

	ladis

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH 2/2] wvdial: Add package
  2017-10-16 12:36   ` Ladislav Michl
@ 2017-10-16 12:42     ` Sascha Hauer
  0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2017-10-16 12:42 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: ptxdist

Hi Ladis,

On Mon, Oct 16, 2017 at 02:36:41PM +0200, Ladislav Michl wrote:
> On Mon, Oct 16, 2017 at 02:15:30PM +0200, Sascha Hauer wrote:
> > Back in the good old days wvdial was used to easily connect
> > a modem to the internet without having to write chat scripts
> > manually. Some people still use modems, so add support for
> > wvdial to ptxdist.
> 
> What is the advantage using it over ModemManager in the good
> recent days (except size and legacy reasons)?
> This is serious question, I'm ready to kick ModemManager
> if this proves to be a better solution.

I did this on customer request for an ancient, pre-dbus powerPC system.
I doubt it's a better solution than ModemManager.

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-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH 1/2] wvstreams: Add package
  2017-09-29 13:52 Sascha Hauer
@ 2017-09-30 10:59 ` Michael Olbrich
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2017-09-30 10:59 UTC (permalink / raw)
  To: ptxdist

On Fri, Sep 29, 2017 at 03:52:01PM +0200, Sascha Hauer wrote:
> 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.hauer@pengutronix.de>
> ---
>  .../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 000000000..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 <paultag@ubuntu.com>
> +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 <execinfo.h>
> + #include <unistd.h>
> +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 <unistd.h>
> + 
> + 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 000000000..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 <dktrkranz@debian.org>
> +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 000000000..183583aab
> --- /dev/null
> +++ b/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
> @@ -0,0 +1,41 @@
> +From 013d7fc99cafd215a18ee2e3eeeead15c4428242 Mon Sep 17 00:00:00 2001
> +From: Luca Falavigna <dktrkranz@debian.org>
> +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 <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 65ae202..e249a14 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)
> +-- 
> +2.11.0
> +
> 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..9381c4c11
> --- /dev/null
> +++ b/patches/wvstreams-4.6.1/0004-Fix-compilation-with-gcc-6.patch
> @@ -0,0 +1,49 @@
> +From e8ef9e0843bc0e8e59c556dbe8c612221e54c295 Mon Sep 17 00:00:00 2001
> +From: Gert Wollny <gw.fossdev@gmail.com>
> +Date: Thu, 28 Sep 2017 15:53:36 +0200
> +Subject: [PATCH 4/4] 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 4564f3c..5a3c070 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));
> + }
> + 
> + 
> +-- 
> +2.11.0
> +
> diff --git a/patches/wvstreams-4.6.1/series b/patches/wvstreams-4.6.1/series
> new file mode 100644
> index 000000000..d21be5195
> --- /dev/null
> +++ b/patches/wvstreams-4.6.1/series
> @@ -0,0 +1,4 @@
> +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

extract with '--git' and run 'git ptx-patches' in the package source dir.

> 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..d5e9aff2b
> --- /dev/null
> +++ b/rules/wvstreams.make
> @@ -0,0 +1,57 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Sascha Hauer <s.hauer@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)

configure_helper.py shows several options including optional dependencies.

Michael

> +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.hauer@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

-- 
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-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH 1/2] wvstreams: Add package
@ 2017-09-29 13:52 Sascha Hauer
  2017-09-30 10:59 ` Michael Olbrich
  0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2017-09-29 13:52 UTC (permalink / raw)
  To: ptxdist

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.hauer@pengutronix.de>
---
 .../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 000000000..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 <paultag@ubuntu.com>
+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 <execinfo.h>
+ #include <unistd.h>
+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 <unistd.h>
+ 
+ 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 000000000..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 <dktrkranz@debian.org>
+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 000000000..183583aab
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0003-fix-FTBFS-with-glibc-2.12.patch
@@ -0,0 +1,41 @@
+From 013d7fc99cafd215a18ee2e3eeeead15c4428242 Mon Sep 17 00:00:00 2001
+From: Luca Falavigna <dktrkranz@debian.org>
+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 <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 65ae202..e249a14 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)
+-- 
+2.11.0
+
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..9381c4c11
--- /dev/null
+++ b/patches/wvstreams-4.6.1/0004-Fix-compilation-with-gcc-6.patch
@@ -0,0 +1,49 @@
+From e8ef9e0843bc0e8e59c556dbe8c612221e54c295 Mon Sep 17 00:00:00 2001
+From: Gert Wollny <gw.fossdev@gmail.com>
+Date: Thu, 28 Sep 2017 15:53:36 +0200
+Subject: [PATCH 4/4] 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 4564f3c..5a3c070 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));
+ }
+ 
+ 
+-- 
+2.11.0
+
diff --git a/patches/wvstreams-4.6.1/series b/patches/wvstreams-4.6.1/series
new file mode 100644
index 000000000..d21be5195
--- /dev/null
+++ b/patches/wvstreams-4.6.1/series
@@ -0,0 +1,4 @@
+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
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..d5e9aff2b
--- /dev/null
+++ b/rules/wvstreams.make
@@ -0,0 +1,57 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@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)
+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.hauer@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-16 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 12:15 [ptxdist] [PATCH 1/2] wvstreams: Add package Sascha Hauer
2017-10-16 12:15 ` [ptxdist] [PATCH 2/2] wvdial: " Sascha Hauer
2017-10-16 12:36   ` Ladislav Michl
2017-10-16 12:42     ` Sascha Hauer
2017-10-16 12:16 ` [ptxdist] [PATCH 1/2] wvstreams: " Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2017-09-29 13:52 Sascha Hauer
2017-09-30 10:59 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox