* [Buildroot] [PATCH 0/2] Add wvstreams and wvdial packages
@ 2013-04-25 9:19 spdawson at gmail.com
2013-04-25 9:19 ` [Buildroot] [PATCH 1/2] wvstreams: new package spdawson at gmail.com
2013-04-25 9:19 ` [Buildroot] [PATCH 2/2] wvdial: " spdawson at gmail.com
0 siblings, 2 replies; 8+ messages in thread
From: spdawson at gmail.com @ 2013-04-25 9:19 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
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
--
1.7.10.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] wvstreams: new package
2013-04-25 9:19 [Buildroot] [PATCH 0/2] Add wvstreams and wvdial packages spdawson at gmail.com
@ 2013-04-25 9:19 ` spdawson at gmail.com
2013-04-25 13:50 ` Thomas Petazzoni
2013-05-06 11:31 ` Peter Korsgaard
2013-04-25 9:19 ` [Buildroot] [PATCH 2/2] wvdial: " spdawson at gmail.com
1 sibling, 2 replies; 8+ messages in thread
From: spdawson at gmail.com @ 2013-04-25 9:19 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
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
diff --git a/package/Config.in b/package/Config.in
index ede0ba0..33d75a9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/wvstreams/Config.in b/package/wvstreams/Config.in
new file mode 100644
index 0000000..c39ec33
--- /dev/null
+++ b/package/wvstreams/Config.in
@@ -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
diff --git a/package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch b/package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch
new file mode 100644
index 0000000..c78cc18
--- /dev/null
+++ b/package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch
@@ -0,0 +1,273 @@
+Fix wvstreams so that it builds with uClibc, which does not have the
+getcontext() and setcontext() functions.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+diff -Nurp a/include/wvtask.h b/include/wvtask.h
+--- a/include/wvtask.h 2008-07-14 20:11:35.000000000 +0100
++++ b/include/wvtask.h 2012-07-28 12:29:53.559981240 +0100
+@@ -28,6 +28,13 @@
+
+ #define WVTASK_MAGIC 0x123678
+
++#undef HAVE_GETCONTEXT
++#ifdef HAVE_GETCONTEXT
++typedef ucontext_t TaskContext;
++#else
++typedef jmp_buf TaskContext;
++#endif
++
+ class WvTaskMan;
+
+ /** Represents a single thread of control. */
+@@ -54,8 +61,8 @@ class WvTask
+ bool running, recycled;
+
+ WvTaskMan &man;
+- ucontext_t mystate; // used for resuming the task
+- ucontext_t func_call, func_return;
++ TaskContext mystate; // used for resuming the task
++ TaskContext func_call, func_return;
+
+ TaskFunc *func;
+ void *userdata;
+@@ -94,13 +101,13 @@ class WvTaskMan
+ static void call_func(WvTask *task);
+
+ static char *stacktop;
+- static ucontext_t stackmaster_task;
++ static TaskContext stackmaster_task;
+
+ static WvTask *stack_target;
+- static ucontext_t get_stack_return;
++ static TaskContext get_stack_return;
+
+ static WvTask *current_task;
+- static ucontext_t toplevel;
++ static TaskContext toplevel;
+
+ WvTaskMan();
+ virtual ~WvTaskMan();
+diff -Nurp a/utils/wvtask.cc b/utils/wvtask.cc
+--- a/utils/wvtask.cc 2009-05-13 22:42:52.000000000 +0100
++++ b/utils/wvtask.cc 2012-07-28 12:32:23.855974538 +0100
+@@ -60,12 +60,14 @@ int WvTask::taskcount, WvTask::numtasks,
+ WvTaskMan *WvTaskMan::singleton;
+ int WvTaskMan::links, WvTaskMan::magic_number;
+ WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks;
+-ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return,
++TaskContext WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return,
+ WvTaskMan::toplevel;
+ WvTask *WvTaskMan::current_task, *WvTaskMan::stack_target;
+ char *WvTaskMan::stacktop;
+
++#ifdef HAVE_GETCONTEXT
+ static int context_return;
++#endif
+
+
+ static bool use_shared_stack()
+@@ -198,9 +200,13 @@ WvTaskMan::WvTaskMan()
+
+ stacktop = (char *)alloca(0);
+
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(&get_stack_return) == 0);
+ if (context_return == 0)
++#else
++ if (setjmp(get_stack_return) == 0)
++#endif
+ {
+ // initial setup - start the stackmaster() task (never returns!)
+ stackmaster();
+@@ -257,22 +263,30 @@ int WvTaskMan::run(WvTask &task, int val
+
+ WvTask *old_task = current_task;
+ current_task = &task;
+- ucontext_t *state;
++ TaskContext *state;
+
+ if (!old_task)
+ state = &toplevel; // top-level call (not in an actual task yet)
+ else
+ state = &old_task->mystate;
+
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(state) == 0);
+ int newval = context_return;
++#else
++ int newval = setjmp(*state);
++#endif
+ if (newval == 0)
+ {
+ // saved the state, now run the task.
++#ifdef HAVE_GETCONTEXT
+ context_return = val;
+ setcontext(&task.mystate);
+ return -1;
++#else
++ longjmp(task.mystate, val);
++#endif
+ }
+ else
+ {
+@@ -317,16 +331,24 @@ int WvTaskMan::yield(int val)
+ (long)current_task->stacksize);
+ }
+ #endif
+-
++
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(¤t_task->mystate) == 0);
+ int newval = context_return;
++#else
++ int newval = setjmp(current_task->mystate);
++#endif
+ if (newval == 0)
+ {
+ // saved the task state; now yield to the toplevel.
++#ifdef HAVE_GETCONTEXT
+ context_return = val;
+ setcontext(&toplevel);
+ return -1;
++#else
++ longjmp(toplevel, val);
++#endif
+ }
+ else
+ {
+@@ -340,9 +362,13 @@ int WvTaskMan::yield(int val)
+
+ void WvTaskMan::get_stack(WvTask &task, size_t size)
+ {
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(&get_stack_return) == 0);
+ if (context_return == 0)
++#else
++ if (setjmp(get_stack_return) == 0)
++#endif
+ {
+ assert(magic_number == -WVTASK_MAGIC);
+ assert(task.magic_number == WVTASK_MAGIC);
+@@ -358,6 +384,7 @@ void WvTaskMan::get_stack(WvTask &task,
+ static char *next_stack_addr = NULL;
+ #endif
+
++#ifndef HAVE_GETCONTEXT
+ task.stack = mmap(next_stack_addr, task.stacksize,
+ PROT_READ | PROT_WRITE,
+ #ifndef MACOS
+@@ -366,12 +393,17 @@ void WvTaskMan::get_stack(WvTask &task,
+ MAP_PRIVATE,
+ #endif
+ -1, 0);
++#endif // !HAVE_GETCONTEXT
+ }
+
+ // initial setup
+ stack_target = &task;
++#ifdef HAVE_GETCONTEXT
+ context_return = size/1024 + (size%1024 > 0);
+ setcontext(&stackmaster_task);
++#else
++ longjmp(stackmaster_task, size/1024 + (size%1024 > 0));
++#endif
+ }
+ else
+ {
+@@ -408,9 +440,13 @@ void WvTaskMan::_stackmaster()
+ {
+ assert(magic_number == -WVTASK_MAGIC);
+
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(&stackmaster_task) == 0);
+ val = context_return;
++#else
++ val = setjmp(stackmaster_task);
++#endif
+ if (val == 0)
+ {
+ assert(magic_number == -WVTASK_MAGIC);
+@@ -418,8 +454,12 @@ void WvTaskMan::_stackmaster()
+ // just did setjmp; save stackmaster's current state (with
+ // all current stack allocations) and go back to get_stack
+ // (or the constructor, if that's what called us)
++#ifdef HAVE_GETCONTEXT
+ context_return = 1;
+ setcontext(&get_stack_return);
++#else
++ longjmp(get_stack_return, 1);
++#endif
+ }
+ else
+ {
+@@ -462,7 +502,9 @@ void WvTaskMan::call_func(WvTask *task)
+ task->func(task->userdata);
+ Dprintf("WvTaskMan: returning from task #%d (%s)\n",
+ task->tid, (const char *)task->name);
++#ifdef HAVE_GETCONTEXT
+ context_return = 1;
++#endif
+ }
+
+
+@@ -473,9 +515,13 @@ void WvTaskMan::do_task()
+ assert(task->magic_number == WVTASK_MAGIC);
+
+ // back here from longjmp; someone wants stack space.
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(&task->mystate) == 0);
+ if (context_return == 0)
++#else
++ if (setjmp(task->mystate) == 0)
++#endif
+ {
+ // done the setjmp; that means the target task now has
+ // a working jmp_buf all set up. Leave space on the stack
+@@ -510,6 +556,7 @@ void WvTaskMan::do_task()
+ }
+ else
+ {
++#ifdef HAVE_GETCONTEXT
+ assert(getcontext(&task->func_call) == 0);
+ task->func_call.uc_stack.ss_size = task->stacksize;
+ task->func_call.uc_stack.ss_sp = task->stack;
+@@ -519,11 +566,19 @@ void WvTaskMan::do_task()
+ task->tid, (const char *)task->name);
+ makecontext(&task->func_call,
+ (void (*)(void))call_func, 1, task);
++#else
++ assert(setjmp(task->func_call) == 0);
++#endif
+
++#ifdef HAVE_GETCONTEXT
+ context_return = 0;
+ assert(getcontext(&task->func_return) == 0);
+ if (context_return == 0)
+ setcontext(&task->func_call);
++#else
++ if (setjmp(task->func_return) == 0)
++ longjmp(task->func_call, 0);
++#endif
+ }
+
+ // the task's function terminated.
+@@ -544,8 +599,12 @@ const void *WvTaskMan::current_top_of_st
+ if (use_shared_stack() || current_task == NULL)
+ return __libc_stack_end;
+ else
++#ifdef HAVE_GETCONTEXT
+ return (const char *)current_task->stack + current_task->stacksize;
+ #else
++ return 0;
++#endif
++#else
+ return 0;
+ #endif
+ }
diff --git a/package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch b/package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch
new file mode 100644
index 0000000..c6317da
--- /dev/null
+++ b/package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch
@@ -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 <spdawson@gmail.com>
+
+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)
+ {
diff --git a/package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch b/package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch
new file mode 100644
index 0000000..690a961
--- /dev/null
+++ b/package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch
@@ -0,0 +1,16 @@
+Fix wvstreams so that it builds with uClibc: const cast problem.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+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;
diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk
new file mode 100644
index 0000000..341fc09
--- /dev/null
+++ b/package/wvstreams/wvstreams.mk
@@ -0,0 +1,51 @@
+#############################################################
+#
+# wvstreams
+#
+#############################################################
+
+WVSTREAMS_VERSION = 4.6.1
+WVSTREAMS_SITE = http://wvstreams.googlecode.com/files
+WVSTREAMS_DEPENDENCIES = openssl zlib
+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
+
+ifeq ($(BR2_PACKAGE_DBUS),y)
+ WVSTREAMS_DEPENDENCIES += dbus
+ WVSTREAMS_CONF_OPT += --with-dbus
+else
+ WVSTREAMS_CONF_OPT += --without-dbus
+endif
+
+ifeq ($(BR2_PACKAGE_TCL),y)
+ WVSTREAMS_DEPENDENCIES += tcl
+ WVSTREAMS_CONF_OPT += --with-tcl
+else
+ WVSTREAMS_CONF_OPT += --without-tcl
+endif
+
+ifeq ($(BR2_PACKAGE_QT),y)
+ WVSTREAMS_DEPENDENCIES += qt
+ WVSTREAMS_CONF_OPT += --with-qt
+else
+ WVSTREAMS_CONF_OPT += --without-qt
+endif
+
+ifeq ($(BR2_PACKAGE_VALGRIND),y)
+ WVSTREAMS_DEPENDENCIES += valgrind
+ WVSTREAMS_CONF_OPT += --with-valgrind
+else
+ WVSTREAMS_CONF_OPT += --without-valgrind
+endif
+
+$(eval $(autotools-package))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] wvdial: new package
2013-04-25 9:19 [Buildroot] [PATCH 0/2] Add wvstreams and wvdial packages spdawson at gmail.com
2013-04-25 9:19 ` [Buildroot] [PATCH 1/2] wvstreams: new package spdawson at gmail.com
@ 2013-04-25 9:19 ` spdawson at gmail.com
2013-04-25 13:57 ` Thomas Petazzoni
1 sibling, 1 reply; 8+ messages in thread
From: spdawson at gmail.com @ 2013-04-25 9:19 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
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
diff --git a/package/Config.in b/package/Config.in
index 33d75a9..84a92e1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/wvdial/Config.in b/package/wvdial/Config.in
new file mode 100644
index 0000000..2dc93ab
--- /dev/null
+++ b/package/wvdial/Config.in
@@ -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/
diff --git a/package/wvdial/wvdial-0001-ppp-install-prefix.patch b/package/wvdial/wvdial-0001-ppp-install-prefix.patch
new file mode 100644
index 0000000..5db9648
--- /dev/null
+++ b/package/wvdial/wvdial-0001-ppp-install-prefix.patch
@@ -0,0 +1,16 @@
+Fix install prefix for PPP configuration files.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+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
+
diff --git a/package/wvdial/wvdial-0002-uClibc-scandir.patch b/package/wvdial/wvdial-0002-uClibc-scandir.patch
new file mode 100644
index 0000000..b611e94
--- /dev/null
+++ b/package/wvdial/wvdial-0002-uClibc-scandir.patch
@@ -0,0 +1,23 @@
+Fix wvdial so that it works with scandir as defined in uClibc.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+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
diff --git a/package/wvdial/wvdial.mk b/package/wvdial/wvdial.mk
new file mode 100644
index 0000000..8537813
--- /dev/null
+++ b/package/wvdial/wvdial.mk
@@ -0,0 +1,41 @@
+#############################################################
+#
+# wvdial
+#
+#############################################################
+
+WVDIAL_VERSION = 1.61
+WVDIAL_SITE = http://wvdial.googlecode.com/files
+WVDIAL_SOURCE = wvdial-$(WVDIAL_VERSION).tar.bz2
+WVDIAL_DEPENDENCIES = wvstreams
+
+WVDIAL_LICENSE = LGPLv2
+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)"
+WVDIAL_INSTALL_TARGET_OPT += prefix="$(TARGET_DIR)/usr" install
+WVDIAL_UNINSTALL_TARGET_OPT += prefix="$(TARGET_DIR)/usr" uninstall
+
+define WVDIAL_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) -C $(@D)
+endef
+
+define WVDIAL_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) \
+ $(WVDIAL_INSTALL_TARGET_OPT) -C $(@D)
+endef
+
+define WVDIAL_UNINSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) \
+ $(WVDIAL_UNINSTALL_TARGET_OPT) -C $(@D)
+endef
+
+define WVDIAL_CLEAN_CMDS
+ $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) clean -C $(@D)
+endef
+
+$(eval $(generic-package))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] wvstreams: new package
2013-04-25 9:19 ` [Buildroot] [PATCH 1/2] wvstreams: new package spdawson at gmail.com
@ 2013-04-25 13:50 ` Thomas Petazzoni
2013-04-25 19:30 ` Simon Dawson
2013-05-06 11:31 ` Peter Korsgaard
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2013-04-25 13:50 UTC (permalink / raw)
To: buildroot
Simon,
This one looks good. Just a few questions below.
On Thu, 25 Apr 2013 10:19:01 +0100, spdawson at gmail.com wrote:
> diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk
> new file mode 100644
> index 0000000..341fc09
> --- /dev/null
> +++ b/package/wvstreams/wvstreams.mk
> @@ -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...
> +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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] wvdial: new package
2013-04-25 9:19 ` [Buildroot] [PATCH 2/2] wvdial: " spdawson at gmail.com
@ 2013-04-25 13:57 ` Thomas Petazzoni
2013-04-25 19:38 ` Simon Dawson
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2013-04-25 13:57 UTC (permalink / raw)
To: buildroot
Simon, Pascal,
On Thu, 25 Apr 2013 10:19:02 +0100, spdawson at gmail.com wrote:
> diff --git a/package/wvdial/wvdial-0001-ppp-install-prefix.patch b/package/wvdial/wvdial-0001-ppp-install-prefix.patch
> new file mode 100644
> index 0000000..5db9648
> --- /dev/null
> +++ b/package/wvdial/wvdial-0001-ppp-install-prefix.patch
> @@ -0,0 +1,16 @@
> +Fix install prefix for PPP configuration files.
> +
> +Signed-off-by: Simon Dawson <spdawson@gmail.com>
> +
> +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?
> +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
"+" ?
> +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?
> +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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] wvstreams: new package
2013-04-25 13:50 ` Thomas Petazzoni
@ 2013-04-25 19:30 ` Simon Dawson
0 siblings, 0 replies; 8+ messages in thread
From: Simon Dawson @ 2013-04-25 19:30 UTC (permalink / raw)
To: buildroot
Hi Thomas; thanks for taking the time to look at this.
On 25 April 2013 14:50, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>> +WVSTREAMS_DEPENDENCIES = openssl zlib
>
> openssl/zlib dependencies are mandatory here...
>
>> +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?
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] wvdial: new package
2013-04-25 13:57 ` Thomas Petazzoni
@ 2013-04-25 19:38 ` Simon Dawson
0 siblings, 0 replies; 8+ messages in thread
From: Simon Dawson @ 2013-04-25 19:38 UTC (permalink / raw)
To: buildroot
Hi Thomas; thanks for the feedback.
On 25 April 2013 14:57, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>> + 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?
You're right --- this needs fixing.
>> +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
> "+" ?
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.
>> +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.
>> +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.
Okay.
I'll fix the patch, and resubmit.
Simon.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] wvstreams: new package
2013-04-25 9:19 ` [Buildroot] [PATCH 1/2] wvstreams: new package spdawson at gmail.com
2013-04-25 13:50 ` Thomas Petazzoni
@ 2013-05-06 11:31 ` Peter Korsgaard
1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2013-05-06 11:31 UTC (permalink / raw)
To: buildroot
>>>>> "spdawson" == spdawson <spdawson@gmail.com> writes:
spdawson> From: Simon Dawson <spdawson@gmail.com>
spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-06 11:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 9:19 [Buildroot] [PATCH 0/2] Add wvstreams and wvdial packages spdawson at gmail.com
2013-04-25 9:19 ` [Buildroot] [PATCH 1/2] wvstreams: new package spdawson at gmail.com
2013-04-25 13:50 ` Thomas Petazzoni
2013-04-25 19:30 ` Simon Dawson
2013-05-06 11:31 ` Peter Korsgaard
2013-04-25 9:19 ` [Buildroot] [PATCH 2/2] wvdial: " spdawson at gmail.com
2013-04-25 13:57 ` Thomas Petazzoni
2013-04-25 19:38 ` Simon Dawson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox