diff options
author | des <des@FreeBSD.org> | 2004-09-07 18:38:47 +0800 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-09-07 18:38:47 +0800 |
commit | adeb0671f782c69a119139e76f0955a227e71c3e (patch) | |
tree | c261a7564eed929847a1795680f7cd71aeea1b6e /astro/gpsdrive | |
parent | 2ecbe6007085b702de4245e8de4f5d897fcbeb0c (diff) | |
download | freebsd-ports-gnome-adeb0671f782c69a119139e76f0955a227e71c3e.tar.gz freebsd-ports-gnome-adeb0671f782c69a119139e76f0955a227e71c3e.tar.zst freebsd-ports-gnome-adeb0671f782c69a119139e76f0955a227e71c3e.zip |
Add a hackaround to allow gpsdrive to use serial devices on FreeBSD. The
original code is a non-portable Linuxism; this patch changes it to a non-
portable FreeBSDism. A more elaborate and portable patch will be submitted
to the author.
Approved by: portmgr (krion), maintainer
Diffstat (limited to 'astro/gpsdrive')
-rw-r--r-- | astro/gpsdrive/Makefile | 1 | ||||
-rw-r--r-- | astro/gpsdrive/files/patch-src::gpsserial.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/astro/gpsdrive/Makefile b/astro/gpsdrive/Makefile index 886f6c3148f5..b8a385d2aee9 100644 --- a/astro/gpsdrive/Makefile +++ b/astro/gpsdrive/Makefile @@ -7,6 +7,7 @@ PORTNAME= gpsdrive PORTVERSION= 2.09 +PORTREVISION= 1 CATEGORIES= astro MASTER_SITES= http://www.gpsdrive.cc/ \ http://www.gpsdrive.oc512.us/ \ diff --git a/astro/gpsdrive/files/patch-src::gpsserial.c b/astro/gpsdrive/files/patch-src::gpsserial.c new file mode 100644 index 000000000000..b6dc660603d8 --- /dev/null +++ b/astro/gpsdrive/files/patch-src::gpsserial.c @@ -0,0 +1,13 @@ +--- src/gpsserial.c.orig Thu Feb 12 18:42:53 2004 ++++ src/gpsserial.c Mon Sep 6 00:44:34 2004 +@@ -178,7 +178,9 @@ + CLOCAL : local connection, no modem contol + CREAD : enable receiving characters + */ +- newtio.c_cflag = (11 + serialspeed) | CS8 | CLOCAL | CREAD; ++ int t[] = { 2400, 4800, 9600, 19200, 38400 }; ++ newtio.c_ispeed = newtio.c_ospeed = t[serialspeed]; ++ newtio.c_cflag = CS8 | CLOCAL | CREAD; + newtio.c_cflag &= ~(PARENB | CRTSCTS); + /* + IGNPAR : ignore bytes with parity errors |