Bug 101452 - [NEW PORT] comms/hf: Amateur Radio soundcard fsk, pactor 1, amtor, gtor, mt63
Summary: [NEW PORT] comms/hf: Amateur Radio soundcard fsk, pactor 1, amtor, gtor, mt63
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-06 02:40 UTC by Diane Bruce
Modified: 2006-09-09 11:51 UTC (History)
0 users

See Also:


Attachments
hf-7.30.shar (38.43 KB, text/plain)
2006-08-06 02:40 UTC, Diane Bruce
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diane Bruce 2006-08-06 02:40:14 UTC
hf is a gtk+-based linux ham radio fsk digimode program, which can do also
the realtime ARQ modes pactor 1, amtor, gtor without a ptc, only with a
soundcard and a pc and linux(FreeBSD), all of which need not be the newest.
The core of hf, the heart of the program (hfkernel) is a real master-piece
of code, it has originally been made by Tom Sailer, many thanks Tom!
hf can also do MT63 and has a CW elbug function. 

WWW: http://www.hf.webmasternet.org

- Diane Bruce, VA3DB
db@db.net

Generated with FreeBSD Port Tools 0.63
Comment 1 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-08-06 19:01:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

I'll take it.
Comment 2 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-08-07 08:59:57 UTC
State Changed
From-To: open->feedback

http://sce-tindy.tecnik93.com/tb-exp/index.php?action=describe_port&id=703
Comment 3 Diane Bruce 2006-09-08 17:23:58 UTC
Revised port as hf is on SourceForge.


# 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:
#
#	hf
#	hf/Makefile
#	hf/distinfo
#	hf/files
#	hf/files/patch-hfkernel_fsk_amtor.c
#	hf/files/patch-hfkernel_fsk_rtty.c
#	hf/files/patch-hfkernel_fsk_cw.c
#	hf/files/patch-hfkernel_fsk_elbug.c
#	hf/files/patch-hfkernel_l1_oss.c
#	hf/files/patch-hfkernel_mt63_sound.cc
#	hf/files/patch-hfkernel_mt63_mt63hf.cc
#	hf/files/patch-hfkernel_mt63_mt63rx.cc
#	hf/files/patch-hfkernel_mt63_mt63tx.cc
#	hf/files/patch-hfkernel_mt63_ratecal1.cc
#	hf/files/patch-hfkernel_main.c
#	hf/files/patch-dcf77_audioin.c
#	hf/files/patch-dcf77_audioout.c
#	hf/files/patch-dcf77_timedec.c
#	hf/files/patch-util_channel.c
#	hf/files/patch-util_reffreq.c
#	hf/files/patch-dcf77_calccorr.c
#	hf/files/patch-scripts_Makefile.in
#	hf/files/patch-Makefile.in
#	hf/files/patch-scripts_hf
#	hf/files/patch-hfterm_src_main.c
#	hf/files/patch-scripts_testtest
#	hf/files/patch-doc_man_de_Makefile.in
#	hf/files/patch-doc_man_hf.1
#	hf/files/patch-hfterm_src_helpgui.c
#	hf/files/patch-hfkernel_mt63_mt63hflink.c
#	hf/pkg-descr
#	hf/pkg-plist
#
echo c - hf
mkdir -p hf > /dev/null 2>&1
echo x - hf/Makefile
sed 's/^X//' >hf/Makefile << 'END-of-hf/Makefile'
X# ports collection makefile for:	hf
X# Date created:		31 July 2006
X# Whom:			db
X#
X# $FreeBSD:$
X#
X
XPORTNAME=	hf
XPORTVERSION=	0.7.3
XCATEGORIES=	comms hamradio
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=     hfterm
X
XMAINTAINER=	db@db.net
XCOMMENT=	Amateur Radio soundcard fsk, pactor 1, amtor, gtor, mt63
X
XRUN_DEPENDS=	whiptail:${PORTSDIR}/devel/newt
X
X#WRKSRC=		${WRKDIR}/hf-0.7.3
XUSE_GNOME=	gtk20
XUSE_GMAKE=	yes
XHAS_CONFIGURE=	yes
XCONFIGURE_ARGS=	--prefix=${PREFIX} --sysconfdir=${PREFIX} --mandir=${PREFIX}/man
XONLY_FOR_ARCHS=	i386
XMAN1=		dcf77gen.1 dcf77rx.1 hf.1 hfterm.1 hfkernel.1
X
Xpost-configure:
X	@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' \
X	${WRKSRC}/util/Makefile ${WRKSRC}/test/Makefile \
X	${WRKSRC}/hfkernel/Makefile ${WRKSRC}/dcf77/Makefile \
X	${WRKSRC}/scripts/Makefile
X
Xpost-install:
X	${MKDIR} ${DATADIR}
X	${MKDIR} ${DATADIR}/hf-examplefiles
X.for d in ${WRKSRC}/doc/hf-examplefiles/fix.01 \
X	${WRKSRC}/doc/hf-examplefiles/fix.02 \
X	${WRKSRC}/doc/hf-examplefiles/fix.03 \
X	${WRKSRC}/doc/hf-examplefiles/fix.04 \
X	${WRKSRC}/doc/hf-examplefiles/fix.05 \
X	${WRKSRC}/doc/hf-examplefiles/fix.06 \
X	${WRKSRC}/doc/hf-examplefiles/fix.07 \
X	${WRKSRC}/doc/hf-examplefiles/fix.08 \
X	${WRKSRC}/doc/hf-examplefiles/fix.09 \
X	${WRKSRC}/doc/hf-examplefiles/fix.10 \
X	${WRKSRC}/doc/hf-examplefiles/fix.11 \
X	${WRKSRC}/doc/hf-examplefiles/fix.12 \
X	${WRKSRC}/doc/hf-examplefiles/hfterm.brag \
X	${WRKSRC}/doc/hf-examplefiles/gag \
X	${WRKSRC}/doc/hf-examplefiles/littleman.ascii
X	@${INSTALL_DATA} ${WRKDIR}/${d} ${DATADIR}/hf-examplefiles
X.endfor
X
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for d in ${WRKSRC}/doc/AUTHORS ${WRKSRC}/doc/README \
X	${WRKSRC}/doc/index.html ${WRKSRC}/doc/ChangeLog \
X	${WRKSRC}/doc/chan_formulas.ps ${WRKSRC}/doc/lfconv.jpg \
X	${WRKSRC}/doc/DE-HF-HOWTO.txt ${WRKSRC}/doc/chan_formulas.tex \
X	${WRKSRC}/doc/mt63.txt ${WRKSRC}/doc/HF-HOWTO.txt \
X	${WRKSRC}/doc/dcf77.txt ${WRKSRC}/doc/pactor.ps \
X	${WRKSRC}/doc/INSTALL ${WRKSRC}/doc/english.txt \
X	${WRKSRC}/doc/pactor.txt ${WRKSRC}/doc/LIESMICH \
X	${WRKSRC}/doc/pactor_statediag.fig \
X	${WRKSRC}/doc/P-MB-list.txt ${WRKSRC}/doc/hf.spec \
X	${WRKSRC}/doc/su1.priv.txt
X	@${INSTALL_DATA} ${WRKDIR}/${d} ${DOCSDIR}
X.endfor
X	@${ECHO} ""
X	@${ECHO} "hf docs installed in ${DOCSDIR}"
X	@${ECHO} ""
X.endif
X
X.include <bsd.port.mk>
END-of-hf/Makefile
echo x - hf/distinfo
sed 's/^X//' >hf/distinfo << 'END-of-hf/distinfo'
XMD5 (hf-0.7.3.tar.gz) = bb612590b026ae03b72325374b54d946
XSHA256 (hf-0.7.3.tar.gz) = 9e760c1728faa269bf34cc3c560d284fc5696d9bde76ebb0f2510da5d29dd11f
XSIZE (hf-0.7.3.tar.gz) = 776115
END-of-hf/distinfo
echo c - hf/files
mkdir -p hf/files > /dev/null 2>&1
echo x - hf/files/patch-hfkernel_fsk_amtor.c
sed 's/^X//' >hf/files/patch-hfkernel_fsk_amtor.c << 'END-of-hf/files/patch-hfkernel_fsk_amtor.c'
X--- hfkernel/fsk/amtor.c.orig	Sun Jul 30 01:38:53 2006
X+++ hfkernel/fsk/amtor.c	Sun Jul 30 01:39:10 2006
X@@ -32,6 +32,7 @@
X #include <assert.h>
X #include <syslog.h>
X #include <string.h>
X+#include <sys/types.h>
X 
X #include "fskl1.h"
X #include "fskutil.h"
END-of-hf/files/patch-hfkernel_fsk_amtor.c
echo x - hf/files/patch-hfkernel_fsk_rtty.c
sed 's/^X//' >hf/files/patch-hfkernel_fsk_rtty.c << 'END-of-hf/files/patch-hfkernel_fsk_rtty.c'
X--- hfkernel/fsk/rtty.c.orig	Sun Jul 30 01:41:43 2006
X+++ hfkernel/fsk/rtty.c	Sun Jul 30 01:43:29 2006
X@@ -33,6 +33,7 @@
X #include <syslog.h>
X #include <string.h>
X #include <stdio.h>
X+#include <sys/types.h>
X 
X #include "fskl1.h"
X #include "fskutil.h"
END-of-hf/files/patch-hfkernel_fsk_rtty.c
echo x - hf/files/patch-hfkernel_fsk_cw.c
sed 's/^X//' >hf/files/patch-hfkernel_fsk_cw.c << 'END-of-hf/files/patch-hfkernel_fsk_cw.c'
X--- hfkernel/fsk/cw.c.orig	Sun Jul 30 10:49:09 2006
X+++ hfkernel/fsk/cw.c	Sun Jul 30 11:57:13 2006
X@@ -35,7 +35,16 @@
X #include <syslog.h>
X #include <string.h>
X #include <stdio.h>
X+#include <sys/types.h>
X+#ifdef __linux__
X #include <sys/io.h>
X+#define IOPERM ioperm
X+#endif
X+#ifdef __FreeBSD__ 
X+#include <machine/cpufunc.h>
X+#include <machine/sysarch.h>
X+#define IOPERM i386_set_ioperm
X+#endif
X #include <sys/time.h>
X #include <time.h>
X #include <sys/ioctl.h>
X@@ -264,7 +273,7 @@
X 		"CW: No serial port specified for elbug.");
X 	    printf("CW: No serial port specified for elbug.\n");
X 	}
X-	else if ((err = ioperm(port, 8, 1))) {
X+	else if ((err = IOPERM(port, 8, 1))) {
X 	    printf("CW: permission problem for serial port %04x: ioperm = %d\n", 
X 		port, err);
X 	    printf("This program has to be called with root permissions.\n");
END-of-hf/files/patch-hfkernel_fsk_cw.c
echo x - hf/files/patch-hfkernel_fsk_elbug.c
sed 's/^X//' >hf/files/patch-hfkernel_fsk_elbug.c << 'END-of-hf/files/patch-hfkernel_fsk_elbug.c'
X--- hfkernel/fsk/elbug.c.orig	Sun Jul 30 10:55:08 2006
X+++ hfkernel/fsk/elbug.c	Sun Jul 30 12:21:38 2006
X@@ -25,7 +25,16 @@
X  */
X 
X #include <stdio.h>
X+#include <sys/types.h>
X+#ifdef __linux__
X #include <sys/io.h>
X+#define IOPERM ioperm
X+#endif
X+#ifdef __FreeBSD__ 
X+#include <machine/cpufunc.h>
X+#include <machine/sysarch.h>
X+#define IOPERM i386_set_ioperm
X+#endif
X #include <sys/time.h>
X #include <sys/ioctl.h>
X #include <fcntl.h>
X@@ -144,7 +153,7 @@
X 	exit (0);
X 	}
X     }
X-    if ((err = ioperm(port, 8, 1))) {
X+    if ((err = IOPERM(port, 8, 1))) {
X 	printf("permission problem for serial port %04x: ioperm = %d\n", 
X 	    port, err);
X 	printf("This program has to be called with root permissions.\n");
END-of-hf/files/patch-hfkernel_fsk_elbug.c
echo x - hf/files/patch-hfkernel_l1_oss.c
sed 's/^X//' >hf/files/patch-hfkernel_l1_oss.c << 'END-of-hf/files/patch-hfkernel_l1_oss.c'
X--- hfkernel/l1/oss.c.orig	Sun Jul 30 10:58:19 2006
X+++ hfkernel/l1/oss.c	Sun Jul 30 10:59:19 2006
X@@ -30,7 +30,6 @@
X #include "config.h"
X #endif
X 
X-#include <asm/byteorder.h>
X #include <sys/soundcard.h>
X #include <sys/types.h>
X #include <sys/socket.h>
X@@ -44,7 +43,6 @@
X #include <sys/ioctl.h>
X #include <sys/time.h>
X #include <signal.h>
X-#include <endian.h>
X #include <pthread.h>
X #include <syslog.h>
X 
END-of-hf/files/patch-hfkernel_l1_oss.c
echo x - hf/files/patch-hfkernel_mt63_sound.cc
sed 's/^X//' >hf/files/patch-hfkernel_mt63_sound.cc << 'END-of-hf/files/patch-hfkernel_mt63_sound.cc'
X--- hfkernel/mt63/sound.cc.orig	Sun Jul 30 11:01:27 2006
X+++ hfkernel/mt63/sound.cc	Sun Jul 30 11:41:22 2006
X@@ -30,6 +30,11 @@
X #include <sys/soundcard.h>
X #include <sys/ioctl.h>
X #endif
X+#ifdef __FreeBSD__ 
X+#include <unistd.h>
X+#include <sys/soundcard.h>
X+#include <sys/ioctl.h>
X+#endif
X #include <sys/stat.h>
X #include <fcntl.h>
X #include <errno.h>
END-of-hf/files/patch-hfkernel_mt63_sound.cc
echo x - hf/files/patch-hfkernel_mt63_mt63hf.cc
sed 's/^X//' >hf/files/patch-hfkernel_mt63_mt63hf.cc << 'END-of-hf/files/patch-hfkernel_mt63_mt63hf.cc'
X--- hfkernel/mt63/mt63hf.cc.orig	Sun Jul 30 11:43:28 2006
X+++ hfkernel/mt63/mt63hf.cc	Sun Jul 30 11:44:07 2006
X@@ -35,6 +35,10 @@
X #include <errno.h>
X #include <ctype.h>
X 
X+#ifdef __FreeBSD__ 
X+#include <unistd.h>
X+#endif
X+
X #include "dsp.h"
X #include "mt63.h"
X #include "sound.h"
END-of-hf/files/patch-hfkernel_mt63_mt63hf.cc
echo x - hf/files/patch-hfkernel_mt63_mt63rx.cc
sed 's/^X//' >hf/files/patch-hfkernel_mt63_mt63rx.cc << 'END-of-hf/files/patch-hfkernel_mt63_mt63rx.cc'
X--- hfkernel/mt63/mt63rx.cc.orig	Sun Jul 30 11:45:23 2006
X+++ hfkernel/mt63/mt63rx.cc	Sun Jul 30 11:45:46 2006
X@@ -31,6 +31,9 @@
X #include <fcntl.h>
X #include <errno.h>
X #include <ctype.h>
X+#ifdef __FreeBSD__ 
X+#include <unistd.h>
X+#endif
X 
X #include "dsp.h"
X #include "mt63.h"
END-of-hf/files/patch-hfkernel_mt63_mt63rx.cc
echo x - hf/files/patch-hfkernel_mt63_mt63tx.cc
sed 's/^X//' >hf/files/patch-hfkernel_mt63_mt63tx.cc << 'END-of-hf/files/patch-hfkernel_mt63_mt63tx.cc'
X--- hfkernel/mt63/mt63tx.cc.orig	Sun Jul 30 11:47:07 2006
X+++ hfkernel/mt63/mt63tx.cc	Sun Jul 30 11:47:26 2006
X@@ -31,6 +31,9 @@
X #include <fcntl.h>
X #include <errno.h>
X #include <ctype.h>
X+#ifdef __FreeBSD__ 
X+#include <unistd.h>
X+#endif
X 
X #include "dsp.h"
X #include "mt63.h"
END-of-hf/files/patch-hfkernel_mt63_mt63tx.cc
echo x - hf/files/patch-hfkernel_mt63_ratecal1.cc
sed 's/^X//' >hf/files/patch-hfkernel_mt63_ratecal1.cc << 'END-of-hf/files/patch-hfkernel_mt63_ratecal1.cc'
X--- hfkernel/mt63/ratecal1.cc.orig	Sun Jul 30 11:48:34 2006
X+++ hfkernel/mt63/ratecal1.cc	Sun Jul 30 11:48:59 2006
X@@ -89,6 +89,9 @@
X #ifdef __linux__
X #include <unistd.h> // for usleep()
X #endif
X+#ifdef __FreeBSD__ 
X+#include <unistd.h>
X+#endif
X 
X // #ifdef __MSDOS__
X // #include <dos.h> // for delay()
END-of-hf/files/patch-hfkernel_mt63_ratecal1.cc
echo x - hf/files/patch-hfkernel_main.c
sed 's/^X//' >hf/files/patch-hfkernel_main.c << 'END-of-hf/files/patch-hfkernel_main.c'
X--- hfkernel/main.c.orig	Sun Jul 30 11:51:24 2006
X+++ hfkernel/main.c	Sun Jul 30 11:53:03 2006
X@@ -42,13 +42,20 @@
X #include <signal.h>
X #include <syslog.h>
X #include <sys/types.h>
X+#ifdef __linux__
X #include <asm/byteorder.h>
X+#endif
X #include <sys/soundcard.h>
X #include <sys/socket.h>
X #include <fcntl.h>
X #include <sys/ioctl.h>
X #include <sys/time.h>
X+#ifdef __linux__
X #include <endian.h>
X+#endif
X+#ifdef __FreeBSD__ 
X+#include <sys/endian.h>
X+#endif
X #include <assert.h>
X 
X #ifdef DISABLE_REALTIME
END-of-hf/files/patch-hfkernel_main.c
echo x - hf/files/patch-dcf77_audioin.c
sed 's/^X//' >hf/files/patch-dcf77_audioin.c << 'END-of-hf/files/patch-dcf77_audioin.c'
X--- dcf77/audioin.c.orig	Sun Jul 30 12:00:54 2006
X+++ dcf77/audioin.c	Sun Jul 30 12:05:07 2006
X@@ -45,6 +45,9 @@
X #include <stropts.h>
X #endif
X #ifdef HAVE_SYS_CONF_H
X+#ifdef __FreeBSD__
X+#include <sys/param.h>
X+#endif
X #include <sys/conf.h>
X #endif
X 
X@@ -52,7 +55,12 @@
X #include <sys/mman.h>
X #include <sched.h>
X #include <sys/soundcard.h>
X+#ifdef __linux__
X #include <endian.h>
X+#endif
X+#ifdef __FreeBSD__ 
X+#include <sys/endian.h>
X+#endif
X #endif
X 
X #include "dcf77.h"
END-of-hf/files/patch-dcf77_audioin.c
echo x - hf/files/patch-dcf77_audioout.c
sed 's/^X//' >hf/files/patch-dcf77_audioout.c << 'END-of-hf/files/patch-dcf77_audioout.c'
X--- dcf77/audioout.c.orig	Sun Jul 30 12:05:54 2006
X+++ dcf77/audioout.c	Sun Jul 30 12:06:52 2006
X@@ -44,6 +44,9 @@
X #include <stropts.h>
X #endif
X #ifdef HAVE_SYS_CONF_H
X+#ifdef __FreeBSD__
X+#include <sys/param.h>
X+#endif
X #include <sys/conf.h>
X #endif
X 
X@@ -51,7 +54,12 @@
X #include <sys/mman.h>
X #include <sched.h>
X #include <sys/soundcard.h>
X+#ifdef __linux__
X #include <endian.h>
X+#endif
X+#ifdef __FreeBSD__
X+#include <sys/endian.h>
X+#endif
X #endif
X 
X #include "dcf77.h"
END-of-hf/files/patch-dcf77_audioout.c
echo x - hf/files/patch-dcf77_timedec.c
sed 's/^X//' >hf/files/patch-dcf77_timedec.c << 'END-of-hf/files/patch-dcf77_timedec.c'
X--- dcf77/timedec.c.orig	Sun Jul 30 12:07:54 2006
X+++ dcf77/timedec.c	Sun Jul 30 12:10:01 2006
X@@ -136,7 +136,12 @@
X 		vlprintf(1, "mktime failed\n");
X 		goto error;
X 	}
X+/* XXX FreeBSD takes care of timezone internally, I don't know about others. 
X+ * -db (VA3DB)
X+ */
X+#ifdef __linux__
X 	t -= timezone;
X+#endif
X /*	t -= tz == ZONE_MESZ ? 7200 : 3600; */
X /* bug? isn't summer time later than winter time ? */
X 	t -= tz == ZONE_MESZ ? 3600 : 7200 ; 
END-of-hf/files/patch-dcf77_timedec.c
echo x - hf/files/patch-util_channel.c
sed 's/^X//' >hf/files/patch-util_channel.c << 'END-of-hf/files/patch-util_channel.c'
X--- util/channel.c.orig	Sun Jul 30 12:11:34 2006
X+++ util/channel.c	Sun Jul 30 12:12:23 2006
X@@ -68,7 +68,12 @@
X #ifdef HAVE_SYS_SOUNDCARD_H
X #include <sys/soundcard.h>
X #include <sys/ioctl.h>
X+#ifdef __linux__
X #include <endian.h>
X+#endif
X+#ifdef __FreeBSD__
X+#include <sys/endian.h>
X+#endif
X #endif
X 
X #ifdef DISABLE_REALTIME
END-of-hf/files/patch-util_channel.c
echo x - hf/files/patch-util_reffreq.c
sed 's/^X//' >hf/files/patch-util_reffreq.c << 'END-of-hf/files/patch-util_reffreq.c'
X--- util/reffreq.c.orig	Wed Jan 26 10:03:20 2005
X+++ util/reffreq.c	Sun Jul 30 14:45:10 2006
X@@ -50,7 +50,10 @@
X #include <asm/page.h>
X #include <endian.h>
X #endif
X-
X+#ifdef __FreeBSD__
X+#include <sys/soundcard.h>
X+#include <sys/endian.h>
X+#endif
X #if TIME_WITH_SYS_TIME
X # include <sys/time.h>
X # include <time.h>
X@@ -108,7 +111,12 @@
X {
X         static char head[256],  foot[256];
X 	char factors[512];
X+#ifdef __linux__
X 	const char *configfilename =  "/etc/hf.conf";
X+#endif
X+#ifdef __FreeBSD__
X+	const char *configfilename =  "/usr/local/etc/hf.conf";
X+#endif
X 	FILE *configfile = NULL;
X 	static int prepared = 0;
X 
END-of-hf/files/patch-util_reffreq.c
echo x - hf/files/patch-dcf77_calccorr.c
sed 's/^X//' >hf/files/patch-dcf77_calccorr.c << 'END-of-hf/files/patch-dcf77_calccorr.c'
X--- dcf77/calccorr.c.orig	Sun Jul 30 15:17:56 2006
X+++ dcf77/calccorr.c	Sun Jul 30 15:18:39 2006
X@@ -197,7 +197,12 @@
X {
X         static char head[256],  foot[256];
X 	char factors[512];
X+#ifdef __linux__
X 	const char *configfilename =  "/etc/hf.conf";
X+#endif
X+#ifdef __FreeBSD__
X+	const char *configfilename =  "/usr/local/etc/hf.conf";
X+#endif
X 	FILE *configfile = NULL;
X 	static int prepared = 0;
X 
END-of-hf/files/patch-dcf77_calccorr.c
echo x - hf/files/patch-scripts_Makefile.in
sed 's/^X//' >hf/files/patch-scripts_Makefile.in << 'END-of-hf/files/patch-scripts_Makefile.in'
X--- scripts/Makefile.in.orig	Sun Mar 27 13:18:15 2005
X+++ scripts/Makefile.in	Sun Jul 30 23:14:54 2006
X@@ -157,7 +157,7 @@
X target_cpu = @target_cpu@
X target_os = @target_os@
X target_vendor = @target_vendor@
X-configdir = /etc
X+configdir = /usr/local/etc
X scripts = hf hftcp ratetry 
X configfiles = hf.conf
X EXTRA_DIST = $(configfiles) $(scripts) testtest htmlup
X@@ -314,7 +314,7 @@
X install:
X 	$(mkinstalldirs) $(DESTDIR)$(configdir)
X 
X-	$(INSTALL_DATA) $(configfiles) $(DESTDIR)$(configdir)
X+	$(INSTALL_DATA) $(configfiles) $(DESTDIR)$(configdir)/hf.conf.samp
X 	$(mkinstalldirs) $(DESTDIR)$(bindir)
X 	$(INSTALL) $(scripts) $(DESTDIR)$(bindir)
X # Tell versions [3.59,3.63) of GNU make to not export all variables.
END-of-hf/files/patch-scripts_Makefile.in
echo x - hf/files/patch-Makefile.in
sed 's/^X//' >hf/files/patch-Makefile.in << 'END-of-hf/files/patch-Makefile.in'
X--- Makefile.in.orig	Sun Mar 27 13:18:22 2005
X+++ Makefile.in	Mon Jul 31 08:03:43 2006
X@@ -182,7 +182,7 @@
X target_cpu = @target_cpu@
X target_os = @target_os@
X target_vendor = @target_vendor@
X-SUBDIRS = scripts hfkernel hfterm dcf77 doc test util
X+SUBDIRS = scripts hfkernel hfterm dcf77 doc/man test util
X EXTRA_DIST = depcomp
X all: config.h
X 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
END-of-hf/files/patch-Makefile.in
echo x - hf/files/patch-scripts_hf
sed 's/^X//' >hf/files/patch-scripts_hf << 'END-of-hf/files/patch-scripts_hf'
X--- scripts/hf.orig	Sat Mar 26 19:11:18 2005
X+++ scripts/hf	Mon Jul 31 15:48:32 2006
X@@ -1,7 +1,7 @@
X-#!/bin/bash
X+#!/bin/sh
X #
X #
X-#	***	***	     /usr/bin/hf  		***	***
X+#	***	***	     /usr/local/bin/hf 		***	***
X #	***					 		***
X #	***	    	 Main Start Script for 	 		***
X #	***	          /usr/bin/hfkernel	     		***
X@@ -12,7 +12,7 @@
X #
X #
X #
X-# There is a system-wide config file: /etc/hf.conf
X+# There is a system-wide config file: /usr/local/etc/hf.conf
X # I will prepare the same defaults here and there, 
X # they will work in most cases.
X # This script will include the config file,
X@@ -22,7 +22,7 @@
X # file which should have root access only be in /usr/bin.)
X 
X ## There is a lot of documentation in English and German!
X-## See comments in /etc/hf.conf, 
X+## See comments in /usr/local/etc/hf.conf, 
X ## See the HF-HOWTO in the doc subdirectory of hf package,
X ## See F1 in the hfterm window!
X ## To configure /etc/hf.conf just remove the single comment signs 
X@@ -40,11 +40,7 @@
X 
X ## prepare "TELL" as a dialog-like function or just echo, #####################
X ## depends on X or console ####################################################
X-if which dialog > /dev/null; then
X-  DIALOG=dialog
X-else
X-  if which whiptail > /dev/null; then
X-    function whiptail_wrapper() {
X+whiptail_wrapper() {
X       X1="$1"
X       X2="$2"
X       if [ $1 = --yesno ]; then
X@@ -54,7 +50,12 @@
X       fi
X       shift 3
X       whiptail "$X1" "$X2" $X3 "$@"
X-    }
X+}
X+
X+if which dialog > /dev/null; then
X+  DIALOG=dialog
X+else
X+  if which whiptail > /dev/null; then
X     DIALOG=whiptail_wrapper
X   else
X     echo "Sorry, dialog or whiptail not found."
X@@ -62,7 +63,7 @@
X     fi
X fi
X 
X-function tell {
X+tell() {
X if  [ !  $DISPLAY  ] ; then
X     if [ ! -z "$DIALOG" ]; then
X         dialog \
X@@ -84,15 +85,15 @@
X rc_failed="\033[71G\033[31m\033[1mfailed\033[m"
X 
X ## Prepare greeting message: ##################################################
X-function greeting {
X+greeting() {
X tell "
X Hello, $startuser, I am $0,
X the main start script for hfkernel and hfterm,
X a ham radio CW-RTTY-AMTOR-GTOR-PACTOR-MT63
X program system with TCP and F6FBB interface.
X-My main configuration file is /etc/hf.conf.
X+My main configuration file is /usr/local/etc/hf.conf.
X Short help is: man hfkernel, man hfterm, man hf.
X-More  help in: /usr/share/<doc>/<packages/>hf/HF-HOWTO
X+More  help in: /usr/local/share/doc/hf/HF-HOWTO
X or in the graphic 'hfterm' by F1.
X The homepage of hf is http://hfterm.sf.net.
X You are welcome to subscribe our mailing list:
X@@ -110,13 +111,11 @@
X timecorr=1  
X soundcorr=1
X kerneloptions=
X-config_file=/etc/hf.conf
X-proc_mhzcorr=`cat /proc/cpuinfo | grep MHz | cut -c 11- | head -n 1`
X-# the head is for the case you have 2 processors, like me, .... ..  !!!
X+config_file=/usr/local/etc/hf.conf
X 
X ## if not yet there, make a directory for the program's files ################
X ## and fill it with examples, e.g. text macos for cq asnd so on ##############
X-function makepersonaldir {
X+makepersonaldir() {
X cd $HOME
X     if [ ! -d hf ] ; then 
X     	tell "
X@@ -142,7 +141,7 @@
X with examples, e.g. text macros...
X 	    
X 	    "
X-	    cp -ruv /usr/share/hf/hf-examplefiles/* ./hf 
X+	    cp -v /usr/local/share/hf/hf-examplefiles/* ./hf 
X 	    if [ $? -eq 0 ]; then
X 	    tell "
X 
X@@ -154,7 +153,7 @@
X 	    
X could not copy examplefiles.
X Please check if 
X-/usr/share/hf/hf-examplefiles/... is there.
X+/usr/local/share/hf/hf-examplefiles/... is there.
X 
X 	    "
X 	    fi
X@@ -163,12 +162,12 @@
X };
X 
X ## Start hfkernel function: ###################################################
X-function startkernel {
X+startkernel() {
X tell "
X I will run now:
X $background_display 
X $alsa_prefix 
X-/usr/bin/hfkernel 
X+/usr/local/bin/hfkernel 
X     -a $audio
X     -p $serial 
X     -m $mhz -t $timecorr -s $soundcorr 
X@@ -178,7 +177,7 @@
X For any errors, see /usr/share/hf/HF-HOWTO !
X You can stop the hfkernel with <Strg> c.
X "
X-$background_display $alsa_prefix /usr/bin/hfkernel \
X+$background_display $alsa_prefix /usr/local/bin/hfkernel \
X -a $audio -p $serial \
X -m $mhz -t $timecorr -s $soundcorr \
X $kerneloptions 
X@@ -203,7 +202,7 @@
X Sorry, the hf script is not prepared to accept options.
X 
X To configure the package, 
X-please just edit /etc/hf.conf.
X+please just edit /usr/local/etc/hf.conf.
X 
X 
X "
X@@ -215,7 +214,6 @@
X     . $config_file 
X 
X tell "
X-/proc/cpuinfo thinks your cpu runs with $proc_mhzcorr Mhz.
X 
X OPTIONS from main configuration file	$config_file: 
X Serial ptt:                     $serial 
X@@ -258,7 +256,7 @@
X 
X Maybe you can stop that process,
X or you will have to select another serial port
X-in /etc/hf.conf.
X+in /usr/local/etc/hf.conf.
X "
X     exit 1
X     fi
X@@ -282,10 +280,10 @@
X so that non-root users can run it.
X But be aware that this can be a security hole.
X I will do this now by :
X-\"chmod 4755 /usr/bin/hfkernel\".
X+\"chmod 4755 /usr/local/bin/hfkernel\".
X 
X "
X-	    chmod 4755 /usr/bin/hfkernel &> /dev/null
X+	    chmod 4755 /usr/local/bin/hfkernel &> /dev/null
X 	else
X # if not root
X 	    tell "
X@@ -294,7 +292,7 @@
X so that normal users can run it.
X Be aware that this can be a security hole.
X Please do as root
X-\"chmod 4755 /usr/bin/hfkernel\".
X+\"chmod 4755 /usr/bin/local/hfkernel\".
X or start this script again as root.
X "
X 	    exit 1
X@@ -310,7 +308,7 @@
X If it works o.k., and you want to run 
X the whole program (including graphic terminal),
X become normal user, start X, 
X-and start the whole program with /usr/bin/hf.
X+and start the whole program with /usr/local/bin/hf.
X 
X "
X     startkernel 
X@@ -329,7 +327,7 @@
X If it works o.k., and you want to run 
X the whole program (including graphic terminal),
X start X, 
X-and start the whole program with /usr/bin/hf.
X+and start the whole program with /usr/local/bin/hf.
X 
X "
X     startkernel 
X@@ -345,7 +343,7 @@
X     startkernel &
X     sleep 1
X # see if hfterm is running    
X-    hfterm=`pidof hfterm`
X+    hfterm=`pgrep hfterm`
X     if [ $hfterm ] ; then
X 	tell "hfterm is running already under X. I restart it."
X 	kill $hfterm
X@@ -356,11 +354,11 @@
X Sorry, I still have some problems with UTF-8...
X I will remember your LANGUAGE
X and set LANG to de_DE.ISO-8859-1 for a while...
X-Then I will start /usr/bin/hfterm.
X+Then I will start /usr/local/bin/hfterm.
X "
X OLDLANG=$LANG
X LANG=de_DE.ISO-8859-1    
X-/usr/bin/hfterm
X+/usr/local/bin/hfterm
X fi
X 
X ## Cleanup ####################################################################
X@@ -370,7 +368,7 @@
X LANG=$OLDLANG
X echo "reset LANG to $LANG"
X 
X-hfkernel=`pidof hfkernel`
X+hfkernel=`pgrep hfkernel`
X if [ $hfkernel ] ; then
X     echo -e "hf: sending the kill signal to hfkernel ... " 
X     hfkernel -k
END-of-hf/files/patch-scripts_hf
echo x - hf/files/patch-hfterm_src_main.c
sed 's/^X//' >hf/files/patch-hfterm_src_main.c << 'END-of-hf/files/patch-hfterm_src_main.c'
X--- hfterm/src/main.c.orig	Mon Jul 31 15:52:06 2006
X+++ hfterm/src/main.c	Mon Jul 31 15:52:49 2006
X@@ -533,7 +533,12 @@
X 	struct hfapp_msg msg;
X 
X 	system("cd");
X+#ifdef __linux__
X 	system("if ! [ -d hf ] ; then mkdir hf; cp -ruv /usr/share/hf/hf-examplefiles/* hf; fi");
X+#endif
X+#ifdef __FreeBSD__
X+	system("if ! [ -d hf ] ; then mkdir hf; cp -v /usr/local/share/hf/hf-examplefiles/* hf; fi");
X+#endif
X 	sprintf(versioninfo,  "hfterm %s by Tom Sailer, Axel Krause, "
X 	    "Günther Montag, Pawel Jalocha et al. ", VERSION);
X 	display_status(versioninfo);
END-of-hf/files/patch-hfterm_src_main.c
echo x - hf/files/patch-scripts_testtest
sed 's/^X//' >hf/files/patch-scripts_testtest << 'END-of-hf/files/patch-scripts_testtest'
X--- scripts/testtest.orig	Mon Jul 31 00:29:38 2006
X+++ scripts/testtest	Mon Jul 31 00:29:01 2006
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!/usr/local/bin/bash
X # test for test and grep and tail ....
X grepstring=`ps -a | grep hfkernel  | grep -v grep | tail -n 1 | tail -c -9`
X echo grepstring = $grepstring
END-of-hf/files/patch-scripts_testtest
echo x - hf/files/patch-doc_man_de_Makefile.in
sed 's/^X//' >hf/files/patch-doc_man_de_Makefile.in << 'END-of-hf/files/patch-doc_man_de_Makefile.in'
X--- doc/man/de/Makefile.in.orig	Mon Jul 31 08:09:35 2006
X+++ doc/man/de/Makefile.in	Mon Jul 31 08:10:20 2006
X@@ -147,7 +147,7 @@
X libdir = @libdir@
X libexecdir = @libexecdir@
X localstatedir = @localstatedir@
X-mandir = @mandir@/de
X+mandir = @mandir@/de.ISO8859-1
X mkdir_p = @mkdir_p@
X oldincludedir = @oldincludedir@
X prefix = @prefix@
END-of-hf/files/patch-doc_man_de_Makefile.in
echo x - hf/files/patch-doc_man_hf.1
sed 's/^X//' >hf/files/patch-doc_man_hf.1 << 'END-of-hf/files/patch-doc_man_hf.1'
X--- doc/man/hf.1.orig	Mon Jul 31 14:09:59 2006
X+++ doc/man/hf.1	Mon Jul 31 14:12:42 2006
X@@ -6,11 +6,11 @@
X .SH "SYNOPSIS"
X .B hf
X is invoked just like this, without any options, because all configuration is done
X-in the file /etc/hf.conf.
X+in the file /usr/local/etc/hf.conf.
X .SH "CONTENTS AND DESCRIPTION OF THE PACKAGE"
X .B hf
X is the startscript and also the name of the program package.
X-.B /etc/hf.conf
X+.B /usr/local/etc/hf.conf
X is the configuration file for the startscript.
X .B hfkernel 
X is the 'kernel' of the program,  which modulates and demodulates Pactor 1,
X@@ -45,13 +45,13 @@
X Tnx to Pawel Jalocha, who is also author of MT63, who made this wonderful tool.
X There are various other test programs.
X .B HF-HOWTO 
X-is the main documentation, found in /usr/share/doc/<packages/>hf
X+is the main documentation, found in /usr/local/share/doc/hf
X or in the doc directory of the hf package.
X .SH "INSTALL AND FIRST START"
X Just 'tar -zxvf' the tar.gz package, then run './configure', 'make'
X and (as root) 'make install'. Or 'rpm -i' the rpm package.
X hfkernel will be installed "suid root" (by 'chmod 4755 /usr/bin/hfkernel').
X-Run '/usr/bin/hf', for first test from a console as root, then as non-root user.
X+Run '/usr/local/bin/hf', for first test from a console as root, then as non-root user.
X At the start of hfkernel a row of numbers runs down the console or xterm:
X corrout ... intermediate ...
X Then start hf as non-root user under X. It will now also start hfterm.
X@@ -72,10 +72,10 @@
X .B DE-HF-HOWTO 
X (German)
X and some other interesting texts, the German 'pactor.txt' in 
X-/usr/share/doc/<packages/>hf
X+/usr/local/share/doc/hf
X and in the doc directory of the source tree of the hf-package.
X Short comments are also contained in the configuration file 
X-/etc/hf.conf.
X+/usr/local/etc/hf.conf.
X .SH "AUTHORS"
X hfkernel & first version of hfterm by:
X .B Thomas M. Sailer, 
X@@ -95,4 +95,4 @@
X and mail to 
X .B hfterm-hackers@lists.sourceforge.net
X and
X-.SH ".... have a lot of fun !!!"
X\ No newline at end of file
X+.SH ".... have a lot of fun !!!"
END-of-hf/files/patch-doc_man_hf.1
echo x - hf/files/patch-hfterm_src_helpgui.c
sed 's/^X//' >hf/files/patch-hfterm_src_helpgui.c << 'END-of-hf/files/patch-hfterm_src_helpgui.c'
X--- hfterm/src/helpgui.c.orig	Mon Jul 31 15:51:44 2006
X+++ hfterm/src/helpgui.c	Mon Jul 31 15:55:24 2006
X@@ -426,7 +426,12 @@
X   gtk_container_add (GTK_CONTAINER (scrw_help_4), text_help_4);
X   gtk_tooltips_set_tip (tooltips, text_help_4, _("Left Side English \nRight Side German"), NULL);
X   gtk_text_set_editable (GTK_TEXT (text_help_4), FALSE);
X+#ifdef __linux__
X   textinsert("/usr/share/hf/HF-HOWTO.txt", GTK_TEXT(text_help_4));
X+#endif
X+#ifdef __FreeBSD
X+  textinsert("/usr/local/share/hf/HF-HOWTO.txt", GTK_TEXT(text_help_4));
X+#endif
X 
X   label_help_4 = gtk_label_new (_("HF-HOWTO"));
X   gtk_widget_set_name (label_help_4, "label_help_4");
X@@ -509,8 +514,12 @@
X   gtk_container_add (GTK_CONTAINER (scrw_help_6), text_help_6);
X   gtk_tooltips_set_tip (tooltips, text_help_6, _("Left Side English \nRight Side German"), NULL);
X   gtk_text_set_editable (GTK_TEXT (text_help_6), FALSE);
X+#ifdef __linux__
X   textinsert("/usr/share/hf/DE-HF-HOWTO.txt", GTK_TEXT(text_help_6));
X-
X+#endif
X+#ifdef __FreeBSD__
X+  textinsert("/usr/local/share/hf/DE-HF-HOWTO.txt", GTK_TEXT(text_help_6));
X+#endif
X   label_help_6 = gtk_label_new (_("DE-HF-HOWTO"));
X   gtk_widget_set_name (label_help_6, "label_help_6");
X   gtk_widget_ref (label_help_6);
X@@ -589,8 +598,12 @@
X   gtk_container_add (GTK_CONTAINER (scrw_help_8), text_help_8);
X   gtk_tooltips_set_tip (tooltips, text_help_8, _("This mailbox list is provided monthly, \nyou can subscribe it via e-mail or packet.\n"), NULL);
X   gtk_text_set_editable (GTK_TEXT (text_help_8), FALSE);
X+#ifdef __linux__
X   textinsert("/usr/share/hf/P-MB-list.txt", GTK_TEXT(text_help_8));
X-
X+#endif
X+#ifdef __FreeBSD__
X+  textinsert("/usr/local/share/hf/P-MB-list.txt", GTK_TEXT(text_help_8));
X+#endif
X   label_help_8 = gtk_label_new (_("Pactor Mailbox List"));
X   gtk_widget_set_name (label_help_8, "label_help_8");
X   gtk_widget_ref (label_help_8);
X@@ -629,8 +642,12 @@
X   gtk_container_add (GTK_CONTAINER (scrw_help_9), text_help_9);
X   gtk_tooltips_set_tip (tooltips, text_help_9, _("Left Side English \nRight German"), NULL);
X   gtk_text_set_editable (GTK_TEXT (text_help_9), FALSE);
X+#ifdef __linux__
X   textinsert("/usr/share/hf/pactor.txt", GTK_TEXT(text_help_9));
X-
X+#endif
X+#ifdef __FreeBSD__
X+  textinsert("/usr/local/share/hf/pactor.txt", GTK_TEXT(text_help_9));
X+#endif
X   label_help_9 = gtk_label_new (_("PACTOR spec"));
X   gtk_widget_set_name (label_help_9, "label_help_9");
X   gtk_widget_ref (label_help_9);
END-of-hf/files/patch-hfterm_src_helpgui.c
echo x - hf/files/patch-hfkernel_mt63_mt63hflink.c
sed 's/^X//' >hf/files/patch-hfkernel_mt63_mt63hflink.c << 'END-of-hf/files/patch-hfkernel_mt63_mt63hflink.c'
X--- hfkernel/mt63/mt63hflink.c.orig	Sat Aug  5 15:52:34 2006
X+++ hfkernel/mt63/mt63hflink.c	Sat Aug  5 21:17:42 2006
X@@ -112,7 +112,7 @@
X 	    % MT63RXBUFLEN );
X 	*/
X 	if (pthread_mutex_unlock(&mt63_inputmut))
X-	    errstr(SEV_FATAL, "pthread_mutex_unlock");
X+	    errstr(SEV_FATAL, "pthread_mutex_unlock l1_mt63_input_samples");
X }
X 
X /* --------------------------------------------------------------------- */
X@@ -150,18 +150,18 @@
X 		//printf("%do ",i);
X 		mytime += (tinc * nsamples); // nsamples fragments encoded
X 		if (pthread_mutex_unlock(&mt63_outputmut))
X-		    errstr(SEV_FATAL, "pthread_mutex_unlock");
X+		    errstr(SEV_FATAL, "pthread_mutex_unlock l1_mt63_output_samples 1");
X 		return 1;
X 	    } else {
X 		if (pthread_mutex_unlock(&mt63_outputmut))
X-		    errstr(SEV_FATAL, "pthread_mutex_unlock");
X+		    errstr(SEV_FATAL, "pthread_mutex_unlock l1_mt63_output_samples 2");
X 		return 0;
X 	    }
X 	} 
X 	// if it is not yet the time to send sting new
X 	printf("mt63 output samples came too early.\n");
X 	if (pthread_mutex_unlock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_unlock");
X+		errstr(SEV_FATAL, "pthread_mutex_unlock l1_mt63_output_samples 3");
X 	return 0;
X }
X 
X@@ -170,7 +170,7 @@
X static void mt63_inputcleanup(void *dummy)
X {
X 	if (pthread_mutex_unlock(&mt63_inputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_unlock");
X+		errstr(SEV_FATAL, "pthread_mutex_unlock mt63_inputcleanup");
X 	modefamily = 0;
X }
X 
X@@ -179,21 +179,21 @@
X void l1_mt63_wait_input_request(void)
X {
X 	if (pthread_mutex_lock(&mt63_inputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_lock");
X+		errstr(SEV_FATAL, "pthread_mutex_lock 1");
X 
X 	pthread_cleanup_push(mt63_inputcleanup, NULL);
X 
X 	if (pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL))
X 		errstr(SEV_FATAL, "pthread_setcancelstate");
X 	if (pthread_cond_wait(&mt63_inputcond, &mt63_inputmut))
X-		errstr(SEV_FATAL, "pthread_cond_wait");
X+		errstr(SEV_FATAL, "pthread_cond_wait l1_mt63_wait_input_request");
X 
X 	pthread_cleanup_pop(0);
X 
X 	if (pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL))
X 		errstr(SEV_FATAL, "pthread_setcancelstate");
X 	if (pthread_mutex_unlock(&mt63_inputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_unlock");
X+		errstr(SEV_FATAL, "pthread_mutex_unlock l1_mt63_wait_input_request 2");
X 	return;
X }
X 
X@@ -211,8 +211,8 @@
X 
X 	mt63_finish_tx();
X 	//printf("mt63 tx finished ...\n");
X-	if (pthread_mutex_unlock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_unlock");
X+//	if (pthread_mutex_unlock(&mt63_outputmut))
X+//		errstr(SEV_FATAL, "pthread_mutex_unlock mt63_outputcleanup");
X 	printf("mt63 outputmutex unlocked...\n");
X 	modefamily = 0;
X 
X@@ -241,17 +241,17 @@
X void l1_mt63_wait_output_request(void)
X {
X 	if (pthread_mutex_lock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_lock");
X+		errstr(SEV_FATAL, "pthread_mutex_lock l1_mt63_wait_output_request 1");
X 	pthread_cleanup_push(mt63_outputcleanup, NULL);
X 	if (pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL))
X 		errstr(SEV_FATAL, "pthread_setcancelstate");
X 	if (pthread_cond_wait(&mt63_outputcond, &mt63_outputmut))
X-		errstr(SEV_FATAL, "pthread_cond_wait");
X+		errstr(SEV_FATAL, "pthread_cond_wait l1_mt63_wait_output_request");
X 	pthread_cleanup_pop(0);
X 	if (pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL))
X 		errstr(SEV_FATAL, "pthread_setcancelstate");
X 	if (pthread_mutex_unlock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "pthread_mutex_unlock");
X+		errstr(SEV_FATAL, "pthread_mutex_unlock l1_mt63_wait_output_request 2");
X 	return;
X }
X 
X@@ -394,10 +394,10 @@
X 	 * this long hangover because otherwise receiver's squelch will
X 	 * cut off tail of the data !
X 	 */
X+	if (pthread_cond_wait(&mt63_outputcond, &mt63_outputmut))
X+		errstr(SEV_FATAL, "pthread_cond_wait mt63_finish_tx");
X 	for(i=0; i< tx_hangover; i++) { 
X 	    //l1_mt63_wait_output_request(); this causes hang while cleanup!!
X-	    if (pthread_cond_wait(&mt63_outputcond, &mt63_outputmut))
X-		errstr(SEV_FATAL, "pthread_cond_wait");
X 	    bufprintf(HFAPP_MSG_DATA_MONITOR, 
X 		//"%02d ", (int)((txchar >> 1) & 0x1f));
X 		".");
X@@ -410,9 +410,9 @@
X 		    mt63txbuf_written -= MT63TXBUFLEN;
X 	    }
X 	    //printf("written %d rest-samples from encodebuf to outbuf...\n", j);
X-	    if (pthread_mutex_unlock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	}
X+	if (pthread_mutex_unlock(&mt63_outputmut))
X+		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	printf("o.k., flushed encodebuf, %d cycles...\n", i);
X 	
X 	errprintf(SEV_INFO, "mt63 tx: Sending jamming waveform ...\n");
X@@ -420,10 +420,12 @@
X 	bufprintf(HFAPP_MSG_DATA_STATUS, 
X 	    "MT63 TX: Sending jamming waveform ...");
X */
X+//	if (pthread_mutex_lock(&mt63_outputmut))
X+//		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_lock");
X 	for ( i = 0; i < 20; i++) { 
X-	    l1_mt63_wait_output_request();
X-	    if (pthread_mutex_lock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_lock");
X+	    l1_mt63_wait_output_request(); /* locks and unlocks mt63_outputmut*/
X+//	    if (pthread_mutex_unlock(&mt63_outputmut)) 
X+//		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	    memset(encodebuf, 0, sizeof(encodebuf));
X 	    mt63_tx_send_jam();
X 	    for(j = 0; j < encodelen; j++) {
X@@ -432,8 +434,6 @@
X 		if (mt63txbuf_written >= MT63TXBUFLEN)
X 		    mt63txbuf_written -= MT63TXBUFLEN;
X 	    }
X-	    if (pthread_mutex_unlock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	}
X 	printf("sent %d cycles of jam ...\n", i);
X } 
X@@ -488,10 +488,10 @@
X 	if (pthread_mutex_unlock(&mt63_outputmut))
X 	    errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	//for(j = 0; j < 24; j++) {   
X+//	if (pthread_mutex_lock(&mt63_outputmut))
X+//		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_lock");
X 	for(;;) {
X-	    l1_mt63_wait_output_request();
X-	    if (pthread_mutex_lock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_lock");
X+	    l1_mt63_wait_output_request(); /* locks and unlocks mt63_outputmut */
X 	    txchar = mt63_getcharbits();
X 	    //txchar = 'f';
X 	    bufprintf(HFAPP_MSG_DATA_MONITOR, 
X@@ -505,9 +505,9 @@
X 		    mt63txbuf_written -= MT63TXBUFLEN;
X 	    }
X 	    //printf("written %d samples from encodebuf to outbuf...\n",i);
X-	    if (pthread_mutex_unlock(&mt63_outputmut))
X-		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	}
X+	if (pthread_mutex_unlock(&mt63_outputmut))
X+		errstr(SEV_FATAL, "mt63 tx: pthread_mutex_unlock");
X 	// mt63_outputcleanup(NULL);
X 	// pthread_exit(NULL);
X }
END-of-hf/files/patch-hfkernel_mt63_mt63hflink.c
echo x - hf/pkg-descr
sed 's/^X//' >hf/pkg-descr << 'END-of-hf/pkg-descr'
Xhf is a gtk+-based linux ham radio fsk digimode program, which can do also
Xthe realtime ARQ modes pactor 1, amtor, gtor without a ptc, only with a
Xsoundcard and a pc and linux(FreeBSD), all of which need not be the newest.
XThe core of hf, the heart of the program (hfkernel) is a real master-piece
Xof code, it has originally been made by Tom Sailer, many thanks Tom!
Xhf can also do MT63 and has a CW elbug function. 
X
XWWW: http://www.hf.webmasternet.org
X
X- Diane Bruce, VA3DB
Xdb@db.net
END-of-hf/pkg-descr
echo x - hf/pkg-plist
sed 's/^X//' >hf/pkg-plist << 'END-of-hf/pkg-plist'
Xbin/addnoise
Xbin/channel
Xbin/dcf77gen
Xbin/dcf77rx
Xbin/elbug
Xbin/hf
Xbin/hfkernel
Xbin/hftcp
Xbin/hfterm
Xbin/morsecod
Xbin/mt63rx
Xbin/mt63trx
Xbin/mt63tx
Xbin/paccalc
Xbin/peakrms
Xbin/ratecal1
Xbin/ratetry
Xbin/reffreq
Xetc/hf.conf.samp
X%%DATADIR%%/hf-examplefiles/fix.01
X%%DATADIR%%/hf-examplefiles/fix.02
X%%DATADIR%%/hf-examplefiles/fix.03
X%%DATADIR%%/hf-examplefiles/fix.04
X%%DATADIR%%/hf-examplefiles/fix.05
X%%DATADIR%%/hf-examplefiles/fix.06
X%%DATADIR%%/hf-examplefiles/fix.07
X%%DATADIR%%/hf-examplefiles/fix.08
X%%DATADIR%%/hf-examplefiles/fix.09
X%%DATADIR%%/hf-examplefiles/fix.10
X%%DATADIR%%/hf-examplefiles/fix.11
X%%DATADIR%%/hf-examplefiles/fix.12
X%%DATADIR%%/hf-examplefiles/gag
X%%DATADIR%%/hf-examplefiles/hfterm.brag
X%%DATADIR%%/hf-examplefiles/littleman.ascii
X%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
X%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
X%%PORTDOCS%%%%DOCSDIR%%/DE-HF-HOWTO.txt
X%%PORTDOCS%%%%DOCSDIR%%/HF-HOWTO.txt
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL
X%%PORTDOCS%%%%DOCSDIR%%/LIESMICH
X%%PORTDOCS%%%%DOCSDIR%%/P-MB-list.txt
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/chan_formulas.ps
X%%PORTDOCS%%%%DOCSDIR%%/chan_formulas.tex
X%%PORTDOCS%%%%DOCSDIR%%/dcf77.txt
X%%PORTDOCS%%%%DOCSDIR%%/english.txt
X%%PORTDOCS%%%%DOCSDIR%%/hf.spec
X%%PORTDOCS%%%%DOCSDIR%%/index.html
X%%PORTDOCS%%%%DOCSDIR%%/lfconv.jpg
X%%PORTDOCS%%%%DOCSDIR%%/mt63.txt
X%%PORTDOCS%%%%DOCSDIR%%/pactor.ps
X%%PORTDOCS%%%%DOCSDIR%%/pactor.txt
X%%PORTDOCS%%%%DOCSDIR%%/pactor_statediag.fig
X%%PORTDOCS%%%%DOCSDIR%%/su1.priv.txt
X@dirrm %%DATADIR%%/hf-examplefiles
X@dirrm %%DATADIR%%
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-hf/pkg-plist
exit
Comment 4 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-08 18:14:20 UTC
State Changed
From-To: feedback->open

new patch received
Comment 5 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-08 19:50:29 UTC
State Changed
From-To: open->feedback

http://sce-tindy.tecnik93.com/tb-exp/index.php?action=describe_port&id=703
Comment 6 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-08 20:30:31 UTC
State Changed
From-To: feedback->open

new patch received
Comment 7 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-08 21:01:31 UTC
State Changed
From-To: open->feedback

same.
Comment 8 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-09 11:51:35 UTC
State Changed
From-To: feedback->closed

New port added, with some changes (plist fixes, broken on 4.x). Thanks!