View | Details | Raw Unified | Return to bug 128589 | Differences between
and this patch

Collapse All | Expand All

(-)gnokii/Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	gnokii
8
PORTNAME=	gnokii
9
PORTVERSION=	0.6.26
9
PORTVERSION=	0.6.27
10
PORTREVISION=	3
11
PORTEPOCH=	1
10
PORTEPOCH=	1
12
CATEGORIES=	comms
11
CATEGORIES=	comms
13
MASTER_SITES=	http://www.gnokii.org/download/gnokii/ \
12
MASTER_SITES=	http://www.gnokii.org/download/gnokii/ \
(-)gnokii/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (gnokii-0.6.26.tar.bz2) = 60f817d8ce748fea0ec9a05b3537e08d
1
MD5 (gnokii-0.6.27.tar.bz2) = fd0ae7996a2e2a2c29e9f3c625df8f3d
2
SHA256 (gnokii-0.6.26.tar.bz2) = 35242b5545ced25383ac8c771b602c15b5585063c3637a23c9ef0a31d3e591ea
2
SHA256 (gnokii-0.6.27.tar.bz2) = 69f1d75f755a2918e9577cf28dacea9d6fca9b9d722813341d50d12acb8ee886
3
SIZE (gnokii-0.6.26.tar.bz2) = 1446615
3
SIZE (gnokii-0.6.27.tar.bz2) = 1491564
(-)gnokii/files/patch-common-devices-unixbluetooth.c (+321 lines)
Line 0 Link Here
1
--- common/devices/unixbluetooth.c.orig	2008-10-05 12:14:31.000000000 +0200
2
+++ common/devices/unixbluetooth.c	2008-11-04 22:30:35.000000000 +0100
3
@@ -54,6 +54,8 @@
4
 #include <netgraph/bluetooth/include/ng_hci.h>
5
 #include <netgraph/bluetooth/include/ng_l2cap.h>
6
 #include <netgraph/bluetooth/include/ng_btsocket.h>
7
+#include <bluetooth.h>
8
+#include <sdp.h>
9
 
10
 #define BTPROTO_RFCOMM BLUETOOTH_PROTO_RFCOMM
11
 #define BDADDR_ANY NG_HCI_BDADDR_ANY
12
@@ -86,11 +88,6 @@
13
 
14
 #endif	/* HAVE_BT_ATON */
15
 
16
-static int str2ba(const char *str, bdaddr_t *ba)
17
-{
18
-	return !bt_aton(str, ba);
19
-}
20
-
21
 #else	/* Linux / BlueZ support */
22
 
23
 #include <bluetooth/bluetooth.h>
24
@@ -100,6 +97,272 @@
25
 
26
 #endif
27
 
