From e7cb22adf33b91cb637f719c07a139f896b0b34d Mon Sep 17 00:00:00 2001 From: skrll Date: Thu, 23 Dec 2004 18:11:18 +0000 Subject: Update speedtouch to 1.3.1. The main changes is to support revision 4 modems (silver cycle helmet/beetle) and to use the threaded pppo3 if native threads are available. Tested on: - stringray by David Brownlee (abs@) and me - purple cycle helmet/beetle by David Brownlee - silver cycle helment/beetle by me --- net/speedtouch/patches/patch-aa | 31 ++++++--------- net/speedtouch/patches/patch-ab | 16 ++++++++ net/speedtouch/patches/patch-ac | 86 +++++++++++++++++++++++++++++++++++++++++ net/speedtouch/patches/patch-ad | 27 +++++++++++++ net/speedtouch/patches/patch-ae | 13 +++++++ 5 files changed, 154 insertions(+), 19 deletions(-) create mode 100644 net/speedtouch/patches/patch-ab create mode 100644 net/speedtouch/patches/patch-ac create mode 100644 net/speedtouch/patches/patch-ad create mode 100644 net/speedtouch/patches/patch-ae (limited to 'net/speedtouch/patches') diff --git a/net/speedtouch/patches/patch-aa b/net/speedtouch/patches/patch-aa index 71be17bb884..0399f440374 100644 --- a/net/speedtouch/patches/patch-aa +++ b/net/speedtouch/patches/patch-aa @@ -1,22 +1,15 @@ -$NetBSD: patch-aa,v 1.4 2003/11/07 11:06:17 abs Exp $ +$NetBSD: patch-aa,v 1.5 2004/12/23 18:11:18 skrll Exp $ ---- doc-bsd/Makefile.in.orig Fri Nov 7 01:56:49 2003 +--- doc-bsd/Makefile.in.orig 2004-06-10 17:36:35.000000000 +0100 +++ doc-bsd/Makefile.in -@@ -88,14 +88,14 @@ all : - - install : install-man - @test -d $(datadir)/doc/speedtouch || $(INSTALL) -c -d $(datadir)/doc/speedtouch -- @test -d $(prefix)/etc/rc.d || $(INSTALL) -c -d $(prefix)/etc/rc.d -- $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample $(prefix)/etc/rc.d -+ @test -d $(datadir)/examples/speedtouch || $(INSTALL) -c -d $(datadir)/examples/speedtouch -+ $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample $(datadir)/examples/speedtouch/adsl.sh -+ $(INSTALL) -m 0444 -o $(installuser) ppp.conf.sample $(datadir)/examples/speedtouch/ppp.conf - $(INSTALL) -m 0444 -o $(installuser) INSTALL $(datadir)/doc/speedtouch - $(INSTALL) -m 0444 -o $(installuser) INSTALL-de $(datadir)/doc/speedtouch - $(INSTALL) -m 0444 -o $(installuser) INSTALL-fr $(datadir)/doc/speedtouch - $(INSTALL) -m 0444 -o $(installuser) INSTALL-it $(datadir)/doc/speedtouch - $(INSTALL) -m 0444 -o $(installuser) INSTALL-nl $(datadir)/doc/speedtouch -- $(INSTALL) -m 0444 -o $(installuser) ppp.conf.sample $(datadir)/doc/speedtouch - $(INSTALL) -m 0444 -o $(installuser) FAQ $(datadir)/doc/speedtouch - $(INSTALL) -m 0444 -o $(installuser) FAQ-fr $(datadir)/doc/speedtouch +@@ -93,7 +93,9 @@ all : + install: install-man + @test -d "$(prefix)/etc/rc.d" || $(INSTALL) -c -d "$(prefix)/etc/rc.d" +- $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample "$(prefix)/etc/rc.d" ++ @test -d "$(datadir)/examples/speedtouch" || $(INSTALL) -c -d $(datadir)/examples/speedtouch ++ $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample $(datadir)/examples/speedtouch ++ $(INSTALL) -m 0444 -o $(installuser) ppp.conf.sample $(datadir)/examples/speedtouch + @test -d "$(docdir)" || $(INSTALL) -c -d "$(docdir)" + $(INSTALL) -m 0444 -o $(installuser) INSTALL "$(docdir)" + $(INSTALL) -m 0444 -o $(installuser) INSTALL-de "$(docdir)" diff --git a/net/speedtouch/patches/patch-ab b/net/speedtouch/patches/patch-ab new file mode 100644 index 00000000000..dfb3882a31c --- /dev/null +++ b/net/speedtouch/patches/patch-ab @@ -0,0 +1,16 @@ +$NetBSD: patch-ab,v 1.4 2004/12/23 18:11:18 skrll Exp $ + +--- configure.in.orig 2004-09-29 21:56:31.000000000 +0100 ++++ configure.in +@@ -112,8 +112,9 @@ case "$host" in + AC_DEFINE(FREEBSD) + ;; + *-netbsd*) +- st_compile="modem_run pppoa2" +- AC_MSG_WARN(pthread lib not yet supported) ++ st_compile="modem_run pppoa2 pppoa3" ++ AC_CHECK_LIB(pthread, pthread_create, THREAD_LIBS="-pthread", ++ [AC_MSG_WARN(pthread lib wasn't found : pppoa3 won't be compiled); st_compile="modem_run pppoa2"]) + DOCDIR="doc-bsd" + PUSB_SOURCE="pusb-bsd.c" + AC_DEFINE(NETBSD) diff --git a/net/speedtouch/patches/patch-ac b/net/speedtouch/patches/patch-ac new file mode 100644 index 00000000000..7cd998950d4 --- /dev/null +++ b/net/speedtouch/patches/patch-ac @@ -0,0 +1,86 @@ +$NetBSD: patch-ac,v 1.3 2004/12/23 18:11:18 skrll Exp $ + +--- configure.orig 2004-03-17 22:52:46.000000000 +0000 ++++ configure +@@ -4574,9 +4574,78 @@ _ACEOF + + ;; + *-netbsd*) +- st_compile="modem_run pppoa2" +- { echo "$as_me:$LINENO: WARNING: pthread lib not yet supported" >&5 +-echo "$as_me: WARNING: pthread lib not yet supported" >&2;} ++ st_compile="modem_run pppoa2 pppoa3" ++ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 ++echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 ++if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lpthread $LIBS" ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char pthread_create (); ++int ++main () ++{ ++pthread_create (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_pthread_pthread_create=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_lib_pthread_pthread_create=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 ++echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 ++if test $ac_cv_lib_pthread_pthread_create = yes; then ++ THREAD_LIBS="-pthread" ++else ++ { echo "$as_me:$LINENO: WARNING: pthread lib wasn't found : pppoa3 won't be compiled" >&5 ++echo "$as_me: WARNING: pthread lib wasn't found : pppoa3 won't be compiled" >&2;}; st_compile="modem_run pppoa2" ++fi ++ + DOCDIR="doc-bsd" + PUSB_SOURCE="pusb-bsd.c" + cat >>confdefs.h <<\_ACEOF diff --git a/net/speedtouch/patches/patch-ad b/net/speedtouch/patches/patch-ad new file mode 100644 index 00000000000..f49026d544c --- /dev/null +++ b/net/speedtouch/patches/patch-ad @@ -0,0 +1,27 @@ +$NetBSD: patch-ad,v 1.3 2004/12/23 18:11:18 skrll Exp $ + +--- src/Makefile.in.orig 2004-09-29 21:56:31.000000000 +0100 ++++ src/Makefile.in +@@ -114,19 +114,19 @@ all: ${make_bindir} + + speedtouch-setup: speedtouch-setup.in Makefile + rm -f $@ $@.tmp +- $(edit) < $< > $@.tmp ++ $(edit) speedtouch-setup.in > $@.tmp + chmod a+x $@.tmp + mv $@.tmp $@ + + speedtouch-start: speedtouch-start.in Makefile + rm -f $@ $@.tmp +- $(edit) < $< > $@.tmp ++ $(edit) speedtouch-start.in > $@.tmp + chmod a+x $@.tmp + mv $@.tmp $@ + + speedtouch-stop: speedtouch-stop.in Makefile + rm -f $@ $@.tmp +- $(edit) < $< > $@.tmp ++ $(edit) speedtouch-stop.in > $@.tmp + chmod a+x $@.tmp + mv $@.tmp $@ + diff --git a/net/speedtouch/patches/patch-ae b/net/speedtouch/patches/patch-ae new file mode 100644 index 00000000000..7a6cba35eed --- /dev/null +++ b/net/speedtouch/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1 2004/12/23 18:11:18 skrll Exp $ + +--- hotplug/Makefile.in.orig 2004-09-29 21:56:31.000000000 +0100 ++++ hotplug/Makefile.in +@@ -28,7 +28,7 @@ all: speedtouch + + speedtouch: speedtouch.in Makefile + rm -f $@ $@.tmp +- $(edit) < $< > $@.tmp ++ $(edit) speedtouch.in > $@.tmp + chmod a+x $@.tmp + mv $@.tmp $@ + -- cgit v1.2.3