diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2007-09-06 12:04:27 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2007-09-06 12:04:27 +0000 |
commit | d0ab14ab884e583784d49381e8519f9ec0da8708 (patch) | |
tree | 42c082c9441f7caf59d128e576be4b5326d27925 /comms | |
parent | 8e4e3b184c22ddb50734c337605fbb5ac1976734 (diff) | |
download | ports-d0ab14ab884e583784d49381e8519f9ec0da8708.tar.gz ports-d0ab14ab884e583784d49381e8519f9ec0da8708.zip |
Notes
Diffstat (limited to 'comms')
-rw-r--r-- | comms/Makefile | 1 | ||||
-rw-r--r-- | comms/bluegps/Makefile | 19 | ||||
-rw-r--r-- | comms/bluegps/distinfo | 3 | ||||
-rw-r--r-- | comms/bluegps/files/patch-aa | 35 | ||||
-rw-r--r-- | comms/bluegps/files/patch-ab | 74 | ||||
-rw-r--r-- | comms/bluegps/pkg-descr | 2 | ||||
-rw-r--r-- | comms/bluegps/pkg-plist | 1 |
7 files changed, 135 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile index 429373d18a3f..eb75a84e8ed2 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -11,6 +11,7 @@ SUBDIR += bforce SUBDIR += bforce-kst SUBDIR += birda + SUBDIR += bluegps SUBDIR += bluez-firmware SUBDIR += bpl+ SUBDIR += cdr_read diff --git a/comms/bluegps/Makefile b/comms/bluegps/Makefile new file mode 100644 index 000000000000..4690c0b67c44 --- /dev/null +++ b/comms/bluegps/Makefile @@ -0,0 +1,19 @@ +# New ports collection makefile for: bluegps +# Date created: 29 July 2007 +# Whom: dirkx@webweaving.org +# +# $FreeBSD$ +# + +PORTNAME= bluegps-linux +PORTVERSION= 2.0 +CATEGORIES= comms +MASTER_SITES= http://www.harbaum.org/till/bluegps/ +EXTRACT_SUFX= .tgz + +MAINTAINER= dirkx@joost.com +COMMENT= Command line tool to download datalogs from the Royaltek RBT-3000 bluetooth GPS receiver + +MAN1= bluegps.1 + +.include <bsd.port.mk> diff --git a/comms/bluegps/distinfo b/comms/bluegps/distinfo new file mode 100644 index 000000000000..989bb6c1ba71 --- /dev/null +++ b/comms/bluegps/distinfo @@ -0,0 +1,3 @@ +MD5 (bluegps-linux-2.0.tgz) = ec1ed56045f76276dce45fabb7d239cd +SHA256 (bluegps-linux-2.0.tgz) = a4a6fc141fa3b8f65d66f416d220a8baf4b607783cba4b3456a34e20a29ed4d0 +SIZE (bluegps-linux-2.0.tgz) = 8508 diff --git a/comms/bluegps/files/patch-aa b/comms/bluegps/files/patch-aa new file mode 100644 index 000000000000..bec396a985cb --- /dev/null +++ b/comms/bluegps/files/patch-aa @@ -0,0 +1,35 @@ +--- bluegps.1 2006-06-04 13:41:03.000000000 +0200 ++++ bluegps.1 2007-07-29 18:53:13.000000000 +0200 +@@ -14,8 +14,9 @@ + .LP + The bluetooth address (bdaddr) of the RBT-3000 to be used has to + be specified on the command line. This bluetooth address can e.g. +-be determined using the \fBhcitool(1)\fP command. +- ++be determined using the \fBhcitool(1)\fP command (linux). Or ++alternatively use the friendly name. (freebsd, see ++\fBbluetooth.hosts(5)\fP). + .SH OPTIONS + .TP + .BI \-d " filename" +@@ -112,6 +113,13 @@ + bluegps -d testlog.nmea 00:02:C7:00:11:22 + .RE + .LP ++On freebsd; if there is an entry in /etc/bluetooth/hosts you can ++also use: ++.LP ++.RS +4 ++bluegps -d testlog.nmea BlueGPS ++.RE ++.LP + If the GPS has been setup to use the password 1234 use the following + command: + .LP +@@ -130,4 +138,5 @@ + accompanies each copy of \fIbluegps\fP. + .SH AUTHORS + Till Harbaum <Till@Harbaum.org>, +-Simon Budig <simon@budig.de> ++Simon Budig <simon@budig.de> and ++some minor changes for FreeBSD by Dirk-Willem van Gulik <dirkx@webweaving.org>. diff --git a/comms/bluegps/files/patch-ab b/comms/bluegps/files/patch-ab new file mode 100644 index 000000000000..feba011f1158 --- /dev/null +++ b/comms/bluegps/files/patch-ab @@ -0,0 +1,74 @@ +--- bluegps.c 2006-06-26 20:28:31.000000000 +0200 ++++ bluegps.c 2007-07-29 18:54:17.000000000 +0200 +@@ -27,10 +27,21 @@ + #include <stdarg.h> + #include <ctype.h> + ++#ifdef __FreeBSD__ ++#include <string.h> ++#include <sys/types.h> ++#include <sys/socket.h> ++#else + #include <netinet/ip.h> ++#endif + ++ ++#ifdef __FreeBSD__ ++#include <bluetooth.h> ++#else + #include <bluetooth/bluetooth.h> + #include <bluetooth/rfcomm.h> ++#endif + + #include "rbt3000.h" + +@@ -269,19 +280,44 @@ + int + rbt3000_connect (char *device_addr) + { +- ++#ifdef __FreeBSD__ ++ struct sockaddr_rfcomm rem_addr; ++ struct hostent * he; ++ ++ memset(&rem_addr, 0, sizeof(rem_addr)); ++ rem_addr.rfcomm_len = sizeof(rem_addr); ++ rem_addr.rfcomm_family = AF_BLUETOOTH; ++ rem_addr.rfcomm_channel = RFCOMM_CHANNEL; ++ ++ if ((he = bt_gethostbyname(device_addr))) { ++ context->device = *(bdaddr_t *) he->h_addr_list[0]; ++ if (context->messages == MSG_VERBOSE) ++ printf("Actual BT address for '%s': %s\n", ++ device_addr, bt_ntoa(&(context->device),NULL)); ++ } else ++ if (!bt_aton(device_addr, &context->device)) { ++ perror("No such device address"); ++ return 0; ++ } ++ rem_addr.rfcomm_bdaddr = context->device; ++#else + struct sockaddr_rc rem_addr; + +- baswap (&context->device, strtoba (device_addr)); +- + rem_addr.rc_family = AF_BLUETOOTH; +- rem_addr.rc_bdaddr = context->device; + rem_addr.rc_channel = RFCOMM_CHANNEL; ++ baswap (&context->device, strtoba (device_addr)); ++ rem_addr.rc_bdaddr = context->device; ++#endif + + /* bluez connects to BlueClient */ + if ((context->device_fd = socket (PF_BLUETOOTH, + SOCK_STREAM, +- BTPROTO_RFCOMM)) < 0 ) ++#ifdef __FreeBSD__ ++ BLUETOOTH_PROTO_RFCOMM ++#else ++ BTPROTO_RFCOMM ++#endif ++ )) < 0 ) + { + perror ("Can't create socket"); + return 0; diff --git a/comms/bluegps/pkg-descr b/comms/bluegps/pkg-descr new file mode 100644 index 000000000000..9552ef640bce --- /dev/null +++ b/comms/bluegps/pkg-descr @@ -0,0 +1,2 @@ +BlueGPS is a simple command line tool to download datalogs from the +Royaltek RBT-3000 bluetooth GPS receiver over a bluetooth link. diff --git a/comms/bluegps/pkg-plist b/comms/bluegps/pkg-plist new file mode 100644 index 000000000000..15d8eaf9f9d4 --- /dev/null +++ b/comms/bluegps/pkg-plist @@ -0,0 +1 @@ +bin/bluegps |