28
+#ifdef HAVE_BLUETOOTH_NETGRAPH	/* FreeBSD / netgraph */
29
+
30
+/*
31
+** FreeBSD version of the find_service_channel function.
32
+** Written by Guido Falsi <mad@madpilot.net>.
33
+** Contains code taken from FreeBSD's sdpcontrol and rfcomm_sppd
34
+** programs, which are Copyright (c) 2001-2003 Maksim Yevmenkin
35
+** <m_evmenkin@yahoo.com>.
36
+*/
37
+
38
+static int find_service_channel(bdaddr_t *adapter, bdaddr_t *device, int only_gnapplet, uint16_t svclass_id)
39
+{
40
+	uint8_t getchan = 0;
41
+	uint32_t i, good = 0;
42
+	char name[64];
43
+	void *ss = NULL;
44
+
45
+	uint32_t attrs[] =
46
+	{
47
+		SDP_ATTR_RANGE( SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET,
48
+			SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET),
49
+		SDP_ATTR_RANGE( SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST,
50
+			SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST),
51
+	};
52
+	#define attrs_len	(sizeof(attrs)/sizeof(attrs[0]))
53
+
54
+	/* Buffer for the attributes */
55
+	#define NRECS   25      /* request this much records from the SDP server */
56
+	#define BSIZE   256     /* one attribute buffer size */
57
+	static uint8_t          buffer[NRECS * attrs_len][BSIZE];
58
+
59
+	/* SDP attributes */
60
+	static sdp_attr_t       values[NRECS * attrs_len];
61
+	#define values_len      (sizeof(values)/sizeof(values[0]))
62
+
63
+	/* Initialize attribute values array */
64
+	for (i = 0; i < values_len; i ++) {
65
+		values[i].flags = SDP_ATTR_INVALID;
66
+		values[i].attr = 0;
67
+		values[i].vlen = BSIZE; 
68
+		values[i].value = buffer[i];
69
+	}
70
+
71
+	if ((ss = sdp_open(adapter, device)) == NULL)
72
+		return -1;
73
+
74
+	if (sdp_error(ss) != 0)
75
+	{
76
+		sdp_close(ss);
77
+		return -1;
78
+	}
79
+
80
+	if (sdp_search(ss, 1, &svclass_id, attrs_len, attrs, values_len, values) != 0)
81
+	{
82
+		sdp_close(ss);
83
+		return -1;
84
+	}
85
+
86
+	for (i = 0; i < values_len; i++)
87
+	{
88
+		if (values[i].flags != SDP_ATTR_OK)
89
+			break;
90
+
91
+		union {
92
+			uint8_t		uint8;
93
+			uint16_t	uint16;
94
+			uint32_t	uint32;
95
+			uint64_t	uint64;
96
+			int128_t	int128;
97
+		}			value;
98
+		uint8_t *start, *end;
99
+		uint32_t type, len;
100
+
101
+		start = values[i].value;
102
+		end = values[i].value + values[i].vlen;
103
+
104
+		switch (values[i].attr) {
105
+		case SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST:
106
+			if(getchan) {
107
+				SDP_GET8(type, start);
108
+				switch (type) {
109
+				case SDP_DATA_SEQ8:
110
+					SDP_GET8(len, start);
111
+					break;
112
+
113
+				case SDP_DATA_SEQ16:
114
+					SDP_GET16(len, start);
115
+					break;
116
+
117
+				case SDP_DATA_SEQ32:
118
+					SDP_GET32(len, start);
119
+					break;
120
+
121
+				default:
122
+					sdp_close(ss);
123
+					return -1;
124
+					break;
125
+				}
126
+
127
+				SDP_GET8(type, start);
128
+				switch (type) {
129
+				case SDP_DATA_SEQ8:
130
+					SDP_GET8(len, start);
131
+					break;
132
+
133
+				case SDP_DATA_SEQ16:
134
+					SDP_GET16(len, start);
135
+					break;
136
+
137
+				case SDP_DATA_SEQ32:
138
+					SDP_GET32(len, start);
139
+					break;
140
+
141
+				default:
142
+					sdp_close(ss);
143
+					return -1;
144
+					break;
145
+				}
146
+
147
+				while (start < end) {
148
+					SDP_GET8(type, start);
149
+					switch (type) {
150
+					case SDP_DATA_UUID16:
151
+						SDP_GET16(value.uint16, start);
152
+						break;
153
+
154
+					case SDP_DATA_UUID32:
155
+						SDP_GET32(value.uint32, start);
156
+						break;
157
+
158
+					case SDP_DATA_UUID128:
159
+						SDP_GET_UUID128(&value.int128, start);
160
+						break;
161
+
162
+					default:
163
+						sdp_close(ss);
164
+						return -1;
165
+						break;
166
+					}
167
+					if(value.uint16 == 3) {
168
+						SDP_GET8(type, start);
169
+						switch (type) {
170
+						case SDP_DATA_UINT8:
171
+						case SDP_DATA_INT8:
172
+							SDP_GET8(value.uint8, start);
173
+							return value.uint8;
174
+							break;
175
+
176
+						case SDP_DATA_UINT16:
177
+						case SDP_DATA_INT16:
178
+							SDP_GET16(value.uint16, start);
179
+							return value.uint16;
180
+							break;
181
+
182
+						case SDP_DATA_UINT32:
183
+						case SDP_DATA_INT32:
184
+							SDP_GET32(value.uint32, start);
185
+							return value.uint32;
186
+							break;
187
+
188
+						default:
189
+							sdp_close(ss);
190
+							return -1;
191
+							break;
192
+						}
193
+					} else {
194
+						SDP_GET8(type, start);
195
+						switch (type) {
196
+						case SDP_DATA_SEQ8:
197
+						case SDP_DATA_UINT8:
198
+						case SDP_DATA_INT8:
199
+						case SDP_DATA_BOOL:
200
+							SDP_GET8(value.uint8, start);
201
+							break;
202
+
203
+						case SDP_DATA_SEQ16:
204
+						case SDP_DATA_UINT16:
205
+						case SDP_DATA_INT16:
206
+						case SDP_DATA_UUID16:
207
+							SDP_GET16(value.uint16, start);
208
+							break;
209
+
210
+						case SDP_DATA_SEQ32:
211
+						case SDP_DATA_UINT32:
212
+						case SDP_DATA_INT32:
213
+						case SDP_DATA_UUID32:
214
+							SDP_GET32(value.uint32, start);
215
+							break;
216
+
217
+						case SDP_DATA_UINT64:
218
+						case SDP_DATA_INT64:
219
+							SDP_GET64(value.uint64, start);
220
+							break;
221
+
222
+						case SDP_DATA_UINT128:
223
+						case SDP_DATA_INT128:
224
+							SDP_GET128(&value.int128, start);
225
+							break;
226
+
227
+						default:
228
+							sdp_close(ss);
229
+							return -1;
230
+							break;
231
+						}
232
+					}
233
+				}
234
+			}
235
+			start += len;
236
+			break;
237
+
238
+		case SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET:
239
+			SDP_GET8(type, start);
240
+			switch (type) {
241
+				case SDP_DATA_STR8:
242
+				case SDP_DATA_URL8:
243
+					SDP_GET8(len, start);
244
+					snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start);
245
+					start += len;
246
+					break;
247
+
248
+				case SDP_DATA_STR16:
249
+				case SDP_DATA_URL16:
250
+					SDP_GET16(len, start);
251
+					snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start);
252
+					start += len;
253
+					break;
254
+
255
+				case SDP_DATA_STR32:
256
+				case SDP_DATA_URL32:
257
+					SDP_GET32(len, start);
258
+					snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start);
259
+					start += len;
260
+					break;
261
+
262
+				default:
263
+					sdp_close(ss);
264
+					return -1;
265
+			}
266
+			if (name == NULL)
267
+				return -1;
268
+
269
+			if (strcmp(name, "gnapplet") == 0) {
270
+				if (only_gnapplet != 0)
271
+					getchan = 1;
272
+				break;
273
+			}
274
+
275
+			if (strstr(name, "Nokia PC Suite") != NULL)
276
+				break;
277
+
278
+			if (strstr(name, "Bluetooth Serial Port") != NULL)
279
+				break;
280
+
281
+			if (strstr(name, "m-Router Connectivity") != NULL)
282
+				break;
283
+
284
+			getchan = 1;
285
+			break;
286
+		}
287
+	}
288
+
289
+	sdp_close(ss);
290
+	return -1;
291
+}
292
+
293
+#else
294
 /*
295
  * Taken from gnome-phone-manager
296
  */
