# HG changeset patch # User Antoine Bodin # Date 1296084050 -3600 # Node ID ef358edbf01dcf0f3bf38c6872e5c3e2a17cda77 # Parent 0989070c1c4e8fb0edaf40bb9ea4fc8676fca37c imported patch toolchain/lzma.patch diff -r 0989070c1c4e -r ef358edbf01d lzma/receipt --- a/lzma/receipt Thu Jan 27 00:20:50 2011 +0100 +++ b/lzma/receipt Thu Jan 27 00:20:50 2011 +0100 @@ -9,20 +9,45 @@ WEB_SITE="http://sourceforge.net/projects/sevenzip/" WGET_URL="$SF_MIRROR/sevenzip/$TARBALL" DEPENDS="lzlib zlib gcc-lib-base" -BUILD_DEPENDS="zlib-dev" +TAGS="compression archive" + +# Rules to compile & install the temporary toolchain. +cook_tmp_toolchain() +{ + # Put & configure the home-script as needed for tmp toolchain. + rm /tools/usr/bin/lzma /tools/usr/bin/unlzma /tools/usr/bin/lzcat + cp stuff/lzma /tools/usr/bin + chmod 755 /tools/usr/bin/lzma + ln -s /tools/usr/bin/lzma /tools/usr/bin/unlzma + ln -s /tools/usr/bin/lzma /tools/usr/bin/lzcat + sed 's~/usr~/tools/usr~' -i /tools/usr/bin/lzma + + cd $src + if [ ! -f done.lzlib.u ]; then + patch -p0 < ../stuff/lzlib.u || return 1 + touch done.lzlib.u + fi + cd CPP/7zip/Compress/LZMA_Alone + + # Remove copyright message. + sed '/MY_VERSION_COPYRIGHT_DATE/d' -i LzmaAlone.cpp + + make -f makefile.gcc lzma + { make -f makefile.gcc liblz.so.1.0.0 && + make -f makefile.gcc lzma + } || return 1 + + cp -a lzma-shared /tools/usr/bin/lzma-alone + cp -a liblz.so.1.0.0 /tools/lib + ln -s /tools/lib/liblz.so.1.0.0 /tools/lib/liblz.so + ln -s /tools/lib/liblz.so.1.0.0 /tools/lib/liblz.so.1 +} + # Rules to configure and make the package. compile_rules() { - mkdir -p $src cd $src - for i in ../* ; do - case "$i" in - ../receipt*|../taz|../stuff|../process.log);; - ../$(basename $src));; - *) mv $i .;; - esac - done if [ ! -f done.lzlib.u ]; then patch -p0 < ../stuff/lzlib.u || return 1 touch done.lzlib.u