diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-01-11 17:40:38 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-01-11 17:40:38 +0000 |
commit | 4036e7587a6a93abfcb00bacfa58defeb735f39c (patch) | |
tree | c0f4f29f8d2f0a6e4d4c82843175960be2912e38 /comms | |
parent | 729c90d8b262fe2f5ba482a0faa46567cb9e65b1 (diff) |
- Update to 0.6.27
PR: 128589
Submitted by: Guido Falsi <mad@madpilot.net> (maintainer)
Notes
Notes:
svn path=/head/; revision=225745
Diffstat (limited to 'comms')
-rw-r--r-- | comms/gnokii/Makefile | 3 | ||||
-rw-r--r-- | comms/gnokii/distinfo | 6 | ||||
-rw-r--r-- | comms/gnokii/files/patch-common-devices-unixbluetooth.c | 321 | ||||
-rw-r--r-- | comms/gnokii/files/patch-configure | 93 | ||||
-rw-r--r-- | comms/gnokii/pkg-plist | 2 |
5 files changed, 410 insertions, 15 deletions
diff --git a/comms/gnokii/Makefile b/comms/gnokii/Makefile index 90dccf0e3d99..e9ca23002ad4 100644 --- a/comms/gnokii/Makefile +++ b/comms/gnokii/Makefile @@ -6,8 +6,7 @@ # PORTNAME= gnokii -PORTVERSION= 0.6.26 -PORTREVISION= 3 +PORTVERSION= 0.6.27 PORTEPOCH= 1 CATEGORIES= comms MASTER_SITES= http://www.gnokii.org/download/gnokii/ \ diff --git a/comms/gnokii/distinfo b/comms/gnokii/distinfo index d5235e7a1efc..8471bf2430f3 100644 --- a/comms/gnokii/distinfo +++ b/comms/gnokii/distinfo @@ -1,3 +1,3 @@ -MD5 (gnokii-0.6.26.tar.bz2) = 60f817d8ce748fea0ec9a05b3537e08d -SHA256 (gnokii-0.6.26.tar.bz2) = 35242b5545ced25383ac8c771b602c15b5585063c3637a23c9ef0a31d3e591ea -SIZE (gnokii-0.6.26.tar.bz2) = 1446615 +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-common-devices-unixbluetooth.c b/comms/gnokii/files/patch-common-devices-unixbluetooth.c new file mode 100644 index 000000000000..7b2074e39925 --- /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 2008-11-04 22:30:35.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 <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 index e40a41d025d5..3af7f0e0bb74 100644 --- a/comms/gnokii/files/patch-configure +++ b/comms/gnokii/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2008-02-15 10:21:49.000000000 +0100 -+++ configure 2008-02-23 11:08:39.000000000 +0100 -@@ -1050,7 +1050,7 @@ +--- configure.orig 2008-10-06 08:57:27.000000000 +0200 ++++ configure 2008-11-01 00:28:22.000000000 +0100 +@@ -1057,7 +1057,7 @@ psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' @@ -9,7 +9,7 @@ ac_prev= ac_dashdash= -@@ -22653,13 +22653,15 @@ +@@ -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: @@ -30,7 +30,7 @@ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -23023,7 +23025,7 @@ +@@ -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 @@ -39,21 +39,96 @@ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac { echo "$as_me:$LINENO: result: ${flag}" >&5 -@@ -23840,7 +23842,7 @@ +@@ -26561,9 +26563,9 @@ + fi - if test "$enable_libical" == "yes"; then + +-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; } -@@ -25684,7 +25686,7 @@ +@@ -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="$LIBS -lsdp -lbluetooth" + 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/pkg-plist b/comms/gnokii/pkg-plist index f6ba56ac4ed1..0c8308b9560e 100644 --- a/comms/gnokii/pkg-plist +++ b/comms/gnokii/pkg-plist @@ -20,7 +20,7 @@ include/gnokii/wappush.h lib/libgnokii.a lib/libgnokii.la lib/libgnokii.so -lib/libgnokii.so.12 +lib/libgnokii.so.4 libdata/pkgconfig/gnokii.pc libdata/pkgconfig/xgnokii.pc sbin/gnokiid |