297
@@ -204,6 +467,8 @@
298
 	return channel;
299
 }
300
 
301
+#endif
302
+
303
 static int get_serial_channel(bdaddr_t *device)
304
 {
305
 	bdaddr_t src;
306
@@ -211,9 +476,15 @@
307
 
308
 	bacpy(&src, BDADDR_ANY);
309
 
310
+#ifdef HAVE_BLUETOOTH_NETGRAPH	/* FreeBSD / netgraph */
311
+	channel = find_service_channel(&src, device, 0, SDP_SERVICE_CLASS_SERIAL_PORT);
312
+	if (channel < 0)
313
+		channel = find_service_channel(&src, device, 0, SDP_SERVICE_CLASS_DIALUP_NETWORKING);
314
+#else
315
 	channel = find_service_channel(&src, device, 0, SERIAL_PORT_SVCLASS_ID);
316
 	if (channel < 0)
317
 		channel = find_service_channel(&src, device, 0, DIALUP_NET_SVCLASS_ID);
318
+#endif
319
 
320
 	return channel;
321
 }
(-)gnokii/files/patch-configure (-9 / +84 lines)
Lines 1-6 Link Here
1
--- configure.orig     2008-02-15 10:21:49.000000000 +0100
1
--- configure.orig	2008-10-06 08:57:27.000000000 +0200
2
+++ configure  2008-02-23 11:08:39.000000000 +0100
2
+++ configure	2008-11-01 00:28:22.000000000 +0100
3
@@ -1050,7 +1050,7 @@
3
@@ -1057,7 +1057,7 @@
4
 psdir='${docdir}'
