pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/comms/obexapp Clean up previous patches for NetBSD blu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9bb3c4a49210
branches:  trunk
changeset: 515844:9bb3c4a49210
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Sun Jul 09 16:35:31 2006 +0000

description:
Clean up previous patches for NetBSD bluetooth support. IMHO I can
send them to the author now.

diffstat:

 comms/obexapp/Makefile         |    6 +-
 comms/obexapp/distinfo         |   11 +-
 comms/obexapp/patches/patch-aa |   29 +++++---
 comms/obexapp/patches/patch-ab |  118 +++-----------------------------------
 comms/obexapp/patches/patch-ac |   25 +++----
 comms/obexapp/patches/patch-ad |  125 +++-------------------------------------
 comms/obexapp/patches/patch-ae |   13 ----
 7 files changed, 55 insertions(+), 272 deletions(-)

diffs (truncated from 385 to 300 lines):

diff -r 04f059e00a48 -r 9bb3c4a49210 comms/obexapp/Makefile
--- a/comms/obexapp/Makefile    Sun Jul 09 15:29:59 2006 +0000
+++ b/comms/obexapp/Makefile    Sun Jul 09 16:35:31 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2006/07/02 18:24:18 xtraeme Exp $
+# $NetBSD: Makefile,v 1.3 2006/07/09 16:35:31 xtraeme Exp $
 #
 
 DISTNAME=      obexapp-1.4.4
@@ -24,13 +24,9 @@
 # Sigh, this needs the GNU libiconv.
 USE_GNU_ICONV=         yes
 
-# Version that contains support for NetBSD/bluetooth.
-BUILDLINK_ABI_DEPENDS.openobex+=       openobex>=1.0.1nb3
-
 # Sigh... too many warnings with GCC 4.x, disable them for now.
 CFLAGS+=               -w
 
-
 .include "../../comms/openobex/buildlink3.mk"
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
diff -r 04f059e00a48 -r 9bb3c4a49210 comms/obexapp/distinfo
--- a/comms/obexapp/distinfo    Sun Jul 09 15:29:59 2006 +0000
+++ b/comms/obexapp/distinfo    Sun Jul 09 16:35:31 2006 +0000
@@ -1,10 +1,9 @@
-$NetBSD: distinfo,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+$NetBSD: distinfo,v 1.2 2006/07/09 16:35:31 xtraeme Exp $
 
 SHA1 (obexapp-1.4.4.tar.gz) = 4d99ff1e636109dd8013d1c4bc5b2852103e4071
 RMD160 (obexapp-1.4.4.tar.gz) = d4ca4229e8e63158366bef72e39323b249aca614
 Size (obexapp-1.4.4.tar.gz) = 245156 bytes
-SHA1 (patch-aa) = 72d58a720378787f2083f55a46dc62a146a10f95
-SHA1 (patch-ab) = 8b6f6f84ba815bc3416822cfbe1fa76ae751b909
-SHA1 (patch-ac) = 0ea10dd4847237fbc8dcb0bfce7e20248d2867b1
-SHA1 (patch-ad) = 02c68786f9621ad4ff4c68653973a549e82de0f7
-SHA1 (patch-ae) = d9a09e9ca0118ebb489507e2fe9965fbded4552b
+SHA1 (patch-aa) = 28d245c716a6d8fd57607dd74f239f165da9f4ac
+SHA1 (patch-ab) = a0355450e8af326a24d6db5af436851e67d4d395
+SHA1 (patch-ac) = d9a09e9ca0118ebb489507e2fe9965fbded4552b
+SHA1 (patch-ad) = cad2be971aa84774f3c4788886860e5982eb0d15
diff -r 04f059e00a48 -r 9bb3c4a49210 comms/obexapp/patches/patch-aa
--- a/comms/obexapp/patches/patch-aa    Sun Jul 09 15:29:59 2006 +0000
+++ b/comms/obexapp/patches/patch-aa    Sun Jul 09 16:35:31 2006 +0000
@@ -1,16 +1,21 @@
-$NetBSD: patch-aa,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+$NetBSD: patch-aa,v 1.2 2006/07/09 16:35:31 xtraeme Exp $
 
