digitemp: fix build for non x86 architectures
authorOtavio Salvador <otavio@ossystems.com.br>
Fri, 25 Nov 2011 16:37:09 +0000 (16:37 +0000)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:16:50 +0000 (08:16 -0800)
* fix Makefile to allow CC and CFLAGS override
 * clean binaries before build

(From meta-openembedded rev: 639323c998a8c53eef864bcde091c6e0bd2dc00a)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-oe/recipes-support/digitemp/digitemp/makefile-fix.patch [new file with mode: 0644]
meta-openembedded/meta-oe/recipes-support/digitemp/digitemp_3.6.0.bb

diff --git a/meta-openembedded/meta-oe/recipes-support/digitemp/digitemp/makefile-fix.patch b/meta-openembedded/meta-oe/recipes-support/digitemp/digitemp/makefile-fix.patch
new file mode 100644 (file)
index 0000000..c0d552d
--- /dev/null
@@ -0,0 +1,20 @@
+digitemp: allow override of CC and CFLAGS vars
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+--- a/Makefile 2008-08-28 21:37:00.000000000 +0000
++++ b/Makefile 2011-11-24 22:22:39.882511272 +0000
+@@ -11,8 +11,9 @@
+ VERSION = 3.6.0
+-CC    = gcc
+-CFLAGS        = -I./src -I./userial -O2 -Wall # -g
++CC    ?= gcc
++CFLAGS        ?=  -O2 -Wall # -g
++CFLAGS += -I./src -I./userial
+ OBJS          =       src/digitemp.o src/device_name.o src/ds2438.o
+ HDRS          =       src/digitemp.h src/device_name.h
index e2ad691..395e56a 100644 (file)
@@ -4,10 +4,19 @@ DEPENDS = "libusb1"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
 
-SRC_URI = "http://www.digitemp.com/software/linux/digitemp-${PV}.tar.gz"
+PR = "r1"
+
+SRC_URI = "http://www.digitemp.com/software/linux/digitemp-${PV}.tar.gz \
+           file://makefile-fix.patch"
 
 inherit autotools
 
+EXTRA_OEMAKE = "ds9097 ds9097u"
+
+do_configure() {
+    rm -f digitemp_*
+}
+
 do_install() {
     install -d ${D}${sbindir}
     install digitemp_* ${D}${sbindir}