4
 psdir='${docdir}'
5
 libdir='${exec_prefix}/lib'
5
 libdir='${exec_prefix}/lib'
6
 localedir='${datarootdir}/locale'
6
 localedir='${datarootdir}/locale'
Lines 9-15 Link Here
9
 
9
 
10
 ac_prev=
10
 ac_prev=
11
 ac_dashdash=
11
 ac_dashdash=
12
@@ -22653,13 +22653,15 @@
12
@@ -24163,13 +24163,15 @@
13
 # First of all, check if the user has set any of the PTHREAD_LIBS,
13
 # First of all, check if the user has set any of the PTHREAD_LIBS,
14
 # etcetera environment variables, and if threads linking works using
14
 # etcetera environment variables, and if threads linking works using
15
 # them:
15
 # them:
Lines 30-36 Link Here
30
         cat >conftest.$ac_ext <<_ACEOF
30
         cat >conftest.$ac_ext <<_ACEOF
31
 /* confdefs.h.  */
31
 /* confdefs.h.  */
32
 _ACEOF
32
 _ACEOF
33
@@ -23023,7 +23025,7 @@
33
@@ -24533,7 +24535,7 @@
34
 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
34
 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
35
         flag=no
35
         flag=no
36
         case "${host_cpu}-${host_os}" in
36
         case "${host_cpu}-${host_os}" in
Lines 39-59 Link Here
39
                 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
39
                 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
40
         esac
40
         esac
