sdcc: add native-tools patch to make it build
authorMichael Lauer <mickey@vanille-media.de>
Thu, 19 Oct 2006 21:33:36 +0000 (21:33 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Thu, 19 Oct 2006 21:33:36 +0000 (21:33 +0000)
packages/sdcc/files/use-native-tools.patch [new file with mode: 0644]
packages/sdcc/sdcc-native_2.5.0.bb
packages/sdcc/sdcc_2.5.0.bb

diff --git a/packages/sdcc/files/use-native-tools.patch b/packages/sdcc/files/use-native-tools.patch
new file mode 100644 (file)
index 0000000..d3b02c4
--- /dev/null
@@ -0,0 +1,80 @@
+Index: sdcc/device/lib/Makefile.in
+===================================================================
+--- sdcc.orig/device/lib/Makefile.in
++++ sdcc/device/lib/Makefile.in
+@@ -18,8 +18,8 @@ ifndef PORTINCDIR
+ PORTINCDIR    = $(INCDIR)/mcs51
+ endif
+-CC            = $(PRJDIR)/bin/sdcc
+-CPP           = $(PRJDIR)/bin/sdcpp
++CC            = sdcc
++CPP           = sdcpp
+ prefix          = @prefix@
+ exec_prefix     = @exec_prefix@
+Index: sdcc/device/lib/mcs51/Makefile
+===================================================================
+--- sdcc.orig/device/lib/mcs51/Makefile
++++ sdcc/device/lib/mcs51/Makefile
+@@ -1,8 +1,8 @@
+ TOPDIR = ../../..
+-SAS = $(TOPDIR)/bin/asx8051
+-SCC = $(TOPDIR)/bin/sdcc
++SAS = asx8051
++SCC = sdcc
+ OBJ = crtstart.rel crtxinit.rel crtxclear.rel crtclear.rel crtxstack.rel \
+       crtpagesfr.rel
+Index: sdcc/device/lib/ds390/Makefile
+===================================================================
+--- sdcc.orig/device/lib/ds390/Makefile
++++ sdcc/device/lib/ds390/Makefile
+@@ -1,4 +1,4 @@
+-CC = ../../../bin/sdcc
++CC = sdcc
+ #VERBOSE = --verbose
+Index: sdcc/device/lib/ds400/Makefile
+===================================================================
+--- sdcc.orig/device/lib/ds400/Makefile
++++ sdcc/device/lib/ds400/Makefile
+@@ -1,4 +1,4 @@
+-CC = ../../../bin/sdcc
++CC = sdcc
+ #VERBOSE = --verbose
+Index: sdcc/device/lib/z80/Makefile
+===================================================================
+--- sdcc.orig/device/lib/z80/Makefile
++++ sdcc/device/lib/z80/Makefile
+@@ -2,8 +2,8 @@
+ TOPDIR = ../../..
+-SCC = $(TOPDIR)/bin/sdcc -mz80
+-SAS = $(TOPDIR)/bin/as-z80
++SCC = sdcc -mz80
++SAS = as-z80
+ OBJ = div.o mul.o putchar.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
+Index: sdcc/device/lib/gbz80/Makefile
+===================================================================
+--- sdcc.orig/device/lib/gbz80/Makefile
++++ sdcc/device/lib/gbz80/Makefile
+@@ -2,8 +2,8 @@
+ TOPDIR = ../../..
+-SCC = $(TOPDIR)/bin/sdcc -mgbz80
+-SAS = $(TOPDIR)/bin/as-gbz80
++SCC = sdcc -mgbz80
++SAS = as-gbz80
+ OBJ = div.o mul.o putchar.o printf.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
index 85c3d5b..6f6c3c1 100644 (file)
@@ -1,10 +1,15 @@
 require sdcc_${PV}.bb
-
 inherit native
+DEPENDS = ""
+
+# don't need native-tools patch here
+SRC_URI = "${SOURCEFORGE_MIRROR}/sdcc/sdcc-${PV}.tar.gz \
+           file://gcc4.patch;patch=1"
 
-# yes, we usually don't want to do this in order to prevent staging pollution,
-# however sdcc behaves pretty nice here, so we can do an exception here (ML).
 do_stage() {
-       oe_runmake install 
+       autotools_stage_all
+       for i in bin/as-*; do
+               install -m 0755 $i ${STAGING_BINDIR}
+       done
 }
 
index 117770e..3347fb9 100644 (file)
@@ -2,10 +2,12 @@ DESCRIPTION= "SDCC - Small Device C Compiler"
 LICENSE = "GPL"
 SECTION = "devel"
 HOMEPAGE = "http://sdcc.sourceforge.net"
+DEPENDS = "sdcc-native"
 PR = "r1"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/sdcc/sdcc-${PV}.tar.gz \
-           file://gcc4.patch;patch=1"
+           file://gcc4.patch;patch=1 \
+           file://use-native-tools.patch;patch=1"
 S = "${WORKDIR}/sdcc"
 
 PARALLEL_MAKE = ""