summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2006-07-09 09:27:52 +0000
committerxtraeme <xtraeme@pkgsrc.org>2006-07-09 09:27:52 +0000
commit1e8e1afd247a9b63c3d976555522a065bea51935 (patch)
treefccf9a4bd9971d125013227eb96805695f7a2595 /comms
parent157a9fd30e85b17cfa76c9c4fef3b717884d8772 (diff)
downloadpkgsrc-1e8e1afd247a9b63c3d976555522a065bea51935.tar.gz
Update to 1.3:
ver 1.3: Add support for setting the creation-ID. Updated constants to match IrOBEX 1.3. Replace netbuf implementation with databuffer. Fix segmentation fault when receiving invalid OBEX packets. ver 1.2: Add OBEX_EV_REQCHECK support. Add support for suspend after sending a header. Add support for empty headers for buggy OBEX servers. Fix memory leak in obex_object_send(). ver 1.1: Fix list of exported functions. Fix duplicate string from basename() result. Fix wrong order of sanity checks. Fix memory leak in send_stream() function. ISO C99 says that inttypes.h includes stdint.h header. Add proper client side ABORT support. Add support for OBEX_SuspendRequest() and OBEX_ResumeRequest(). Add USB transport support. Increase the allowed maximum MTU to 64kB-1. Disconnect when an ABORT fails. Make it possible to include headers from C++ source code. Advertise OBEX Protocol Version 1.0. pkgsrc: * I've added patches to detect properly NetBSD bluetooth support and I have sent it to the openobex folks, they will be integrated soon. * Take maintainership for now. * Bump BUILDLINK_API_DEPENDS because the API has changed. *** PLEASE DO NOT TOUCH OBEXFTP, I'M UPDATING IT RIGHT NOW. THANKS ***
Diffstat (limited to 'comms')
-rw-r--r--comms/openobex/Makefile27
-rw-r--r--comms/openobex/PLIST4
-rw-r--r--comms/openobex/buildlink3.mk12
-rw-r--r--comms/openobex/distinfo19
-rw-r--r--comms/openobex/patches/patch-aa45
-rw-r--r--comms/openobex/patches/patch-ab41
-rw-r--r--comms/openobex/patches/patch-ac35
-rw-r--r--comms/openobex/patches/patch-ad20
-rw-r--r--comms/openobex/patches/patch-ae117
-rw-r--r--comms/openobex/patches/patch-af31
10 files changed, 146 insertions, 205 deletions
diff --git a/comms/openobex/Makefile b/comms/openobex/Makefile
index 6ccba5a83de..327f7c4f39e 100644
--- a/comms/openobex/Makefile
+++ b/comms/openobex/Makefile
@@ -1,17 +1,16 @@
-# $NetBSD: Makefile,v 1.10 2006/07/06 16:31:39 rillig Exp $
+# $NetBSD: Makefile,v 1.11 2006/07/09 09:27:52 xtraeme Exp $
#
-DISTNAME= openobex-1.0.1
-PKGREVISION= 3
+DISTNAME= openobex-1.3
CATEGORIES= comms
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openobex/}
-MAINTAINER= pkgsrc-users@NetBSD.org
+MAINTAINER= xtraeme@NetBSD.org
HOMEPAGE= http://openobex.sourceforge.net/
COMMENT= Implementation of the Object Exchange (OBEX) protocol
GNU_CONFIGURE= yes
-USE_TOOLS+= gmake pkg-config
+USE_TOOLS+= autoconf gmake pkg-config
USE_LIBTOOL= yes
PKGCONFIG_OVERRIDE= openobex-config.in
@@ -21,19 +20,13 @@ PKGCONFIG_OVERRIDE= openobex-config.in
.if (${OPSYS} == "NetBSD" && exists(/usr/include/bluetooth.h))
SUBST_CLASSES+= bt
SUBST_STAGE.bt= post-patch
-SUBST_FILES.bt= configure
-SUBST_SED.bt= -e "s|bluetooth/bluetooth.h|bluetooth.h|g"
-SUBST_SED.bt+= -e "s|bluetooth/rfcomm.h|netbt/rfcomm.h|g"
-SUBST_SED.bt+= -e "s|sockaddr_rc|sockaddr_bt|g"
+SUBST_FILES.bt= include/obex.h
+SUBST_SED.bt= -e "s|ifndef SOL_RFCOMM|ifdef SOL_RFCOMM|"
SUBST_MESSAGE.bt= Fixing bluetooth detection.
-
-SUBST_CLASSES+= bt2
-SUBST_STAGE.bt2= post-patch
-SUBST_FILES.bt2= src/obex.h
-SUBST_SED.bt2= -e "s|ifndef SOL_RFCOMM|ifdef SOL_RFCOMM|"
-
-# bacpy() and friends
-CPPFLAGS+= -DCOMPAT_BLUEZ
.endif
+post-patch:
+ cd ${WRKSRC} && autoconf
+
+.include "../../devel/libusb/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/comms/openobex/PLIST b/comms/openobex/PLIST
index a049c5146f4..ac2687cbeba 100644
--- a/comms/openobex/PLIST
+++ b/comms/openobex/PLIST
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2004/09/22 08:09:21 jlam Exp $
-bin/openobex-config
+@comment $NetBSD: PLIST,v 1.3 2006/07/09 09:27:52 xtraeme Exp $
include/openobex/obex.h
include/openobex/obex_const.h
lib/libopenobex.la
+lib/pkgconfig/openobex.pc
share/aclocal/openobex.m4
@dirrm include/openobex
diff --git a/comms/openobex/buildlink3.mk b/comms/openobex/buildlink3.mk
index 5c525c656dc..55d7ce2928b 100644
--- a/comms/openobex/buildlink3.mk
+++ b/comms/openobex/buildlink3.mk
@@ -1,20 +1,20 @@
-# $NetBSD: buildlink3.mk,v 1.8 2006/07/08 23:10:38 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.9 2006/07/09 09:27:52 xtraeme Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
OPENOBEX_BUILDLINK3_MK:= ${OPENOBEX_BUILDLINK3_MK}+
-.if !empty(BUILDLINK_DEPTH:M+)
+.if ${BUILDLINK_DEPTH} == "+"
BUILDLINK_DEPENDS+= openobex
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nopenobex}
BUILDLINK_PACKAGES+= openobex
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}openobex
-.if !empty(OPENOBEX_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.openobex+= openobex>=1.0.1
-BUILDLINK_ABI_DEPENDS.openobex+= openobex>=1.0.1nb2
+.if ${OPENOBEX_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.openobex+= openobex>=1.3
BUILDLINK_PKGSRCDIR.openobex?= ../../comms/openobex
.endif # OPENOBEX_BUILDLINK3_MK
+.include "../../devel/libusb/buildlink3.mk"
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/comms/openobex/distinfo b/comms/openobex/distinfo
index c25dde9bb9c..16e5bc230f4 100644
--- a/comms/openobex/distinfo
+++ b/comms/openobex/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.4 2006/07/03 19:18:57 xtraeme Exp $
+$NetBSD: distinfo,v 1.5 2006/07/09 09:27:52 xtraeme Exp $
-SHA1 (openobex-1.0.1.tar.gz) = aa73b3f9e345088e8f1c070e0e727f586820d20e
-RMD160 (openobex-1.0.1.tar.gz) = 70dc7d2e38b819af0c35ccb26f806b7aa7682b0e
-Size (openobex-1.0.1.tar.gz) = 211696 bytes
-SHA1 (patch-aa) = a73def8cc93d50a023ce76ec30e05163293aea45
-SHA1 (patch-ab) = 172cf62a95b8e278c2539d4339b6bb17354e8cd7
-SHA1 (patch-ac) = 8b9ca12b6c84ab743590dc16689ba672ffb5b46b
-SHA1 (patch-ad) = 4a9c02f6e899d1740504ec03bda3301915018ae3
-SHA1 (patch-ae) = c25191fcded6e87d2bcca17a2ae77720c79646a4
+SHA1 (openobex-1.3.tar.gz) = a6fbb5991bc14b90ba6c42faf026bf6bfa325d7f
+RMD160 (openobex-1.3.tar.gz) = f38474e17aaff1799ecb5f45de6ab23c3bdc8de0
+Size (openobex-1.3.tar.gz) = 337614 bytes
+SHA1 (patch-aa) = bc1c17a9f040f2e3c1b82b9b0070026d829e4a21
+SHA1 (patch-ab) = 84f76f808634dbeaed74a69469a91be1322b9bf1
+SHA1 (patch-ac) = 4e8075984d5a957bfb2fda3b63872063252b7b75
+SHA1 (patch-ad) = 0aa9962a170716fd93f115ac3bdb7307e31081a1
+SHA1 (patch-ae) = 9292387331847631b74e1331f50bab247bdb19b0
+SHA1 (patch-af) = d9a913a695a27f487ba496629bd37a8904c364b4
diff --git a/comms/openobex/patches/patch-aa b/comms/openobex/patches/patch-aa
index 1ce49a9e904..b4ce5c27221 100644
--- a/comms/openobex/patches/patch-aa
+++ b/comms/openobex/patches/patch-aa
@@ -1,38 +1,13 @@
-$NetBSD: patch-aa,v 1.1 2006/07/02 18:16:53 xtraeme Exp $
+$NetBSD: patch-aa,v 1.2 2006/07/09 09:27:52 xtraeme Exp $
---- src/obex_transport.h.orig 2003-10-01 13:17:13.000000000 +0200
-+++ src/obex_transport.h 2006-07-02 18:51:48.000000000 +0200
-@@ -39,7 +39,11 @@
- #ifdef HAVE_IRDA
- #include "irda_wrap.h"
- #endif /*HAVE_IRDA*/
--#ifdef HAVE_BLUETOOTH
-+
-+#if defined(HAVE_BLUETOOTH) && defined(__NetBSD__)
-+#include <bluetooth.h>
-+#include <netbt/rfcomm.h>
-+#elif defined(HAVE_BLUETOOTH)
- #include <bluetooth/bluetooth.h>
- #include <bluetooth/rfcomm.h>
- #endif /*HAVE_BLUETOOTH*/
-@@ -52,7 +56,11 @@
- #endif /*HAVE_IRDA*/
- struct sockaddr_in inet;
- #ifdef HAVE_BLUETOOTH
-+#ifdef __NetBSD__
-+ struct sockaddr_bt rfcomm;
-+#else
- struct sockaddr_rc rfcomm;
-+#endif
- #endif /*HAVE_BLUETOOTH*/
- } saddr_t;
-
-@@ -76,7 +84,4 @@
- int obex_transport_read(obex_t *self, int count, uint8_t *buf, int buflen);
+--- configure.in.orig 2006-06-14 11:24:13.000000000 +0200
++++ configure.in 2006-07-09 10:01:18.000000000 +0200
+@@ -23,6 +23,8 @@
+ AC_PATH_BLUEZ
+ AC_PATH_USB
++NETBSD_BLUETOOTH_CHECK
++
+ AC_ARG_OPENOBEX
--#endif OBEX_TRANSPORT_H
--
--
--
-+#endif /* OBEX_TRANSPORT_H */
+ AC_OUTPUT(Makefile include/Makefile lib/Makefile apps/Makefile ircp/Makefile doc/Makefile openobex.pc)
diff --git a/comms/openobex/patches/patch-ab b/comms/openobex/patches/patch-ab
index 4b1aacea5d9..414ed134393 100644
--- a/comms/openobex/patches/patch-ab
+++ b/comms/openobex/patches/patch-ab
@@ -1,12 +1,35 @@
-$NetBSD: patch-ab,v 1.1 2006/07/02 18:16:53 xtraeme Exp $
+$NetBSD: patch-ab,v 1.2 2006/07/09 09:27:52 xtraeme Exp $
---- src/obex.c.orig 2006-07-02 18:53:03.000000000 +0200
-+++ src/obex.c 2006-07-02 18:53:13.000000000 +0200
-@@ -33,6 +33,7 @@
- #endif
+--- acinclude.m4.orig 2006-06-14 11:11:47.000000000 +0200
++++ acinclude.m4 2006-07-09 10:33:49.000000000 +0200
+@@ -61,6 +61,17 @@
+ AC_SUBST(BLUEZ_LIBS)
+ ])
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <errno.h>
++AC_DEFUN([NETBSD_BLUETOOTH_CHECK], [
++ AC_CACHE_CHECK([for NetBSD bluetooth support], netbsdbt_found,[
++
++ AC_TRY_COMPILE([
++ #include <bluetooth.h>
++ ], [
++ struct sockaddr_bt *bt;
++ ], netbsdbt_found=yes, netbsdbt_found=no)
++ ])
++])
++
+ AC_DEFUN([AC_PATH_USB], [
+ PKG_CHECK_MODULES(USB, libusb, usb_found=yes, AC_MSG_RESULT(no))
+ AC_SUBST(USB_CFLAGS)
+@@ -126,6 +137,12 @@
+ REQUIRES="bluez"
+ fi
++ if (test "${bluetooth_enable}" = "yes" && test "${netbsdbt_found}" = "yes"); then
++ AC_DEFINE(HAVE_BLUETOOTH, 1, [Define if system supports Bluetooth and it's enabled])
++ AC_DEFINE(HAVE_NETBSD_BLUETOOTH, 1, [Define if it uses NetBSD's bluetooth stack])
++ CPPFLAGS="$CPPFLAGS -DCOMPAT_BLUEZ"
++ fi
++
+ if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then
+ AC_DEFINE(HAVE_USB, 1, [Define if system supports USB and it's enabled])
+ AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="$REQUIRES libusb")
diff --git a/comms/openobex/patches/patch-ac b/comms/openobex/patches/patch-ac
index 3fa74e1bd37..5b78c48a94e 100644
--- a/comms/openobex/patches/patch-ac
+++ b/comms/openobex/patches/patch-ac
@@ -1,16 +1,27 @@
-$NetBSD: patch-ac,v 1.1 2006/07/02 18:16:53 xtraeme Exp $
+$NetBSD: patch-ac,v 1.2 2006/07/09 09:27:52 xtraeme Exp $
---- src/obex_main.c.orig 2003-10-01 13:17:13.000000000 +0200
-+++ src/obex_main.c 2006-07-02 18:56:16.000000000 +0200
-@@ -46,7 +46,11 @@
- #include <stdio.h>
-
- #ifdef HAVE_BLUETOOTH
-+#ifdef __NetBSD__
+--- lib/obex_transport.h.orig 2006-07-09 10:19:01.000000000 +0200
++++ lib/obex_transport.h 2006-07-09 10:20:53.000000000 +0200
+@@ -39,7 +39,10 @@
+ #ifdef HAVE_IRDA
+ #include "irda_wrap.h"
+ #endif /*HAVE_IRDA*/
+-#ifdef HAVE_BLUETOOTH
++#ifdef HAVE_NETBSD_BLUETOOTH
+#include <bluetooth.h>
-+#else
++#include <netbt/rfcomm.h>
++#elif defined(HAVE_BLUETOOTH)
#include <bluetooth/bluetooth.h>
-+#endif /* __NetBSD__ */
+ #include <bluetooth/rfcomm.h>
#endif /*HAVE_BLUETOOTH*/
-
- #endif /* _WIN32 */
+@@ -54,7 +57,9 @@
+ struct sockaddr_irda irda;
+ #endif /*HAVE_IRDA*/
+ struct sockaddr_in inet;
+-#ifdef HAVE_BLUETOOTH
++#ifdef HAVE_NETBSD_BLUETOOTH
++ struct sockaddr_bt rfcomm;
++#elif defined(HAVE_BLUETOOTH)
+ struct sockaddr_rc rfcomm;
+ #endif /*HAVE_BLUETOOTH*/
+ #ifdef HAVE_USB
diff --git a/comms/openobex/patches/patch-ad b/comms/openobex/patches/patch-ad
index 74ee19c1b3e..84529e65807 100644
--- a/comms/openobex/patches/patch-ad
+++ b/comms/openobex/patches/patch-ad
@@ -1,12 +1,14 @@
-$NetBSD: patch-ad,v 1.1 2006/07/02 18:16:53 xtraeme Exp $
+$NetBSD: patch-ad,v 1.2 2006/07/09 09:27:52 xtraeme Exp $
---- src/obex_object.c.orig 2006-07-02 18:56:59.000000000 +0200
-+++ src/obex_object.c 2006-07-02 18:57:10.000000000 +0200
-@@ -33,6 +33,7 @@
- #endif
+--- config.h.in.orig 2006-07-09 10:27:25.000000000 +0200
++++ config.h.in 2006-07-09 10:28:00.000000000 +0200
+@@ -6,6 +6,9 @@
+ /* Define if system supports Bluetooth and it's enabled */
+ #undef HAVE_BLUETOOTH
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
++/* Define if system uses NetBSD's bluetooth stack */
++#undef HAVE_NETBSD_BLUETOOTH
++
+ /* Define to 1 if you have the <dlfcn.h> header file. */
+ #undef HAVE_DLFCN_H
- #include "obex_main.h"
diff --git a/comms/openobex/patches/patch-ae b/comms/openobex/patches/patch-ae
index ac2f5ae66d0..f591f056e0c 100644
--- a/comms/openobex/patches/patch-ae
+++ b/comms/openobex/patches/patch-ae
@@ -1,110 +1,15 @@
-$NetBSD: patch-ae,v 1.1 2006/07/02 18:16:53 xtraeme Exp $
+$NetBSD: patch-ae,v 1.2 2006/07/09 09:27:52 xtraeme Exp $
---- src/btobex.c.orig 2003-10-01 13:17:13.000000000 +0200
-+++ src/btobex.c 2006-07-02 19:24:16.000000000 +0200
-@@ -46,12 +46,16 @@
- #include <netinet/in.h>
- #include <sys/socket.h>
-
-+#ifdef __NetBSD__
+--- lib/obex_main.c.orig 2006-07-09 10:34:51.000000000 +0200
++++ lib/obex_main.c 2006-07-09 10:35:37.000000000 +0200
+@@ -45,7 +45,9 @@
+ #include <sys/types.h>
+ #include <stdio.h>
+
+-#ifdef HAVE_BLUETOOTH
++#ifdef HAVE_NETBSD_BLUETOOTH
+#include <bluetooth.h>
-+#include <netbt/rfcomm.h>
-+#else
++#elif defined(HAVE_BLUETOOTH)
#include <bluetooth/bluetooth.h>
- #include <bluetooth/rfcomm.h>
-+#endif
-
- #endif /* _WIN32 */
-
--
- #include <obex_main.h>
- #include <btobex.h>
-
-@@ -65,6 +69,15 @@
- void btobex_prepare_connect(obex_t *self, bdaddr_t *src, bdaddr_t *dst, uint8_t channel)
- {
- #ifndef _WIN32
-+#ifdef __NetBSD__
-+ self->trans.self.rfcomm.bt_family = AF_BLUETOOTH;
-+ bacpy(&self->trans.self.rfcomm.bt_bdaddr, src);
-+ self->trans.self.rfcomm.bt_channel = 0;
-+
-+ self->trans.peer.rfcomm.bt_family = AF_BLUETOOTH;
-+ bacpy(&self->trans.peer.rfcomm.bt_bdaddr, dst);
-+ self->trans.peer.rfcomm.bt_channel = channel;
-+#else
- self->trans.self.rfcomm.rc_family = AF_BLUETOOTH;
- bacpy(&self->trans.self.rfcomm.rc_bdaddr, src);
- self->trans.self.rfcomm.rc_channel = 0;
-@@ -72,6 +85,7 @@
- self->trans.peer.rfcomm.rc_family = AF_BLUETOOTH;
- bacpy(&self->trans.peer.rfcomm.rc_bdaddr, dst);
- self->trans.peer.rfcomm.rc_channel = channel;
-+#endif
- #endif /* _WIN32 */
- }
-
-@@ -85,9 +99,15 @@
- {
- #ifndef _WIN32
- /* Bind local service */
-+#ifdef __NetBSD__
-+ self->trans.self.rfcomm.bt_family = AF_BLUETOOTH;
-+ bacpy(&self->trans.self.rfcomm.bt_bdaddr, src);
-+ self->trans.self.rfcomm.bt_channel = channel;
-+#else
- self->trans.self.rfcomm.rc_family = AF_BLUETOOTH;
- bacpy(&self->trans.self.rfcomm.rc_bdaddr, src);
- self->trans.self.rfcomm.rc_channel = channel;
-+#endif
- #endif /* _WIN32 */
- }
-
-@@ -109,7 +129,11 @@
- }
-
- if (bind(self->serverfd, (struct sockaddr*) &self->trans.self.rfcomm,
-+#ifdef __NetBSD__
-+ sizeof(struct sockaddr_bt)))
-+#else
- sizeof(struct sockaddr_rc)))
-+#endif
- {
- DEBUG(0, "Error doing bind\n");
- goto out_freesock;
-@@ -142,7 +166,11 @@
- int btobex_accept(obex_t *self)
- {
- #ifndef _WIN32
-+#ifdef __NetBSD__
-+ int addrlen = sizeof(struct sockaddr_bt);
-+#else
- int addrlen = sizeof(struct sockaddr_rc);
-+#endif
- //int mtu;
- //int len = sizeof(int);
-
-@@ -181,7 +209,11 @@
- }
-
- ret = bind(self->fd, (struct sockaddr*) &self->trans.self.rfcomm,
-+#ifdef __NetBSD__
-+ sizeof(struct sockaddr_bt));
-+#else
- sizeof(struct sockaddr_rc));
-+#endif
-
- if (ret < 0) {
- DEBUG(4, "ret=%d\n", ret);
-@@ -189,7 +221,11 @@
- }
+ #endif /*HAVE_BLUETOOTH*/
- ret = connect(self->fd, (struct sockaddr*) &self->trans.peer.rfcomm,
-+#ifdef __NetBSD__
-+ sizeof(struct sockaddr_bt));
-+#else
- sizeof(struct sockaddr_rc));
-+#endif
- if (ret < 0) {
- DEBUG(4, "ret=%d\n", ret);
- goto out_freesock;
diff --git a/comms/openobex/patches/patch-af b/comms/openobex/patches/patch-af
new file mode 100644
index 00000000000..2adf44218dc
--- /dev/null
+++ b/comms/openobex/patches/patch-af
@@ -0,0 +1,31 @@
+$NetBSD: patch-af,v 1.3 2006/07/09 09:27:52 xtraeme Exp $
+
+--- lib/btobex.c.orig 2006-07-09 10:36:43.000000000 +0200
++++ lib/btobex.c 2006-07-09 10:38:51.000000000 +0200
+@@ -37,7 +37,7 @@
+ #include <winsock.h>
+
+ #else /* _WIN32 */
+-/* Linux case */
++/* Linux/NetBSD case */
+
+ #include <string.h>
+ #include <unistd.h>
+@@ -46,8 +46,17 @@
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+
++#ifdef HAVE_NETBSD_BLUETOOTH
++#define rc_family bt_family
++#define rc_bdaddr bt_bdaddr
++#define rc_channel bt_channel
++#define sockaddr_rc sockaddr_bt
++#include <bluetooth.h>
++#include <netbt/rfcomm.h>
++#else
+ #include <bluetooth/bluetooth.h>
+ #include <bluetooth/rfcomm.h>
++#endif
+
+ #endif /* _WIN32 */
+