diff options
author | Diane Bruce <db@FreeBSD.org> | 2007-12-24 15:13:53 +0000 |
---|---|---|
committer | Diane Bruce <db@FreeBSD.org> | 2007-12-24 15:13:53 +0000 |
commit | 9226281616185037bf0e254eda6a660bf7da7e28 (patch) | |
tree | 4e91c7819ac780afeec6c6defa6bd678e0a8c6f2 /comms/hf | |
parent | 2c493361b066557b04c0d0132e049d50ecffe72b (diff) | |
download | ports-9226281616185037bf0e254eda6a660bf7da7e28.tar.gz ports-9226281616185037bf0e254eda6a660bf7da7e28.zip |
Notes
Diffstat (limited to 'comms/hf')
-rw-r--r-- | comms/hf/Makefile | 4 | ||||
-rw-r--r-- | comms/hf/files/patch-hfkernel_cw.c | 63 | ||||
-rw-r--r-- | comms/hf/files/patch-hfkernel_elbug.c | 28 | ||||
-rw-r--r-- | comms/hf/files/patch-hfkernel_l1_refclock.c | 12 |
4 files changed, 104 insertions, 3 deletions
diff --git a/comms/hf/Makefile b/comms/hf/Makefile index 38359de4b43e..2d9046a4d4c1 100644 --- a/comms/hf/Makefile +++ b/comms/hf/Makefile @@ -7,7 +7,7 @@ PORTNAME= hf PORTVERSION= 0.8 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= comms hamradio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= hfterm @@ -23,8 +23,6 @@ GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --prefix=${PREFIX} --sysconfdir=${PREFIX} -ONLY_FOR_ARCHS= i386 - MANLANG= "" "de.ISO8859-1" MAN1= hf.1 hfterm.1 hfkernel.1 MAN1_EN= dcf77gen.1 dcf77rx.1 diff --git a/comms/hf/files/patch-hfkernel_cw.c b/comms/hf/files/patch-hfkernel_cw.c new file mode 100644 index 000000000000..0eefe1c83056 --- /dev/null +++ b/comms/hf/files/patch-hfkernel_cw.c @@ -0,0 +1,63 @@ +--- hfkernel/cw/cw.c.orig 2007-12-24 08:38:46.000000000 -0500 ++++ hfkernel/cw/cw.c 2007-12-24 08:45:35.000000000 -0500 +@@ -39,11 +39,21 @@ + #ifdef __linux__ + #include <sys/io.h> + #define IOPERM ioperm ++#define TTY0 "/dev/ttyS0" ++#define TTY1 "/dev/ttyS1" ++#define TTY2 "/dev/ttyS2" ++#define TTY3 "/dev/ttyS3" + #endif + #ifdef __FreeBSD__ + #include <machine/cpufunc.h> + #include <machine/sysarch.h> +-#define IOPERM i386_set_ioperm ++#define TTY0 "/dev/ttyd0" ++#define TTY1 "/dev/ttyd1" ++#define TTY2 "/dev/ttyd2" ++#define TTY3 "/dev/ttyd3" ++ #ifdef __i386__ ++ #define IOPERM i386_set_ioperm ++ #endif + #endif + #include <sys/time.h> + #include <time.h> +@@ -408,6 +418,7 @@ + + void *mode_cw_tx(void *dummy) + { ++#ifdef IOPERM + /* duration of 1 dot, i suppose a word has 50 dots */ + /* ---> so i think 1 baud in cw is 50 * wpm / 60 */ + int i = 0, err = 0, pausecount = 0, idlewait, status, cts, dcd; +@@ -416,16 +427,16 @@ + printf("%s", cable); + + if (name_ptt) { +- if (! strcmp (name_ptt, "/dev/ttyS0")) { ++ if (! strcmp (name_ptt, TTY0)) { + port = 0x3F8; + } +- if (! strcmp (name_ptt, "/dev/ttyS1")) { ++ if (! strcmp (name_ptt, TTY1)) { + port = 0x2F8; + } +- if (! strcmp (name_ptt, "/dev/ttyS2")) { ++ if (! strcmp (name_ptt, TTY2)) { + port = 0x3E8; + } +- if (! strcmp (name_ptt, "/dev/ttyS3")) { ++ if (! strcmp (name_ptt, TTY3)) { + port = 0x2E8; + } + } +@@ -514,5 +525,8 @@ + decode(PAUSE); + } + } ++#else ++ printf("Not on i386, elbug disabled\n"); ++#endif + } + diff --git a/comms/hf/files/patch-hfkernel_elbug.c b/comms/hf/files/patch-hfkernel_elbug.c new file mode 100644 index 000000000000..2a900540aac3 --- /dev/null +++ b/comms/hf/files/patch-hfkernel_elbug.c @@ -0,0 +1,28 @@ +--- hfkernel/cw/elbug.c.orig 2007-12-24 09:30:07.000000000 -0500 ++++ hfkernel/cw/elbug.c 2007-12-24 09:31:45.000000000 -0500 +@@ -37,7 +37,9 @@ + #include <machine/cpufunc.h> + #include <machine/sysarch.h> + #include <sys/kbio.h> ++#ifdef __i386__ + #define IOPERM i386_set_ioperm ++#endif + #else + #include <sys/kd.h> /* Linux, UnixWare */ + #endif +@@ -328,10 +330,15 @@ + exit (0); + } + } ++#ifdef IOPERM + if ((err = IOPERM(port, 8, 1))) { + printf("permission problem for serial port %04x: ioperm = %d\n", port, err); + printf("This program has to be called with root permissions.\n"); + } ++#else ++ printf("No IOPERM non i386?\n"); ++ exit(-1); ++#endif + if ((fd_ptt = open(name_ptt, O_RDWR, 0)) < 0) { + printf("error in opening ptt device %s - maybe try another one?\n", + name_ptt); diff --git a/comms/hf/files/patch-hfkernel_l1_refclock.c b/comms/hf/files/patch-hfkernel_l1_refclock.c new file mode 100644 index 000000000000..f14b5b363438 --- /dev/null +++ b/comms/hf/files/patch-hfkernel_l1_refclock.c @@ -0,0 +1,12 @@ +--- hfkernel/l1/refclock.c.orig 2007-12-23 22:40:50.000000000 -0500 ++++ hfkernel/l1/refclock.c 2007-12-23 22:41:42.000000000 -0500 +@@ -225,7 +225,9 @@ + "So I use gettimeofday() as timing source, which has lowest accuracy.\n" + "Let's hope you entered a good gettimeofday correction with -t %10.9f.\n", + tv_corr); ++#ifdef __i386__ + rdtsc_ok=0; ++#endif + } + } + return (lasttime = curtime); |