diff options
author | Martin JaMa Jansa <Martin.Jansa@gmail.com> | 2011-08-11 13:18:11 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-08-14 13:18:27 +0200 |
commit | c0ac88e9283c061932592e64237cf1b41b3d7468 (patch) | |
tree | 3b569ad9d29100d44f9ab770f3f769ae42005404 /meta-oe | |
parent | 7ceff4d2e065685a6735b3bf72241eefebe0768b (diff) | |
download | meta-openembedded-c0ac88e9283c061932592e64237cf1b41b3d7468.tar.gz |
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')
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 @@ | |||
1 | From b379db29534ce6fa2e185f559e817398b3feb9ea Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin JaMa Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Thu, 11 Aug 2011 11:19:52 +0200 | ||
4 | Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util" | ||
5 | |||
6 | This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071. | ||
7 | |||
8 | Conflicts: | ||
9 | |||
10 | src/Makefile.am | ||
11 | |||
12 | Signed-off-by: Martin JaMa Jansa <Martin.Jansa@gmail.com> | ||
13 | --- | ||
14 | src/Makefile.am | 15 ++++++++++++++- | ||
15 | 1 files changed, 14 insertions(+), 1 deletions(-) | ||
16 | |||
17 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
18 | index 0674413..ed87891 100644 | ||
19 | --- a/src/Makefile.am | ||
20 | +++ b/src/Makefile.am | ||
21 | @@ -1,6 +1,6 @@ | ||
22 | AM_CFLAGS = -Wall | ||
23 | |||
24 | -bin_PROGRAMS = dfu-util | ||
25 | +bin_PROGRAMS = dfu-util dfu-util_static | ||
26 | dfu_util_SOURCES = main.c \ | ||
27 | dfu_load.c \ | ||
28 | dfu_load.h \ | ||
29 | @@ -11,3 +11,17 @@ dfu_util_SOURCES = main.c \ | ||
30 | dfu_file.h \ | ||
31 | quirks.c \ | ||
32 | quirks.h | ||
33 | + | ||
34 | +dfu_util_static_SOURCES = main.c \ | ||
35 | + dfu_load.c \ | ||
36 | + dfu_load.h \ | ||
37 | + dfu.c \ | ||
38 | + dfu.h \ | ||
39 | + usb_dfu.h \ | ||
40 | + dfu_file.c \ | ||
41 | + dfu_file.h \ | ||
42 | + quirks.c \ | ||
43 | + quirks.h | ||
44 | + | ||
45 | +dfu_util_static_LDFLAGS = -static | ||
46 | +dfu_util_static_LDADD = -lusb-1.0 -lrt -lpthread | ||
47 | -- | ||
48 | 1.7.6 | ||
49 | |||
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 @@ | |||
1 | Index: dfu-util-0.4/configure.ac | ||
2 | =================================================================== | ||
3 | --- dfu-util-0.4.orig/configure.ac 2011-08-10 22:22:30.000000000 +0200 | ||
4 | +++ dfu-util-0.4/configure.ac 2011-08-10 22:22:57.000000000 +0200 | ||
5 | @@ -18,14 +18,12 @@ | ||
6 | # Checks for libraries. | ||
7 | PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0.0,, | ||
8 | AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) | ||
9 | -AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb) | ||
10 | - | ||
11 | LIBS="$LIBS $USB_LIBS" | ||
12 | CFLAGS="$CFLAGS $USB_CFLAGS" | ||
13 | |||
14 | # Checks for header files. | ||
15 | AC_HEADER_STDC | ||
16 | -AC_CHECK_HEADERS([stdlib.h string.h stdio.h usbpath.h]) | ||
17 | +AC_CHECK_HEADERS([stdlib.h string.h stdio.h]) | ||
18 | |||
19 | # Checks for typedefs, structures, and compiler characteristics. | ||
20 | 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 @@ | |||
1 | require dfu-util_${PV}.bb | ||
2 | |||
3 | inherit native deploy | ||
4 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" | ||
5 | |||
6 | DEPENDS = "libusb1-native" | ||
7 | |||
8 | FILESPATH =. "${FILE_DIRNAME}/${BPN}-${PV}:" | ||
9 | SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch" | ||
10 | |||
11 | do_deploy() { | ||
12 | install -d ${DEPLOY_DIR_TOOLS} | ||
13 | install -m 0755 src/dfu-util_static ${DEPLOY_DIR_TOOLS}/dfu-util-${PV} | ||
14 | rm -f ${DEPLOY_DIR_TOOLS}/dfu-util | ||
15 | ln -sf ./dfu-util-${PV} ${DEPLOY_DIR_TOOLS}/dfu-util | ||
16 | |||
17 | } | ||
18 | |||
19 | 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>" | |||
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
6 | 6 | ||
7 | DEPENDS = "virtual/libusb0 usbpath" | ||
8 | |||
9 | SRC_URI = "http://dfu-util.gnumonks.org/releases/dfu-util-${PV}.tar.gz" | 7 | SRC_URI = "http://dfu-util.gnumonks.org/releases/dfu-util-${PV}.tar.gz" |
10 | 8 | ||
11 | BBCLASSEXTEND = "native" | ||
12 | |||
13 | inherit autotools | 9 | 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 @@ | |||
1 | require dfu-util.inc | 1 | require dfu-util.inc |
2 | 2 | ||
3 | PV = "0.1" | ||
4 | PR = "r1" | 3 | PR = "r1" |
5 | 4 | ||
5 | DEPENDS = "virtual/libusb0 usbpath" | ||
6 | |||
7 | BBCLASSEXTEND = "native" | ||
8 | |||
6 | SRC_URI[md5sum] = "454b931249d29e4a6c2a2ade17858490" | 9 | SRC_URI[md5sum] = "454b931249d29e4a6c2a2ade17858490" |
7 | SRC_URI[sha256sum] = "a27cc667be9b158fecf0ed066698e30eca0c0b3cd7a85aad2058d47ffe16f0e1" | 10 | 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 @@ | |||
1 | require dfu-util.inc | ||
2 | |||
3 | DEPENDS = "libusb1" | ||
4 | |||
5 | SRC_URI += "file://no-usbpath.patch" | ||
6 | |||
7 | SRC_URI[md5sum] = "2cf466fabb881e8598fa02f286d3242c" | ||
8 | SRC_URI[sha256sum] = "f60fea987aa06ee03da22a656d1d113ac224458ec4442bcf1764a62f0930bd07" | ||