mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
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>
This commit is contained in:
parent
7ceff4d2e0
commit
c0ac88e928
@ -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
|
||||
|
||||
@ -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
|
||||
19
meta-oe/recipes-support/dfu-util/dfu-util-native_0.4.bb
Normal file
19
meta-oe/recipes-support/dfu-util/dfu-util-native_0.4.bb
Normal file
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
8
meta-oe/recipes-support/dfu-util/dfu-util_0.4.bb
Normal file
8
meta-oe/recipes-support/dfu-util/dfu-util_0.4.bb
Normal file
@ -0,0 +1,8 @@
|
||||
require dfu-util.inc
|
||||
|
||||
DEPENDS = "libusb1"
|
||||
|
||||
SRC_URI += "file://no-usbpath.patch"
|
||||
|
||||
SRC_URI[md5sum] = "2cf466fabb881e8598fa02f286d3242c"
|
||||
SRC_URI[sha256sum] = "f60fea987aa06ee03da22a656d1d113ac224458ec4442bcf1764a62f0930bd07"
|
||||
Loading…
x
Reference in New Issue
Block a user