pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/comms/obexapp Initial import of obexapp-1.4.4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a4889afd03b4
branches:  trunk
changeset: 515480:a4889afd03b4
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Sun Jul 02 18:18:34 2006 +0000

description:
Initial import of obexapp-1.4.4.

An obex application to transfer objects (address book items, images, movies,
anything the target can handle) to mobile devices via IrDA, Bluetooth and other
protocol via the OBEX format.

xtraeme: now it should be possible to transfer files from/to my cellular
phone from NetBSD.

diffstat:

 comms/obexapp/DESCR            |    3 +
 comms/obexapp/Makefile         |   36 ++++++++++++
 comms/obexapp/PLIST            |    4 +
 comms/obexapp/distinfo         |   10 +++
 comms/obexapp/patches/patch-aa |   16 +++++
 comms/obexapp/patches/patch-ab |  113 +++++++++++++++++++++++++++++++++++++++
 comms/obexapp/patches/patch-ac |   16 +++++
 comms/obexapp/patches/patch-ad |  116 +++++++++++++++++++++++++++++++++++++++++
 comms/obexapp/patches/patch-ae |   13 ++++
 9 files changed, 327 insertions(+), 0 deletions(-)

diffs (truncated from 363 to 300 lines):

diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/DESCR       Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,3 @@
+An obex application to transfer objects (address book items, images, movies,
+anything the target can handle) to mobile devices via IrDA, Bluetooth and other
+protocol via the OBEX format.
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/Makefile    Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+#
+
+DISTNAME=      obexapp-1.4.4
+CATEGORIES=    comms
+MASTER_SITES=  http://www.geocities.com/m_evmenkin/
+
+MAINTAINER=    xtraeme%NetBSD.org@localhost
+HOMEPAGE=      http://www.geocities.com/m_evmenkin/
+COMMENT=       Obex application to transfer objects to mobile equipment
+
+WRKSRC=                ${WRKDIR}/obexapp
+
+SUBST_CLASSES+=                mk
+SUBST_FILES.mk=                Makefile
+SUBST_STAGE.mk=                post-configure
+SUBST_SED.mk=          -e "s|-lbsdxml|-lexpat|"
+SUBST_SED.mk+=         -e "s|/usr/local/man|${PREFIX}|"
+SUBST_SED.mk+=         -e "s|/usr/local|${PREFIX}|"
+SUBST_SED.mk+=         -e "s|CFLAGS=|CFLAGS+=|"
+
+# 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"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/PLIST       Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/07/02 18:18:34 xtraeme Exp $
+bin/obexapp
+man/cat1/obexapp.0
+man/man1/obexapp.1
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/distinfo    Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2006/07/02 18:18:34 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
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/patches/patch-aa    Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-aa,v 1.1.1.1 2006/07/02 18:18:34 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 @@
+ 
+ struct context
+ {
++#ifdef __NetBSD__
++      struct sockaddr_bt       addr;           /* remote address */
++#else
+       struct sockaddr_rfcomm   addr;           /* remote address */
++#endif
+       bdaddr_t                 saddr;          /* local address */
+       char                    *root;           /* root path */
+       char                    *user;           /* user */
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/patches/patch-ab    Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,113 @@
+$NetBSD: patch-ab,v 1.1.1.1 2006/07/02 18:18:34 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
+               }
+       }
+ 
++#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);
++#endif
+ 
+       /* Detach server (if required) */
+       if (context.server && context.detach) {
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/patches/patch-ac    Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ac,v 1.1.1.1 2006/07/02 18:18:34 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;
+ 
+       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);
+ 
diff -r 5db87e375e66 -r a4889afd03b4 comms/obexapp/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/obexapp/patches/patch-ad    Sun Jul 02 18:18:34 2006 +0000
@@ -0,0 +1,116 @@
+$NetBSD: patch-ad,v 1.1.1.1 2006/07/02 18:18:34 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
+ 
+       if (bind(context->tfd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+               syslog(LOG_ERR, "%s(): Could not bind socket. %s (%d)",
+@@ -157,7 +176,11 @@
+ obexapp_transport_listen(obex_t *handle, void *userdata)
+ {
+       context_p               context = (context_p) userdata;
++#ifdef __NetBSD__
++      struct sockaddr_bt      addr;
++#else
+       struct sockaddr_rfcomm  addr;
++#endif
+       socklen_t               addrlen;
+       pid_t                   pid;
+       int                     s;
+@@ -171,7 +194,11 @@
+               return (1);
+       }
+ 



Home | Main Index | Thread Index | Old Index