---- obexapp.h.orig     2006-07-02 19:32:51.000000000 +0200
-+++ obexapp.h  2006-07-02 19:33:45.000000000 +0200
-@@ -71,7 +71,11 @@
+--- obexapp.h.orig     2004-12-29 22:49:05.000000000 +0100
++++ obexapp.h  2006-07-09 18:23:44.000000000 +0200
+@@ -32,6 +32,16 @@
+ #ifndef _OBEXAPP_H_
+ #define _OBEXAPP_H_
  
- struct context
- {
 +#ifdef __NetBSD__
-+      struct sockaddr_bt       addr;           /* remote address */
-+#else
-       struct sockaddr_rfcomm   addr;           /* remote address */
++#define BLUETOOTH_PROTO_RFCOMM        BTPROTO_RFCOMM
++#define NG_HCI_BDADDR_ANY     BDADDR_ANY
++#define sockaddr_rfcomm       sockaddr_bt
++#define rfcomm_bdaddr         bt_bdaddr
++#define rfcomm_channel                bt_channel
++#define rfcomm_len            bt_len
++#define rfcomm_family         bt_family
 +#endif
-       bdaddr_t                 saddr;          /* local address */
-       char                    *root;           /* root path */
-       char                    *user;           /* user */
++
+ /*
+  * Defines 
+  */
diff -r 04f059e00a48 -r 9bb3c4a49210 comms/obexapp/patches/patch-ab
--- a/comms/obexapp/patches/patch-ab    Sun Jul 09 15:29:59 2006 +0000
+++ b/comms/obexapp/patches/patch-ab    Sun Jul 09 16:35:31 2006 +0000
@@ -1,113 +1,15 @@
-$NetBSD: patch-ab,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+$NetBSD: patch-ab,v 1.2 2006/07/09 16:35:31 xtraeme Exp $
 
---- main.c.orig        2004-12-24 00:09:48.000000000 +0100
-+++ main.c     2006-07-02 19:48:19.000000000 +0200
-@@ -90,8 +90,13 @@
- 
-       /* Prepare context */
-       memset(&context, 0, sizeof(context));
-+#ifdef __NetBSD__
-+      context.addr.bt_len = sizeof(context.addr.bt_len);
-+      context.addr.bt_family = AF_BLUETOOTH;
-+#else
-       context.addr.rfcomm_len = sizeof(context.addr.rfcomm_len);
-       context.addr.rfcomm_family = AF_BLUETOOTH;
-+#endif
-       context.tfd = context.sfd = -1;
-       context.detach = 1;
- 
-@@ -148,15 +153,23 @@
-       while ((n = getopt(argc, argv, "a:A:cC:dDfhnr:Ssu:")) != -1) {
-               switch (n) {
-               case 'a':
-+#ifdef __NetBSD__
-+                      if (!bt_aton(optarg, &context.addr.bt_bdaddr)) {
-+#else
-                       if (!bt_aton(optarg, &context.addr.rfcomm_bdaddr)) {
-+#endif
-                               struct hostent  *he = bt_gethostbyname(optarg);
- 
-                               if (he == NULL)
-                                       errx(1, "%s: %s", optarg,
-                                               hstrerror(h_errno));
--
-+#ifdef __NetBSD__
-+                              memcpy(&context.addr.bt_bdaddr, he->h_addr,
-+                                      sizeof(context.addr.bt_bdaddr));
-+#else
-                               memcpy(&context.addr.rfcomm_bdaddr, he->h_addr,
-                                       sizeof(context.addr.rfcomm_bdaddr));
-+#endif
-                       }
-                       break;
- 
-@@ -178,11 +191,19 @@
-                       break;
- 
-               case 'C': /* channel to listen on or connect to */
-+#ifdef __NetBSD__
-+                      context.addr.bt_channel = strtoul(optarg, &ep, 10);
-+#else
-                       context.addr.rfcomm_channel = strtoul(optarg, &ep, 10);
-+#endif
-                       if (*ep != '\0') {
-+#ifdef __NetBSD__
-+                              context.addr.bt_channel = 0;
-+#else
-                               context.addr.rfcomm_channel = 0;
-+#endif
- 
--                              switch (tolower(optarg[0])) {
-+                              switch (tolower((unsigned char)optarg[0])) {
-                               case 'i': /* IrMC */
-                                       service = SDP_SERVICE_CLASS_IR_MC_SYNC;
-                                       break;
-@@ -254,10 +275,25 @@
-       argv += optind;
- 
-       if (!context.server) {
-+#ifdef __NetBSD__
-+              if (memcmp(&context.addr.bt_bdaddr,
-+                  BDADDR_ANY, sizeof(context.addr.bt_bdaddr)) == 0)
-+                      errx(1, "Must specify server BD_ADDR");
-+              
-+              /* Check channel, if was not set then obtain it via SDP */
-+              if (context.addr.bt_channel == 0 && service != 0) {
-+                      int channel;
-+
-+                      if (rfcomm_channel_lookup(NULL,
-+                                              &context.addr.bt_bdaddr,
-+                                              service, &channel, &n) != 0)
-+                              errx(1, "Could not obtain RFCOMM channel");
-+
-+                      context.addr.bt_channel = (u_int8_t) channel;
-+#else
-               if (memcmp(&context.addr.rfcomm_bdaddr,
-                   NG_HCI_BDADDR_ANY, sizeof(context.addr.rfcomm_bdaddr)) == 0)
-                       errx(1, "Must specify server BD_ADDR");
--
-               /* Check channel, if was not set then obtain it via SDP */
-               if (context.addr.rfcomm_channel == 0 && service != 0) {
-                       int     channel;
-@@ -268,13 +304,21 @@
-                               errc(1, n, "Could not obtain RFCOMM channel");
- 
-                       context.addr.rfcomm_channel = (u_int8_t) channel;
-+#endif
-               }
-       }
+--- sdp.c.orig 2003-09-07 21:00:55.000000000 +0200
++++ sdp.c      2006-07-09 18:27:44.000000000 +0200
+@@ -34,6 +34,10 @@
+ #include <sdp.h>
+ #include <stdio.h>
  
 +#ifdef __NetBSD__
-+      if (context.addr.bt_channel <= 0 ||
-+          context.addr.bt_channel > 30)
-+              errx(1, "Invalid RFCOMM channel %d",
-+                      context.addr.bt_channel);
-+#else
-       if (context.addr.rfcomm_channel <= 0 ||
-           context.addr.rfcomm_channel > 30)
-               errx(1, "Invalid RFCOMM channel %d",
-                       context.addr.rfcomm_channel);
++#define NG_HCI_BDADDR_ANY     BDADDR_ANY
 +#endif
++
+ #undef        PROTOCOL_DESCRIPTOR_LIST_BUFFER_SIZE
+ #define       PROTOCOL_DESCRIPTOR_LIST_BUFFER_SIZE    256
  
-       /* Detach server (if required) */
-       if (context.server && context.detach) {
diff -r 04f059e00a48 -r 9bb3c4a49210 comms/obexapp/patches/patch-ac
--- a/comms/obexapp/patches/patch-ac    Sun Jul 09 15:29:59 2006 +0000
+++ b/comms/obexapp/patches/patch-ac    Sun Jul 09 16:35:31 2006 +0000
@@ -1,16 +1,13 @@
-$NetBSD: patch-ac,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+$NetBSD: patch-ac,v 1.2 2006/07/09 16:35:31 xtraeme Exp $
 
---- sdp.c.orig 2006-07-02 19:51:38.000000000 +0200
-+++ sdp.c      2006-07-02 19:52:05.000000000 +0200
-@@ -72,7 +72,11 @@
-       u_int32_t        type, len;
+--- util.c.orig        2006-07-02 20:07:59.000000000 +0200
++++ util.c     2006-07-02 20:08:07.000000000 +0200
+@@ -30,7 +30,7 @@
+  */
  
-       if (local == NULL)
-+#ifdef __NetBSD__
-+              local = BDADDR_ANY;
-+#else
-               local = NG_HCI_BDADDR_ANY;
-+#endif
-       if (remote == NULL || channel == NULL)
-               rfcomm_channel_lookup_exit(EINVAL);
- 
+ #include <bluetooth.h>
+-#include <bsdxml.h>
++#include <expat.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <iconv.h>
diff -r 04f059e00a48 -r 9bb3c4a49210 comms/obexapp/patches/patch-ad
--- a/comms/obexapp/patches/patch-ad    Sun Jul 09 15:29:59 2006 +0000
+++ b/comms/obexapp/patches/patch-ad    Sun Jul 09 16:35:31 2006 +0000
@@ -1,116 +1,13 @@
-$NetBSD: patch-ad,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+$NetBSD: patch-ad,v 1.2 2006/07/09 16:35:31 xtraeme Exp $
 
---- transport.c.orig   2006-07-02 19:52:50.000000000 +0200
-+++ transport.c        2006-07-02 19:59:19.000000000 +0200
-@@ -53,7 +53,11 @@
- obexapp_transport_connect(obex_t *handle, void *userdata)
- {
-       context_p               context = (context_p) userdata;
--      struct sockaddr_rfcomm  addr;
-+#ifdef __NetBSD__
-+      struct sockaddr_bt      addr;
-+#else
-+      struct sockaddr_rfcomm  addr
-+#endif
- 
-       syslog(LOG_DEBUG, "%s()", __func__);
- 
-@@ -63,21 +67,36 @@
-               return (-1);
-       }
- 
-+#ifdef __NetBSD__
-+      syslog(LOG_INFO, "%s(): Connecting to %s/%d, pid=%d",
-+              __func__, bt_ntoa(&context->addr.bt_bdaddr, NULL),
-+              context->addr.bt_channel, getpid());
-+
-+      context->tfd = socket(PF_BLUETOOTH,SOCK_STREAM,BTPROTO_RFCOMM);
-+#else
-       syslog(LOG_INFO, "%s(): Connecting to %s/%d, pid=%d",
-               __func__, bt_ntoa(&context->addr.rfcomm_bdaddr, NULL),
-               context->addr.rfcomm_channel, getpid());
- 
-       context->tfd = socket(PF_BLUETOOTH,SOCK_STREAM,BLUETOOTH_PROTO_RFCOMM);
-+#endif
-       if (context->tfd < 0) {
-               syslog(LOG_ERR, "%s(): Could not create socket. %s (%d)",
-                       __func__,  strerror(errno), errno);
-               return (-1);
-       }
- 
-+#ifdef __NetBSD__
-+      addr.bt_len = sizeof(addr);
-+      addr.bt_family = AF_BLUETOOTH;
-+      memcpy(&addr.bt_bdaddr, &context->saddr, sizeof(addr.bt_bdaddr));
-+      addr.bt_channel = 0;
-+#else
-       addr.rfcomm_len = sizeof(addr);
-       addr.rfcomm_family = AF_BLUETOOTH;
-       memcpy(&addr.rfcomm_bdaddr, &context->saddr, sizeof(addr.rfcomm_bdaddr));
-       addr.rfcomm_channel = 0;
-+#endif
+--- main.c.orig        2006-07-09 18:28:27.000000000 +0200
++++ main.c     2006-07-09 18:28:37.000000000 +0200
+@@ -265,7 +265,7 @@
+                       if (rfcomm_channel_lookup(NULL,
+                                               &context.addr.rfcomm_bdaddr,
+                                               service, &channel, &n) != 0)
+-                              errc(1, n, "Could not obtain RFCOMM channel");



Home | Main Index | Thread Index | Old Index