summaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-04-06 03:53:27 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-04-06 03:53:27 +0800
commit06dd884e8550e00c219576d3e2f01008310d1674 (patch)
treec0a4539719af1a6c12909ad2c639cf492b69448c /comms
parent8c1aff8302a44e0c5518c53c33e18d7f07cda2f2 (diff)
downloadmarcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.tar
marcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.tar.gz
marcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.tar.bz2
marcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.tar.lz
marcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.tar.xz
marcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.tar.zst
marcuscom-ports-06dd884e8550e00c219576d3e2f01008310d1674.zip
Chase the libical shared lib version.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12213 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'comms')
-rw-r--r--comms/gnokii/Makefile162
-rw-r--r--comms/gnokii/distinfo3
-rw-r--r--comms/gnokii/files/patch-Docs-man-Makefile.in11
-rw-r--r--comms/gnokii/files/patch-Makefile.in14
-rw-r--r--comms/gnokii/files/patch-common-Makefile.in12
-rw-r--r--comms/gnokii/files/patch-common-devices-unixbluetooth.c321
-rw-r--r--comms/gnokii/files/patch-configure134
-rw-r--r--comms/gnokii/files/patch-gnokii-Makefile.in11
-rw-r--r--comms/gnokii/files/patch-gnokii-gnokii-security.c17
-rw-r--r--comms/gnokii/files/patch-gnokii-gnokii-utils.c11
-rw-r--r--comms/gnokii/files/patch-gnokii-gnokii.c11
-rw-r--r--comms/gnokii/files/patch-gnokiid-Makefile.in22
-rw-r--r--comms/gnokii/files/patch-gnokiirc29
-rw-r--r--comms/gnokii/files/patch-smsd-Makefile.in22
-rw-r--r--comms/gnokii/files/patch-xgnokii-Makefile.in21
-rw-r--r--comms/gnokii/files/pkg-message.in13
-rw-r--r--comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff21
-rw-r--r--comms/gnokii/pkg-descr10
-rw-r--r--comms/gnokii/pkg-install41
-rw-r--r--comms/gnokii/pkg-plist126
20 files changed, 1012 insertions, 0 deletions
diff --git a/comms/gnokii/Makefile b/comms/gnokii/Makefile
new file mode 100644
index 000000000..c2f7a043b
--- /dev/null
+++ b/comms/gnokii/Makefile
@@ -0,0 +1,162 @@
+# New ports collection makefile for: gnokii
+# Date created: 15 March 1999
+# Whom: Staffan Ulfberg <staffanu@multivac.fatburen.org>
+#
+# $FreeBSD:$
+#
+
+PORTNAME= gnokii
+PORTVERSION= 0.6.27
+PORTREVISION= 2
+PORTEPOCH= 1
+CATEGORIES= comms
+MASTER_SITES= http://www.gnokii.org/download/gnokii/ \
+ ftp://ftp.gnokii.org/pub/gnokii/ \
+ http://www.gnokii.org/download/gnokii/0.6.x/
+
+MAINTAINER= mad@madpilot.net
+COMMENT= Tools to talk to GSM cellular phones
+
+BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_GETTEXT= yes
+USE_LDCONFIG= yes
+MAKE_JOBS_SAFE= yes
+WANT_GNOME= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --with-libintl-prefix=${LOCALBASE} --enable-security \
+ --with-xgnokiidir=${PREFIX}/share
+CONFIGURE_ENV+= MSGFMT="${LOCALBASE}/bin/msgfmt" \
+ XGETTEXT="${LOCALBASE}/bin/xgettext" \
+ CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include -fPIC" \
+ LIBS="-L../common -L${LOCALBASE}/lib" \
+ PKG_CONFIG="${LOCALBASE}/bin/pkg-config"
+
+PKGDEINSTALL= ${PKGINSTALL}
+SUB_FILES+= pkg-message
+PORTDOCS= *
+MAN1= gnokii.1 sendsms.1
+MAN8= gnokiid.8 mgnokiidev.8
+
+CONFLICTS= smstools-[0-9]* sendsms-[0-9]*
+
+OPTIONS= ICAL "Build with IETF iCal support" off \
+ USB "Build with libusb support" off \
+ PCSC "Build with PC/SC-Lite support" off \
+ SMSD "Enable smsd daemon" off \
+ MYSQL "Enable MySQL support for smsd" off \
+ PGSQL "Enable PostgreSQL support for smsd" off \
+ X11 "Build graphical version (xgnokii)" on
+
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/lib/libical.so) || defined(WITH_ICAL)
+LIB_DEPENDS+= ical.43:${PORTSDIR}/devel/libical
+.endif
+
+.if ${OSVERSION} < 800069
+. if exists(${LOCALBASE}/lib/libusb.so) || defined(WITH_USB)
+LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb
+. endif
+.endif
+
+.if exists(${LOCALBASE}/lib/libpcsclite.so) || defined(WITH_PCSC)
+LIB_DEPENDS+= pcsclite.1:${PORTSDIR}/devel/pcsc-lite
+.endif
+
+.if !defined(WITH_SMSD)
+PLIST_SUB+= SMSD='@comment ' MSM='@comment ' PGM='@comment '
+CONFIGURE_ARGS+= --disable-smsd
+.else
+PLIST_SUB+= SMSD=''
+USE_GNOME+= glib20
+MAN8+= smsd.8
+.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so) && !defined(WITHOUT_MYSQL)
+USE_MYSQL= yes
+PLIST_SUB+= MSM=''
+.else
+PLIST_SUB+= MSM='@comment '
+.endif
+.if exists(${LOCALBASE}/bin/psql) && !defined(WITHOUT_PGSQL)
+USE_PGSQL= yes
+PLIST_SUB+= PGM=''
+.else
+PLIST_SUB+= PGM='@comment '
+.endif
+.endif
+
+.if defined(WITHOUT_X11)
+CONFIGURE_ARGS+= --without-x
+PLIST_SUB+= X11='@comment '
+.else
+USE_XORG= xpm
+USE_GNOME+= gtk20
+PLIST_SUB+= X11=''
+MAN1+= xgnokii.1
+.endif
+
+FIXPREFIX= Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \
+ common/cfgreader.c po/et.po po/sl.po
+post-patch:
+.for f in ${FIXPREFIX}
+ @${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \
+ ${WRKSRC}/${f}
+.endfor
+ @${REINPLACE_CMD} -e "s:%%PTHREAD_LIBS%%:${PTHREAD_LIBS}:; \
+ s:%%PTHREAD_CFLAGS%%:${PTHREAD_CFLAGS}:" ${WRKSRC}/configure
+.for f in common/data/virtmodem.c utils/mgnokiidev.c
+ @${REINPLACE_CMD} -E -e "s:^(#ifdef.*)__OpenBSD__:\1__FreeBSD__:" \
+ ${WRKSRC}/${f}
+.endfor
+# fix test(1) conditions in configure script
+ @${REINPLACE_CMD} -E \
+ -e 's|([[:space:]]+test[[:space:]]+.+)==([[:space:]]+"yes")|\1=\2|' \
+ ${WRKSRC}/${CONFIGURE_SCRIPT}
+ @${MV} ${WRKSRC}/Docs/man/xgnokii.1x ${WRKSRC}/Docs/man/xgnokii.1
+
+post-build:
+.if defined(WITH_SMSD)
+.if defined(WITH_MYSQL)
+ @${REINPLACE_CMD} -e 's/^#libsmsd_mysql_la_SOURCES/libsmsd_mysql_la_SOURCES/' ${WRKSRC}/smsd/Makefile.in
+ @${REINPLACE_CMD} -e 's/^#libsmsd_mysql_la_LDFLAGS/libsmsd_mysql_la_LDFLAGS/' ${WRKSRC}/smsd/Makefile.in
+ @${REINPLACE_CMD} -e 's/^#libsmsd_mysql_la_LIBADD/libsmsd_mysql_la_LIBADD/' ${WRKSRC}/smsd/Makefile.in
+.endif
+.if defined(WITH_PGSQL)
+ @${REINPLACE_CMD} -e 's/^#libsmsd_pq_la_SOURCES/libsmsd_pq_la_SOURCES/' ${WRKSRC}/smsd/Makefile.in
+ @${REINPLACE_CMD} -e 's/^#libsmsd_pq_la_LDFLAGS/libsmsd_pq_la_LDFLAGS/' ${WRKSRC}/smsd/Makefile.in
+ @${REINPLACE_CMD} -e 's/^#libsmsd_pq_la_LIBADD/libsmsd_pq_la_LIBADD/' ${WRKSRC}/smsd/Makefile.in
+.endif
+.endif
+
+pre-install:
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/xgnokii/xgnokii.pc ${PREFIX}/libdata/pkgconfig
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if !defined(NOPORTDOCS)
+ ${GMAKE} install -C ${WRKSRC}/Docs
+.else
+ ${GMAKE} install -C ${WRKSRC}/Docs/man
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \
+ ${PREFIX}/etc/gnokiirc.sample
+.if defined(WITH_SMSD)
+ @cd ${WRKSRC}/smsd && ${GMAKE} install
+ ${MKDIR} ${PREFIX}/share/smsd
+ ${INSTALL_SCRIPT} ${WRKSRC}/smsd/action ${PREFIX}/share/smsd
+ ${INSTALL_DATA} ${WRKSRC}/smsd/README ${PREFIX}/share/smsd
+.if defined(WITH_MYSQL)
+ ${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.mysql.sql ${PREFIX}/share/smsd
+.endif
+.if defined(WITH_PGSQL)
+ ${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.pq.sql ${PREFIX}/share/smsd
+.endif
+.endif
+ @${ECHO_MSG}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
+
+.include <bsd.port.post.mk>
diff --git a/comms/gnokii/distinfo b/comms/gnokii/distinfo
new file mode 100644
index 000000000..8471bf243
--- /dev/null
+++ b/comms/gnokii/distinfo
@@ -0,0 +1,3 @@
+MD5 (gnokii-0.6.27.tar.bz2) = fd0ae7996a2e2a2c29e9f3c625df8f3d
+SHA256 (gnokii-0.6.27.tar.bz2) = 69f1d75f755a2918e9577cf28dacea9d6fca9b9d722813341d50d12acb8ee886
+SIZE (gnokii-0.6.27.tar.bz2) = 1491564
diff --git a/comms/gnokii/files/patch-Docs-man-Makefile.in b/comms/gnokii/files/patch-Docs-man-Makefile.in
new file mode 100644
index 000000000..38413ce17
--- /dev/null
+++ b/comms/gnokii/files/patch-Docs-man-Makefile.in
@@ -0,0 +1,11 @@
+--- Docs/man/Makefile.in.orig 2008-02-23 17:36:56.000000000 +0100
++++ Docs/man/Makefile.in 2008-02-23 17:52:50.000000000 +0100
+@@ -252,7 +252,7 @@
+ target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-man_MANS = gnokii.1 sendsms.1 gnokiid.8 mgnokiidev.8 xgnokii.1x
++man_MANS = gnokii.1 sendsms.1 gnokiid.8 mgnokiidev.8 xgnokii.1
+ EXTRA_DIST = $(man_MANS)
+ all: all-am
+
diff --git a/comms/gnokii/files/patch-Makefile.in b/comms/gnokii/files/patch-Makefile.in
new file mode 100644
index 000000000..bbaa5eb32
--- /dev/null
+++ b/comms/gnokii/files/patch-Makefile.in
@@ -0,0 +1,14 @@
+--- Makefile.in.orig 2008-06-02 15:48:31.000000000 +0200
++++ Makefile.in 2008-06-02 15:48:47.000000000 +0200
+@@ -279,9 +279,9 @@
+ target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-SUBDIRS = include common gnokii po patches Docs $(am__append_1) \
++SUBDIRS = include common gnokii po patches $(am__append_1) \
+ $(am__append_2) $(am__append_3)
+-DIST_SUBDIRS = include Docs common gnokii gnokiid utils xgnokii po smsd win32 testsuite patches getopt
++DIST_SUBDIRS = include common gnokii gnokiid utils xgnokii po smsd win32 testsuite patches getopt
+ EXTRA_DIST = \
+ ChangeLog \
+ COPYING \
diff --git a/comms/gnokii/files/patch-common-Makefile.in b/comms/gnokii/files/patch-common-Makefile.in
new file mode 100644
index 000000000..31358b6e3
--- /dev/null
+++ b/comms/gnokii/files/patch-common-Makefile.in
@@ -0,0 +1,12 @@
+--- common/Makefile.in.orig 2008-02-23 17:18:24.000000000 +0100
++++ common/Makefile.in 2008-02-23 17:18:53.000000000 +0100
+@@ -318,7 +318,8 @@
+ $(DATA_DIR)
+
+ pkgconfig_DATA = gnokii.pc
+-pkgconfigdir = $(libdir)/pkgconfig
++libdatadir = $(libdir)data
++pkgconfigdir = $(libdatadir)/pkgconfig
+ libgnokii_la_CPPFLAGS = -DLIBDIR="\"$(libdir)\""
+ libgnokii_la_CFLAGS = -I$(top_srcdir)/include
+ libgnokii_la_SOURCES = \
diff --git a/comms/gnokii/files/patch-common-devices-unixbluetooth.c b/comms/gnokii/files/patch-common-devices-unixbluetooth.c
new file mode 100644
index 000000000..5bb9bb09a
--- /dev/null
+++ b/comms/gnokii/files/patch-common-devices-unixbluetooth.c
@@ -0,0 +1,321 @@
+--- common/devices/unixbluetooth.c.orig 2008-10-05 12:14:31.000000000 +0200
++++ common/devices/unixbluetooth.c 2009-02-17 17:03:58.000000000 +0100
+@@ -54,6 +54,8 @@
+ #include <netgraph/bluetooth/include/ng_hci.h>
+ #include <netgraph/bluetooth/include/ng_l2cap.h>
+ #include <netgraph/bluetooth/include/ng_btsocket.h>
++#include <bluetooth.h>
++#include </usr/include/sdp.h>
+
+ #define BTPROTO_RFCOMM BLUETOOTH_PROTO_RFCOMM
+ #define BDADDR_ANY NG_HCI_BDADDR_ANY
+@@ -86,11 +88,6 @@
+
+ #endif /* HAVE_BT_ATON */
+
+-static int str2ba(const char *str, bdaddr_t *ba)
+-{
+- return !bt_aton(str, ba);
+-}
+-
+ #else /* Linux / BlueZ support */
+
+ #include <bluetooth/bluetooth.h>
+@@ -100,6 +97,272 @@
+
+ #endif
+
++#ifdef HAVE_BLUETOOTH_NETGRAPH /* FreeBSD / netgraph */
++
++/*
++** FreeBSD version of the find_service_channel function.
++** Written by Guido Falsi <mad@madpilot.net>.
++** Contains code taken from FreeBSD's sdpcontrol and rfcomm_sppd
++** programs, which are Copyright (c) 2001-2003 Maksim Yevmenkin
++** <m_evmenkin@yahoo.com>.
++*/
++
++static int find_service_channel(bdaddr_t *adapter, bdaddr_t *device, int only_gnapplet, uint16_t svclass_id)
++{
++ uint8_t getchan = 0;
++ uint32_t i, good = 0;
++ char name[64];
++ void *ss = NULL;
++
++ uint32_t attrs[] =
++ {
++ SDP_ATTR_RANGE( SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET,
++ SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET),
++ SDP_ATTR_RANGE( SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST,
++ SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST),
++ };
++ #define attrs_len (sizeof(attrs)/sizeof(attrs[0]))
++
++ /* Buffer for the attributes */
++ #define NRECS 25 /* request this much records from the SDP server */
++ #define BSIZE 256 /* one attribute buffer size */
++ static uint8_t buffer[NRECS * attrs_len][BSIZE];
++
++ /* SDP attributes */
++ static sdp_attr_t values[NRECS * attrs_len];
++ #define values_len (sizeof(values)/sizeof(values[0]))
++
++ /* Initialize attribute values array */
++ for (i = 0; i < values_len; i ++) {
++ values[i].flags = SDP_ATTR_INVALID;
++ values[i].attr = 0;
++ values[i].vlen = BSIZE;
++ values[i].value = buffer[i];
++ }
++
++ if ((ss = sdp_open(adapter, device)) == NULL)
++ return -1;
++
++ if (sdp_error(ss) != 0)
++ {
++ sdp_close(ss);
++ return -1;
++ }
++
++ if (sdp_search(ss, 1, &svclass_id, attrs_len, attrs, values_len, values) != 0)
++ {
++ sdp_close(ss);
++ return -1;
++ }
++
++ for (i = 0; i < values_len; i++)
++ {
++ if (values[i].flags != SDP_ATTR_OK)
++ break;
++
++ union {
++ uint8_t uint8;
++ uint16_t uint16;
++ uint32_t uint32;
++ uint64_t uint64;
++ int128_t int128;
++ } value;
++ uint8_t *start, *end;
++ uint32_t type, len;
++
++ start = values[i].value;
++ end = values[i].value + values[i].vlen;
++
++ switch (values[i].attr) {
++ case SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST:
++ if(getchan) {
++ SDP_GET8(type, start);
++ switch (type) {
++ case SDP_DATA_SEQ8:
++ SDP_GET8(len, start);
++ break;
++
++ case SDP_DATA_SEQ16:
++ SDP_GET16(len, start);
++ break;
++
++ case SDP_DATA_SEQ32:
++ SDP_GET32(len, start);
++ break;
++
++ default:
++ sdp_close(ss);
++ return -1;
++ break;
++ }
++
++ SDP_GET8(type, start);
++ switch (type) {
++ case SDP_DATA_SEQ8:
++ SDP_GET8(len, start);
++ break;
++
++ case SDP_DATA_SEQ16:
++ SDP_GET16(len, start);
++ break;
++
++ case SDP_DATA_SEQ32:
++ SDP_GET32(len, start);
++ break;
++
++ default:
++ sdp_close(ss);
++ return -1;
++ break;
++ }
++
++ while (start < end) {
++ SDP_GET8(type, start);
++ switch (type) {
++ case SDP_DATA_UUID16:
++ SDP_GET16(value.uint16, start);
++ break;
++
++ case SDP_DATA_UUID32:
++ SDP_GET32(value.uint32, start);
++ break;
++
++ case SDP_DATA_UUID128:
++ SDP_GET_UUID128(&value.int128, start);
++ break;
++
++ default:
++ sdp_close(ss);
++ return -1;
++ break;
++ }
++ if(value.uint16 == 3) {
++ SDP_GET8(type, start);
++ switch (type) {
++ case SDP_DATA_UINT8:
++ case SDP_DATA_INT8:
++ SDP_GET8(value.uint8, start);
++ return value.uint8;
++ break;
++
++ case SDP_DATA_UINT16:
++ case SDP_DATA_INT16:
++ SDP_GET16(value.uint16, start);
++ return value.uint16;
++ break;
++
++ case SDP_DATA_UINT32:
++ case SDP_DATA_INT32:
++ SDP_GET32(value.uint32, start);
++ return value.uint32;
++ break;
++
++ default:
++ sdp_close(ss);
++ return -1;
++ break;
++ }
++ } else {
++ SDP_GET8(type, start);
++ switch (type) {
++ case SDP_DATA_SEQ8:
++ case SDP_DATA_UINT8:
++ case SDP_DATA_INT8:
++ case SDP_DATA_BOOL:
++ SDP_GET8(value.uint8, start);
++ break;
++
++ case SDP_DATA_SEQ16:
++ case SDP_DATA_UINT16:
++ case SDP_DATA_INT16:
++ case SDP_DATA_UUID16:
++ SDP_GET16(value.uint16, start);
++ break;
++
++ case SDP_DATA_SEQ32:
++ case SDP_DATA_UINT32:
++ case SDP_DATA_INT32:
++ case SDP_DATA_UUID32:
++ SDP_GET32(value.uint32, start);
++ break;
++
++ case SDP_DATA_UINT64:
++ case SDP_DATA_INT64:
++ SDP_GET64(value.uint64, start);
++ break;
++
++ case SDP_DATA_UINT128:
++ case SDP_DATA_INT128:
++ SDP_GET128(&value.int128, start);
++ break;
++
++ default:
++ sdp_close(ss);
++ return -1;
++ break;
++ }
++ }
++ }
++ }
++ start += len;
++ break;
++
++ case SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET:
++ SDP_GET8(type, start);
++ switch (type) {
++ case SDP_DATA_STR8:
++ case SDP_DATA_URL8:
++ SDP_GET8(len, start);
++ snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start);
++ start += len;
++ break;
++
++ case SDP_DATA_STR16:
++ case SDP_DATA_URL16:
++ SDP_GET16(len, start);
++ snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start);
++ start += len;
++ break;
++
++ case SDP_DATA_STR32:
++ case SDP_DATA_URL32:
++ SDP_GET32(len, start);
++ snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start);
++ start += len;
++ break;
++
++ default:
++ sdp_close(ss);
++ return -1;
++ }
++ if (name == NULL)
++ return -1;
++
++ if (strcmp(name, "gnapplet") == 0) {
++ if (only_gnapplet != 0)
++ getchan = 1;
++ break;
++ }
++
++ if (strstr(name, "Nokia PC Suite") != NULL)
++ break;
++
++ if (strstr(name, "Bluetooth Serial Port") != NULL)
++ break;
++
++ if (strstr(name, "m-Router Connectivity") != NULL)
++ break;
++
++ getchan = 1;
++ break;
++ }
++ }
++
++ sdp_close(ss);
++ return -1;
++}
++
++#else
+ /*
+ * Taken from gnome-phone-manager
+ */
+@@ -204,6 +467,8 @@
+ return channel;
+ }
+
++#endif
++
+ static int get_serial_channel(bdaddr_t *device)
+ {
+ bdaddr_t src;
+@@ -211,9 +476,15 @@
+
+ bacpy(&src, BDADDR_ANY);
+
++#ifdef HAVE_BLUETOOTH_NETGRAPH /* FreeBSD / netgraph */
++ channel = find_service_channel(&src, device, 0, SDP_SERVICE_CLASS_SERIAL_PORT);
++ if (channel < 0)
++ channel = find_service_channel(&src, device, 0, SDP_SERVICE_CLASS_DIALUP_NETWORKING);
++#else
+ channel = find_service_channel(&src, device, 0, SERIAL_PORT_SVCLASS_ID);
+ if (channel < 0)
+ channel = find_service_channel(&src, device, 0, DIALUP_NET_SVCLASS_ID);
++#endif
+
+ return channel;
+ }
diff --git a/comms/gnokii/files/patch-configure b/comms/gnokii/files/patch-configure
new file mode 100644
index 000000000..b76c8a418
--- /dev/null
+++ b/comms/gnokii/files/patch-configure
@@ -0,0 +1,134 @@
+--- configure.orig 2008-10-06 08:57:27.000000000 +0200
++++ configure 2009-02-26 17:21:58.000000000 +0100
+@@ -1057,7 +1057,7 @@
+ psdir='${docdir}'
+ libdir='${exec_prefix}/lib'
+ localedir='${datarootdir}/locale'
+-mandir='${datarootdir}/man'
++mandir='${prefix}/man'
+
+ ac_prev=
+ ac_dashdash=
+@@ -24163,13 +24163,15 @@
+ # First of all, check if the user has set any of the PTHREAD_LIBS,
+ # etcetera environment variables, and if threads linking works using
+ # them:
+-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
++if test x"-pthread" != x; then
++ PTHREAD_CFLAGS=""
++ PTHREAD_LIBS="-pthread"
+ save_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++ CFLAGS="$CFLAGS "
+ save_LIBS="$LIBS"
+- LIBS="$PTHREAD_LIBS $LIBS"
+- { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+-echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
++ LIBS="-pthread $LIBS"
++ { echo "$as_me:$LINENO: checking for pthread_join in LIBS=-pthread with CFLAGS=" >&5
++echo $ECHO_N "checking for pthread_join in LIBS=-pthread with CFLAGS=... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -24533,7 +24535,7 @@
+ echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
+ flag=no
+ case "${host_cpu}-${host_os}" in
+- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
++ *-aix* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ { echo "$as_me:$LINENO: result: ${flag}" >&5
+@@ -26561,9 +26563,9 @@
+ fi
+
+
+-if test "$enable_libical" == "yes"; then
++if test "$enable_libical" = "yes"; then
+ OLD_CFLAGS="$CFLAGS"
+- LIBS="$LIBS $ICAL_LIBS -lpthread -lical"
++ LIBS="$LIBS $ICAL_LIBS -pthread -lical"
+ CFLAGS="$CFLAGS $ICAL_CFLAGS"
+ { echo "$as_me:$LINENO: checking whether libical is installed" >&5
+ echo $ECHO_N "checking whether libical is installed... $ECHO_C" >&6; }
+@@ -26650,7 +26652,7 @@
+ enable_libusb=yes
+ fi
+
+-if test "$enable_libusb" == "yes"; then
++if test "$enable_libusb" = "yes"; then
+ { echo "$as_me:$LINENO: checking whether libusb is installed" >&5
+ echo $ECHO_N "checking whether libusb is installed... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -26872,7 +26874,7 @@
+ enable_irda=yes
+ fi
+
+-if test "$enable_irda" == "yes"; then
++if test "$enable_irda" = "yes"; then
+ { echo "$as_me:$LINENO: checking for linux/irda.h" >&5
+ echo $ECHO_N "checking for linux/irda.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_linux_irda_h+set}" = set; then
+@@ -26955,7 +26957,7 @@
+ enable_bluetooth=yes
+ fi
+
+-if test "$enable_bluetooth" == "yes"; then
++if test "$enable_bluetooth" = "yes"; then
+ { echo "$as_me:$LINENO: checking for the bluetooth support" >&5
+ echo $ECHO_N "checking for the bluetooth support... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for the struct sockaddr_rc in <bluetooth/rfcomm.h>" >&5
+@@ -27025,7 +27027,7 @@
+
+ fi
+ fi
+-if test "$enable_bluetooth" == "yes"; then
++if test "$enable_bluetooth" = "yes"; then
+ { echo "$as_me:$LINENO: checking for the MacOS X bluetooth support" >&5
+ echo $ECHO_N "checking for the MacOS X bluetooth support... $ECHO_C" >&6; }
+
+@@ -27526,7 +27528,7 @@
+ fi
+ fi
+
+-if test "$enable_bluetooth" == "yes"; then
++if test "$enable_bluetooth" = "yes"; then
+ { echo "$as_me:$LINENO: checking for the FreeBSD/netgraph bluetooth support" >&5
+ echo $ECHO_N "checking for the FreeBSD/netgraph bluetooth support... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for the struct sockaddr_rfcomm in <netgraph/.../ng_btsocket.h>" >&5
+@@ -27602,7 +27604,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lbluetooth $LIBS"
++LIBS="-lsdp -lbluetooth $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -27658,7 +27660,7 @@
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_bluetooth_bt_aton" >&5
+ echo "${ECHO_T}$ac_cv_lib_bluetooth_bt_aton" >&6; }
+ if test $ac_cv_lib_bluetooth_bt_aton = yes; then
+- BLUETOOTH_LIBS="$LIBS -lbluetooth"
++ BLUETOOTH_LIBS="-lsdp -lbluetooth $LIBS"
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_BT_ATON
+ _ACEOF
+@@ -27676,7 +27678,7 @@
+ enable_libpcsclite=yes
+ fi
+
+-if test "$enable_libpcsclite" == "yes"; then
++if test "$enable_libpcsclite" = "yes"; then
+
+
+ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+@@ -28474,7 +28476,7 @@
+ echo "${ECHO_T}$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&6; }
+ if test $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage = yes; then
+ XPM_CFLAGS="$XINCL"
+- XPM_LIBS="$XLIBS -lXpm -lX11"
++ XPM_LIBS="$XLIBS -lXpm -lX11 -lroken -lcrypt"
+
+ cat >>confdefs.h <<\_ACEOF
+ #define XPM 1
diff --git a/comms/gnokii/files/patch-gnokii-Makefile.in b/comms/gnokii/files/patch-gnokii-Makefile.in
new file mode 100644
index 000000000..9e75758b5
--- /dev/null
+++ b/comms/gnokii/files/patch-gnokii-Makefile.in
@@ -0,0 +1,11 @@
+--- gnokii/Makefile.in.orig 2009-02-26 17:09:49.000000000 +0100
++++ gnokii/Makefile.in 2009-02-26 17:20:21.000000000 +0100
+@@ -57,7 +57,7 @@
+ gnokii-gnokii-security.$(OBJEXT) \
+ gnokii-gnokii-settings.$(OBJEXT) gnokii-gnokii-sms.$(OBJEXT) \
+ gnokii-gnokii-todo.$(OBJEXT) gnokii-gnokii-utils.$(OBJEXT) \
+- gnokii-gnokii-wap.$(OBJEXT)
++ gnokii-gnokii-wap.$(OBJEXT) /usr/lib/libsdp.so
+ gnokii_OBJECTS = $(am_gnokii_OBJECTS)
+ am__DEPENDENCIES_1 =
+ gnokii_DEPENDENCIES = $(top_builddir)/common/libgnokii.la \
diff --git a/comms/gnokii/files/patch-gnokii-gnokii-security.c b/comms/gnokii/files/patch-gnokii-gnokii-security.c
new file mode 100644
index 000000000..ed4297602
--- /dev/null
+++ b/comms/gnokii/files/patch-gnokii-gnokii-security.c
@@ -0,0 +1,17 @@
+--- gnokii/gnokii-security.c.orig Thu May 10 20:50:16 2007
++++ gnokii/gnokii-security.c Thu Jun 21 11:56:13 2007
+@@ -131,12 +131,14 @@
+
+ if (isatty(fd)) {
+ strncpy(pass, getpass(prompt), length - 1);
++/* FreeBSD uses standard C library, no getline, sorry.
+ } else {
+ err = getline(&s, &s_len, stdin);
+ if (err > 0 && s) {
+ strncpy(pass, s, length - 1);
+ free(s);
+ }
++*/
+ }
+ pass[length - 1] = 0;
+ #endif
diff --git a/comms/gnokii/files/patch-gnokii-gnokii-utils.c b/comms/gnokii/files/patch-gnokii-gnokii-utils.c
new file mode 100644
index 000000000..56402ad1f
--- /dev/null
+++ b/comms/gnokii/files/patch-gnokii-gnokii-utils.c
@@ -0,0 +1,11 @@
+--- gnokii/gnokii-utils.c.orig 2007-12-06 14:24:37.000000000 +0100
++++ gnokii/gnokii-utils.c 2007-12-06 14:25:25.000000000 +0100
+@@ -43,6 +43,8 @@
+
+ #include <stdio.h>
+ #include <signal.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+
+ #include "gnokii-app.h"
+ #include "gnokii.h"
diff --git a/comms/gnokii/files/patch-gnokii-gnokii.c b/comms/gnokii/files/patch-gnokii-gnokii.c
new file mode 100644
index 000000000..dd16da5ae
--- /dev/null
+++ b/comms/gnokii/files/patch-gnokii-gnokii.c
@@ -0,0 +1,11 @@
+--- gnokii/gnokii.c.orig 2009-02-03 23:23:35.000000000 +0100
++++ gnokii/gnokii.c 2009-02-03 23:24:01.000000000 +0100
+@@ -1082,7 +1082,7 @@
+ else
+ len = strlen(input);
+ if (len > 0)
+- argv[argc++] = strndup(input, len);
++ argv[argc++] = strdup(input);
+ input = tmp;
+ } while (input);
+ argv[argc] = NULL;
diff --git a/comms/gnokii/files/patch-gnokiid-Makefile.in b/comms/gnokii/files/patch-gnokiid-Makefile.in
new file mode 100644
index 000000000..e688fc352
--- /dev/null
+++ b/comms/gnokii/files/patch-gnokiid-Makefile.in
@@ -0,0 +1,22 @@
+--- gnokiid/Makefile.in.orig 2008-10-06 08:57:16.000000000 +0200
++++ gnokiid/Makefile.in 2009-02-26 17:26:31.000000000 +0100
+@@ -48,7 +48,7 @@
+ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ PROGRAMS = $(bin_PROGRAMS)
+ am_gnokiid_OBJECTS = gnokiid-gnokiid.$(OBJEXT)
+-gnokiid_OBJECTS = $(am_gnokiid_OBJECTS)
++gnokiid_OBJECTS = $(am_gnokiid_OBJECTS) /usr/lib/libsdp.so
+ am__DEPENDENCIES_1 =
+ gnokiid_DEPENDENCIES = $(top_builddir)/common/libgnokii.la \
+ $(top_builddir)/common/data/libDATA.la $(am__DEPENDENCIES_1)
+@@ -326,8 +326,8 @@
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
diff --git a/comms/gnokii/files/patch-gnokiirc b/comms/gnokii/files/patch-gnokiirc
new file mode 100644
index 000000000..7731e37c3
--- /dev/null
+++ b/comms/gnokii/files/patch-gnokiirc
@@ -0,0 +1,29 @@
+--- Docs/sample/gnokiirc.orig Wed Nov 9 01:11:42 2005
++++ Docs/sample/gnokiirc Sat Nov 12 19:11:21 2005
+@@ -7,7 +7,7 @@
+
+ # Set port to the physical port used to connect to your phone.
+ # Linux version is:
+-port = /dev/ttyS0
++port = /dev/cuaa0
+ #
+ # For MacOSX you will need something like:
+ # port = /dev/cu.USA28X1P1.1
+@@ -45,7 +45,7 @@
+ # model = AT
+ # If you can't figure out what to put here read the FAQ.
+ # If it still doesn't help, consult gnokii-ml or #gnokii at freenode.
+-model = 6510
++model = 6210
+ # There are few main models that should make use of the certain drivers.
+ # These are: 6110, 7110, 6510, 3110, 2110, 6160.
+
+@@ -87,7 +87,7 @@
+ # port software (eg. minicom). If you have wrong permissions for the
+ # directory, a warning will be generated. If you don't want a lockfile, set
+ # it to 'no'.
+-use_locking = yes
++use_locking = no
+
+ # Baudrate to use on serial port connections.
+ # Currently used only by models AT and BIP/CIMD. Defaults to 19200.
diff --git a/comms/gnokii/files/patch-smsd-Makefile.in b/comms/gnokii/files/patch-smsd-Makefile.in
new file mode 100644
index 000000000..83601dce0
--- /dev/null
+++ b/comms/gnokii/files/patch-smsd-Makefile.in
@@ -0,0 +1,22 @@
+--- smsd/Makefile.in.orig 2008-10-06 08:57:19.000000000 +0200
++++ smsd/Makefile.in 2009-02-26 17:35:49.000000000 +0100
+@@ -86,7 +86,7 @@
+ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ PROGRAMS = $(bin_PROGRAMS)
+ am_smsd_OBJECTS = smsd.$(OBJEXT) lowlevel.$(OBJEXT)
+-smsd_OBJECTS = $(am_smsd_OBJECTS)
++smsd_OBJECTS = $(am_smsd_OBJECTS) /usr/lib/libsdp.so
+ smsd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(top_builddir)/common/libgnokii.la
+ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
+@@ -421,8 +421,8 @@
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
diff --git a/comms/gnokii/files/patch-xgnokii-Makefile.in b/comms/gnokii/files/patch-xgnokii-Makefile.in
new file mode 100644
index 000000000..75dd784cc
--- /dev/null
+++ b/comms/gnokii/files/patch-xgnokii-Makefile.in
@@ -0,0 +1,21 @@
+--- xgnokii/Makefile.in.orig 2008-10-06 08:57:20.000000000 +0200
++++ xgnokii/Makefile.in 2009-02-26 17:33:22.000000000 +0100
+@@ -62,7 +62,7 @@
+ xgnokii-xgnokii_xring.$(OBJEXT) \
+ xgnokii-xgnokii_lowlevel.$(OBJEXT) \
+ xgnokii-xgnokii_data.$(OBJEXT)
+-xgnokii_OBJECTS = $(am_xgnokii_OBJECTS)
++xgnokii_OBJECTS = $(am_xgnokii_OBJECTS) /usr/lib/libsdp.so
+ am__DEPENDENCIES_1 =
+ xgnokii_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(top_builddir)/common/libgnokii.la \
+@@ -360,7 +360,8 @@
+ #FIXME install help
+ HELP_DIR = docs/help
+ pkgconfig_DATA = xgnokii.pc
+-pkgconfigdir = $(libdir)/pkgconfig
++libdatadir = $(libdir)data
++pkgconfigdir = $(libdatadir)/pkgconfig
+ desktop_in_files = xgnokii.desktop.in
+ desktopdir = $(datadir)/applications
+ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
diff --git a/comms/gnokii/files/pkg-message.in b/comms/gnokii/files/pkg-message.in
new file mode 100644
index 000000000..7f1b37d3d
--- /dev/null
+++ b/comms/gnokii/files/pkg-message.in
@@ -0,0 +1,13 @@
+==============================================================================
+The default config is installed in %%PREFIX%%/etc/gnokiirc.sample, and is
+configured for Nokia 6210 phones connected on COM1. Have a look at the
+documentation/manpages for more information. You'll need to copy
+gnokiirc.sample to %%PREFIX%%/etc/gnokiirc or $HOME/.gnokiirc for gnokii/
+xgnokii to use it.
+
+Add the users that shall be authorized to run gnokii programs to the
+gnokii group.
+
+NOTE: if you have enabled and plan using the smsd program check
+%%PREFIX%%/share/smsd/README.
+==============================================================================
diff --git a/comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff b/comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff
new file mode 100644
index 000000000..abeed58c8
--- /dev/null
+++ b/comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff
@@ -0,0 +1,21 @@
+--- smsd/Makefile.orig Sun Nov 13 16:00:45 2005
++++ smsd/Makefile Sun Nov 13 16:00:54 2005
+@@ -7,14 +7,14 @@
+ # $Id: smsd-Makefile-WITH_GLIB.diff,v 1.1 2009-04-05 19:51:04 marcus Exp $
+ #
+
+-#GLIBCFLAGS = glib-config --cflags
+-#GLIBLDLIBS = glib-config --libs
++GLIBCFLAGS = glib-config --cflags
++GLIBLDLIBS = glib-config --libs
+
+ # Comment out above lines and uncomment below lines if you want compile smsd
+ # with glib2 instead of glib1.
+ #
+-GLIBCFLAGS = pkg-config --cflags glib-2.0
+-GLIBLDLIBS = pkg-config --libs glib-2.0
++#GLIBCFLAGS = pkg-config --cflags glib-2.0
++#GLIBLDLIBS = pkg-config --libs glib-2.0
+
+ TOPDIR=..
+ include $(TOPDIR)/Makefile.global
diff --git a/comms/gnokii/pkg-descr b/comms/gnokii/pkg-descr
new file mode 100644
index 000000000..4d2f2a1ed
--- /dev/null
+++ b/comms/gnokii/pkg-descr
@@ -0,0 +1,10 @@
+Gnokii is a Unix/Linux tool suite for mobile phones. It provides a
+library to communicate with a phone hiding the communication protocol.
+The library handles SMS, phonebook, calendar, phone calls, and other
+mobile phone capabilities. It supports most of the GSM phones: Nokia
+ones using Nokia proprietary protocol and AT-capable ones -- using
+standard AT commands.
+
+WWW: http://www.gnokii.org/
+
+- Guido Falsi <mad@madpilot.net>
diff --git a/comms/gnokii/pkg-install b/comms/gnokii/pkg-install
new file mode 100644
index 000000000..de143b544
--- /dev/null
+++ b/comms/gnokii/pkg-install
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+GROUP=gnokii
+
+SUIDBINS="${PKG_PREFIX}/sbin/gnokiid ${PKG_PREFIX}/sbin/mgnokiidev"
+BINS="${PKG_PREFIX}/bin/gnokii ${SUIDBINS}"
+
+if [ -e ${PKG_PREFIX}/bin/xgnokii ]; then
+ BINS="$BINS ${PKG_PREFIX}/bin/xgnokii"
+fi
+
+case "$2" in
+"PRE-INSTALL")
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+ ;;
+
+"POST-INSTALL")
+ chgrp $GROUP $BINS
+ chmod 750 ${BINS}
+ chmod u+s ${SUIDBINS}
+ ;;
+
+"DEINSTALL")
+ if [ -z "`pw groupshow $GROUP 2>&1 | sed -E -e 's/^([^:]+:){3}(.*)$/\2/'`" ]; then
+ echo "Removing empty group \"$GROUP\"."
+ pw groupdel $GROUP
+ fi
+ ;;
+
+esac
diff --git a/comms/gnokii/pkg-plist b/comms/gnokii/pkg-plist
new file mode 100644
index 000000000..0c8308b95
--- /dev/null
+++ b/comms/gnokii/pkg-plist
@@ -0,0 +1,126 @@
+bin/gnokii
+bin/sendsms
+%%X11%%bin/xgnokii
+etc/gnokiirc.sample
+include/gnokii.h
+include/gnokii/bitmaps.h
+include/gnokii/call.h
+include/gnokii/common.h
+include/gnokii/data.h
+include/gnokii/encoding.h
+include/gnokii/error.h
+include/gnokii/networks.h
+include/gnokii/ringtones.h
+include/gnokii/rlp-common.h
+include/gnokii/sms.h
+include/gnokii/statemachine.h
+include/gnokii/virtmodem.h
+include/gnokii/wappush.h
+@dirrm include/gnokii
+lib/libgnokii.a
+lib/libgnokii.la
+lib/libgnokii.so
+lib/libgnokii.so.4
+libdata/pkgconfig/gnokii.pc
+libdata/pkgconfig/xgnokii.pc
+sbin/gnokiid
+sbin/mgnokiidev
+%%SMSD%%sbin/smsd
+share/locale/cs/LC_MESSAGES/gnokii.mo
+share/locale/de/LC_MESSAGES/gnokii.mo
+share/locale/et/LC_MESSAGES/gnokii.mo
+share/locale/fi/LC_MESSAGES/gnokii.mo
+share/locale/fr/LC_MESSAGES/gnokii.mo
+share/locale/it/LC_MESSAGES/gnokii.mo
+share/locale/nl/LC_MESSAGES/gnokii.mo
+share/locale/pl/LC_MESSAGES/gnokii.mo
+share/locale/pt/LC_MESSAGES/gnokii.mo
+share/locale/sk/LC_MESSAGES/gnokii.mo
+share/locale/sl/LC_MESSAGES/gnokii.mo
+share/locale/sv/LC_MESSAGES/gnokii.mo
+share/locale/zh_CN/LC_MESSAGES/gnokii.mo
+%%SMSD%%share/smsd/README
+%%SMSD%%share/smsd/action
+%%SMSD%%lib/smsd/libsmsd_file.a
+%%SMSD%%lib/smsd/libsmsd_file.la
+%%SMSD%%lib/smsd/libsmsd_file.so
+%%MSM%%lib/smsd/libsmsd_mysql.a
+%%MSM%%lib/smsd/libsmsd_mysql.la
+%%MSM%%lib/smsd/libsmsd_mysql.so
+%%MSM%%share/smsd/sms.tables.mysql.sql
+%%PGM%%lib/smsd/libsmsd_pq.a
+%%PGM%%lib/smsd/libsmsd_pq.la
+%%PGM%%lib/smsd/libsmsd_pq.so
+%%PGM%%share/smsd/sms.tables.pq.sql
+%%SMSD%%@dirrm lib/smsd
+%%SMSD%%@dirrm share/smsd
+%%X11%%share/applications/xgnokii.desktop
+%%X11%%share/xgnokii/help/en_US/faq.html
+%%X11%%share/xgnokii/help/en_US/firmware/firmware.html
+%%X11%%share/xgnokii/help/en_US/index.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net0.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net1.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net2.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net3.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net4.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net5.html
+%%X11%%share/xgnokii/help/en_US/netmon/faq_net6.html
+%%X11%%share/xgnokii/help/en_US/netmon/net_mon1.png
+%%X11%%share/xgnokii/help/en_US/netmon/net_mon2.png
+%%X11%%share/xgnokii/help/en_US/netmon/net_mon3.png
+%%X11%%share/xgnokii/help/en_US/netmon/nm2_5110.png
+%%X11%%share/xgnokii/help/en_US/netmon/nm_3210.png
+%%X11%%share/xgnokii/help/en_US/netmon/nm_5110.png
+%%X11%%share/xgnokii/help/en_US/netmon/nm_9110.png
+%%X11%%share/xgnokii/help/en_US/netmon/tip.png
+%%X11%%share/xgnokii/help/en_US/styl.css
+%%X11%%share/xgnokii/help/pl_PL/calendar.html
+%%X11%%share/xgnokii/help/pl_PL/contacts.html
+%%X11%%share/xgnokii/help/pl_PL/dtmf.html
+%%X11%%share/xgnokii/help/pl_PL/index.html
+%%X11%%share/xgnokii/help/pl_PL/netmon.html
+%%X11%%share/xgnokii/help/pl_PL/netmon/dir0.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/dir1.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/glowna.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/f2mbus.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/f2mbus2.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_loga.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net0.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net1.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net2.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net3.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net4.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net5.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faq_net6.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/faqkable.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/firmware.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/index.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/net_mon1.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/net_mon2.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/net_mon3.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/net_spis.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/nm2_5110.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/nm_3210.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/nm_5110.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/nm_9110.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/gsm/tip.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/htm.png
+%%X11%%share/xgnokii/help/pl_PL/netmon/index.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/konw.js
+%%X11%%share/xgnokii/help/pl_PL/netmon/spis.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/spis_d.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/spis_d2.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/spis_g.htm
+%%X11%%share/xgnokii/help/pl_PL/netmon/styl.css
+%%X11%%share/xgnokii/help/pl_PL/sms.html
+%%X11%%share/xgnokii/help/pl_PL/speeddial.html
+%%X11%%share/xgnokii/help/pl_PL/xkeyb.html
+%%X11%%@dirrm share/xgnokii/help/en_US/firmware
+%%X11%%@dirrm share/xgnokii/help/en_US/netmon
+%%X11%%@dirrm share/xgnokii/help/en_US
+%%X11%%@dirrm share/xgnokii/help/pl_PL/netmon/gsm
+%%X11%%@dirrm share/xgnokii/help/pl_PL/netmon
+%%X11%%@dirrm share/xgnokii/help/pl_PL
+%%X11%%@dirrm share/xgnokii/help
+%%X11%%@dirrm share/xgnokii
+%%X11%%@dirrmtry share/applications