diff options
-rw-r--r-- | recipes/lzma/lzma-4.65/makefile-cleanup.patch | 18 | ||||
-rw-r--r-- | recipes/lzma/lzma.inc | 22 |
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() { |