aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/dfu-util
diff options
context:
space:
mode:
authorMartin JaMa Jansa <Martin.Jansa@gmail.com>2011-08-11 13:18:11 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-08-14 13:18:27 +0200
commitc0ac88e9283c061932592e64237cf1b41b3d7468 (patch)
tree3b569ad9d29100d44f9ab770f3f769ae42005404 /meta-oe/recipes-support/dfu-util
parent7ceff4d2e065685a6735b3bf72241eefebe0768b (diff)
downloadmeta-openembedded-c0ac88e9283c061932592e64237cf1b41b3d7468.tar.gz
meta-openembedded-c0ac88e9283c061932592e64237cf1b41b3d7468.tar.bz2
meta-openembedded-c0ac88e9283c061932592e64237cf1b41b3d7468.zip
dfu-util: add version 0.4
* return dfu-util_static, as static binary is more usefull from deploy dir I've tried to build static version with libtool, but in the end this is easier and someone can use both shared/static version * Thanks to GNUtoo for initial recipes http://shr-project.org/trac/ticket/1465 * move usbpath dependency to dfu-util_0.1 Signed-off-by: Martin JaMa Jansa <Martin.Jansa@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support/dfu-util')
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util-0.4/0001-Revert-Makefile.am-Drop-static-dfu-util.patch49
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util-0.4/no-usbpath.patch20
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util-native_0.4.bb19
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util.inc4
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util_0.1.bb5
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util_0.4.bb8
6 files changed, 100 insertions, 5 deletions
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-0.4/0001-Revert-Makefile.am-Drop-static-dfu-util.patch b/meta-oe/recipes-support/dfu-util/dfu-util-0.4/0001-Revert-Makefile.am-Drop-static-dfu-util.patch
new file mode 100644
index 000000000..9ffc5821c
--- /dev/null
+++ b/meta-oe/recipes-support/dfu-util/dfu-util-0.4/0001-Revert-Makefile.am-Drop-static-dfu-util.patch
@@ -0,0 +1,49 @@
+From b379db29534ce6fa2e185f559e817398b3feb9ea Mon Sep 17 00:00:00 2001
+From: Martin JaMa Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 11 Aug 2011 11:19:52 +0200
+Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util"
+
+This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071.
+
+Conflicts:
+
+ src/Makefile.am
+
+Signed-off-by: Martin JaMa Jansa <Martin.Jansa@gmail.com>
+---
+ src/Makefile.am | 15 ++++++++++++++-
+ 1 files changed, 14 insertions(+), 1 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 0674413..ed87891 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,6 @@
+ AM_CFLAGS = -Wall
+
+-bin_PROGRAMS = dfu-util
++bin_PROGRAMS = dfu-util dfu-util_static
+ dfu_util_SOURCES = main.c \
+ dfu_load.c \
+ dfu_load.h \
+@@ -11,3 +11,17 @@ dfu_util_SOURCES = main.c \
+ dfu_file.h \
+ quirks.c \
+ quirks.h
++
++dfu_util_static_SOURCES = main.c \
++ dfu_load.c \
++ dfu_load.h \
++ dfu.c \
++ dfu.h \
++ usb_dfu.h \
++ dfu_file.c \
++ dfu_file.h \
++ quirks.c \
++ quirks.h
++
++dfu_util_static_LDFLAGS = -static
++dfu_util_static_LDADD = -lusb-1.0 -lrt -lpthread
+--
+1.7.6
+
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-0.4/no-usbpath.patch b/meta-oe/recipes-support/dfu-util/dfu-util-0.4/no-usbpath.patch
new file mode 100644
index 000000000..e4f943e5e
--- /dev/null
+++ b/meta-oe/recipes-support/dfu-util/dfu-util-0.4/no-usbpath.patch
@@ -0,0 +1,20 @@
+Index: dfu-util-0.4/configure.ac
+===================================================================
+--- dfu-util-0.4.orig/configure.ac 2011-08-10 22:22:30.000000000 +0200
++++ dfu-util-0.4/configure.ac 2011-08-10 22:22:57.000000000 +0200
+@@ -18,14 +18,12 @@
+ # Checks for libraries.
+ PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0.0,,
+ AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))
+-AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb)
+-
+ LIBS="$LIBS $USB_LIBS"
+ CFLAGS="$CFLAGS $USB_CFLAGS"
+
+ # Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([stdlib.h string.h stdio.h usbpath.h])
++AC_CHECK_HEADERS([stdlib.h string.h stdio.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.4.bb b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.4.bb
new file mode 100644
index 000000000..4a830a36b
--- /dev/null
+++ b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.4.bb
@@ -0,0 +1,19 @@
+require dfu-util_${PV}.bb
+
+inherit native deploy
+do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}"
+
+DEPENDS = "libusb1-native"
+
+FILESPATH =. "${FILE_DIRNAME}/${BPN}-${PV}:"
+SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch"
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_TOOLS}
+ install -m 0755 src/dfu-util_static ${DEPLOY_DIR_TOOLS}/dfu-util-${PV}
+ rm -f ${DEPLOY_DIR_TOOLS}/dfu-util
+ ln -sf ./dfu-util-${PV} ${DEPLOY_DIR_TOOLS}/dfu-util
+
+}
+
+addtask deploy before do_package after do_install
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util.inc b/meta-oe/recipes-support/dfu-util/dfu-util.inc
index 503583243..633b829b2 100644
--- a/meta-oe/recipes-support/dfu-util/dfu-util.inc
+++ b/meta-oe/recipes-support/dfu-util/dfu-util.inc
@@ -4,10 +4,6 @@ AUTHOR = "Harald Welte <laforge@openmoko.org>"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "virtual/libusb0 usbpath"
-
SRC_URI = "http://dfu-util.gnumonks.org/releases/dfu-util-${PV}.tar.gz"
-BBCLASSEXTEND = "native"
-
inherit autotools
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util_0.1.bb b/meta-oe/recipes-support/dfu-util/dfu-util_0.1.bb
index 7b25b1357..b63d74d1a 100644
--- a/meta-oe/recipes-support/dfu-util/dfu-util_0.1.bb
+++ b/meta-oe/recipes-support/dfu-util/dfu-util_0.1.bb
@@ -1,7 +1,10 @@
require dfu-util.inc
-PV = "0.1"
PR = "r1"
+DEPENDS = "virtual/libusb0 usbpath"
+
+BBCLASSEXTEND = "native"
+
SRC_URI[md5sum] = "454b931249d29e4a6c2a2ade17858490"
SRC_URI[sha256sum] = "a27cc667be9b158fecf0ed066698e30eca0c0b3cd7a85aad2058d47ffe16f0e1"
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util_0.4.bb b/meta-oe/recipes-support/dfu-util/dfu-util_0.4.bb
new file mode 100644
index 000000000..12d6af6af
--- /dev/null
+++ b/meta-oe/recipes-support/dfu-util/dfu-util_0.4.bb
@@ -0,0 +1,8 @@
+require dfu-util.inc
+
+DEPENDS = "libusb1"
+
+SRC_URI += "file://no-usbpath.patch"
+
+SRC_URI[md5sum] = "2cf466fabb881e8598fa02f286d3242c"
+SRC_URI[sha256sum] = "f60fea987aa06ee03da22a656d1d113ac224458ec4442bcf1764a62f0930bd07"