From patchwork Sun Dec 9 23:06:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 204801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 69AAD2C020B for ; Mon, 10 Dec 2012 10:07:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2EBF5A010F; Sun, 9 Dec 2012 23:06:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nLLpvdsIWPPK; Sun, 9 Dec 2012 23:06:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 11FF4A00EF; Sun, 9 Dec 2012 23:06:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 446F98F74B for ; Sun, 9 Dec 2012 23:06:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 380AD829B8 for ; Sun, 9 Dec 2012 23:06:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uk8KuvitR7LK for ; Sun, 9 Dec 2012 23:06:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by whitealder.osuosl.org (Postfix) with ESMTPS id CD19C81B96 for ; Sun, 9 Dec 2012 23:06:45 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id hm2so677705wib.10 for ; Sun, 09 Dec 2012 15:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=pGmy5wiFg/c/fx2XHOgFYKMznZf5nleYGRtC79rhGDk=; b=ZfWG1+yMMJFtkNAT7ZLm9FEgqvbupUcAQmpPvU9EDKLjnU6AQwuR6nA3I897Omo6dk 44bAeQPQxruoTnr7M6PaXGYXDwUWIK/qBY5itbQzz8jbomoSPPmYqicgVm2jnoqI3L/1 ABm4kQ/45U3r9cRzXNOhsAPzcP9Re69gJygfherLDugnZjKJPh3+aQUNk4zs4aZG/D/Z wu6o5ED19f+XYa/+alXU5G/qH+8onRFxMvf1dYmDrE0UrFHtwQo9aXqRN6i86WIYJlPW X/a4/9IyVZNdCEnW/sxHVubumjIh49BGXfRkULyU1o3ZibOmOBSiaeIMcMRtdnGn0qGr gwPg== Received: by 10.180.81.39 with SMTP id w7mr7850755wix.15.1355094403520; Sun, 09 Dec 2012 15:06:43 -0800 (PST) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPS id y3sm7881379wix.6.2012.12.09.15.06.41 (version=SSLv3 cipher=OTHER); Sun, 09 Dec 2012 15:06:42 -0800 (PST) From: Samuel Martin To: buildroot@busybox.net Date: Mon, 10 Dec 2012 00:06:22 +0100 Message-Id: <1355094387-22886-2-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1355094387-22886-1-git-send-email-s.martin49@gmail.com> References: <1355094387-22886-1-git-send-email-s.martin49@gmail.com> Cc: armadeus-forum@lists.sourceforge.net, Julien Boibessot Subject: [Buildroot] [PATCH] openobex: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Cc: Julien Boibessot Cc: Eric Jarrige Signed-off-by: Samuel Martin Tested-by: Eric Jarrige --- package/Config.in | 1 + package/openobex/Config.in | 28 +++++++++++++++++ ...penobex-libusb_check_when_cross-compiling.patch | 18 +++++++++++ .../openobex-replace_deprecated_functions.patch | 30 +++++++++++++++++++ package/openobex/openobex.mk | 35 ++++++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 package/openobex/Config.in create mode 100644 package/openobex/openobex-libusb_check_when_cross-compiling.patch create mode 100644 package/openobex/openobex-replace_deprecated_functions.patch create mode 100644 package/openobex/openobex.mk diff --git a/package/Config.in b/package/Config.in index 74e439e..0855684 100644 --- a/package/Config.in +++ b/package/Config.in @@ -632,6 +632,7 @@ source "package/ntp/Config.in" source "package/nuttcp/Config.in" source "package/olsr/Config.in" source "package/openntpd/Config.in" +source "package/openobex/Config.in" source "package/openssh/Config.in" source "package/openswan/Config.in" source "package/openvpn/Config.in" diff --git a/package/openobex/Config.in b/package/openobex/Config.in new file mode 100644 index 0000000..06f4c7d --- /dev/null +++ b/package/openobex/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_OPENOBEX + bool "openobex" + help + Free open source implementation of the Object Exchange (OBEX) + protocol. + + http://www.openobex.org + +if BR2_PACKAGE_OPENOBEX +config BR2_PACKAGE_OPENOBEX_BLUEZ + bool "enable bluez support" + select BR2_PACKAGE_BLUEZ_UTILS + +config BR2_PACKAGE_OPENOBEX_LIBUSB + bool "enable libusb support" + select BR2_PACKAGE_LIBUSB + +config BR2_PACKAGE_OPENOBEX_APPS + bool "install test applications" + help + Also install the openobex test applications on target. + +config BR2_PACKAGE_OPENOBEX_SYSLOG + bool "enable debugging to the system logger" + +config BR2_PACKAGE_OPENOBEX_DUMP + bool "enable protocol dumping for debugging" +endif diff --git a/package/openobex/openobex-libusb_check_when_cross-compiling.patch b/package/openobex/openobex-libusb_check_when_cross-compiling.patch new file mode 100644 index 0000000..7b8056a --- /dev/null +++ b/package/openobex/openobex-libusb_check_when_cross-compiling.patch @@ -0,0 +1,18 @@ +Fix libusb check when cross-compiling. + +Signed-off-by: Julien Boibessot +Signed-off-by: Samuel Martin + +Index: openobex-1.5/acinclude.m4 +=================================================================== +--- openobex-1.5.orig/acinclude.m4 2010-06-16 10:32:47.000000000 +0200 ++++ openobex-1.5/acinclude.m4 2010-06-16 10:35:33.000000000 +0200 +@@ -158,7 +158,7 @@ + ;; + *) + PKG_CHECK_MODULES(USB, libusb, usb_lib_found=yes, AC_MSG_RESULT(no)) +- AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb") ++ REQUIRES="libusb" + ;; + esac + AC_SUBST(USB_CFLAGS) diff --git a/package/openobex/openobex-replace_deprecated_functions.patch b/package/openobex/openobex-replace_deprecated_functions.patch new file mode 100644 index 0000000..17274d3 --- /dev/null +++ b/package/openobex/openobex-replace_deprecated_functions.patch @@ -0,0 +1,30 @@ +obex_test_cable.c: avoid to use SuSv3 LEGACY APIs + +Signed-off-by: Julien Boibessot +Signed-off-by: Samuel Martin + +Index: openobex-1.5/apps/obex_test_cable.c +=================================================================== +--- openobex-1.5.orig/apps/obex_test_cable.c 2009-02-08 19:30:22.000000000 +0100 ++++ openobex-1.5/apps/obex_test_cable.c 2010-06-16 11:11:05.000000000 +0200 +@@ -113,9 +113,9 @@ + if(total == sizeof(tmpbuf)) + return -1; + +- if( (answer = index(tmpbuf, '\n')) ) { ++ if( (answer = strchr(tmpbuf, '\n')) ) { + // Remove first line (echo) +- if( (answer_end = index(answer+1, '\n')) ) { ++ if( (answer_end = strchr(answer+1, '\n')) ) { + // Found end of answer + done = 1; + } +@@ -178,7 +178,7 @@ + } + + tcgetattr(gt->ttyfd, >->oldtio); +- bzero(>->newtio, sizeof(struct termios)); ++ memset(>->newtio, 0, sizeof(struct termios)); + gt->newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS; + gt->newtio.c_iflag = IGNPAR; + gt->newtio.c_oflag = 0; diff --git a/package/openobex/openobex.mk b/package/openobex/openobex.mk new file mode 100644 index 0000000..beac5ff --- /dev/null +++ b/package/openobex/openobex.mk @@ -0,0 +1,35 @@ +############################################################# +# +# openobex +# +############################################################# +OPENOBEX_VERSION = 1.5 +OPENOBEX_SITE = http://ftp.osuosl.org/pub/linux/bluetooth +# Libraries seems release under LGPLv2.1, while other material are undrer GPLv2 +OPENOBEX_LICENSE = GPLv2/LGPLv2.1 +OPENOBEX_LICENSE_FILES = COPYING COPYING.LIB + +OPENOBEX_AUTORECONF = YES +OPENOBEX_INSTALL_STAGING = YES + +OPENOBEX_CONF_OPT += \ + $(if $(BR2_ENABLE_DEBUG),--enable-debug) \ + $(if $(BR2_PACKAGE_OPENOBEX_APPS),--enable-apps) \ + $(if $(BR2_PACKAGE_OPENOBEX_SYSLOG),--enable-syslog) \ + $(if $(BR2_PACKAGE_OPENOBEX_DUMP),--enable-dump) + +ifeq ($(BR2_PACKAGE_OPENOBEX_BLUEZ),y) +OPENOBEX_DEPENDENCIES += bluez_utils +OPENOBEX_CONF_OPT += --with-bluez=$(STAGING_DIR) +else +OPENOBEX_CONF_OPT += --disable-bluetooth +endif + +ifeq ($(BR2_PACKAGE_OPENOBEX_LIBUSB),y) +OPENOBEX_DEPENDENCIES += libusb +OPENOBEX_CONF_OPT += --with-usb=$(STAGING_DIR) +else +OPENOBEX_CONF_OPT += --disable-usb +endif + +$(eval $(autotools-package))