Add wvstreams and wvdial packages
cover Add wvstreams and wvdial packages
From: Simon Dawson <[email protected]>
Add packages for wvstreams and wvdial to buildroot. Note that wvstreams requires quite heavy patching to get it to build for uClibc. Both projects look to be long dead, so I don't hold out much hope of getting the patches upstreamed.
Simon Dawson (2):
wvstreams: new package
wvdial: new package
package/Config.in | 2 + package/wvdial/Config.in | 9 + .../wvdial/wvdial-0001-ppp-install-prefix.patch | 16 ++ package/wvdial/wvdial-0002-uClibc-scandir.patch | 23 ++ package/wvdial/wvdial.mk | 41 +++ package/wvstreams/Config.in | 13 + ...treams-0001-fix-uClibc-compile-getcontext.patch | 273 ++++++++++++++++++++ ...002-fix-uClibc-compile-execinfo-backtrace.patch | 31 +++ .../wvstreams-0003-fix-uClibc-compile-misc.patch | 16 ++ package/wvstreams/wvstreams.mk | 51 ++++ 10 files changed, 475 insertions(+) create mode 100644 package/wvdial/Config.in create mode 100644 package/wvdial/wvdial-0001-ppp-install-prefix.patch create mode 100644 package/wvdial/wvdial-0002-uClibc-scandir.patch create mode 100644 package/wvdial/wvdial.mk create mode 100644 package/wvstreams/Config.in create mode 100644 package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch create mode 100644 package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch create mode 100644 package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch create mode 100644 package/wvstreams/wvstreams.mk
Signature · 1 line
1.7.10.4
PATCH 1/2 wvstreams: new package
From: Simon Dawson <[email protected]>
--- package/Config.in | 1 + package/wvstreams/Config.in | 13 + ...treams-0001-fix-uClibc-compile-getcontext.patch | 273 ++++++++++++++++++++ ...002-fix-uClibc-compile-execinfo-backtrace.patch | 31 +++ .../wvstreams-0003-fix-uClibc-compile-misc.patch | 16 ++ package/wvstreams/wvstreams.mk | 51 ++++ 6 files changed, 385 insertions(+) create mode 100644 package/wvstreams/Config.in create mode 100644 package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch create mode 100644 package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch create mode 100644 package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch create mode 100644 package/wvstreams/wvstreams.mk
package/Config.in +1 -0
@@ -546,6 +546,7 @@ source "package/openpgm/Config.in" source "package/ortp/Config.in" source "package/slirp/Config.in" source "package/usbredir/Config.in" +source "package/wvstreams/Config.in" source "package/zeromq/Config.in" source "package/zmqpp/Config.in" source "package/zyre/Config.in"
package/wvstreams/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_WVSTREAMS + bool "wvstreams" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + C++ Network Programming Library. + + http://wvstreams.googlecode.com/ + +comment "wvstreams requires a toolchain with C++ support enabled" + depends on !BR2_INSTALL_LIBSTDCPP
package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch new file +273 -0
273 lines not on this page · raw message
package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch new file +31 -0
@@ -0,0 +1,31 @@ +Fix wvstreams so that it builds with uClibc: we don't have execinfo.h, +so we can't do backtrace() stuff. + +Signed-off-by: Simon Dawson <[email protected]> + +diff -Nurp a/utils/wvcrash.cc b/utils/wvcrash.cc +--- a/utils/wvcrash.cc 2008-12-17 12:24:20.000000000 +0000 ++++ b/utils/wvcrash.cc 2012-07-27 22:00:15.456502262 +0100 +@@ -28,7 +28,9 @@ + // FIXME: this file mostly only works in Linux + #ifdef __linux + +-# include <execinfo.h> ++#ifdef HAVE_EXECINFO_H ++#include <execinfo.h> ++#endif + #include <unistd.h> + + #ifdef __USE_GNU +@@ -267,9 +269,11 @@ static void wvcrash_real(int sig, int fd + } + } + ++#ifdef HAVE_EXECINFO_H + wr(fd, "\nBacktrace:\n"); + backtrace_symbols_fd(trace, + backtrace(trace, sizeof(trace)/sizeof(trace[0])), fd); ++#endif + + if (pid > 0) + {
package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch new file +16 -0
@@ -0,0 +1,16 @@ +Fix wvstreams so that it builds with uClibc: const cast problem. + +Signed-off-by: Simon Dawson <[email protected]> + +diff -Nurp a/crypto/wvx509.cc b/crypto/wvx509.cc +--- a/crypto/wvx509.cc 2008-10-23 21:23:49.000000000 +0100 ++++ b/crypto/wvx509.cc 2012-06-15 18:45:06.605899292 +0100 +@@ -1157,7 +1157,7 @@ WvString WvX509::get_extension(int nid) + + if (ext) + { +- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++ X509V3_EXT_METHOD *method = const_cast<X509V3_EXT_METHOD *>(X509V3_EXT_get(ext)); + if (!method) + { + WvDynBuf buf;
package/wvstreams/wvstreams.mk new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 1/2 wvstreams: new package
Simon,
This one looks good. Just a few questions below.
Quoted 6 lines · spdawson at gmail.com
package/wvstreams/wvstreams.mk new file +0
-0
package/wvstreams/wvstreams.mk line 9
Quoted 9 lines
package/wvstreams/wvstreams.mk new file +9
-0@@ -0,0 +1,51 @@ +############################################################# +# +# wvstreams +# +############################################################# + +WVSTREAMS_VERSION = 4.6.1 +WVSTREAMS_SITE = http://wvstreams.googlecode.com/files +WVSTREAMS_DEPENDENCIES = openssl zlib
openssl/zlib dependencies are mandatory here...
package/wvstreams/wvstreams.mk line 21
Quoted 12 lines
package/wvstreams/wvstreams.mk new file +12
-0+WVSTREAMS_INSTALL_STAGING = YES + +WVSTREAMS_LICENSE = LGPLv2+ +WVSTREAMS_LICENSE_FILES = LICENSE + +# N.B. parallel make fails +WVSTREAMS_MAKE = $(MAKE1) + +# Needed to work around problem with wvassert.h +WVSTREAMS_CONF_OPT += CPPFLAGS=-DNDEBUG + +WVSTREAMS_CONF_OPT += --with-openssl --with-zlib --without-pam
but this seems to suggest that openssl/zlib support is not mandatory. Can we make this optional if it's possible?
Other than that, it looks good to me.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/2 wvstreams: new package
Hi Thomas; thanks for taking the time to look at this.
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line
+WVSTREAMS_DEPENDENCIES = openssl zlib
openssl/zlib dependencies are mandatory here...
Quoted 15 lines
package/wvstreams/wvstreams.mk line 21
Quoted 12 lines
package/wvstreams/wvstreams.mk new file +12
-0+WVSTREAMS_INSTALL_STAGING = YES + +WVSTREAMS_LICENSE = LGPLv2+ +WVSTREAMS_LICENSE_FILES = LICENSE + +# N.B. parallel make fails +WVSTREAMS_MAKE = $(MAKE1) + +# Needed to work around problem with wvassert.h +WVSTREAMS_CONF_OPT += CPPFLAGS=-DNDEBUG + +WVSTREAMS_CONF_OPT += --with-openssl --with-zlib --without-pambut this seems to suggest that openssl/zlib support is not mandatory. Can we make this optional if it's possible?
Unfortunately, the configure script errors out unless both openssl and zlib are present --- they are really unconditional dependencies of wvstreams. So the configure switches to enable/disable these features are somewhat redundant.
Simon.
PATCH 1/2 wvstreams: new package
In reply to spdawson at gmail.comQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"spdawson" == spdawson <[email protected]> writes:
spdawson> From: Simon Dawson <[email protected]> spdawson> Signed-off-by: Simon Dawson <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 wvdial: new package
In reply to spdawson at gmail.comFrom: Simon Dawson <[email protected]>
--- package/Config.in | 1 + package/wvdial/Config.in | 9 +++++ .../wvdial/wvdial-0001-ppp-install-prefix.patch | 16 ++++++++ package/wvdial/wvdial-0002-uClibc-scandir.patch | 23 +++++++++++ package/wvdial/wvdial.mk | 41 ++++++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 package/wvdial/Config.in create mode 100644 package/wvdial/wvdial-0001-ppp-install-prefix.patch create mode 100644 package/wvdial/wvdial-0002-uClibc-scandir.patch create mode 100644 package/wvdial/wvdial.mk
package/Config.in +1 -0
@@ -777,6 +777,7 @@ source "package/wireless-regdb/Config.in" source "package/wireless_tools/Config.in" source "package/wireshark/Config.in" source "package/wpa_supplicant/Config.in" +source "package/wvdial/Config.in" source "package/xinetd/Config.in" source "package/xl2tp/Config.in"
package/wvdial/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_WVDIAL + bool "wvdial" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # wvstreams + select BR2_PACKAGE_WVSTREAMS + help + wvdial with support for software flow control and asyncmaps. + + http://wvdial.googlecode.com/
package/wvdial/wvdial-0001-ppp-install-prefix.patch new file +16 -0
@@ -0,0 +1,16 @@ +Fix install prefix for PPP configuration files. + +Signed-off-by: Simon Dawson <[email protected]> + +diff -Nurp a/Makefile b/Makefile +--- a/Makefile 2011-08-04 20:30:52.000000000 +0100 ++++ b/Makefile 2013-04-25 09:11:36.916376367 +0100 +@@ -23,7 +23,7 @@ LIBS+=$(PC_LIBS) + + BINDIR=${prefix}/bin + MANDIR=${prefix}/share/man +-PPPDIR=/etc/ppp/peers ++PPPDIR=${prefix}/etc/ppp/peers + + include wvrules.mk +
package/wvdial/wvdial-0002-uClibc-scandir.patch new file +23 -0
@@ -0,0 +1,23 @@ +Fix wvdial so that it works with scandir as defined in uClibc. + +Signed-off-by: Simon Dawson <[email protected]> + +diff -Nurp a/wvmodemscan.cc b/wvmodemscan.cc +--- a/wvmodemscan.cc 2009-09-29 18:27:28.000000000 +0100 ++++ b/wvmodemscan.cc 2012-07-28 14:03:56.359729660 +0100 +@@ -495,13 +495,13 @@ static int fileselect(const struct diren + // (no internal ISDN support) || !strncmp(e->d_name, "ttyI", 4); + } + +-#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 10) ++#if defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)) + static int filesort(const dirent **e1, const dirent **e2) + #else + static int filesort(const void *_e1, const void *_e2) + #endif + { +-#if !(defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)) ++#if !(defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10))) + dirent const * const *e1 = (dirent const * const *)_e1; + dirent const * const *e2 = (dirent const * const *)_e2; + #endif
package/wvdial/wvdial.mk new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 2/2 wvdial: new package
Simon, Pascal,
Quoted 9 lines · spdawson at gmail.com
package/wvdial/wvdial-0001-ppp-install-prefix.patch new file +3
-0@@ -0,0 +1,16 @@ +Fix install prefix for PPP configuration files. + +Signed-off-by: Simon Dawson <[email protected]>
package/wvdial/wvdial-0001-ppp-install-prefix.patch line 13
Quoted 10 lines
package/wvdial/wvdial-0001-ppp-install-prefix.patch new file +10
-0+ +diff -Nurp a/Makefile b/Makefile +--- a/Makefile 2011-08-04 20:30:52.000000000 +0100 ++++ b/Makefile 2013-04-25 09:11:36.916376367 +0100 +@@ -23,7 +23,7 @@ LIBS+=$(PC_LIBS) + + BINDIR=${prefix}/bin + MANDIR=${prefix}/share/man +-PPPDIR=/etc/ppp/peers ++PPPDIR=${prefix}/etc/ppp/peers
This one looks suspicious: /etc is usually not in the prefix, other it would be in /usr/etc/ppp/peers. Could you explain what's going on here?
package/wvdial/wvdial-0001-ppp-install-prefix.patch
Quoted 6 lines
package/wvdial/wvdial-0001-ppp-install-prefix.patch new file +6
-0+WVDIAL_VERSION = 1.61 +WVDIAL_SITE = http://wvdial.googlecode.com/files +WVDIAL_SOURCE = wvdial-$(WVDIAL_VERSION).tar.bz2 +WVDIAL_DEPENDENCIES = wvstreams + +WVDIAL_LICENSE = LGPLv2
I haven't checked the code, is it really LGPLv2, and not LGPLv2.1 ? No "+" ?
package/wvdial/wvdial-0001-ppp-install-prefix.patch
Quoted 7 lines
package/wvdial/wvdial-0001-ppp-install-prefix.patch new file +7
-0+WVDIAL_LICENSE_FILES = COPYING.LIB + +# N.B. parallel make fails +WVDIAL_MAKE = $(MAKE1) + +WVDIAL_MAKE_ENV += \ + CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" WVSTREAMS="$(WVSTREAMS_DIR)"
Use $(TARGET_CONFIGURE_OPTS) instead of CC/CXX. I don't really like to see the wvdial build process poke into the wvstreams build directory. Each component should normally build even if the build directories of its dependencies have been removed. Is it possible to point it to the headers+libraries installed in $(STAGING_DIR) instead?
package/wvdial/wvdial-0001-ppp-install-prefix.patch
Quoted 2 lines
package/wvdial/wvdial-0001-ppp-install-prefix.patch new file +2
-0+WVDIAL_INSTALL_TARGET_OPT += prefix="$(TARGET_DIR)/usr" install +WVDIAL_UNINSTALL_TARGET_OPT += prefix="$(TARGET_DIR)/usr" uninstall
Those are used only once, so I would rather put them directly into the install/uninstall commands below.
Other than that, looks good.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/2 wvdial: new package
Hi Thomas; thanks for the feedback.
Quoted 7 lines · Thomas Petazzoni
Quoted 4 lines
+ BINDIR=${prefix}/bin
+ MANDIR=${prefix}/share/man
+-PPPDIR=/etc/ppp/peers
++PPPDIR=${prefix}/etc/ppp/peersThis one looks suspicious: /etc is usually not in the prefix, other it would be in
/usr/etc/ppp/peers. Could you explain what's going on here?
You're right --- this needs fixing.
Quoted 9 lines
package/wvdial/wvdial.mk line 12
Quoted 6 lines
package/wvdial/wvdial.mk new file +6
-0+WVDIAL_VERSION = 1.61 +WVDIAL_SITE = http://wvdial.googlecode.com/files +WVDIAL_SOURCE = wvdial-$(WVDIAL_VERSION).tar.bz2 +WVDIAL_DEPENDENCIES = wvstreams + +WVDIAL_LICENSE = LGPLv2I haven't checked the code, is it really LGPLv2, and not LGPLv2.1 ? No "+" ?
Yes, and it's even titled "GNU LIBRARY GENERAL PUBLIC LICENSE Version 2" in the COPYING.LIB file; I think the codebase is just quite old and unloved.
Quoted 8 lines
package/wvdial/wvdial.mk line 19
Quoted 2 lines
package/wvdial/wvdial.mk new file +2
-0+WVDIAL_MAKE_ENV += \ + CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" WVSTREAMS="$(WVSTREAMS_DIR)"Use $(TARGET_CONFIGURE_OPTS) instead of CC/CXX. I don't really like to see the wvdial build process poke into the wvstreams build directory. Each component should normally build even if the build directories of its dependencies have been removed. Is it possible to point it to the headers+libraries installed in $(STAGING_DIR) instead?
Okay; understood.
Quoted 5 lines
package/wvdial/wvdial.mk line 21
Quoted 2 lines
package/wvdial/wvdial.mk new file +2
-0+WVDIAL_INSTALL_TARGET_OPT += prefix="$(TARGET_DIR)/usr" install +WVDIAL_UNINSTALL_TARGET_OPT += prefix="$(TARGET_DIR)/usr" uninstallThose are used only once, so I would rather put them directly into the install/uninstall commands below.
Okay.
I'll fix the patch, and resubmit.
Simon.