41
         { echo "$as_me:$LINENO: result: ${flag}" >&5
41
         { echo "$as_me:$LINENO: result: ${flag}" >&5
42
@@ -23840,7 +23842,7 @@
42
@@ -26561,9 +26563,9 @@
43
 fi
43
 
44
 
44
 if test "$enable_libical" == "yes"; then
45
 
46
-if test "$enable_libical" == "yes"; then
47
+if test "$enable_libical" = "yes"; then
45
 	OLD_CFLAGS="$CFLAGS"
48
 	OLD_CFLAGS="$CFLAGS"
46
-	LIBS="$LIBS $ICAL_LIBS -lpthread -lical"
49
-	LIBS="$LIBS $ICAL_LIBS -lpthread -lical"
47
+	LIBS="$LIBS $ICAL_LIBS -pthread -lical"
50
+	LIBS="$LIBS $ICAL_LIBS -pthread -lical"
48
 	CFLAGS="$CFLAGS $ICAL_CFLAGS"
51
 	CFLAGS="$CFLAGS $ICAL_CFLAGS"
49
 	{ echo "$as_me:$LINENO: checking whether libical is installed" >&5
52
 	{ echo "$as_me:$LINENO: checking whether libical is installed" >&5
50
 echo $ECHO_N "checking whether libical is installed... $ECHO_C" >&6; }
53
 echo $ECHO_N "checking whether libical is installed... $ECHO_C" >&6; }
51
@@ -25684,7 +25686,7 @@
54
@@ -26650,7 +26652,7 @@
55
   enable_libusb=yes
56
 fi
57
 
58
-if test "$enable_libusb" == "yes"; then
59
+if test "$enable_libusb" = "yes"; then
60
 	{ echo "$as_me:$LINENO: checking whether libusb is installed" >&5
61
 echo $ECHO_N "checking whether libusb is installed... $ECHO_C" >&6; }
62
 	cat >conftest.$ac_ext <<_ACEOF
63
@@ -26872,7 +26874,7 @@
64
   enable_irda=yes
65
 fi
66
 
67
-if test "$enable_irda" == "yes"; then
68
+if test "$enable_irda" = "yes"; then
69
 	{ echo "$as_me:$LINENO: checking for linux/irda.h" >&5
70
 echo $ECHO_N "checking for linux/irda.h... $ECHO_C" >&6; }
71
 if test "${ac_cv_header_linux_irda_h+set}" = set; then
72
@@ -26955,7 +26957,7 @@
73
   enable_bluetooth=yes
74
 fi
75
 
76
-if test "$enable_bluetooth" == "yes"; then
77
+if test "$enable_bluetooth" = "yes"; then
78
 	{ echo "$as_me:$LINENO: checking for the bluetooth support" >&5
79
 echo $ECHO_N "checking for the bluetooth support... $ECHO_C" >&6; }
80
 	{ echo "$as_me:$LINENO: checking for the struct sockaddr_rc in <bluetooth/rfcomm.h>" >&5
81
@@ -27025,7 +27027,7 @@
82
 
83
 	fi
84
 fi
85
-if test "$enable_bluetooth" == "yes"; then
86
+if test "$enable_bluetooth" = "yes"; then
87
 	{ echo "$as_me:$LINENO: checking for the MacOS X bluetooth support" >&5
88
 echo $ECHO_N "checking for the MacOS X bluetooth support... $ECHO_C" >&6; }
89
 
90
@@ -27526,7 +27528,7 @@
91
 	fi
92
 fi
93
 
94
-if test "$enable_bluetooth" == "yes"; then
95
+if test "$enable_bluetooth" = "yes"; then
96
 	{ echo "$as_me:$LINENO: checking for the FreeBSD/netgraph bluetooth support" >&5
97
 echo $ECHO_N "checking for the FreeBSD/netgraph bluetooth support... $ECHO_C" >&6; }
98
 	{ echo "$as_me:$LINENO: checking for the struct sockaddr_rfcomm in <netgraph/.../ng_btsocket.h>" >&5
99
@@ -27602,7 +27604,7 @@
100
   echo $ECHO_N "(cached) $ECHO_C" >&6
101
 else
102
   ac_check_lib_save_LIBS=$LIBS
103
-LIBS="-lbluetooth  $LIBS"
104
+LIBS="-lsdp -lbluetooth $LIBS"
105
 cat >conftest.$ac_ext <<_ACEOF
106
 /* confdefs.h.  */
107
 _ACEOF
108
@@ -27658,7 +27660,7 @@
109
 { echo "$as_me:$LINENO: result: $ac_cv_lib_bluetooth_bt_aton" >&5
110
 echo "${ECHO_T}$ac_cv_lib_bluetooth_bt_aton" >&6; }
111
 if test $ac_cv_lib_bluetooth_bt_aton = yes; then
112
-  BLUETOOTH_LIBS="$LIBS -lbluetooth"
113
+  BLUETOOTH_LIBS="$LIBS -lsdp -lbluetooth"
114
 cat >>confdefs.h <<\_ACEOF
115
 #define HAVE_BT_ATON
116
 _ACEOF
117
@@ -27676,7 +27678,7 @@
118
   enable_libpcsclite=yes
119
 fi
120
 
121
-if test "$enable_libpcsclite" == "yes"; then
122
+if test "$enable_libpcsclite" = "yes"; then
123
 
124
 
125
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
126
@@ -28474,7 +28476,7 @@
52
 echo "${ECHO_T}$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&6; }
127
 echo "${ECHO_T}$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&6; }
53
 if test $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage = yes; then
128
 if test $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage = yes; then
54
    XPM_CFLAGS="$XINCL"
129
    XPM_CFLAGS="$XINCL"
55
-                  XPM_LIBS="$XLIBS -lXpm -lX11"
130
-                  XPM_LIBS="$XLIBS -lXpm -lX11"
56
+                  XPM_LIBS="$XLIBS -lXpm -lX11 -lroken -lcrypt"
131
+                  XPM_LIBS="$XLIBS -lXpm -lX11 -lroken -lcrypt"
57
132
 
58
 cat >>confdefs.h <<\_ACEOF
133
 cat >>confdefs.h <<\_ACEOF
59
 #define XPM 1
134
 #define XPM 1
(-)gnokii/pkg-plist (-1 / +1 lines)
Lines 20-26 Link Here
20
lib/libgnokii.a
20
lib/libgnokii.a
21
lib/libgnokii.la
21
lib/libgnokii.la
22
lib/libgnokii.so
22
lib/libgnokii.so
23
lib/libgnokii.so.12
23
lib/libgnokii.so.4
24
libdata/pkgconfig/gnokii.pc
24
libdata/pkgconfig/gnokii.pc
25
libdata/pkgconfig/xgnokii.pc
25
libdata/pkgconfig/xgnokii.pc
26
sbin/gnokiid
26
sbin/gnokiid

Return to bug 128589