ports/106823: [NEW PORT] comms/soundmodem: Amateur Radio sound modem

Diane Bruce db at db.net
Sat Dec 16 23:30:18 UTC 2006


>Number:         106823
>Category:       ports
>Synopsis:       [NEW PORT] comms/soundmodem: Amateur Radio sound modem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 16 23:30:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Diane Bruce
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
none
>Environment:
System: FreeBSD diana.db.net 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sat Oct 14 14:44:56 MDT 2006
>Description:
soundmodem Tom's userland modem on FreeBSD

WWW: http://www.baycom.org/~tom/ham/soundmodem/

- Diane Bruce, VA3DB
db at db.net

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- soundmodem-0.10.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	soundmodem
#	soundmodem/files
#	soundmodem/files/patch-configure
#	soundmodem/files/patch-soundcard_main.c
#	soundmodem/files/patch-libmisc_getopt.h
#	soundmodem/files/patch-pammodem_meas.c
#	soundmodem/files/patch-pskmodem_measpsk.c
#	soundmodem/files/patch-soundcard_soundmodem.8
#	soundmodem/files/patch-configapp_src_soundmodemconfig.8
#	soundmodem/files/patch-configapp_src_main.c
#	soundmodem/files/patch-soundcard_ptt.c
#	soundmodem/files/soundmodem
#	soundmodem/Makefile
#	soundmodem/distinfo
#	soundmodem/pkg-descr
#
echo c - soundmodem
mkdir -p soundmodem > /dev/null 2>&1
echo c - soundmodem/files
mkdir -p soundmodem/files > /dev/null 2>&1
echo x - soundmodem/files/patch-configure
sed 's/^X//' >soundmodem/files/patch-configure << 'END-of-soundmodem/files/patch-configure'
X--- configure.orig	Tue Sep 12 14:52:56 2006
X+++ configure	Tue Sep 12 16:48:30 2006
X@@ -7912,7 +7912,8 @@
X int
X main ()
X {
X-
X+#include <stdio.h>
X+printf("RUNNING a conftest!\n");
X /* ensure backward compatibility */
X #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
X #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
X@@ -7979,9 +7980,6 @@
X 
X echo "$as_me:$LINENO: result: not present." >&5
X echo "${ECHO_T}not present." >&6
X-   { { echo "$as_me:$LINENO: error: Sufficiently new version of libasound not found." >&5
X-echo "$as_me: error: Sufficiently new version of libasound not found." >&2;}
X-   { (exit 1); exit 1; }; }
X    alsa_found=no
X 
X fi
END-of-soundmodem/files/patch-configure
echo x - soundmodem/files/patch-soundcard_main.c
sed 's/^X//' >soundmodem/files/patch-soundcard_main.c << 'END-of-soundmodem/files/patch-soundcard_main.c'
X--- soundcard/main.c.orig	Sun Nov  5 21:44:34 2006
X+++ soundcard/main.c	Sun Nov  5 21:44:53 2006
X@@ -354,7 +354,7 @@
X 		{ "daemonize", 0, 0, 'D' },
X 		{ 0, 0, 0, 0 }
X 	};
X-	char *configname = NULL, *cfgname, *filename = "/etc/ax25/soundmodem.conf";
X+	char *configname = NULL, *cfgname, *filename = "%%PREFIX%%/etc/soundmodem.conf";
X 	unsigned int verblevel = 2, tosyslog = 0, simd = 1, schedrr = 0, lockmem = 0, daemonize = 0;
X         int c, err = 0;
X 	xmlDocPtr doc;
END-of-soundmodem/files/patch-soundcard_main.c
echo x - soundmodem/files/patch-libmisc_getopt.h
sed 's/^X//' >soundmodem/files/patch-libmisc_getopt.h << 'END-of-soundmodem/files/patch-libmisc_getopt.h'
X--- libmisc/getopt.h.orig	Mon Sep 18 22:42:44 2006
X+++ libmisc/getopt.h	Tue Sep 19 17:43:44 2006
X@@ -101,7 +101,9 @@
X    errors, only prototype getopt for the GNU C library.  */
X extern int getopt (int argc, char *const *argv, const char *shortopts);
X #else /* not __GNU_LIBRARY__ */
X+#if 0
X extern int getopt ();
X+#endif
X #endif /* not __GNU_LIBRARY__ */
X extern int getopt_long (int argc, char *const *argv, const char *shortopts,
X 		        const struct option *longopts, int *longind);
END-of-soundmodem/files/patch-libmisc_getopt.h
echo x - soundmodem/files/patch-pammodem_meas.c
sed 's/^X//' >soundmodem/files/patch-pammodem_meas.c << 'END-of-soundmodem/files/patch-pammodem_meas.c'
X--- pammodem/meas.c.orig	Tue Sep 19 17:44:23 2006
X+++ pammodem/meas.c	Tue Sep 19 17:51:00 2006
X@@ -32,6 +32,8 @@
X #ifdef HAVE_STROPTS_H
X #include <stropts.h>
X #endif
X+#include <sys/param.h>
X+#include <sys/types.h>
X #ifdef HAVE_SYS_CONF_H
X #include <sys/conf.h>
X #endif
X@@ -45,12 +47,12 @@
X #include <sys/soundcard.h>
X #endif
X 
X-#include <sys/types.h>
X #include <sys/stat.h>
X #include <fcntl.h>
X #include <poll.h>
X #include <stdio.h>
X #include <stdlib.h>
X+#include <string.h>
X #include <strings.h>
X #include <unistd.h>
X #include <signal.h>
END-of-soundmodem/files/patch-pammodem_meas.c
echo x - soundmodem/files/patch-pskmodem_measpsk.c
sed 's/^X//' >soundmodem/files/patch-pskmodem_measpsk.c << 'END-of-soundmodem/files/patch-pskmodem_measpsk.c'
X--- pskmodem/measpsk.c.orig	Tue Sep 19 17:51:37 2006
X+++ pskmodem/measpsk.c	Tue Sep 19 17:52:15 2006
X@@ -32,6 +32,8 @@
X #ifdef HAVE_STROPTS_H
X #include <stropts.h>
X #endif
X+#include <sys/param.h>
X+#include <sys/types.h>
X #ifdef HAVE_SYS_CONF_H
X #include <sys/conf.h>
X #endif
END-of-soundmodem/files/patch-pskmodem_measpsk.c
echo x - soundmodem/files/patch-soundcard_soundmodem.8
sed 's/^X//' >soundmodem/files/patch-soundcard_soundmodem.8 << 'END-of-soundmodem/files/patch-soundcard_soundmodem.8'
X--- soundcard/soundmodem.8.orig	Fri Aug  9 16:01:52 2002
X+++ soundcard/soundmodem.8	Sun Nov  5 21:47:40 2006
X@@ -20,7 +20,7 @@
X driver (enable CONFIG_MKISS).
X .B soundmodem
X is controlled by a configuration file. The default filename is
X-/etc/ax25/soundmodem.conf. Any other name may be specified on the command line.
X+%%PREFIX%%/etc/soundmodem.conf. Any other name may be specified on the command line.
X 
X 
X 
END-of-soundmodem/files/patch-soundcard_soundmodem.8
echo x - soundmodem/files/patch-configapp_src_soundmodemconfig.8
sed 's/^X//' >soundmodem/files/patch-configapp_src_soundmodemconfig.8 << 'END-of-soundmodem/files/patch-configapp_src_soundmodemconfig.8'
X--- configapp/src/soundmodemconfig.8.orig	Fri Aug  9 16:01:51 2002
X+++ configapp/src/soundmodemconfig.8	Sun Nov  5 21:59:09 2006
X@@ -15,7 +15,7 @@
X .SH DESCRIPTION
X .B soundmodemconfig
X is a GUI tool for creating a configuration file for soundmodem (8).
X-The default file name is /etc/ax25/soundmodem.conf, though
X+The default file name is %%PREFIX%%/etc/soundmodem.conf, though
X any other file name may be specified on the command line.
X 
X 
END-of-soundmodem/files/patch-configapp_src_soundmodemconfig.8
echo x - soundmodem/files/patch-configapp_src_main.c
sed 's/^X//' >soundmodem/files/patch-configapp_src_main.c << 'END-of-soundmodem/files/patch-configapp_src_main.c'
X--- configapp/src/main.c.orig	Sun Nov  5 21:45:29 2006
X+++ configapp/src/main.c	Sun Nov  5 21:45:50 2006
X@@ -358,7 +358,7 @@
X #else /* WIN32 */
X 
X static xmlDocPtr doc = NULL;
X-static const char *cfgfile = "/etc/ax25/soundmodem.conf";
X+static const char *cfgfile = "%%PREFIX%%/etc/soundmodem.conf";
X 
X static xmlNodePtr findconfig(const char *newname)
X {
END-of-soundmodem/files/patch-configapp_src_main.c
echo x - soundmodem/files/patch-soundcard_ptt.c
sed 's/^X//' >soundmodem/files/patch-soundcard_ptt.c << 'END-of-soundmodem/files/patch-soundcard_ptt.c'
X--- soundcard/ptt.c.orig	Sat Nov  9 10:31:53 2002
X+++ soundcard/ptt.c	Mon Nov  6 00:17:03 2006
X@@ -48,6 +48,9 @@
X 
X #ifdef HAVE_LINUX_PPDEV_H
X #include <linux/ppdev.h>
X+#elif defined(__FreeBSD__)
X+#include <dev/ppbus/ppi.h>
X+#include <dev/ppbus/ppbconf.h>
X #else
X #include "ppdev.h"
X #endif
X@@ -62,7 +65,11 @@
X 
X struct modemparams pttparams[] = {
X 	{ "file", "PTT Driver", "Path name of the serial or parallel port driver for outputting PTT", "none", MODEMPAR_COMBO, 
X+#ifdef __FreeBSD__
X+	  { c: { { "none", "/dev/ttyd0", "/dev/ttyd1", "/dev/lp0", "/dev/lp1" } } } },
X+#else
X 	  { c: { { "none", "/dev/ttyS0", "/dev/ttyS1", "/dev/parport0", "/dev/parport1" } } } },
X+#endif
X 	{ NULL }
X };
X 
X@@ -87,7 +94,11 @@
X 	if (!ioctl(fd, TIOCMBIC, &y)) {
X 		state->fd = fd;
X 		state->mode = serport;
X+#ifdef __FreeBSD__
X+	} else if (!ioctl(fd, PPISDATA, &x)) {
X+#else
X 	} else if (!ioctl(fd, PPCLAIM, 0) && !ioctl(fd, PPRDATA, &x)) {
X+#endif
X 		state->fd = fd;
X 		state->mode = parport;
X 	} else {
X@@ -122,7 +133,11 @@
X #endif
X 	} else if (state->mode == parport) {
X 		reg = state->ptt | (state->dcd << 1);
X+#ifdef __FreeBSD__
X+		ioctl(state->fd, PPISDATA, &reg);
X+#else
X 		ioctl(state->fd, PPWDATA, &reg);
X+#endif
X 	}
X }
X 
X@@ -148,7 +163,11 @@
X #endif
X 	} else if (state->mode == parport) {
X 		reg = state->ptt | (state->dcd << 1);
X+#ifdef __FreeBSD__
X+		ioctl(state->fd, PPISDATA, &reg);
X+#else
X 		ioctl(state->fd, PPWDATA, &reg);
X+#endif
X 	}
X }
X 
END-of-soundmodem/files/patch-soundcard_ptt.c
echo x - soundmodem/files/soundmodem
sed 's/^X//' >soundmodem/files/soundmodem << 'END-of-soundmodem/files/soundmodem'
X#! /bin/sh
X#
X# PROVIDE: soundmodem
X# REQUIRE: LOGIN
X#
X# Add the following lines to /etc/rc.conf to enable soundmodem:
X#
X#soundmodem_enable="YES"
X
X. /etc/rc.subr
X
Xname=soundmodem
Xrcvar=`set_rcvar`
Xload_rc_config $name
Xsoundmodem_enable=${soundmodem_enable-"NO"}
X
Xcommand=/usr/local/sbin/soundmodem
Xstart_cmd=soundmodem_start
Xstop_cmd=soundmodem_stop
X
Xpidfile=/var/run/soundmodem.pid
Xrequired_files=/usr/local/etc/soundmodem.conf
X
Xsoundmodem_start()
X{
X	echo "Starting Soundmodem: "
X	/usr/local/sbin/soundmodem --daemonize
X	return 0
X}
Xsoundmodem_stop()
X{
X	echo "Stopping Soundmodem: "
X	killall soundmodem
X	return 0
X}
X
Xrun_rc_command "$1"
END-of-soundmodem/files/soundmodem
echo x - soundmodem/Makefile
sed 's/^X//' >soundmodem/Makefile << 'END-of-soundmodem/Makefile'
X# ports collection makefile for:	soundmodem
X# Date created:		4 November 2006
X# Whom:			db
X#
X# $FreeBSD:$
X#
X
XPORTNAME=	soundmodem
XPORTVERSION=	0.10
XCATEGORIES=	comms
XMASTER_SITES=	http://www.baycom.org/~tom/ham/soundmodem/ \
X		http://chronos.org.uk/distfiles/
X
XMAINTAINER=	db at db.net
XCOMMENT=	Amateur Radio sound modem
X
XLIB_DEPENDS=	audiofile:${PORTSDIR}/audio/libaudiofile
X
XCONFIGURE_ARGS=	--disable-alsatest
XWRKSRC=		${WRKDIR}/${DISTNAME}
XUSE_GMAKE=	yes
XHAS_CONFIGURE=	yes
XONLY_FOR_ARCHS=	i386
XUSE_GNOME=	gtk12 libxml
XMAN8	=	soundmodem.8 soundmodemconfig.8
XPLIST_FILES=	bin/soundmodemconfig etc/rc.d/soundmodem \
X		include/modem.h include/simd.h sbin/soundmodem
Xpre-patch:
X	@${CP} ${FILESDIR}/soundmodem ${WRKSRC}
Xpost-patch:
X	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
X		${WRKSRC}/soundcard/soundmodem.8 \
X		${WRKSRC}/soundcard/main.c \
X		${WRKSRC}/configapp/src/soundmodemconfig.8 \
X		${WRKSRC}/configapp/src/main.c \
X		${WRKSRC}/soundmodem
X
Xpost-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/soundmodem ${PREFIX}/etc/rc.d
X
X.include <bsd.port.pre.mk>
X.if ${OSVERSION} < 500000
XBROKEN=		Does not compile on FreeBSD 4.x
X.endif
X
X.include <bsd.port.post.mk>
END-of-soundmodem/Makefile
echo x - soundmodem/distinfo
sed 's/^X//' >soundmodem/distinfo << 'END-of-soundmodem/distinfo'
XMD5 (soundmodem-0.10.tar.gz) = 6bf9acaf19c55e57628a49bdff79c8f9
XSHA256 (soundmodem-0.10.tar.gz) = e7a42c413a180b873ae76b2c252904a3e34c9807c2604f2315426443d9e28627
XSIZE (soundmodem-0.10.tar.gz) = 491112
END-of-soundmodem/distinfo
echo x - soundmodem/pkg-descr
sed 's/^X//' >soundmodem/pkg-descr << 'END-of-soundmodem/pkg-descr'
Xsoundmodem Tom's userland modem on FreeBSD
X
XWWW: http://www.baycom.org/~tom/ham/soundmodem/
X
X- Diane Bruce, VA3DB
Xdb at db.net
END-of-soundmodem/pkg-descr
exit
--- soundmodem-0.10.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list