From aa8d8f2fcd8b1da30a4fcc02ba80c05805ee4f84 Mon Sep 17 00:00:00 2001 From: plunky Date: Fri, 15 Mar 2013 08:18:43 +0000 Subject: Update to ObexFTP 0.24 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a new maintainer, Hendrik Sattler and the sources are held at gitorius.org. Build is changed to CMake and although it does not appear in the ChangeLog below, I forwarded all the NetBSD related patches that pkgsrc had (and more in fact, to get it working) although I would still say that obexapp is the better program. From the ChangeLog: ObexFTP 0.24 (released 2013-03-05) ---------------------------------- * Maintainer changed from Christian to Hendrik * change build system to using CMake * integrate obexfs-0.12 * fix build for OpenOBEX-1.7 ObexFTP 0.23 (released 2009-02-17) ---------------------------------- * allow win32 to use hci src names * adding a simpler connect wrapper * show OBEX_HandleInput errors * catch errors and let the user know * print timeout stats if available * sdp unregister more verbose * upgrading btkit * fix for win32 without bt * replacing deprecated automake vars * sizeof() fixes * removing bdaddr_t reference from obexftpd.c * adding bootstrap helper * concurrency bug in extconf.rb generated Makefile (fix by Alin Năstac) * switching from POD to asciidoc * clearing gnu-style implicit rules ObexFTP 0.22 (released 2008-06-15) ---------------------------------- * added proper unicode support * added support for transparent OBEX-over-AT mode * rewritten at-command function * added specific error messages * refactored to flexible bt_kit layer * fixed cache root duplicates * fixed off-by-one and unfreed mem in cache layer * added pkg-config file * added example code * switched to doxygen * added python binding callbacks * portable packed structs * enabled linux hci dev names for source selection * Python binding uses distutils now, tested by Adam Williamson * removed exit from bt discovery * Better autodetection for possible language bindings * reworked win32 support * Motorola SLVR L2 cobex fix by Andrey Rahmatullin * now using AC_HELP_STRING for compat with autoconf <=2.57 * added hci selection support, drafted by Manuel Naranjo * switched obexftp cli to new discovery api * prefer PCSUITE over FTP, req. by Martin Storsjö for Series 60 2nd Ed. * fixed compile error with >=swig-1.3.28 * renamed sdp browse function * fixed month/day swapping in atotime, spotted by Dr. Johannes Zellner * added BFC compatibility for newer Siemens phones * added PCSOFTWARE uuid support for SHARP phones * added motorola support * end bfb mode properly * added CPROT=0 support from 3GPP 27.007 * fixed ericsson init * fixed invalid conn_id in disconnect rep. by Alan J. McFarlane * better create flag handling in setpath * Changed LDADD to LIBADD sug. by Sergey Vlasov * obexftpd clean up by Hendrik Sattler * 64-bit fixes by Hendrik Sattler * Removed all (dangerous) obex_headerdata_t casts * Reorganized all swig-dependant Makefiles * Applied cobex write patch from Simon Ruggier * Applied from Frode Isaksen ObexFTP 0.21 (released 2006-06-27) ---------------------------------- 2006-05-26 Christian W. Zuckschwerdt * Fixes to obexftpd suggested by Hendrik Sattler 2006-05-24 Christian W. Zuckschwerdt * Added ruby binding * Added preliminary discovery function --- comms/obexftp/Makefile | 36 +++---- comms/obexftp/PLIST | 15 ++- comms/obexftp/buildlink3.mk | 4 +- comms/obexftp/distinfo | 20 +--- comms/obexftp/patches/patch-aa | 69 ------------- comms/obexftp/patches/patch-ab | 19 ---- comms/obexftp/patches/patch-ac | 26 ----- comms/obexftp/patches/patch-ad | 28 ------ comms/obexftp/patches/patch-ae | 15 --- comms/obexftp/patches/patch-af | 23 ----- comms/obexftp/patches/patch-ag | 19 ---- comms/obexftp/patches/patch-ah | 13 --- comms/obexftp/patches/patch-ai | 119 ---------------------- comms/obexftp/patches/patch-aj | 218 ----------------------------------------- comms/obexftp/patches/patch-ak | 73 -------------- comms/obexftp/patches/patch-al | 20 ---- 16 files changed, 33 insertions(+), 684 deletions(-) delete mode 100644 comms/obexftp/patches/patch-aa delete mode 100644 comms/obexftp/patches/patch-ab delete mode 100644 comms/obexftp/patches/patch-ac delete mode 100644 comms/obexftp/patches/patch-ad delete mode 100644 comms/obexftp/patches/patch-ae delete mode 100644 comms/obexftp/patches/patch-af delete mode 100644 comms/obexftp/patches/patch-ag delete mode 100644 comms/obexftp/patches/patch-ah delete mode 100644 comms/obexftp/patches/patch-ai delete mode 100644 comms/obexftp/patches/patch-aj delete mode 100644 comms/obexftp/patches/patch-ak delete mode 100644 comms/obexftp/patches/patch-al (limited to 'comms') diff --git a/comms/obexftp/Makefile b/comms/obexftp/Makefile index 42cd2460882..2b99e909807 100644 --- a/comms/obexftp/Makefile +++ b/comms/obexftp/Makefile @@ -1,36 +1,32 @@ -# $NetBSD: Makefile,v 1.17 2013/02/22 19:59:05 shattered Exp $ +# $NetBSD: Makefile,v 1.18 2013/03/15 08:18:43 plunky Exp $ # -DISTNAME= obexftp-0.20 -PKGREVISION= 3 +DISTNAME= obexftp-0.24-Source +PKGNAME= obexftp-0.24 CATEGORIES= comms MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openobex/} -EXTRACT_SUFX= .tar.bz2 MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://dev.zuckschwerdt.org/openobex/ +HOMEPAGE= https://gitorious.org/obexftp COMMENT= File copying over the Object Exchange (OBEX) protocol +LICENSE= gnu-gpl-v2 -GNU_CONFIGURE= yes -USE_TOOLS+= autoconf gmake pkg-config -USE_LIBTOOL= yes +USE_CMAKE= yes +USE_TOOLS+= cmake pkg-config -CONFIGURE_ARGS+= --disable-perl -CONFIGURE_ARGS+= --disable-python -CONFIGURE_ARGS+= --disable-swig +CMAKE_ARGS+= -DCMAKE_INSTALL_MANDIR:PATH=${PREFIX}/${PKGMANDIR} +CMAKE_ARGS+= -DENABLE_PERL:BOOL=OFF +CMAKE_ARGS+= -DENABLE_PYTHON:BOOL=OFF +CMAKE_ARGS+= -DENABLE_RUBY:BOOL=OFF +CMAKE_ARGS+= -DENABLE_TCL:BOOL=OFF -LIBS.SunOS+= -lsocket -lnsl -liconv +BUILD_DEPENDS+= asciidoc>=8.6.6:../../textproc/asciidoc +BUILD_DEPENDS+= xmlto>=0.0.25:../../textproc/xmlto -.include "../../mk/bsd.prefs.mk" - -.if ((${OPSYS} == "NetBSD" && exists(/usr/include/bluetooth.h)) || ${OPSYS} == "DragonFly") -CPPFLAGS+= -DCOMPAT_BLUEZ -DSDP_COMPAT -.endif - -post-patch: - cd ${WRKSRC} && autoconf +BUILD_TARGET= all doc .include "../../comms/openobex/buildlink3.mk" .include "../../converters/libiconv/buildlink3.mk" .include "../../devel/libusb/buildlink3.mk" +.include "../../devel/swig/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/comms/obexftp/PLIST b/comms/obexftp/PLIST index b0542336bcf..0ace6b9893d 100644 --- a/comms/obexftp/PLIST +++ b/comms/obexftp/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2009/06/14 17:38:41 joerg Exp $ +@comment $NetBSD: PLIST,v 1.5 2013/03/15 08:18:43 plunky Exp $ bin/obexftp bin/obexftpd include/bfb/bfb.h @@ -8,8 +8,15 @@ include/obexftp/client.h include/obexftp/obexftp.h include/obexftp/object.h include/obexftp/uuid.h -lib/libbfb.la -lib/libmulticobex.la -lib/libobexftp.la +lib/libbfb.so +lib/libbfb.so.0 +lib/libbfb.so.0.0.5 +lib/libmulticobex.so +lib/libmulticobex.so.1 +lib/libmulticobex.so.1.0.1 +lib/libobexftp.so +lib/libobexftp.so.0 +lib/libobexftp.so.0.3.0 +lib/pkgconfig/obexftp.pc man/man1/obexftp.1 man/man1/obexftpd.1 diff --git a/comms/obexftp/buildlink3.mk b/comms/obexftp/buildlink3.mk index b75205489f2..505b26f385e 100644 --- a/comms/obexftp/buildlink3.mk +++ b/comms/obexftp/buildlink3.mk @@ -1,11 +1,11 @@ -# $NetBSD: buildlink3.mk,v 1.2 2009/03/20 19:24:02 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.3 2013/03/15 08:18:43 plunky Exp $ BUILDLINK_TREE+= obexftp .if !defined(OBEXFTP_BUILDLINK3_MK) OBEXFTP_BUILDLINK3_MK:= -BUILDLINK_API_DEPENDS.obexftp+= obexftp>=0.20nb1 +BUILDLINK_API_DEPENDS.obexftp+= obexftp>=0.24 BUILDLINK_PKGSRCDIR.obexftp?= ../../comms/obexftp .include "../../comms/openobex/buildlink3.mk" diff --git a/comms/obexftp/distinfo b/comms/obexftp/distinfo index 04805596d00..9d59ad8ed6f 100644 --- a/comms/obexftp/distinfo +++ b/comms/obexftp/distinfo @@ -1,17 +1,5 @@ -$NetBSD: distinfo,v 1.8 2012/02/16 17:40:29 hans Exp $ +$NetBSD: distinfo,v 1.9 2013/03/15 08:18:43 plunky Exp $ -SHA1 (obexftp-0.20.tar.bz2) = 0b3a7d2aeb0dbd24d75761a7e59f42f46ea5ef82 -RMD160 (obexftp-0.20.tar.bz2) = ded5cf4d95eac77d5f6ee0a39f3789eb962534ed -Size (obexftp-0.20.tar.bz2) = 351641 bytes -SHA1 (patch-aa) = 65925a0df323cd391dab48f45fcf6c99dbcc8fbb -SHA1 (patch-ab) = 0a0c2cbcfc9449df48e8340dba1593d5593129f5 -SHA1 (patch-ac) = 6b44406a04ea81eb615d6ed9ffebf2db27008e35 -SHA1 (patch-ad) = 00ada8c88756d3201b02e5a0b9467a7ee1ad0f50 -SHA1 (patch-ae) = d08fd3b4aa5e2f61eda5ea6d3f6656f8b036af30 -SHA1 (patch-af) = f1e96b8a15a4fec69b81d19635a674ee307d31c1 -SHA1 (patch-ag) = 7a3f10354e8a86022cac360b8a36198d9e7449ab -SHA1 (patch-ah) = c0fe5bd78e7614a7eb6adb7154676fd9bde7a31c -SHA1 (patch-ai) = dca54c345dba0977f1bf90778e15cdd4676749ca -SHA1 (patch-aj) = 26f6509d26aaa893fe6018bd048135fb077e0b9c -SHA1 (patch-ak) = bdef026206a0dca2c4781b06bbdfdd90f1c934f6 -SHA1 (patch-al) = 1f2dd6ed302711f17e33584cc34f6f674a6973c7 +SHA1 (obexftp-0.24-Source.tar.gz) = c82260d7f44519a1b0aaa0eae3ff0809f321f486 +RMD160 (obexftp-0.24-Source.tar.gz) = 99fb5fac2460398cd3ab377426fe7b1050b0a6ea +Size (obexftp-0.24-Source.tar.gz) = 88154 bytes diff --git a/comms/obexftp/patches/patch-aa b/comms/obexftp/patches/patch-aa deleted file mode 100644 index 56cc11abef9..00000000000 --- a/comms/obexftp/patches/patch-aa +++ /dev/null @@ -1,69 +0,0 @@ -$NetBSD: patch-aa,v 1.5 2009/07/20 05:56:03 hasso Exp $ - ---- aclocal.m4.orig 2006-05-16 16:50:36.000000000 +0200 -+++ aclocal.m4 2006-10-22 10:07:38.000000000 +0200 -@@ -56,6 +56,9 @@ - #ifdef __FreeBSD__ - #include - #include -+ #elif defined(__NetBSD__) || defined(__DragonFly__) -+ #include -+ #include - #else /* Linux */ - #include - #include -@@ -65,6 +68,9 @@ - #ifdef __FreeBSD__ - bdaddr_t bdaddr; - struct sockaddr_rfcomm addr; -+ #elif defined(__NetBSD__) || defined(__DragonFly__) -+ bdaddr_t bdaddr; -+ struct sockaddr_bt addr; - #else /* Linux */ - bdaddr_t bdaddr; - struct sockaddr_rc addr; -@@ -76,6 +82,7 @@ - AC_DEFINE([HAVE_BLUETOOTH], [1], [Define if system supports Bluetooth and it's enabled]) - BLUETOOTH_CFLAGS="" - BLUETOOTH_LIBS="-lbluetooth" -+ AC_CHECK_LIB(sdp, sdp_open, BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp") - fi - AC_SUBST(BLUETOOTH_CFLAGS) - AC_SUBST(BLUETOOTH_LIBS) -@@ -92,14 +99,22 @@ - AC_MSG_CHECKING(for Bluetooth SDP support) - - AC_TRY_COMPILE( [ -+ #if defined(__NetBSD__) || defined(__DragonFly__) -+ #include -+ #include -+ #else - #include -+ #endif - ],[ -+ #if defined(__NetBSD__) || defined(__DragonFly__) -+ sdp_attr_t attr; -+ #else - sdp_list_t sdplist; -+ #endif - ], - am_cv_sdplib_found=yes, - am_cv_sdplib_found=no - ) -- - if test $am_cv_sdplib_found = yes; then - AC_DEFINE(HAVE_SDPLIB,1,[Define if system supports Bluetooth SDP]) - -@@ -118,6 +133,12 @@ - AC_MSG_CHECKING(for USB support) - - AC_TRY_COMPILE( [ -+ #if defined(__NetBSD__) || defined(__DragonFly__) -+ #include -+ #else -+ #include -+ #endif -+ - #include - #include - ],[ diff --git a/comms/obexftp/patches/patch-ab b/comms/obexftp/patches/patch-ab deleted file mode 100644 index 2519b9a421a..00000000000 --- a/comms/obexftp/patches/patch-ab +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-ab,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- multicobex/multi_cobex.c.orig 2005-11-24 15:55:11.000000000 +0100 -+++ multicobex/multi_cobex.c 2006-07-09 12:21:14.000000000 +0200 -@@ -49,6 +49,14 @@ - #include - #endif - -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#else -+#include -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - #include - #include "multi_cobex.h" - #include "multi_cobex_private.h" diff --git a/comms/obexftp/patches/patch-ac b/comms/obexftp/patches/patch-ac deleted file mode 100644 index c90278783ea..00000000000 --- a/comms/obexftp/patches/patch-ac +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-ac,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- obexftp/object.h.orig 2005-09-13 16:53:20.000000000 +0200 -+++ obexftp/object.h 2006-07-09 12:45:14.000000000 +0200 -@@ -22,7 +22,21 @@ - #ifndef OBEXFTP_OBJECT_H - #define OBEXFTP_OBJECT_H - -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ - #include -+#include -+ -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#else -+#include -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - #include - - #ifdef __cplusplus diff --git a/comms/obexftp/patches/patch-ad b/comms/obexftp/patches/patch-ad deleted file mode 100644 index b62c05fc54e..00000000000 --- a/comms/obexftp/patches/patch-ad +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-ad,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- obexftp/client.h.orig 2006-01-11 16:22:51.000000000 +0100 -+++ obexftp/client.h 2006-07-09 12:39:10.000000000 +0200 -@@ -22,9 +22,23 @@ - #ifndef OBEXFTP_CLIENT_H - #define OBEXFTP_CLIENT_H - -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ - #include - #include -+#include - #include -+ -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#else -+#include -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - #include - #ifndef OBEX_TRANS_USB - #define OBEX_TRANS_USB 6 diff --git a/comms/obexftp/patches/patch-ae b/comms/obexftp/patches/patch-ae deleted file mode 100644 index f78954c7ffe..00000000000 --- a/comms/obexftp/patches/patch-ae +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-ae,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- obexftp/client.c.orig 2006-07-09 12:37:02.000000000 +0200 -+++ obexftp/client.c 2006-07-09 12:38:10.000000000 +0200 -@@ -48,6 +48,10 @@ - #ifdef __FreeBSD__ - #include - #include -+#elif defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#include -+#include - #else /* Linux */ - #include - #include diff --git a/comms/obexftp/patches/patch-af b/comms/obexftp/patches/patch-af deleted file mode 100644 index ed577192e0e..00000000000 --- a/comms/obexftp/patches/patch-af +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-af,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- obexftp/obexftp_io.c.orig 2006-07-09 12:40:32.000000000 +0200 -+++ obexftp/obexftp_io.c 2006-07-09 12:41:36.000000000 +0200 -@@ -30,6 +30,18 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#else -+#include -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - #include - - #include "obexftp_io.h" diff --git a/comms/obexftp/patches/patch-ag b/comms/obexftp/patches/patch-ag deleted file mode 100644 index f018bbe0486..00000000000 --- a/comms/obexftp/patches/patch-ag +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-ag,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- obexftp/cache.c.orig 2006-07-09 12:43:21.000000000 +0200 -+++ obexftp/cache.c 2006-07-09 12:43:56.000000000 +0200 -@@ -40,6 +40,14 @@ - #include - #endif - -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#else -+#include -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - #include - - #include "obexftp.h" diff --git a/comms/obexftp/patches/patch-ah b/comms/obexftp/patches/patch-ah deleted file mode 100644 index c6dd1c06697..00000000000 --- a/comms/obexftp/patches/patch-ah +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2006/07/17 12:29:57 xtraeme Exp $ - ---- obexftp/Makefile.in.orig 2006-07-09 12:56:29.000000000 +0200 -+++ obexftp/Makefile.in 2006-07-09 12:57:34.000000000 +0200 -@@ -201,7 +201,7 @@ - object.h - - --libobexftp_la_LDFLAGS = -version-info $(OBEXFTP_VERSION) -+libobexftp_la_LDFLAGS = -version-info $(OBEXFTP_VERSION) @BLUETOOTH_LIBS@ - - EXTRA_DIST = client.i - subdir = obexftp diff --git a/comms/obexftp/patches/patch-ai b/comms/obexftp/patches/patch-ai deleted file mode 100644 index bd4659c6ee9..00000000000 --- a/comms/obexftp/patches/patch-ai +++ /dev/null @@ -1,119 +0,0 @@ -$NetBSD: patch-ai,v 1.4 2012/02/16 17:40:29 hans Exp $ - ---- apps/obexftpd.c.orig 2006-04-13 07:57:55.000000000 +0200 -+++ apps/obexftpd.c -@@ -23,6 +23,10 @@ - * Created at: Don, 2 Okt 2003 - */ - -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ - #include - #include - #include -@@ -45,6 +49,14 @@ - #include - #endif /*_WIN32*/ - -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#else -+#include -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - /* just until there is a server layer in obexftp */ - #include - -@@ -56,6 +68,8 @@ - - #include "obexftp_sdp.h" - -+#define DEFFILEMOD (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) /* 0644 */ -+ - /* define this to "", "\r\n" or "\n" */ - #define EOLCHARS "\n" - -@@ -72,7 +86,9 @@ - - //BEGIN of constant - -+#ifdef HAVE_BLUETOOTH - bdaddr_t *bt_src = NULL; -+#endif - char *device = NULL; - int channel = 10; /* OBEX_PUSH_HANDLE */ - -@@ -698,7 +714,7 @@ static int safe_save_file(char *name, co - #ifdef _WIN32 - fd = open(filename, O_RDWR | O_CREAT, 0); - #else -- fd = open(filename, O_RDWR | O_CREAT, DEFFILEMODE); -+ fd = open(filename, O_RDWR | O_CREAT, DEFFILEMOD); - #endif - - if ( fd < 0) { -@@ -934,16 +950,21 @@ static void start_server(int transport) - exit(0); - } - -- if (transport==OBEX_TRANS_BLUETOOTH && 0 > obexftp_sdp_register()) -- { -- //OBEX_Cleanup(handle); -- fprintf(stderr, "register to SDP Server failed.\n"); -- exit(0); -- } -- else -- { -- use_sdp = 1; -- } -+#ifdef HAVE_BLUETOOTH -+ if (transport==OBEX_TRANS_BLUETOOTH) -+ { -+ if (0 > obexftp_sdp_register()) -+ { -+ //OBEX_Cleanup(handle); -+ fprintf(stderr, "register to SDP Server failed.\n"); -+ exit(0); -+ } -+ else -+ { -+ use_sdp = 1; -+ } -+ } -+#endif - - reset: - handle = OBEX_Init(transport, obex_event, 0); -@@ -963,12 +984,14 @@ reset: - exit(-1); - } - break; -+#ifdef HAVE_BLUETOOTH - case OBEX_TRANS_BLUETOOTH: - if (0 > BtOBEX_ServerRegister(handle, bt_src, channel)) { - perror("failed to register bluetooth server"); - exit(-1); - } - break; -+#endif - case OBEX_TRANS_IRDA: - if (0 > IrOBEX_ServerRegister(handle, "")) { - perror("failed to register IrDA server"); -@@ -1002,11 +1025,13 @@ reset: - goto reset; - } - -+#ifdef HAVE_BLUETOOTH - if (use_sdp) - { - fprintf(stderr, "sdp unregister\n"); - obexftp_sdp_unregister(); - } -+#endif - - } - diff --git a/comms/obexftp/patches/patch-aj b/comms/obexftp/patches/patch-aj deleted file mode 100644 index 49638f89d82..00000000000 --- a/comms/obexftp/patches/patch-aj +++ /dev/null @@ -1,218 +0,0 @@ -$NetBSD: patch-aj,v 1.2 2009/07/20 05:56:03 hasso Exp $ - ---- apps/bt_discovery.c.orig 2006-01-11 17:27:35.000000000 +0000 -+++ apps/bt_discovery.c -@@ -10,6 +10,205 @@ - #include - #include - -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#include -+#include -+#include -+ -+#include "bt_discovery.h" -+ -+/* -+ * Parse protocol descriptor list for the RFCOMM channel -+ * -+ * seq8 len8 2 -+ * seq8 len8 2 -+ * uuid16 value16 3 L2CAP -+ * seq8 len8 2 -+ * uuid16 value16 3 RFCOMM -+ * uint8 value8 2 channel -+ * === -+ * 14 -+ */ -+ -+static int32_t -+parse_rfcomm_channel(sdp_attr_t *a) -+{ -+ uint8_t *ptr = a->value; -+ uint8_t *end = a->value + a->vlen; -+ int32_t type, len, uuid, channel; -+ -+ if (end - ptr < 14) -+ return (-1); -+ -+ SDP_GET8(type, ptr); -+ switch (type) { -+ case SDP_DATA_SEQ8: -+ SDP_GET8(len, ptr); -+ break; -+ -+ case SDP_DATA_SEQ16: -+ SDP_GET16(len, ptr); -+ break; -+ -+ case SDP_DATA_SEQ32: -+ SDP_GET32(len, ptr); -+ break; -+ -+ default: -+ return (-1); -+ } -+ if (ptr + len > end) -+ return (-1); -+ -+ /* Protocol */ -+ SDP_GET8(type, ptr); -+ switch (type) { -+ case SDP_DATA_SEQ8: -+ SDP_GET8(len, ptr); -+ break; -+ -+ case SDP_DATA_SEQ16: -+ SDP_GET16(len, ptr); -+ break; -+ -+ case SDP_DATA_SEQ32: -+ SDP_GET32(len, ptr); -+ break; -+ -+ default: -+ return (-1); -+ } -+ if (ptr + len > end) -+ return (-1); -+ -+ /* UUID */ -+ if (ptr + 3 > end) -+ return (-1); -+ SDP_GET8(type, ptr); -+ switch (type) { -+ case SDP_DATA_UUID16: -+ SDP_GET16(uuid, ptr); -+ if (uuid != SDP_UUID_PROTOCOL_L2CAP) -+ return (-1); -+ break; -+ -+ case SDP_DATA_UUID32: /* XXX FIXME can we have 32-bit UUID */ -+ case SDP_DATA_UUID128: /* XXX FIXME can we have 128-bit UUID */ -+ default: -+ return (-1); -+ } -+ -+ /* Protocol */ -+ SDP_GET8(type, ptr); -+ switch (type) { -+ case SDP_DATA_SEQ8: -+ SDP_GET8(len, ptr); -+ break; -+ -+ case SDP_DATA_SEQ16: -+ SDP_GET16(len, ptr); -+ break; -+ -+ case SDP_DATA_SEQ32: -+ SDP_GET32(len, ptr); -+ break; -+ -+ default: -+ return (-1); -+ } -+ if (ptr + len > end) -+ return (-1); -+ -+ /* UUID */ -+ if (ptr + 3 > end) -+ return (-1); -+ SDP_GET8(type, ptr); -+ switch (type) { -+ case SDP_DATA_UUID16: -+ SDP_GET16(uuid, ptr); -+ if (uuid != SDP_UUID_PROTOCOL_RFCOMM) -+ return (-1); -+ break; -+ -+ case SDP_DATA_UUID32: /* XXX FIXME can we have 32-bit UUID */ -+ case SDP_DATA_UUID128: /* XXX FIXME can we have 128-bit UUID */ -+ default: -+ return (-1); -+ } -+ -+ /* channel */ -+ if (ptr + 2 > end) -+ return (-1); -+ -+ SDP_GET8(type, ptr); -+ if (type != SDP_DATA_UINT8) -+ return (-1); -+ -+ SDP_GET8(channel, ptr); -+ -+ return (channel); -+} -+ -+int -+discover_bt(char *addr, char **res_bdaddr, int *res_channel) -+{ -+ bdaddr_t laddr, raddr; -+ uint8_t buffer[256]; -+ sdp_attr_t proto = { SDP_ATTR_INVALID, 0, sizeof(buffer), buffer }; -+ uint16_t serv = SDP_SERVICE_CLASS_OBEX_FILE_TRANSFER; -+ uint32_t attr = SDP_ATTR_RANGE(SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, -+ SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST); -+ void *ss; -+ -+ /* -+ * Convert given address to bdaddr. If not bdaddr, -+ * look it up in hosts database. -+ * -+ * XXX original does an inquiry if no name is given, -+ * XXX and matches against the name given or uses -+ * XXX the first device found. Consider that. -+ */ -+ if (addr == NULL) -+ errx(1, "must have address"); -+ -+ if (!bt_aton(addr, &raddr)) { -+ struct hostent *he = NULL; -+ -+ if ((he = bt_gethostbyname(addr)) == NULL) -+ errx(1, "%s: %s", -+ addr, hstrerror(h_errno)); -+ -+ bdaddr_copy(&raddr, (bdaddr_t *)he->h_addr); -+ } -+ -+ *res_bdaddr = strdup(bt_ntoa(&raddr, NULL)); -+ fprintf(stderr, "Browsing %s ...\n", *res_bdaddr); -+ -+ /* -+ * Connect to remote SDP server to find the channel -+ * number to use for the OBEX_FILE_TRANSFER service -+ */ -+ bdaddr_copy(&laddr, BDADDR_ANY); -+ ss = sdp_open(&laddr, &raddr); -+ if (ss == NULL || (errno = sdp_error(ss)) != 0) -+ err(1, "%s", addr); -+ -+ if (sdp_search(ss, 1, &serv, 1, &attr, 1, &proto) != 0) -+ errx(1, "sdp_search", strerror(sdp_error(ss))); -+ -+ if (proto.flags != SDP_ATTR_OK) -+ errx(1, "sdp_search: File Transfer not available"); -+ -+ sdp_close(ss); -+ -+ *res_channel = parse_rfcomm_channel(&proto); -+ if (*res_channel == -1) -+ errx(1, "sdp_search: No Channel #"); -+ -+ return 0; -+} -+#else - #include - #include - #include -@@ -146,6 +345,7 @@ int discover_bt(char *addr, char **res_b - - return 0; - } -+#endif - - #else - #include "bt_discovery.h" diff --git a/comms/obexftp/patches/patch-ak b/comms/obexftp/patches/patch-ak deleted file mode 100644 index 045e3852a32..00000000000 --- a/comms/obexftp/patches/patch-ak +++ /dev/null @@ -1,73 +0,0 @@ -$NetBSD: patch-ak,v 1.3 2009/07/20 05:56:03 hasso Exp $ - ---- apps/obexftp_sdp.c.orig 2006-03-08 00:34:15.000000000 +0100 -+++ apps/obexftp_sdp.c -@@ -25,6 +25,8 @@ - #include - #endif - -+#ifdef HAVE_BLUETOOTH -+ - #include - #include - #include -@@ -34,6 +36,53 @@ - #include - #include - -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include -+#include -+ -+#include "obexftp_sdp.h" -+ -+#define OBEXFTP_RFCOMM_CHANNEL 10 -+ -+static void *session; -+ -+void -+obexftp_sdp_unregister(void) -+{ -+ sdp_close(session); -+} -+ -+int -+obexftp_sdp_register(void) -+{ -+ sdp_ftrn_profile_t ftrn; -+ bdaddr_t bdaddr; -+ -+ memset(&ftrn, 0, sizeof(ftrn)); -+ ftrn.server_channel = OBEXFTP_RFCOMM_CHANNEL; -+ -+ bdaddr_copy(&bdaddr, BDADDR_ANY); -+ -+ session = sdp_open_local(NULL); -+ if (session == NULL || (errno = sdp_error(session))) { -+ syslog(LOG_ERR, "Failed to connect to the local SDP server. %s(%d)", -+ strerror(errno), errno); -+ -+ return -1; -+ } -+ -+ if (sdp_register_service(session, SDP_SERVICE_CLASS_OBEX_FILE_TRANSFER, -+ &bdaddr, (uint8_t *)&ftrn, sizeof(ftrn), NULL) != 0) { -+ errno = sdp_error(session); -+ syslog(LOG_ERR, "SDP registration failed. %s(%d)", -+ strerror(errno), errno); -+ sdp_close(session); -+ return -1; -+ } -+ -+ return 0; -+} -+#else /* __NetBSD__ */ - #include - #include - #include -@@ -173,3 +222,5 @@ int obexftp_sdp_search(bdaddr_t *src, bd - return 0; - } - */ -+#endif /* !__NetBSD__ */ -+#endif /* HAVE_BLUETOOTH */ diff --git a/comms/obexftp/patches/patch-al b/comms/obexftp/patches/patch-al deleted file mode 100644 index de068be9be7..00000000000 --- a/comms/obexftp/patches/patch-al +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-al,v 1.1 2006/07/24 17:07:15 xtraeme Exp $ - ---- apps/obexftp.c.orig 2006-05-16 16:41:49.000000000 +0200 -+++ apps/obexftp.c -@@ -399,6 +399,7 @@ int main(int argc, char *argv[]) - transport = OBEX_TRANS_CUSTOM; - fprintf(stderr, "Using TTY: %s\n", device); - } -+#ifdef HAVE_BLUETOOTH - if (getenv(OBEXFTP_BLUETOOTH) != NULL) { - device = getenv(OBEXFTP_BLUETOOTH); - if (channel <= 0 || strlen(device) < (6*2+5) || device[2]!=':') -@@ -408,6 +409,7 @@ int main(int argc, char *argv[]) - transport = OBEX_TRANS_BLUETOOTH; - fprintf(stderr, "Using BT: %s (%d)\n", device, channel); - } -+#endif - if (getenv(OBEXFTP_INET) != NULL) { - device = strdup(getenv(OBEXFTP_INET)); - transport = OBEX_TRANS_INET; -- cgit v1.2.3