aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/lzma
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2011-02-23 12:51:24 -0700
committerTom Rini <tom_rini@mentor.com>2011-02-23 14:07:01 -0700
commit6bb7f0a60617f50da54eaa03f25a14bfb19aad64 (patch)
tree39b1fce05c3444fd464d9c1b46748d350ec8d727 /recipes/lzma
parentc596318ffcfaf06ef5dd8d5270a55ff58e4daad6 (diff)
downloadopenembedded-6bb7f0a60617f50da54eaa03f25a14bfb19aad64.tar.gz
lzma: Various cleanups and a bugfix
We use the subdir parameter to SRC_URI so that we will unpack into the normal S directory rather than WORKDIR (which avoids a race with the append to unpack and removal of empty log files). Next, we replace the regex to override the compiler with a patch that really does it where it's needed (C/LzmaUtil) and now we have a target liblzma.a rather than host liblzma.a. For CPP/7zip/Compress/LZMA_Alone we just need to pass in correct values via CXX_C / CXX. Given the structure of the Makefile it's easiest to pass in the rest of the flags as part of the compiler. Signed-off-by: Tom Rini <tom_rini@mentor.com>
Diffstat (limited to 'recipes/lzma')
-rw-r--r--recipes/lzma/lzma-4.65/makefile-cleanup.patch18
-rw-r--r--recipes/lzma/lzma.inc22
2 files changed, 25 insertions, 15 deletions
diff --git a/recipes/lzma/lzma-4.65/makefile-cleanup.patch b/recipes/lzma/lzma-4.65/makefile-cleanup.patch
new file mode 100644
index 0000000000..ccca4d9e83
--- /dev/null
+++ b/recipes/lzma/lzma-4.65/makefile-cleanup.patch
@@ -0,0 +1,18 @@
+Index: lzma-4.65/C/LzmaUtil/makefile.gcc
+===================================================================
+--- lzma-4.65.orig/C/LzmaUtil/makefile.gcc
++++ lzma-4.65/C/LzmaUtil/makefile.gcc
+@@ -1,10 +1,10 @@
+ PROG = lzma
+-CC = gcc
++CC ?= gcc
+ LIB = liblzma.a
+ RM = rm -f
+ CFLAGS = -c -O2 -Wall
+-AR = ar
+-RANLIB = ranlib
++AR ?= ar
++RANLIB ?= ranlib
+
+ OBJS = \
+ Alloc.o \
diff --git a/recipes/lzma/lzma.inc b/recipes/lzma/lzma.inc
index c7e074c051..c67619e3d6 100644
--- a/recipes/lzma/lzma.inc
+++ b/recipes/lzma/lzma.inc
@@ -1,35 +1,27 @@
DESCRIPTION = "LZMA is a general compression method. LZMA provides high compression ratio and very fast decompression."
HOMEPAGE = "http://www.7-zip.org/"
LICENSE = "LGPL"
-INC_PR = "r5"
+INC_PR = "r6"
-SRC_URI = "http://downloads.sourceforge.net/sevenzip/lzma${@bb.data.getVar('PV',d,1).replace('.','')}.tar.bz2 \
+SRC_URI = "http://downloads.sourceforge.net/sevenzip/lzma${@bb.data.getVar('PV',d,1).replace('.','')}.tar.bz2;subdir=${BPN}-${PV} \
file://001-large_files.patch \
file://002-lzmp.patch \
file://003-compile_fixes.patch \
- file://100-static_library.patch"
-
-S = "${WORKDIR}"
+ file://100-static_library.patch \
+ file://makefile-cleanup.patch"
EXTRA_OEMAKE = "-f makefile.gcc"
-CFLAGS += "-c -I${S}"
-
do_unpack_append() {
# Replace MS-DOS line-endings with Unix style line-endings
oe.process.run("find . -type f -print0 | xargs -0 sed 's/\r$//' -i",
cwd=d.getVar("S", True))
}
-do_patch_append() {
- # Hack to ensure we use our environment values
- oe.process.run("find . -type f -name makefile.gcc -print0 | xargs -0 sed 's/^CXX =/CXX ?=/;s/^CXX_C =/CXX_C ?=/;s/CXX_C/CC/' -i",
- cwd=d.getVar("S", True))
-}
-
do_compile() {
- oe_runmake -C C/LzmaUtil
- oe_runmake -C CPP/7zip/Compress/LZMA_Alone
+ oe_runmake CFLAGS='${CFLAGS} -c' -C C/LzmaUtil
+ oe_runmake CXX_C='${CC} ${CFLAGS}' CXX='${CXX} ${CXXFLAGS}' \
+ -C CPP/7zip/Compress/LZMA_Alone
}
do_install() {