diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2006-12-21 21:19:26 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2006-12-21 21:19:26 +0000 |
commit | 96130cd2a7a343cbf374404daf1d731bae7c6d1c (patch) | |
tree | 3b1225460b69b3fc96ae31a170d67671ef64517f /comms | |
parent | 5019b8e1405d45deb8eba10c398d04f5435d4d58 (diff) | |
download | ports-96130cd2a7a343cbf374404daf1d731bae7c6d1c.tar.gz ports-96130cd2a7a343cbf374404daf1d731bae7c6d1c.zip |
Notes
Diffstat (limited to 'comms')
-rw-r--r-- | comms/Makefile | 1 | ||||
-rw-r--r-- | comms/soundmodem/Makefile | 48 | ||||
-rw-r--r-- | comms/soundmodem/distinfo | 3 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-configapp_src_main.c | 11 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-configapp_src_soundmodemconfig.8 | 11 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-configure | 22 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-libmisc_getopt.h | 12 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-pammodem_meas.c | 25 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-pskmodem_measpsk.c | 11 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-soundcard_main.c | 11 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-soundcard_ptt.c | 60 | ||||
-rw-r--r-- | comms/soundmodem/files/patch-soundcard_soundmodem.8 | 11 | ||||
-rw-r--r-- | comms/soundmodem/files/soundmodem | 37 | ||||
-rw-r--r-- | comms/soundmodem/pkg-descr | 6 |
14 files changed, 269 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile index ac47d1da3e6b..ba8c1b5a9a80 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -101,6 +101,7 @@ SUBDIR += sms_client SUBDIR += smstools SUBDIR += snooper + SUBDIR += soundmodem SUBDIR += spandsp SUBDIR += splat SUBDIR += sredird diff --git a/comms/soundmodem/Makefile b/comms/soundmodem/Makefile new file mode 100644 index 000000000000..8344f8750084 --- /dev/null +++ b/comms/soundmodem/Makefile @@ -0,0 +1,48 @@ +# ports collection makefile for: soundmodem +# Date created: 4 November 2006 +# Whom: db +# +# $FreeBSD$ +# + +PORTNAME= soundmodem +PORTVERSION= 0.10 +CATEGORIES= comms hamradio +MASTER_SITES= http://www.baycom.org/~tom/ham/soundmodem/ \ + http://chronos.org.uk/distfiles/ + +MAINTAINER= db@db.net +COMMENT= Amateur Radio sound modem + +LIB_DEPENDS= audiofile:${PORTSDIR}/audio/libaudiofile + +CONFIGURE_ARGS= --disable-alsatest +WRKSRC= ${WRKDIR}/${DISTNAME} +USE_GMAKE= yes +HAS_CONFIGURE= yes +ONLY_FOR_ARCHS= i386 +USE_GNOME= gtk12 libxml +MAN8= soundmodem.8 soundmodemconfig.8 +PLIST_FILES= bin/soundmodemconfig etc/rc.d/soundmodem \ + include/modem.h include/simd.h sbin/soundmodem + +pre-patch: + @${CP} ${FILESDIR}/soundmodem ${WRKSRC} + +post-patch: + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ + ${WRKSRC}/soundcard/soundmodem.8 \ + ${WRKSRC}/soundcard/main.c \ + ${WRKSRC}/configapp/src/soundmodemconfig.8 \ + ${WRKSRC}/configapp/src/main.c \ + ${WRKSRC}/soundmodem + +post-install: + ${INSTALL_SCRIPT} ${WRKSRC}/soundmodem ${PREFIX}/etc/rc.d + +.include <bsd.port.pre.mk> +.if ${OSVERSION} < 500000 +BROKEN= Does not compile on FreeBSD 4.x +.endif + +.include <bsd.port.post.mk> diff --git a/comms/soundmodem/distinfo b/comms/soundmodem/distinfo new file mode 100644 index 000000000000..dd03edd54e18 --- /dev/null +++ b/comms/soundmodem/distinfo @@ -0,0 +1,3 @@ +MD5 (soundmodem-0.10.tar.gz) = 6bf9acaf19c55e57628a49bdff79c8f9 +SHA256 (soundmodem-0.10.tar.gz) = e7a42c413a180b873ae76b2c252904a3e34c9807c2604f2315426443d9e28627 +SIZE (soundmodem-0.10.tar.gz) = 491112 diff --git a/comms/soundmodem/files/patch-configapp_src_main.c b/comms/soundmodem/files/patch-configapp_src_main.c new file mode 100644 index 000000000000..165747ba60c5 --- /dev/null +++ b/comms/soundmodem/files/patch-configapp_src_main.c @@ -0,0 +1,11 @@ +--- configapp/src/main.c.orig Sun Nov 5 21:45:29 2006 ++++ configapp/src/main.c Sun Nov 5 21:45:50 2006 +@@ -358,7 +358,7 @@ + #else /* WIN32 */ + + static xmlDocPtr doc = NULL; +-static const char *cfgfile = "/etc/ax25/soundmodem.conf"; ++static const char *cfgfile = "%%PREFIX%%/etc/soundmodem.conf"; + + static xmlNodePtr findconfig(const char *newname) + { diff --git a/comms/soundmodem/files/patch-configapp_src_soundmodemconfig.8 b/comms/soundmodem/files/patch-configapp_src_soundmodemconfig.8 new file mode 100644 index 000000000000..599fe256649b --- /dev/null +++ b/comms/soundmodem/files/patch-configapp_src_soundmodemconfig.8 @@ -0,0 +1,11 @@ +--- configapp/src/soundmodemconfig.8.orig Fri Aug 9 16:01:51 2002 ++++ configapp/src/soundmodemconfig.8 Sun Nov 5 21:59:09 2006 +@@ -15,7 +15,7 @@ + .SH DESCRIPTION + .B soundmodemconfig + is a GUI tool for creating a configuration file for soundmodem (8). +-The default file name is /etc/ax25/soundmodem.conf, though ++The default file name is %%PREFIX%%/etc/soundmodem.conf, though + any other file name may be specified on the command line. + + diff --git a/comms/soundmodem/files/patch-configure b/comms/soundmodem/files/patch-configure new file mode 100644 index 000000000000..d34e203d90db --- /dev/null +++ b/comms/soundmodem/files/patch-configure @@ -0,0 +1,22 @@ +--- configure.orig Tue Sep 12 14:52:56 2006 ++++ configure Tue Sep 12 16:48:30 2006 +@@ -7912,7 +7912,8 @@ + int + main () + { +- ++#include <stdio.h> ++printf("RUNNING a conftest!\n"); + /* ensure backward compatibility */ + #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) + #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR +@@ -7979,9 +7980,6 @@ + + echo "$as_me:$LINENO: result: not present." >&5 + echo "${ECHO_T}not present." >&6 +- { { echo "$as_me:$LINENO: error: Sufficiently new version of libasound not found." >&5 +-echo "$as_me: error: Sufficiently new version of libasound not found." >&2;} +- { (exit 1); exit 1; }; } + alsa_found=no + + fi diff --git a/comms/soundmodem/files/patch-libmisc_getopt.h b/comms/soundmodem/files/patch-libmisc_getopt.h new file mode 100644 index 000000000000..56910e4843cc --- /dev/null +++ b/comms/soundmodem/files/patch-libmisc_getopt.h @@ -0,0 +1,12 @@ +--- libmisc/getopt.h.orig Mon Sep 18 22:42:44 2006 ++++ libmisc/getopt.h Tue Sep 19 17:43:44 2006 +@@ -101,7 +101,9 @@ + errors, only prototype getopt for the GNU C library. */ + extern int getopt (int argc, char *const *argv, const char *shortopts); + #else /* not __GNU_LIBRARY__ */ ++#if 0 + extern int getopt (); ++#endif + #endif /* not __GNU_LIBRARY__ */ + extern int getopt_long (int argc, char *const *argv, const char *shortopts, + const struct option *longopts, int *longind); diff --git a/comms/soundmodem/files/patch-pammodem_meas.c b/comms/soundmodem/files/patch-pammodem_meas.c new file mode 100644 index 000000000000..78d6d07aed8b --- /dev/null +++ b/comms/soundmodem/files/patch-pammodem_meas.c @@ -0,0 +1,25 @@ +--- pammodem/meas.c.orig Tue Sep 19 17:44:23 2006 ++++ pammodem/meas.c Tue Sep 19 17:51:00 2006 +@@ -32,6 +32,8 @@ + #ifdef HAVE_STROPTS_H + #include <stropts.h> + #endif ++#include <sys/param.h> ++#include <sys/types.h> + #ifdef HAVE_SYS_CONF_H + #include <sys/conf.h> + #endif +@@ -45,12 +47,12 @@ + #include <sys/soundcard.h> + #endif + +-#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> + #include <poll.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <strings.h> + #include <unistd.h> + #include <signal.h> diff --git a/comms/soundmodem/files/patch-pskmodem_measpsk.c b/comms/soundmodem/files/patch-pskmodem_measpsk.c new file mode 100644 index 000000000000..166136953056 --- /dev/null +++ b/comms/soundmodem/files/patch-pskmodem_measpsk.c @@ -0,0 +1,11 @@ +--- pskmodem/measpsk.c.orig Tue Sep 19 17:51:37 2006 ++++ pskmodem/measpsk.c Tue Sep 19 17:52:15 2006 +@@ -32,6 +32,8 @@ + #ifdef HAVE_STROPTS_H + #include <stropts.h> + #endif ++#include <sys/param.h> ++#include <sys/types.h> + #ifdef HAVE_SYS_CONF_H + #include <sys/conf.h> + #endif diff --git a/comms/soundmodem/files/patch-soundcard_main.c b/comms/soundmodem/files/patch-soundcard_main.c new file mode 100644 index 000000000000..d6d26ae93b4a --- /dev/null +++ b/comms/soundmodem/files/patch-soundcard_main.c @@ -0,0 +1,11 @@ +--- soundcard/main.c.orig Sun Nov 5 21:44:34 2006 ++++ soundcard/main.c Sun Nov 5 21:44:53 2006 +@@ -354,7 +354,7 @@ + { "daemonize", 0, 0, 'D' }, + { 0, 0, 0, 0 } + }; +- char *configname = NULL, *cfgname, *filename = "/etc/ax25/soundmodem.conf"; ++ char *configname = NULL, *cfgname, *filename = "%%PREFIX%%/etc/soundmodem.conf"; + unsigned int verblevel = 2, tosyslog = 0, simd = 1, schedrr = 0, lockmem = 0, daemonize = 0; + int c, err = 0; + xmlDocPtr doc; diff --git a/comms/soundmodem/files/patch-soundcard_ptt.c b/comms/soundmodem/files/patch-soundcard_ptt.c new file mode 100644 index 000000000000..e9226630047a --- /dev/null +++ b/comms/soundmodem/files/patch-soundcard_ptt.c @@ -0,0 +1,60 @@ +--- soundcard/ptt.c.orig Sat Nov 9 10:31:53 2002 ++++ soundcard/ptt.c Mon Nov 6 00:17:03 2006 +@@ -48,6 +48,9 @@ + + #ifdef HAVE_LINUX_PPDEV_H + #include <linux/ppdev.h> ++#elif defined(__FreeBSD__) ++#include <dev/ppbus/ppi.h> ++#include <dev/ppbus/ppbconf.h> + #else + #include "ppdev.h" + #endif +@@ -62,7 +65,11 @@ + + struct modemparams pttparams[] = { + { "file", "PTT Driver", "Path name of the serial or parallel port driver for outputting PTT", "none", MODEMPAR_COMBO, ++#ifdef __FreeBSD__ ++ { c: { { "none", "/dev/ttyd0", "/dev/ttyd1", "/dev/lp0", "/dev/lp1" } } } }, ++#else + { c: { { "none", "/dev/ttyS0", "/dev/ttyS1", "/dev/parport0", "/dev/parport1" } } } }, ++#endif + { NULL } + }; + +@@ -87,7 +94,11 @@ + if (!ioctl(fd, TIOCMBIC, &y)) { + state->fd = fd; + state->mode = serport; ++#ifdef __FreeBSD__ ++ } else if (!ioctl(fd, PPISDATA, &x)) { ++#else + } else if (!ioctl(fd, PPCLAIM, 0) && !ioctl(fd, PPRDATA, &x)) { ++#endif + state->fd = fd; + state->mode = parport; + } else { +@@ -122,7 +133,11 @@ + #endif + } else if (state->mode == parport) { + reg = state->ptt | (state->dcd << 1); ++#ifdef __FreeBSD__ ++ ioctl(state->fd, PPISDATA, ®); ++#else + ioctl(state->fd, PPWDATA, ®); ++#endif + } + } + +@@ -148,7 +163,11 @@ + #endif + } else if (state->mode == parport) { + reg = state->ptt | (state->dcd << 1); ++#ifdef __FreeBSD__ ++ ioctl(state->fd, PPISDATA, ®); ++#else + ioctl(state->fd, PPWDATA, ®); ++#endif + } + } + diff --git a/comms/soundmodem/files/patch-soundcard_soundmodem.8 b/comms/soundmodem/files/patch-soundcard_soundmodem.8 new file mode 100644 index 000000000000..b7c32e182afd --- /dev/null +++ b/comms/soundmodem/files/patch-soundcard_soundmodem.8 @@ -0,0 +1,11 @@ +--- soundcard/soundmodem.8.orig Fri Aug 9 16:01:52 2002 ++++ soundcard/soundmodem.8 Sun Nov 5 21:47:40 2006 +@@ -20,7 +20,7 @@ + driver (enable CONFIG_MKISS). + .B soundmodem + is controlled by a configuration file. The default filename is +-/etc/ax25/soundmodem.conf. Any other name may be specified on the command line. ++%%PREFIX%%/etc/soundmodem.conf. Any other name may be specified on the command line. + + + diff --git a/comms/soundmodem/files/soundmodem b/comms/soundmodem/files/soundmodem new file mode 100644 index 000000000000..4bfdf0c6116e --- /dev/null +++ b/comms/soundmodem/files/soundmodem @@ -0,0 +1,37 @@ +#! /bin/sh +# +# PROVIDE: soundmodem +# REQUIRE: LOGIN +# +# Add the following lines to /etc/rc.conf to enable soundmodem: +# +#soundmodem_enable="YES" + +. /etc/rc.subr + +name=soundmodem +rcvar=`set_rcvar` +load_rc_config $name +soundmodem_enable=${soundmodem_enable-"NO"} + +command=/usr/local/sbin/soundmodem +start_cmd=soundmodem_start +stop_cmd=soundmodem_stop + +pidfile=/var/run/soundmodem.pid +required_files=/usr/local/etc/soundmodem.conf + +soundmodem_start() +{ + echo "Starting Soundmodem: " + /usr/local/sbin/soundmodem --daemonize + return 0 +} +soundmodem_stop() +{ + echo "Stopping Soundmodem: " + killall soundmodem + return 0 +} + +run_rc_command "$1" diff --git a/comms/soundmodem/pkg-descr b/comms/soundmodem/pkg-descr new file mode 100644 index 000000000000..abd78f2134e2 --- /dev/null +++ b/comms/soundmodem/pkg-descr @@ -0,0 +1,6 @@ +soundmodem Tom's userland modem on FreeBSD + +WWW: http://www.baycom.org/~tom/ham/soundmodem/ + +- Diane Bruce, VA3DB +db@db.net |