diff options
author | Alin Năstac <mrness@gentoo.org> | 2005-07-30 16:28:43 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2005-07-30 16:28:43 +0000 |
commit | 9440498b67101dfae2a8431408a04f81052cf342 (patch) | |
tree | 41d9702b7af8b7d360e0bc4b113f357d710981eb /app-mobilephone | |
parent | ppc stable, #100683 (diff) | |
download | gentoo-2-9440498b67101dfae2a8431408a04f81052cf342.tar.gz gentoo-2-9440498b67101dfae2a8431408a04f81052cf342.tar.bz2 gentoo-2-9440498b67101dfae2a8431408a04f81052cf342.zip |
initial import from #99091
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-mobilephone')
7 files changed, 343 insertions, 0 deletions
diff --git a/app-mobilephone/openobex-apps/ChangeLog b/app-mobilephone/openobex-apps/ChangeLog new file mode 100644 index 000000000000..10c29099d176 --- /dev/null +++ b/app-mobilephone/openobex-apps/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for app-mobilephone/openobex-apps +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/openobex-apps/ChangeLog,v 1.1 2005/07/30 16:28:43 mrness Exp $ + +*openobex-apps-1.0.0 (30 Jul 2005) + + 30 Jul 2005; Alin Nastac <mrness@gentoo.org> +files/add-obexserver.patch, + +files/openobex-apps-printf-fixes.patch, +metadata.xml, + +openobex-apps-1.0.0.ebuild: + Initial import from bug #99091, thanks to Maxxer <lorenzo.milesi@gmail.com>. + diff --git a/app-mobilephone/openobex-apps/Manifest b/app-mobilephone/openobex-apps/Manifest new file mode 100644 index 000000000000..536f63bc9cbe --- /dev/null +++ b/app-mobilephone/openobex-apps/Manifest @@ -0,0 +1,6 @@ +MD5 bba6d85880b5492d46ea40089f8e239b openobex-apps-1.0.0.ebuild 940 +MD5 8366a150ffb76f4de5ca0cbdf7908f4f ChangeLog 411 +MD5 bcfd0d2d662576baafd7ac5ab6c58cae metadata.xml 368 +MD5 24b07ddc1d28f613f17c722a55b7700d files/digest-openobex-apps-1.0.0 70 +MD5 81eade8beeebeeb548bc2d032e069736 files/add-obexserver.patch 4019 +MD5 5e2f505367cca8710e097baeb88a0870 files/openobex-apps-printf-fixes.patch 4573 diff --git a/app-mobilephone/openobex-apps/files/add-obexserver.patch b/app-mobilephone/openobex-apps/files/add-obexserver.patch new file mode 100644 index 000000000000..19c932f43139 --- /dev/null +++ b/app-mobilephone/openobex-apps/files/add-obexserver.patch @@ -0,0 +1,122 @@ +diff -Naur openobex-apps-1.0.0/src/Makefile.am openobex-apps-1.0.0-new/src/Makefile.am +--- openobex-apps-1.0.0/src/Makefile.am 2002-12-01 18:34:41.000000000 +0100 ++++ openobex-apps-1.0.0-new/src/Makefile.am 2005-07-14 17:03:26.000000000 +0200 +@@ -9,7 +9,7 @@ + obex_put_common.c obex_put_common.h + + +-bin_PROGRAMS = irxfer obex_tcp irobex_palm3 obex_test ++bin_PROGRAMS = irxfer obex_tcp irobex_palm3 obex_test obexserver + + obex_test_SOURCES = \ + obex_test.c obex_test.h \ +@@ -19,6 +19,10 @@ + + obex_test_LDADD = @OPENOBEX_LIBS@ @BLUETOOTH_LIBS@ libmisc.a + ++obexserver_SOURCES = obexserver.c ++ ++obexserver_LDADD = @OPENOBEX_LIBS@ libmisc.a ++ + obex_tcp_SOURCES = obex_tcp.c + + irxfer_SOURCES = irxfer.c +diff -Naur openobex-apps-1.0.0/src/Makefile.in openobex-apps-1.0.0-new/src/Makefile.in +--- openobex-apps-1.0.0/src/Makefile.in 2002-12-01 18:36:18.000000000 +0100 ++++ openobex-apps-1.0.0-new/src/Makefile.in 2005-07-14 17:03:26.000000000 +0200 +@@ -78,13 +78,17 @@ + libmisc_a_SOURCES = obex_io.c obex_io.h obex_put_common.c obex_put_common.h + + +-bin_PROGRAMS = irxfer obex_tcp irobex_palm3 obex_test ++bin_PROGRAMS = irxfer obex_tcp irobex_palm3 obex_test obexserver + + obex_test_SOURCES = obex_test.c obex_test.h obex_test_client.c obex_test_client.h obex_test_server.c obex_test_server.h obex_test_cable.c obex_test_cable.h + + + obex_test_LDADD = @OPENOBEX_LIBS@ @BLUETOOTH_LIBS@ libmisc.a + ++obexserver_SOURCES = obexserver.c ++ ++obexserver_LDADD = @OPENOBEX_LIBS@ libmisc.a ++ + obex_tcp_SOURCES = obex_tcp.c + + irxfer_SOURCES = irxfer.c +@@ -127,6 +131,9 @@ + obex_test_cable.o + obex_test_DEPENDENCIES = libmisc.a + obex_test_LDFLAGS = ++obexserver_OBJECTS = obexserver.o ++obexserver_DEPENDENCIES = libmisc.a ++obexserver_LDFLAGS = + CFLAGS = @CFLAGS@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) +@@ -138,8 +145,8 @@ + + TAR = tar + GZIP_ENV = --best +-SOURCES = $(libmisc_a_SOURCES) $(irxfer_SOURCES) $(obex_tcp_SOURCES) $(irobex_palm3_SOURCES) $(obex_test_SOURCES) +-OBJECTS = $(libmisc_a_OBJECTS) $(irxfer_OBJECTS) $(obex_tcp_OBJECTS) $(irobex_palm3_OBJECTS) $(obex_test_OBJECTS) ++SOURCES = $(libmisc_a_SOURCES) $(irxfer_SOURCES) $(obex_tcp_SOURCES) $(irobex_palm3_SOURCES) $(obex_test_SOURCES) $(obexserver_SOURCES) ++OBJECTS = $(libmisc_a_OBJECTS) $(irxfer_OBJECTS) $(obex_tcp_OBJECTS) $(irobex_palm3_OBJECTS) $(obex_test_OBJECTS) $(obexserver_OBJECTS) + + all: all-redirect + .SUFFIXES: +@@ -226,6 +233,10 @@ + @rm -f obex_test + $(LINK) $(obex_test_LDFLAGS) $(obex_test_OBJECTS) $(obex_test_LDADD) $(LIBS) + ++obexserver: $(obexserver_OBJECTS) $(obexserver_DEPENDENCIES) ++ @rm -f obexserver ++ $(LINK) $(obexserver_LDFLAGS) $(obexserver_OBJECTS) $(LDADD) $(LIBS) ++ + tags: TAGS + + ID: $(HEADERS) $(SOURCES) $(LISP) +@@ -282,6 +293,7 @@ + obex_test.h obex_test_cable.h + obex_test_server.o: obex_test_server.c obex_io.h obex_test.h \ + obex_test_cable.h obex_test_server.h ++obexserver.o: obexserver.c + + info-am: + info: info-am +diff -Naur openobex-apps-1.0.0/src/obexserver.c openobex-apps-1.0.0-new/src/obexserver.c +--- openobex-apps-1.0.0/src/obexserver.c 1970-01-01 01:00:00.000000000 +0100 ++++ openobex-apps-1.0.0-new/src/obexserver.c 2005-07-14 17:03:30.000000000 +0200 +@@ -0,0 +1,33 @@ ++/* Simple OpenOBEX server for Bluez+OpenOBEX */ ++/* link with libmisc.a from OPENObex-apps and libopenobex from OpenOBEX */ ++/* venglin@freebsd.lublin.pl */ ++ ++ ++#include <stdio.h> ++#include <stdlib.h> ++ ++#include <openobex/obex.h> ++ ++#define OBEX_PUSH_HANDLE 10 ++ ++volatile int finished = 0; ++obex_t *handle = NULL; ++ ++void obex_event(obex_t *handle, obex_object_t *object, int mode, int event, int obex_cmd, int obex_rsp); ++ ++int main(int argc, char **argv) ++{ ++ obex_object_t *object; ++ ++ handle = OBEX_Init(OBEX_TRANS_BLUETOOTH, obex_event, 0); ++ ++ if (argc == 1) ++ { ++ BtOBEX_ServerRegister(handle, NULL, OBEX_PUSH_HANDLE); ++ printf("Waiting for connection...\n"); ++ btobex_accept(handle); ++ ++ while (!finished) ++ OBEX_HandleInput(handle, 1); ++ } ++} diff --git a/app-mobilephone/openobex-apps/files/digest-openobex-apps-1.0.0 b/app-mobilephone/openobex-apps/files/digest-openobex-apps-1.0.0 new file mode 100644 index 000000000000..4117c6377f8d --- /dev/null +++ b/app-mobilephone/openobex-apps/files/digest-openobex-apps-1.0.0 @@ -0,0 +1 @@ +MD5 99927916459067bac249da8f7abc43fa openobex-apps-1.0.0.tar.gz 64249 diff --git a/app-mobilephone/openobex-apps/files/openobex-apps-printf-fixes.patch b/app-mobilephone/openobex-apps/files/openobex-apps-printf-fixes.patch new file mode 100644 index 000000000000..22a1a96a09eb --- /dev/null +++ b/app-mobilephone/openobex-apps/files/openobex-apps-printf-fixes.patch @@ -0,0 +1,152 @@ +--- openobex-apps-1.0.0/src/obex_put_common.c 2002-12-01 09:34:41.000000000 -0800 ++++ openobex-apps-1.0.0-new/src/obex_put_common.c 2005-02-18 15:36:06.982711586 -0800 +@@ -82,7 +82,7 @@ + break; + + default: +- printf(__FUNCTION__ "() Skipped header %02x\n", hi); ++ printf("%s() Skipped header %02x\n", __FUNCTION__, hi); + } + } + if(!body) { +@@ -123,7 +123,7 @@ + OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS); + break; + default: +- printf(__FUNCTION__ "() Denied %02x request\n", cmd); ++ printf("%s() Denied %02x request\n", __FUNCTION__, cmd); + OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED); + break; + } +--- openobex-apps-1.0.0/src/obex_test_cable.h 2002-12-01 09:34:41.000000000 -0800 ++++ openobex-apps-1.0.0-new/src/obex_test_cable.h 2005-02-18 15:45:44.153908603 -0800 +@@ -38,7 +38,7 @@ + #include <openobex/obex.h> + + #ifdef CABLE_DEBUG +-#define CDEBUG(args...) printf(__FUNCTION__ "() " args) ++#define CDEBUG(args...) printf(args) + #else + #define CDEBUG(args...) + #endif +--- openobex-apps-1.0.0/src/obex_test_client.c 2002-12-01 09:34:41.000000000 -0800 ++++ openobex-apps-1.0.0-new/src/obex_test_client.c 2005-02-18 15:38:36.895308553 -0800 +@@ -370,13 +370,13 @@ + + while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) { + if(hi == OBEX_HDR_BODY) { +- printf(__FUNCTION__ "() Found body\n"); ++ printf("%s() Found body\n",__FUNCTION__); + body = hv.bs; + body_len = hlen; + break; + } + else { +- printf(__FUNCTION__ "() Skipped header %02x\n", hi); ++ printf("%s() Skipped header %02x\n", __FUNCTION__, hi); + } + } + +--- openobex-apps-1.0.0/src/obex_test_server.c 2002-12-01 09:34:41.000000000 -0800 ++++ openobex-apps-1.0.0-new/src/obex_test_server.c 2005-02-18 15:42:04.560119274 -0800 +@@ -54,17 +54,17 @@ + char *name = NULL; + char *namebuf = NULL; + +- printf(__FUNCTION__ "()\n"); ++ printf("%s()\n",__FUNCTION__); + + while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) { + switch(hi) { + case OBEX_HDR_BODY: +- printf(__FUNCTION__ "() Found body\n"); ++ printf("%s() Found body\n",__FUNCTION__); + body = hv.bs; + body_len = hlen; + break; + case OBEX_HDR_NAME: +- printf(__FUNCTION__ "() Found name\n"); ++ printf("%s() Found name\n",__FUNCTION__); + if( (namebuf = malloc(hlen / 2))) { + OBEX_UnicodeToChar(namebuf, hv.bs, hlen); + name = namebuf; +@@ -72,7 +72,7 @@ + break; + + default: +- printf(__FUNCTION__ "() Skipped header %02x\n", hi); ++ printf("%s() Skipped header %02x\n", __FUNCTION__, hi); + } + } + if(!body) { +@@ -103,12 +103,12 @@ + char *name = NULL; + char *namebuf = NULL; + +- printf(__FUNCTION__ "()\n"); ++ printf("%s()\n",__FUNCTION__); + + while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) { + switch(hi) { + case OBEX_HDR_NAME: +- printf(__FUNCTION__ "() Found name\n"); ++ printf("%s() Found name\n",__FUNCTION__); + if( (namebuf = malloc(hlen / 2))) { + OBEX_UnicodeToChar(namebuf, hv.bs, hlen); + name = namebuf; +@@ -116,16 +116,16 @@ + break; + + default: +- printf(__FUNCTION__ "() Skipped header %02x\n", hi); ++ printf("%s() Skipped header %02x\n", __FUNCTION__, hi); + } + } + + if(!name) { +- printf(__FUNCTION__ "() Got a GET without a name-header!\n"); ++ printf("%s() Got a GET without a name-header!\n",__FUNCTION__); + OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_FOUND, OBEX_RSP_NOT_FOUND); + return; + } +- printf(__FUNCTION__ "() Got a request for %s\n", name); ++ printf("%s() Got a request for %s\n", __FUNCTION__, name); + + buf = easy_readfile(name, &file_size); + if(buf == NULL) { +@@ -154,7 +154,7 @@ + + const uint8_t *who = NULL; + int who_len = 0; +- printf(__FUNCTION__ "()\n"); ++ printf("%s()\n",__FUNCTION__); + + while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) { + if(hi == OBEX_HDR_WHO) { +@@ -162,7 +162,7 @@ + who_len = hlen; + } + else { +- printf(__FUNCTION__ "() Skipped header %02x\n", hi); ++ printf("%s() Skipped header %02x\n", __FUNCTION__, hi); + } + } + if (who_len == 6) { +@@ -199,7 +199,7 @@ + OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS); + break; + default: +- printf(__FUNCTION__ "() Denied %02x request\n", cmd); ++ printf("%s() Denied %02x request\n", __FUNCTION__, cmd); + OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED); + break; + } +@@ -224,7 +224,7 @@ + break; + + default: +- printf(__FUNCTION__ "() Command (%02x) has now finished\n", obex_cmd); ++ printf("%s() Command (%02x) has now finished\n", __FUNCTION__, obex_cmd); + break; + } + } diff --git a/app-mobilephone/openobex-apps/metadata.xml b/app-mobilephone/openobex-apps/metadata.xml new file mode 100644 index 000000000000..48faede2e7c7 --- /dev/null +++ b/app-mobilephone/openobex-apps/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mobile-phone</herd> +<longdescription>This is the apps that comes with the Open OBEX C-library. +These are not meant to be more than test-programs to look at +if you want to see how use the library itself.</longdescription> +</pkgmetadata> diff --git a/app-mobilephone/openobex-apps/openobex-apps-1.0.0.ebuild b/app-mobilephone/openobex-apps/openobex-apps-1.0.0.ebuild new file mode 100644 index 000000000000..49e72a89f71f --- /dev/null +++ b/app-mobilephone/openobex-apps/openobex-apps-1.0.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/openobex-apps/openobex-apps-1.0.0.ebuild,v 1.1 2005/07/30 16:28:43 mrness Exp $ + +inherit eutils + +DESCRIPTION="Openobex test applications, including example obexserver to receive files using bluetooth" +HOMEPAGE="http://sourceforge.net/projects/openobex" +SRC_URI="mirror://sourceforge/openobex/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="bluetooth" + +DEPEND="dev-libs/openobex + bluetooth? ( net-wireless/bluez-libs )" +RDEPEND="${DEPEND} + bluetooth? ( net-wireless/bluez-utils )" + +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/${PN}-printf-fixes.patch + use bluetooth && epatch ${FILESDIR}/add-obexserver.patch +} + +src_install () { + make DESTDIR=${D} install || die + + dodoc ChangeLog README AUTHORS NEWS +} + +pkg_postinst() { + if use bluetooth ; then + einfo + einfo "To use obexserver run: " + einfo "1. sdptool add --channel=10 OPUSH " + einfo "2. obexserver " + einfo + fi +}
\ No newline at end of file |