build fix.
authorhschang <chang@dev3>
Thu, 12 Feb 2015 12:01:44 +0000 (21:01 +0900)
committerhschang <chang@dev3>
Mon, 16 Feb 2015 00:59:42 +0000 (09:59 +0900)
40 files changed:
meta-bsp/common/recipes/vuplus/vuplus-dvb-modules.bb
meta-bsp/common/recipes/vuplus/vuplus-dvb-proxy.bb
meta-bsp/vuduo2/recipes/vuplus/vuplus-dvb-proxy.bbappend
meta-bsp/vusolo2/recipes/vuplus/vuplus-dvb-proxy.bbappend
meta-bsp/vusolose/recipes/vuplus/vuplus-dvb-proxy.bbappend
meta-openvuplus/conf/distro/vuplus.conf
meta-openvuplus/recipes-connectivity/libmicrohttpd/libmicrohttpd_0.4.6.bb [new file with mode: 0644]
meta-openvuplus/recipes-devtools/python/python-native_2.7.3.bbappend
meta-openvuplus/recipes-extended/libimobiledevice/libplist/fix-parallel-make.patch [deleted file]
meta-openvuplus/recipes-extended/libimobiledevice/libplist_1.8.bbappend [deleted file]
meta-openvuplus/recipes-graphics/libgles/libgles.bb
meta-openvuplus/recipes-graphics/libvugles2/libvugles2_0.1.0.bb
meta-openvuplus/recipes-multimedia/gstreamer1.0/gstreamer1.0-plugins-bad_1.4.%.bbappend
meta-openvuplus/recipes-multimedia/libcec/libcec_2.1.1.bb
meta-openvuplus/recipes-multimedia/xbmc/enigma2-plugin-extensions-xbmc.bb
meta-openvuplus/recipes-multimedia/xbmc/xbmc_git.bb
meta-openvuplus/recipes-multimedia/xbmc/xbmc_git.bbappend
meta-openvuplus/recipes-support/libbluray/libaacs/libaacs_define_xopen_source_500.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/libbluray/libaacs/libaacs_remove_werror_implicit_function_declaration.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/libbluray/libaacs_git.bb
meta-openvuplus/recipes-support/libbluray/libbluray.inc
meta-openvuplus/recipes-support/libbluray/libbluray_1.0.0.bb
meta-openvuplus/recipes-support/libbluray/libdca_0.0.5-5.bb
meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bb [new file with mode: 0644]
meta-openvuplus/recipes-support/libgcrypt/files/add-pkgconfig-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/libgcrypt/libgcrypt.inc [new file with mode: 0644]
meta-openvuplus/recipes-support/libgcrypt/libgcrypt_1.6.2.bb [new file with mode: 0644]
meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch [deleted file]
meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch [deleted file]
meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb [deleted file]
meta-openvuplus/recipes-support/lzma/lzma-4.65/001-large_files.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/lzma/lzma-4.65/002-lzmp.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/lzma/lzma-4.65/003-compile_fixes.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/lzma/lzma-4.65/100-static_library.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/lzma/lzma-4.65/makefile-cleanup.patch [new file with mode: 0644]
meta-openvuplus/recipes-support/lzma/lzma.inc [new file with mode: 0644]
meta-openvuplus/recipes-support/lzma/lzma_4.65.bb [new file with mode: 0644]
meta-openvuplus/recipes-vuplus/packagegroups/packagegroup-vuplus-base.bb

index bdf850b..5fac239 100755 (executable)
@@ -8,9 +8,6 @@ PR = "r22-${SRCDATE}"
 
 SRC_URI = "http://archive.vuplus.com/download/drivers/vuplus-dvb-modules-${MACHINE}-${PV}-${SRCDATE}.tar.gz "
 
-DEPENDS += "virtual/kernel module-init-tools"
-RDEPENDS_${PN} += "module-init-tools-depmod"
-
 S = "${WORKDIR}"
 
 inherit module-base
index f924559..527d5ed 100644 (file)
@@ -8,9 +8,6 @@ PR = "${SRCDATE}.${SRCDATE_PR}"
 
 SRC_URI = "http://archive.vuplus.com/download/build_support/vuplus/vuplus-dvb-proxy-${MACHINE}-${PV}-${PR}.tar.gz "
 
-DEPENDS += "virtual/kernel module-init-tools"
-RDEPENDS_${PN} += "module-init-tools-depmod"
-
 S = "${WORKDIR}"
 
 inherit module-base
index d6f2564..dfc5fd2 100644 (file)
@@ -1,8 +1,8 @@
 SRCDATE = "20150113"
 SRCDATE_PR = "r0"
 
-do_install_append(){
-  ln -s /lib/modules/${KERNEL_VERSION}/extra/dvb-bcm7424.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/dvb-bcm.ko
+pkg_postinst_${PN}_append () {
+  ln -s /lib/modules/${KERNEL_VERSION}/extra/dvb-bcm7424.ko $D/lib/modules/${KERNEL_VERSION}/extra/dvb-bcm.ko
 }
 
 
index bb02493..dac3ac2 100644 (file)
@@ -1,8 +1,8 @@
 SRCDATE = "20150113"
 SRCDATE_PR = "r0"
 
-do_install_append(){
-  ln -s /lib/modules/${KERNEL_VERSION}/extra/dvb-bcm7356.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/dvb-bcm.ko
+pkg_postinst_${PN}_append () {
+  ln -s /lib/modules/${KERNEL_VERSION}/extra/dvb-bcm7356.ko $D/lib/modules/${KERNEL_VERSION}/extra/dvb-bcm.ko
 }
 
 
index aece1a3..d8045c4 100644 (file)
@@ -1,8 +1,8 @@
 SRCDATE = "20150113"
 SRCDATE_PR = "r0"
 
-do_install_append(){
-  ln -s /lib/modules/${KERNEL_VERSION}/extra/dvb-bcm7241.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/dvb-bcm.ko
+pkg_postinst_${PN}_append () {
+  ln -s /lib/modules/${KERNEL_VERSION}/extra/dvb-bcm7241.ko $D/lib/modules/${KERNEL_VERSION}/extra/dvb-bcm.ko
 }
 
 SRC_URI[md5sum] = "af6a79ba8c1df1b6c502c5891ace8186"
index 7a9dc2f..7904c52 100644 (file)
@@ -42,6 +42,10 @@ PREFERRED_VERSION_udev ?= "182"
 
 PREFERRED_VERSION_elfutils ?= "0.148"
 
+PREFERRED_VERSION_libmicrohttpd ?= "0.4.6"
+PREFERRED_VERSION_libdvdcss ?= "1.2.10"
+PREFERRED_VERSION_taglib ?= "1.8"
+
 PREFERRED_PROVIDER_jpeg = "jpeg"
 PREFERRED_PROVIDER_jpeg-native = "jpeg-native"
 PREFERRED_PROVIDER_libfribidi = "libfribidi"
diff --git a/meta-openvuplus/recipes-connectivity/libmicrohttpd/libmicrohttpd_0.4.6.bb b/meta-openvuplus/recipes-connectivity/libmicrohttpd/libmicrohttpd_0.4.6.bb
new file mode 100644 (file)
index 0000000..0fb9b4e
--- /dev/null
@@ -0,0 +1,15 @@
+DESCRIPTION = "GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application."
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9331186f4f80db7da0e724bdd6554ee5"
+
+DEPENDS = "libgcrypt curl"
+
+SRC_URI = "ftp://ftp.nluug.nl/pub/gnu/libmicrohttpd//libmicrohttpd-${PV}.tar.gz"
+SRC_URI[md5sum] = "61698da6aa04744ea076c327f66fc05a"
+SRC_URI[sha256sum] = "0cb09e26678d1531a4fd40a748abff5142bfdad3ae11cfe3bb7ad7317a99e371"
+
+inherit autotools lib_package
+
+do_compile_append() {
+       sed -i s:-L${STAGING_LIBDIR}::g libmicrohttpd.pc
+}
index 66116fb..de95c93 100644 (file)
@@ -1,7 +1,8 @@
-PR .= "-vuplus1"
+PR .= "-vuplus2"
 
 SRC_URI += "file://04-default-is-optimized.patch"
 
 RPROVIDES_${PN} += "python-pickle-native python-pprint-native"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
diff --git a/meta-openvuplus/recipes-extended/libimobiledevice/libplist/fix-parallel-make.patch b/meta-openvuplus/recipes-extended/libimobiledevice/libplist/fix-parallel-make.patch
deleted file mode 100644 (file)
index 92e0ab1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From 335b25febd4c864ad0ac08479f5cd43fc21b7d73 Mon Sep 17 00:00:00 2001
-From: Nikias Bassen
-Date: Mon, 09 Jul 2012 21:17:15 +0000
-Subject: Fix building with parallel build makeopts
-
----
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0bad840..155994e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -57,6 +57,8 @@ ADD_SUBDIRECTORY( plutil )
- ADD_SUBDIRECTORY( include )
- ADD_SUBDIRECTORY( test )
-+ADD_DEPENDENCIES( plist libcnary )
-+
- IF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
-       ADD_SUBDIRECTORY( swig )
- ENDIF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
---
-cgit v0.9.0.2
-
diff --git a/meta-openvuplus/recipes-extended/libimobiledevice/libplist_1.8.bbappend b/meta-openvuplus/recipes-extended/libimobiledevice/libplist_1.8.bbappend
deleted file mode 100644 (file)
index 62abfc3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-PR .= "-vuplus0"
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI_append = " file://fix-parallel-make.patch "
-
index a458de7..35ff369 100644 (file)
@@ -22,5 +22,6 @@ do_package_qa() {
 }
 
 PACKAGE_ARCH := "${MACHINE_ARCH}"
-FILES_${PN}="/"
+PACKAGES = "${PN}"
+FILES_${PN}="/usr/lib /usr/include"
 
index f394ae1..0094885 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "shared library for E2 animation"
 SECTION = "libs"
 LICENSE = "CLOSED"
 
-RDEPENDS = "libgles"
+RDEPENDS_${PN} = "libgles"
 
 SRCDATE = "20150109"
 SRCDATE_PR = "r1"
@@ -24,6 +24,9 @@ do_install() {
        cp -a ${S}/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/
 }
 
+do_package_qa() {
+}
+
 PACKAGE_ARCH := "${MACHINE_ARCH}"
 
 PACKAGES = "${PN}"
index 8c0b734..f73d38a 100644 (file)
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-DEPENDS += "librtmp"
-EXTRA_OECONF := "${@bb.data.getVar('EXTRA_OECONF',d,1).replace('--disable-rtmp', '--enable-rtmp --enable-mpegdemux').replace('--disable-dts', '--enable-dts')}"
+DEPENDS += "libdca"
+EXTRA_OECONF := "${@bb.data.getVar('EXTRA_OECONF',d,1).replace('--disable-dts', '--enable-dts --enable-mpegdemux')}"
 PACKAGECONFIG += "faac faad libmms hls dash smoothstreaming webp rtmp"
 SRC_URI += "file://0001-rtmp-fix-seeking-and-potential-segfault.patch"
 
index 4dfdeb1..82185d1 100644 (file)
@@ -6,7 +6,7 @@ DEPENDS = "udev"
 SRCREV = "605d913ae656ef9707a7f9cbca41f78d180d79dc"
 PR = "r2"
 
-SRC_URI = "git://github.com/Pulse-Eight/libcec.git"
+SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release"
 
 S = "${WORKDIR}/git"
 
index 2385471..814c212 100644 (file)
@@ -7,7 +7,7 @@ PV="1.0"
 PR="${PKG_DATE}_r0"
 
 DEPENDS += "enigma2 xbmc"
-RDEPENDS += "xbmc"
+RDEPENDS_${PN} += "xbmc"
 
 SRC_URI = "http://archive.vuplus.com/download/build_support/e2xbmc-plugin_${PKG_DATE}.tar.gz"
 
index ce6bec3..0c2e1f1 100644 (file)
@@ -1,4 +1,4 @@
-DESCRIPTION = "XBMC Media Center"
+SUMMARY = "XBMC Media Center"
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
@@ -18,7 +18,7 @@ SRC_URI = "git://github.com/xbmc/xbmc.git;branch=eden;protocol=git \
            file://configure.in-Avoid-running-code.patch \
           "
 
-inherit autotools gettext python-dir
+inherit autotools-brokensep gettext python-dir
 
 S = "${WORKDIR}/git"
 
@@ -48,7 +48,7 @@ export STAGING_INCDIR
 export PYTHON_DIR
 
 do_configure() {
-       sh bootstrap
+       ./bootstrap
        oe_runconf
 }
 
index 59039ed..7d92df8 100644 (file)
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
 
 DEPENDS = "libgles libxslt libusb1 libcec libplist expat yajl gperf-native fribidi mpeg2dec samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0  bzip2 virtual/libsdl jasper zip-native zlib libtinyxml taglib libbluray libshairport librtmp zlib libnfs libxslt"
 
-RDEPENDS = "python"
-RDEPENDS += "\
+RDEPENDS_${PN} = "python"
+RDEPENDS_${PN} += "\
        python-distutils \
        python-subprocess \
        python-robotparser \
@@ -35,7 +35,7 @@ RDEPENDS += "\
        python-numbers \
        nfs-utils-client \
        libshairport \
-       eglibc-gconv-utf-32 \
+       glibc-gconv-utf-32 \
        lzma \
        tiff \
        yajl \
diff --git a/meta-openvuplus/recipes-support/libbluray/libaacs/libaacs_define_xopen_source_500.patch b/meta-openvuplus/recipes-support/libbluray/libaacs/libaacs_define_xopen_source_500.patch
new file mode 100644 (file)
index 0000000..572c956
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 466f7f9..0dec17f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
+ AC_CONFIG_HEADERS(config.h)
+ AM_MAINTAINER_MODE
+-SET_FEATURES="-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L"
++SET_FEATURES="-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500"
+ case "${host_os}" in
+   "")
diff --git a/meta-openvuplus/recipes-support/libbluray/libaacs/libaacs_remove_werror_implicit_function_declaration.patch b/meta-openvuplus/recipes-support/libbluray/libaacs/libaacs_remove_werror_implicit_function_declaration.patch
new file mode 100644 (file)
index 0000000..e67050d
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/configure.ac b/configure.ac
+index 466f7f9..48490df 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -145,10 +145,6 @@ CC_CHECK_CFLAGS_APPEND([-Wall -Wdisabled-optimization -Wpointer-arith ]dnl
+ [-Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef ]dnl
+ [-Wmissing-prototypes -Wshadow])
+-CC_CHECK_CFLAGS_APPEND([-Werror=implicit-function-declaration ]dnl
+-                       [-Werror-implicit-function-declaration],
+-                       [break;])
+-
+ CC_CHECK_WERROR
+ AS_IF([test "x$enable_werror" = "xyes"], [
+   CFLAGS="${CFLAGS} $cc_cv_werror"
index 720e93b..54c091b 100644 (file)
@@ -3,10 +3,13 @@ SECTION = "libs/multimedia"
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4b54a1fd55a448865a0b32d41598759d"
 DEPENDS = "libgcrypt"
-SRCREV = "668bd765cd3bdaf8216ad0fa26e01286029c0499"
-PV = "0.4.0"
+SRCREV = "863e0a50ed9ee7b9bf4695a74bc4d607d12a67ff"
+PV = "0.6.0"
 
-SRC_URI = "git://git.videolan.org/${PN}.git;protocol=git"
+SRC_URI = " \
+       git://git.videolan.org/${PN}.git;protocol=git \
+       file://libaacs_define_xopen_source_500.patch \
+       "
 
 S = "${WORKDIR}/git"
 
index beb8186..e42fcf8 100644 (file)
@@ -7,6 +7,6 @@ INC_PR = "r5"
 S="${WORKDIR}/git"
 SRC_URI = "git://git.videolan.org/libbluray.git;branch=master;protocol=git \
                "
-inherit autotools
+inherit autotools-brokensep
 
 FILES_${PN} = "/"
index 34f2d39..d3a1eb7 100644 (file)
@@ -1,7 +1,7 @@
 require libbluray.inc
 
 DEPENDS += "libaacs libdca libdvdcss"
-RDEPENDS += "libaacs libdca libdvdcss"
+RDEPENDS_${PN} += "libaacs libdca libdvdcss"
 
 SRCREV="491c7e8501d7e7ea853700a2f35a18f11ad40a5b"
 LIC_FILES_CHKSUM="file://COPYING;md5=435ed639f84d4585d93824e7da3d85da"
index 8dd898f..6950b40 100644 (file)
@@ -3,12 +3,14 @@ SECTION = "libs/multimedia"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SRCREV = "4f6b5d6e6fb35994c342de95bf05e20117da549b"
+PR = "r1"
+DEPENDS += "quilt-native"
 
 SRC_URI = "git://anonscm.debian.org/collab-maint/${PN}.git;protocol=git"
 
 S = "${WORKDIR}/git"
 
-inherit autotools lib_package pkgconfig
+inherit autotools-brokensep lib_package pkgconfig
 
 do_unpackpost() {
         QUILT_PATCHES=debian/patches quilt push -a
@@ -16,4 +18,4 @@ do_unpackpost() {
         sed -i -e 's/double/sample_t/g' ${S}/libdca/*.c ${S}/libdca/*.h
 }
 
-addtask unpackpost after do_unpack before do_patch
+addtask unpackpost after do_patch before do_configure
diff --git a/meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bb b/meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bb
new file mode 100644 (file)
index 0000000..1a0b7b8
--- /dev/null
@@ -0,0 +1,13 @@
+DESCRIPTION = "libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+PR = "r1"
+
+SRC_URI = "http://download.videolan.org/pub/libdvdcss/${PV}/libdvdcss-${PV}.tar.bz2"
+
+inherit autotools
+
+EXTRA_OECONF = " --disable-doc "
+
+SRC_URI[md5sum] = "ebd5370b79ac5a83e5c61b24a214cf74"
+SRC_URI[sha256sum] = "2394a75013ab66b592d8c91d53529ede392bc9faee37fe279bd29b455eff2220"
diff --git a/meta-openvuplus/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/meta-openvuplus/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
new file mode 100644 (file)
index 0000000..82c93bd
--- /dev/null
@@ -0,0 +1,151 @@
+Add and use pkg-config for libgcrypt instead of -config scripts.
+
+Upstream-Status: Rejected [upstream have indicated they don't want a pkg-config dependency]
+
+RP 2014/5/22
+
+Index: libgcrypt-1.2.4/configure.ac
+===================================================================
+--- libgcrypt-1.2.4.orig/configure.ac  2008-03-19 22:14:50.000000000 +0000
++++ libgcrypt-1.2.4/configure.ac       2008-03-19 22:14:58.000000000 +0000
+@@ -807,6 +807,7 @@
+ doc/Makefile
+ src/Makefile
+ src/gcrypt.h
++src/libgcrypt.pc
+ src/libgcrypt-config
+ tests/Makefile
+ w32-dll/Makefile
+Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ libgcrypt-1.2.4/src/libgcrypt.pc.in        2008-03-19 22:14:58.000000000 +0000
+@@ -0,0 +1,33 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++host=@LIBGCRYPT_CONFIG_HOST@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} -lgcrypt
++Libs.private: -L${libdir} -lgpg-error
++Cflags: -I${includedir} 
+Index: libgcrypt-1.6.1/src/libgcrypt.m4
+===================================================================
+--- libgcrypt-1.6.1.orig/src/libgcrypt.m4      2013-12-16 17:44:32.000000000 +0000
++++ libgcrypt-1.6.1/src/libgcrypt.m4   2014-05-13 21:25:37.478389833 +0000
+@@ -22,17 +22,7 @@
+ dnl
+ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ [ AC_REQUIRE([AC_CANONICAL_HOST])
+-  AC_ARG_WITH(libgcrypt-prefix,
+-            AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
+-                           [prefix where LIBGCRYPT is installed (optional)]),
+-     libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
+-  if test x$libgcrypt_config_prefix != x ; then
+-     if test x${LIBGCRYPT_CONFIG+set} != xset ; then
+-        LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
+-     fi
+-  fi
+-  AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+   tmp=ifelse([$1], ,1:1.2.0,$1)
+   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+      req_libgcrypt_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -42,48 +32,13 @@
+      min_libgcrypt_version="$tmp"
+   fi
+-  AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
+-  ok=no
+-  if test "$LIBGCRYPT_CONFIG" != "no" ; then
+-    req_major=`echo $min_libgcrypt_version | \
+-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+-    req_minor=`echo $min_libgcrypt_version | \
+-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+-    req_micro=`echo $min_libgcrypt_version | \
+-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+-    libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
+-    major=`echo $libgcrypt_config_version | \
+-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+-    minor=`echo $libgcrypt_config_version | \
+-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+-    micro=`echo $libgcrypt_config_version | \
+-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+-    if test "$major" -gt "$req_major"; then
+-        ok=yes
+-    else
+-        if test "$major" -eq "$req_major"; then
+-            if test "$minor" -gt "$req_minor"; then
+-               ok=yes
+-            else
+-               if test "$minor" -eq "$req_minor"; then
+-                   if test "$micro" -ge "$req_micro"; then
+-                     ok=yes
+-                   fi
+-               fi
+-            fi
+-        fi
+-    fi
+-  fi
+-  if test $ok = yes; then
+-    AC_MSG_RESULT([yes ($libgcrypt_config_version)])
+-  else
+-    AC_MSG_RESULT(no)
+-  fi
++  PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= $min_libgcrypt_version], [ok=yes], [ok=no])
++
+   if test $ok = yes; then
+      # If we have a recent libgcrypt, we should also check that the
+      # API is compatible
+      if test "$req_libgcrypt_api" -gt 0 ; then
+-        tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
++        tmp=`$PKG_CONFIG --variable=api_version libgcrypt`
+         if test "$tmp" -gt 0 ; then
+            AC_MSG_CHECKING([LIBGCRYPT API version])
+            if test "$req_libgcrypt_api" -eq "$tmp" ; then
+@@ -96,10 +51,8 @@
+      fi
+   fi
+   if test $ok = yes; then
+-    LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
+-    LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
+     ifelse([$2], , :, [$2])
+-    libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
++    libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt`
+     if test x"$libgcrypt_config_host" != xnone ; then
+       if test x"$libgcrypt_config_host" != x"$host" ; then
+   AC_MSG_WARN([[
+@@ -113,8 +66,6 @@
+       fi
+     fi
+   else
+-    LIBGCRYPT_CFLAGS=""
+-    LIBGCRYPT_LIBS=""
+     ifelse([$3], , :, [$3])
+   fi
+   AC_SUBST(LIBGCRYPT_CFLAGS)
diff --git a/meta-openvuplus/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch b/meta-openvuplus/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
new file mode 100644 (file)
index 0000000..56c591f
--- /dev/null
@@ -0,0 +1,71 @@
+tests/bench-slope.c: workaround ICE failure on mips with '-O -g'
+
+Hit a ICE and could reduce it to the following minimal example:
+
+1. Only the size of array assigned with 2 caused the issue:
+$ cat > mipgcc-test.c << END
+
+int main (int argc, char **argv)
+{
+        char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
+        int i = 0;
+
+        while(pStrArry[i] && i<ARRAY_SIZE_MAX)
+        {
+                printf("%s\n", pStrArry[i]);
+                i++;
+        }
+
+        return 0;
+}
+
+END
+
+2. Only -O1 and -g on mips caused the issue:
+$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
+mipgcc-test.c: In function 'main':
+mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:20810
+ }
+ ^
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <http://gcc.gnu.org/bugs.html> for instructions
+
+3. The quick workround is trying to enlarge the size of array with larger
+than 2.
+
+4. File a bug to GNU, but it could not be reproduced on there environment.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
+
+Upstream-Status: [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/bench-slope.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/bench-slope.c b/tests/bench-slope.c
+index bd05064..28c2438 100644
+--- a/tests/bench-slope.c
++++ b/tests/bench-slope.c
+@@ -1197,7 +1197,7 @@ static struct bench_ops hash_ops = {
+ };
+-static struct bench_hash_mode hash_modes[] = {
++static struct bench_hash_mode hash_modes[3] = {
+   {"", &hash_ops},
+   {0},
+ };
+@@ -1349,7 +1349,7 @@ static struct bench_ops mac_ops = {
+ };
+-static struct bench_mac_mode mac_modes[] = {
++static struct bench_mac_mode mac_modes[3] = {
+   {"", &mac_ops},
+   {0},
+ };
+-- 
+1.8.1.2
+
diff --git a/meta-openvuplus/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta-openvuplus/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
new file mode 100644 (file)
index 0000000..a3e5403
--- /dev/null
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+
+libgcrypt: fix building error with '-O2' in sysroot path
+
+Characters like '-O2' or '-Ofast' will be replaced by '-O1' when compiling cipher.
+If we are cross compiling libgcrypt and sysroot contains such characters, we would
+get compile errors because the sysroot path has been modified.
+
+Fix this by adding blank spaces before and after the original matching pattern in the
+sed command.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ cipher/Makefile.am |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cipher/Makefile.am b/cipher/Makefile.am
+index 76cdc96..9a89792 100644
+--- a/cipher/Makefile.am
++++ b/cipher/Makefile.am
+@@ -69,7 +69,7 @@ rfc2268.c \
+ camellia.c camellia.h camellia-glue.c
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
++o_flag_munging = sed -e 's/ -O\([2-9s][2-9s]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
+ else
+ o_flag_munging = cat
+ endif
+-- 
+1.7.9.5
+
diff --git a/meta-openvuplus/recipes-support/libgcrypt/libgcrypt.inc b/meta-openvuplus/recipes-support/libgcrypt/libgcrypt.inc
new file mode 100644 (file)
index 0000000..128ebe6
--- /dev/null
@@ -0,0 +1,42 @@
+SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
+HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+SECTION = "libs"
+
+# helper program gcryptrnd and getrandom are under GPL, rest LGPL
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+DEPENDS = "libgpg-error libcap"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
+           file://add-pkgconfig-support.patch \
+           file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
+           file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \
+"
+
+BINCONFIG = "${bindir}/libgcrypt-config"
+
+PR = "r1"
+
+inherit autotools texinfo binconfig pkgconfig
+
+EXTRA_OECONF = "--disable-asm --with-capabilities"
+
+do_configure_prepend () {
+       # Else this could be used in preference to the one in aclocal-copy
+       rm -f ${S}/m4/gpg-error.m4
+}
+
+# libgcrypt.pc is added locally and thus installed here
+do_install_append() {
+       install -d ${D}/${libdir}/pkgconfig
+       install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
+}
+
+FILES_${PN}-dev += "${bindir}/dumpsexp ${bindir}/hmac256"
+
+ARM_INSTRUCTION_SET = "arm"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-openvuplus/recipes-support/libgcrypt/libgcrypt_1.6.2.bb b/meta-openvuplus/recipes-support/libgcrypt/libgcrypt_1.6.2.bb
new file mode 100644 (file)
index 0000000..c49c0e7
--- /dev/null
@@ -0,0 +1,4 @@
+require libgcrypt.inc
+
+SRC_URI[md5sum] = "d19adc062edff0ebc7e887212733ef1f"
+SRC_URI[sha256sum] = "936921644b9c81e2395e18a554a9a5f9252aae3976f8afc3e4229ee9d785e627"
diff --git a/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch
deleted file mode 100644 (file)
index 88c962b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: TinyXml is built with TIXML_USE_STL, so we have to
- enforce it when the library is used.
-Author: Felix Geyer <debfx-pkg@fobos.de>
-
-Upstream-Status: Pending
-
-diff -Nur tinyxml-2.5.3/tinyxml.h tinyxml-2.5.3.patch/tinyxml.h
---- tinyxml-2.5.3/tinyxml.h    2007-05-07 00:41:23.000000000 +0200
-+++ tinyxml-2.5.3.patch/tinyxml.h      2009-07-08 22:32:03.000000000 +0200
-@@ -26,6 +26,10 @@
- #ifndef TINYXML_INCLUDED
- #define TINYXML_INCLUDED
-+#ifndef TIXML_USE_STL
-+      #define TIXML_USE_STL
-+#endif
-+
- #ifdef _MSC_VER
- #pragma warning( push )
- #pragma warning( disable : 4530 )
diff --git a/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch
deleted file mode 100644 (file)
index b801506..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Description: TinyXML incorrectly encodes text element containing
- an ampersand followed by either x or #.
-
-Origin: http://sourceforge.net/tracker/index.php?func=detail&aid=3031828&group_id=13559&atid=313559
-
-Upstream-Status: Pending
-
-diff -u -r1.105 tinyxml.cpp
---- a/tinyxml.cpp
-+++ b/tinyxml.cpp
-@@ -57,30 +57,7 @@
-       {
-               unsigned char c = (unsigned char) str[i];
--              if (    c == '&' 
--                   && i < ( (int)str.length() - 2 )
--                       && str[i+1] == '#'
--                       && str[i+2] == 'x' )
--              {
--                      // Hexadecimal character reference.
--                      // Pass through unchanged.
--                      // &#xA9;       -- copyright symbol, for example.
--                      //
--                      // The -1 is a bug fix from Rob Laveaux. It keeps
--                      // an overflow from happening if there is no ';'.
--                      // There are actually 2 ways to exit this loop -
--                      // while fails (error case) and break (semicolon found).
--                      // However, there is no mechanism (currently) for
--                      // this function to return an error.
--                      while ( i<(int)str.length()-1 )
--                      {
--                              outString->append( str.c_str() + i, 1 );
--                              ++i;
--                              if ( str[i] == ';' )
--                                      break;
--                      }
--              }
--              else if ( c == '&' )
-+              if ( c == '&' )
-               {
-                       outString->append( entity[0].str, entity[0].strLength );
-                       ++i;
-diff -u -r1.89 xmltest.cpp
---- a/xmltest.cpp
-+++ b/xmltest.cpp
-@@ -1340,6 +1340,16 @@
-               }*/
-       }
-+      #ifdef TIXML_USE_STL
-+      {
-+              TiXmlDocument xml;
-+              xml.Parse("<foo>foo&amp;#xa+bar</foo>");
-+              std::string str;
-+              str << xml;
-+              XmlTest( "Entity escaping", "<foo>foo&amp;#xa+bar</foo>", str.c_str() );
-+      }
-+      #endif
-+
-       /*  1417717 experiment
-       {
-               TiXmlDocument xml;
diff --git a/meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
deleted file mode 100644 (file)
index fdadebd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# (c) Copyright 2012  Hewlett-Packard Development Company, L.P. 
-
-DESCRIPTION = "a simple, small, minimal, C++ XML parser"
-HOMEPAGE = "http://www.sourceforge.net/projects/tinyxml"
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://readme.txt;md5=f8f366f3370dda889f60faa7db162cf4"
-SECTION = "libs"
-
-PR = "r5"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.tar.gz \
-           file://enforce-use-stl.patch \
-           file://entity-encoding.patch"
-SRC_URI[md5sum] = "c1b864c96804a10526540c664ade67f0"
-SRC_URI[sha256sum] = "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593"
-
-S = "${WORKDIR}/tinyxml"
-
-CXXFLAGS += "-fPIC"
-
-do_compile() {
-    ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxml.o ${S}/tinyxml.cpp
-    ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlerror.o ${S}/tinyxmlerror.cpp
-    ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlparser.o ${S}/tinyxmlparser.cpp
-    ${CXX} ${CXXFLAGS} \
-            -shared \
-            -Wl,-soname,libtinyxml.so.${PV} \
-            -o ${S}/libtinyxml.so.${PV} \
-            ${LDFLAGS} \
-            ${S}/tinyxml.o \
-            ${S}/tinyxmlparser.o \
-            ${S}/tinyxmlerror.o
-}
-
-do_install() {
-    install -d ${D}${libdir}
-    install -m 0755 ${S}/libtinyxml.so.${PV} ${D}${libdir}
-    ln -sf libtinyxml.so.${PV} ${D}${libdir}/libtinyxml.so
-
-    install -d ${D}${includedir}
-    install -m 0644 ${S}/tinyxml.h ${D}${includedir}
-}
-
diff --git a/meta-openvuplus/recipes-support/lzma/lzma-4.65/001-large_files.patch b/meta-openvuplus/recipes-support/lzma/lzma-4.65/001-large_files.patch
new file mode 100644 (file)
index 0000000..b95fe9e
--- /dev/null
@@ -0,0 +1,13 @@
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
+===================================================================
+--- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc   2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc        2009-06-01 22:00:54.000000000 +0200
+@@ -3,7 +3,7 @@
+ CXX_C = gcc -O2 -Wall
+ LIB = -lm
+ RM = rm -f
+-CFLAGS = -c
++CFLAGS = -c -D_FILE_OFFSET_BITS=64
+ ifdef SystemDrive
+ IS_MINGW = 1
diff --git a/meta-openvuplus/recipes-support/lzma/lzma-4.65/002-lzmp.patch b/meta-openvuplus/recipes-support/lzma/lzma-4.65/002-lzmp.patch
new file mode 100644 (file)
index 0000000..72d881c
--- /dev/null
@@ -0,0 +1,1059 @@
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp    2009-06-01 22:01:10.000000000 +0200
+@@ -0,0 +1,895 @@
++/*
++ * LZMA command line tool similar to gzip to encode and decode LZMA files.
++ *
++ * Copyright (C) 2005 Ville Koskinen
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
++ * USA.
++ */
++
++#include "../../../Common/MyInitGuid.h"
++
++#include <iostream>
++using std::cout;
++using std::cerr;
++using std::endl;
++
++#include <cstdio>
++#include <cstdlib>
++#include <cstring>
++
++#include <string>
++using std::string;
++#include <vector>
++using std::vector;
++typedef vector<string> stringVector;
++
++#include <unistd.h>
++#include <getopt.h>
++#include <signal.h>
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <utime.h>
++#include <sys/time.h> // futimes()
++
++// For Solaris
++#ifndef HAVE_FUTIMES
++//#define futimes(fd, tv) futimesat(fd, NULL, tv)
++#endif
++
++#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
++#include <fcntl.h>
++#include <io.h>
++#define MY_SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)
++#else
++#define MY_SET_BINARY_MODE(file)
++#endif
++
++#include "../../../7zip/Common/FileStreams.h"
++
++#include "../../../Common/Types.h"
++
++#include "../../../7zip/Compress/LzmaDecoder.h"
++#include "../../../7zip/Compress/LzmaEncoder.h"
++
++#include "Exception.h"
++
++#include "lzma_version.h"
++
++namespace lzma {
++
++const char *PROGRAM_VERSION = PACKAGE_VERSION;
++const char *PROGRAM_COPYRIGHT = "Copyright (C) 2006 Ville Koskinen";
++
++/* LZMA_Alone switches:
++    -a{N}:  set compression mode - [0, 2], default: 2 (max)
++    -d{N}:  set dictionary - [0,28], default: 23 (8MB)
++    -fb{N}: set number of fast bytes - [5, 255], default: 128
++    -lc{N}: set number of literal context bits - [0, 8], default: 3
++    -lp{N}: set number of literal pos bits - [0, 4], default: 0
++    -pb{N}: set number of pos bits - [0, 4], default: 2
++    -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, bt4b, pat2r, pat2,
++                pat2h, pat3h, pat4h, hc3, hc4], default: bt4
++*/
++
++struct lzma_option {
++      short compression_mode;                 // -a
++      short dictionary;                       // -d
++      short fast_bytes;                       // -fb
++      wchar_t *match_finder;                  // -mf
++      short literal_context_bits;             // -lc
++      short literal_pos_bits;                 // -lp
++      short pos_bits;                         // -pb
++};
++
++/* The following is a mapping from gzip/bzip2 style -1 .. -9 compression modes
++ * to the corresponding LZMA compression modes. Thanks, Larhzu, for coining
++ * these. */
++const lzma_option option_mapping[] = {
++      { 0,  0,  0,    NULL, 0, 0, 0},         // -0 (needed for indexing)
++      { 0, 16, 64,  L"hc4", 3, 0, 2},         // -1
++      { 0, 20, 64,  L"hc4", 3, 0, 2},         // -2
++      { 1, 19, 64,  L"bt4", 3, 0, 2},         // -3
++      { 2, 20, 64,  L"bt4", 3, 0, 2},         // -4
++      { 2, 21, 128, L"bt4", 3, 0, 2},         // -5
++      { 2, 22, 128, L"bt4", 3, 0, 2},         // -6
++      { 2, 23, 128, L"bt4", 3, 0, 2},         // -7
++      { 2, 24, 255, L"bt4", 3, 0, 2},         // -8
++      { 2, 25, 255, L"bt4", 3, 0, 2},         // -9
++};
++
++struct extension_pair {
++      char *from;
++      char *to;
++};
++
++const extension_pair known_extensions[] = {
++      { ".lzma", "" },
++      { ".tlz", ".tar" },
++      { NULL, NULL }
++};
++
++/* Sorry, I just happen to like enumerations. */
++enum PROGRAM_MODE {
++      PM_COMPRESS = 0,
++      PM_DECOMPRESS,
++      PM_TEST,
++      PM_HELP,
++      PM_LICENSE,
++      PM_VERSION
++};
++
++enum {
++      STATUS_OK = 0,
++      STATUS_ERROR = 1,
++      STATUS_WARNING = 2
++};
++
++/* getopt options. */
++/* struct option { name, has_arg, flag, val } */
++const struct option long_options[] = {
++      { "stdout", 0, 0, 'c' },
++      { "decompress", 0, 0, 'd' },
++      { "compress", 0, 0, 'z' },
++      { "keep", 0, 0, 'k' },
++      { "force", 0, 0, 'f' },
++      { "test", 0, 0, 't' },
++      { "suffix", 1, 0, 'S' },
++      { "quiet", 0, 0, 'q' },
++      { "verbose", 0, 0, 'v' },
++      { "help", 0, 0, 'h' },
++      { "license", 0, 0, 'L' },
++      { "version", 0, 0, 'V' },
++      { "fast", 0, 0, '1' },
++      { "best", 0, 0, '9' },
++      { 0, 0, 0, 0 }
++};
++
++/* getopt option string (for the above options). */
++const char option_string[] = "cdzkftS:qvhLV123456789A:D:F:";
++
++/* Defaults. */
++PROGRAM_MODE program_mode = PM_COMPRESS;
++int   verbosity                       = 0;
++bool  stdinput                        = false;
++bool  stdoutput                       = false;
++bool  keep                            = false;
++bool  force                           = false;
++int   compression_mode                = 7;
++//char        *suffix                         = strdup(".lzma");
++char  *suffix                         = strdup(known_extensions[0].from);
++lzma_option   advanced_options        = { -1, -1, -1, NULL, -1, -1, -1 };
++
++void print_help(const char *const argv0)
++{
++      // Help goes to stdout while other messages go to stderr.
++      cout << "\nlzma " << PROGRAM_VERSION
++              << " " << PROGRAM_COPYRIGHT << "\n"
++              "Based on LZMA SDK " << LZMA_SDK_VERSION_STRING << " "
++              << LZMA_SDK_COPYRIGHT_STRING
++              << "\n\nUsage: " << argv0
++              << " [flags and input files in any order]\n"
++"  -c --stdout       output to standard output\n"
++"  -d --decompress   force decompression\n"
++"  -z --compress     force compression\n"
++"  -k --keep         keep (don't delete) input files\n"
++"  -f --force        force overwrite of output file and compress links\n"
++"  -t --test         test compressed file integrity\n"
++"  -S .suf  --suffix .suf   use suffix .suf on compressed files\n"
++"  -q --quiet        suppress error messages\n"
++"  -v --verbose      be verbose\n"
++"  -h --help         print this message\n"
++"  -L --license      display the license information\n"
++"  -V --version      display version numbers of LZMA SDK and lzma\n"
++"  -1 .. -2          fast compression\n"
++"  -3 .. -9          good to excellent compression. -7 is the default.\n"
++"     --fast         alias for -1\n"
++"     --best         alias for -9 (usually *not* what you want)\n\n"
++"  Memory usage depends a lot on the chosen compression mode -1 .. -9.\n"
++"  See the man page lzma(1) for details.\n\n";
++}
++
++void print_license(void)
++{
++      cout << "\n  LZMA command line tool " << PROGRAM_VERSION << " - "
++              << PROGRAM_COPYRIGHT
++              << "\n  LZMA SDK " << LZMA_SDK_VERSION_STRING << " - "
++              << LZMA_SDK_COPYRIGHT_STRING
++              << "\n  This program is a part of the LZMA utils package.\n"
++              "  http://tukaani.org/lzma/\n\n"
++"  This program is free software; you can redistribute it and/or\n"
++"  modify it under the terms of the GNU General Public License\n"
++"  as published by the Free Software Foundation; either version 2\n"
++"  of the License, or (at your option) any later version.\n"
++"\n"
++"  This program is distributed in the hope that it will be useful,\n"
++"  but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
++"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
++"  GNU General Public License for more details.\n"
++"\n";
++}
++
++void print_version(void)
++{
++      cout << "LZMA command line tool " << PROGRAM_VERSION << "\n"
++              << "LZMA SDK " << LZMA_SDK_VERSION_STRING << "\n";
++}
++
++short str2int (const char *str, const int &min, const int &max)
++{
++      int value = -1;
++      char *endptr = NULL;
++      if (str == NULL || str[0] == '\0')
++              throw ArgumentException("Invalid integer option");
++      value = strtol (str, &endptr, 10);
++      if (*endptr != '\0' || value < min || value > max)
++              throw ArgumentException("Invalid integer option");
++      return value;
++}
++
++void parse_options(int argc, char **argv, stringVector &filenames)
++{
++      /* Snatched from getopt(3). */
++      int c;
++
++      /* Check how we were called */
++      {
++              char *p = strrchr (argv[0], '/'); // Remove path prefix, if any
++              if (p++ == NULL)
++                      p = argv[0];
++              if (strstr (p, "un") != NULL) {
++                      program_mode = PM_DECOMPRESS;
++              } else if (strstr (p, "cat") != NULL) {
++                      program_mode = PM_DECOMPRESS;
++                      stdoutput = true;
++              }
++      }
++
++      while (-1 != (c = getopt_long(argc, argv, option_string,
++                      long_options, NULL))) {
++              switch (c) {
++                      // stdout
++                      case 'c':
++                              stdoutput = true;
++                              break;
++
++                      // decompress
++                      case 'd':
++                              program_mode = PM_DECOMPRESS;
++                              break;
++
++                      // compress
++                      case 'z':
++                              program_mode = PM_COMPRESS;
++                              break;
++
++                      // keep
++                      case 'k':
++                              keep = true;
++                              break;
++
++                      // force
++                      case 'f':
++                              force = true;
++                              break;
++
++                      // test
++                      case 't':
++                              program_mode = PM_TEST;
++                              break;
++
++                      // suffix
++                      case 'S':
++                              if (optarg) {
++                                      free(suffix);
++                                      suffix = strdup(optarg);
++                              }
++                              break;
++
++                      // quiet
++                      case 'q':
++                              verbosity = 0;
++                              break;
++
++                      // verbose
++                      case 'v':
++                              verbosity++;
++                              break;
++
++                      // help
++                      case 'h':
++                              program_mode = PM_HELP;
++                              break;
++
++                      // license
++                      case 'L':
++                              program_mode = PM_LICENSE;
++                              break;
++
++                      // version
++                      case 'V':
++                              program_mode = PM_VERSION;
++                              break;
++
++                      case '1': case '2': case '3': case '4': case '5':
++                      case '6': case '7': case '8': case '9':
++                              compression_mode = c - '0';
++                              break;
++
++                      // Advanced options //
++                      // Compression mode
++                      case 'A':
++                              advanced_options.compression_mode =
++                                              str2int (optarg, 0, 2);
++                              break;
++
++                      // Dictionary size
++                      case 'D':
++                              advanced_options.dictionary =
++                                              str2int (optarg, 0, 28);
++                              break;
++
++                      // Fast bytes
++                      case 'F':
++                              advanced_options.fast_bytes =
++                                              str2int (optarg, 0, 273);
++                              break;
++
++                      default:
++                              throw ArgumentException("");
++                              break;
++              } // switch(c)
++      } // while(1)
++
++      for (int i = optind; i < argc; i++) {
++              if (strcmp("-", argv[i]) == 0)
++                      continue;
++              filenames.push_back(argv[i]);
++      }
++} // parse_options
++
++void set_encoder_properties(NCompress::NLzma::CEncoder *encoder,
++              lzma_option &opt)
++{
++      /* Almost verbatim from LzmaAlone.cpp. */
++          PROPID propIDs[] =
++      {
++              NCoderPropID::kDictionarySize,
++              NCoderPropID::kPosStateBits,
++              NCoderPropID::kLitContextBits,
++              NCoderPropID::kLitPosBits,
++              NCoderPropID::kAlgorithm,
++              NCoderPropID::kNumFastBytes,
++              NCoderPropID::kMatchFinder,
++              NCoderPropID::kEndMarker
++      };
++      const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
++#define VALUE(x) (advanced_options.x >= 0 ? advanced_options.x : opt.x)
++      PROPVARIANT properties[kNumProps];
++      for (int p = 0; p < 6; p++)
++              properties[p].vt = VT_UI4;
++      properties[0].ulVal = UInt32(1 << VALUE (dictionary));
++      properties[1].ulVal = UInt32(VALUE (pos_bits));
++      properties[2].ulVal = UInt32(VALUE (literal_context_bits));
++      properties[3].ulVal = UInt32(VALUE (literal_pos_bits));
++      properties[4].ulVal = UInt32(VALUE (compression_mode));
++      properties[5].ulVal = UInt32(VALUE (fast_bytes));
++#undef VALUE
++
++      properties[6].vt = VT_BSTR;
++      properties[6].bstrVal = (BSTR)opt.match_finder;
++
++      properties[7].vt = VT_BOOL;
++      properties[7].boolVal = stdinput ? VARIANT_TRUE : VARIANT_FALSE;
++
++      if (encoder->SetCoderProperties(propIDs, properties, kNumProps) != S_OK)
++              throw Exception("SetCoderProperties() error");
++}
++
++void encode(NCompress::NLzma::CEncoder *encoderSpec,
++              CMyComPtr<ISequentialInStream> inStream,
++              CMyComPtr<ISequentialOutStream> outStream,
++              lzma_option encoder_options,
++              UInt64 fileSize)
++{
++      set_encoder_properties(encoderSpec, encoder_options);
++
++      encoderSpec->WriteCoderProperties(outStream);
++
++      for (int i = 0; i < 8; i++)
++      {
++              Byte b = Byte(fileSize >> (8 * i));
++              if (outStream->Write(&b, sizeof(b), 0) != S_OK)
++                      throw Exception("Write error while encoding");
++      }
++
++      HRESULT result = encoderSpec->Code(inStream, outStream, 0, 0, 0);
++
++      if (result == E_OUTOFMEMORY)
++              throw Exception("Cannot allocate memory");
++      else if (result != S_OK) {
++              char buffer[33];
++              snprintf(buffer, 33, "%d", (unsigned int)result);
++              throw Exception(string("Encoder error: ") + buffer);
++      }
++}
++
++void decode(NCompress::NLzma::CDecoder *decoderSpec,
++              CMyComPtr<ISequentialInStream> inStream,
++              CMyComPtr<ISequentialOutStream> outStream)
++{
++      const UInt32 kPropertiesSize = 5;
++      Byte properties[kPropertiesSize];
++      UInt32 processedSize;
++      UInt64 fileSize = 0;
++
++      if (inStream->Read(properties, kPropertiesSize, &processedSize) != S_OK)
++              throw Exception("Read error");
++      if (processedSize != kPropertiesSize)
++              throw Exception("Read error");
++      if (decoderSpec->SetDecoderProperties2(properties, kPropertiesSize) != S_OK)
++              throw Exception("SetDecoderProperties() error");
++
++      for (int i = 0; i < 8; i++)
++      {
++              Byte b;
++
++              if (inStream->Read(&b, sizeof(b), &processedSize) != S_OK)
++                      throw Exception("Read error");
++              if (processedSize != 1)
++                      throw Exception("Read error");
++
++              fileSize |= ((UInt64)b) << (8 * i);
++      }
++
++      if (decoderSpec->Code(inStream, outStream, 0, &fileSize, 0) != S_OK)
++              throw Exception("Decoder error");
++}
++
++int open_instream(const string infile,
++              CMyComPtr<ISequentialInStream> &inStream,
++              UInt64 &fileSize)
++{
++      CInFileStream *inStreamSpec = new CInFileStream;
++      inStream = inStreamSpec;
++      if (!inStreamSpec->Open(infile.c_str()))
++              throw Exception("Cannot open input file " + infile);
++
++      inStreamSpec->File.GetLength(fileSize);
++
++      return inStreamSpec->File.GetHandle();
++}
++
++int open_outstream(const string outfile,
++              CMyComPtr<ISequentialOutStream> &outStream)
++{
++      COutFileStream *outStreamSpec = new COutFileStream;
++      outStream = outStreamSpec;
++
++      bool open_by_force = (program_mode == PM_TEST) | force;
++
++      if (!outStreamSpec->Create(outfile.c_str(), open_by_force))
++              throw Exception("Cannot open output file " + outfile);
++
++      return outStreamSpec->File.GetHandle();
++}
++
++double get_ratio(int inhandle, int outhandle)
++{
++      struct stat in_stats, out_stats;
++      fstat(inhandle, &in_stats);
++      fstat(outhandle, &out_stats);
++
++      return (double)out_stats.st_size / (double)in_stats.st_size;
++}
++
++mode_t get_file_mode(string filename)
++{
++      struct stat in_stat;
++      lstat(filename.c_str(), &in_stat);
++
++      return in_stat.st_mode;
++}
++
++bool string_ends_with(string str, string ending)
++{
++      return equal(ending.rbegin(), ending.rend(), str.rbegin());
++}
++
++bool extension_is_known(string filename)
++{
++      bool known_format = false;
++      extension_pair extension; int i = 1;
++
++      extension = known_extensions[0];
++      while (extension.from != NULL) {
++              if (string_ends_with(filename, extension.from)) {
++                      known_format = true;
++                      break;
++              }
++              extension = known_extensions[i];
++              i++;
++      }
++
++      if (!known_format) {
++              if (!string_ends_with(filename, suffix)) {
++                      return false;
++              }
++      }
++
++      return true;
++}
++
++string replace_extension(string filename)
++{
++      int suffix_starts_at = filename.length() - strlen (suffix);
++      string from_suffix = filename.substr(suffix_starts_at, strlen (suffix));
++      string ret = filename.substr(0, suffix_starts_at);
++      extension_pair extension; int i = 1;
++
++      bool found_replacement = false;
++      extension = known_extensions[0];
++      while (extension.from != NULL) {
++              if (from_suffix.compare(extension.from) == 0) {
++                      ret += extension.to;
++                      found_replacement = true;
++                      break;
++              }
++
++              extension = known_extensions[i];
++              i++;
++      }
++
++      return ret;
++}
++
++string pretty_print_status(string filename, string output_filename,
++              string ratio)
++{
++      string ret = "";
++
++      ret += filename;
++      ret += ":\t ";
++
++      if (program_mode == PM_TEST) {
++              ret += "decoded succesfully";
++
++              return ret;
++      }
++
++      if (!stdinput && !stdoutput) {
++              ret += ratio;
++              ret += " -- ";
++      }
++
++      if (program_mode == PM_COMPRESS) {
++              if (keep) {
++                      ret += "encoded succesfully";
++
++                      return ret;
++              }
++
++              ret += "replaced with ";
++              ret += output_filename;
++
++              return ret;
++      }
++
++      if (program_mode == PM_DECOMPRESS) {
++              if (keep) {
++                      ret += "decoded succesfully";
++
++                      return ret;
++              }
++
++              ret += "replaced with ";
++              ret += output_filename;
++
++              return ret;
++      }
++
++      return ret;
++}
++
++static string archive_name; // I know, it is crude, but I haven't found any other
++    // way then making a global variable to transfer filename to handler
++
++void signal_handler (int signum)
++{
++    unlink (archive_name.c_str()); // deleting
++    signal (signum, SIG_DFL); // we return the default function to used signal
++    kill (getpid(), signum); // and then send this signal to the process again
++}
++
++} // namespace lzma
++
++
++int main(int argc, char **argv)
++{
++      using namespace lzma;
++      using std::cerr;
++
++      stringVector filenames;
++
++      signal (SIGTERM,signal_handler);
++      signal (SIGHUP,signal_handler);
++      signal (SIGINT,signal_handler);
++
++      try {
++              parse_options(argc, argv, filenames);
++      }
++      catch (...) {
++              return STATUS_ERROR;
++      }
++
++      if (program_mode == PM_HELP) {
++              print_help(argv[0]);
++              return STATUS_OK;
++      }
++      else if (program_mode == PM_LICENSE) {
++              print_license();
++              return STATUS_OK;
++      }
++      else if (program_mode == PM_VERSION) {
++              print_version();
++              return STATUS_OK;
++      }
++
++      if (filenames.empty()) {
++              stdinput = true;
++              stdoutput = true;
++
++              /* FIXME: get rid of this */
++              filenames.push_back("-");
++      }
++
++      /* Protection: always create new files with 0600 in order to prevent
++       * outsiders from reading incomplete data. */
++      umask(0077);
++
++      bool warning = false;
++
++      for (int i = 0; i < filenames.size(); i++) {
++              CMyComPtr<ISequentialInStream> inStream;
++              CMyComPtr<ISequentialOutStream> outStream;
++              UInt64 fileSize = 0;
++              int inhandle = 0, outhandle = 0;
++              string output_filename;
++
++              if (stdinput) {
++                      inStream = new CStdInFileStream;
++                      MY_SET_BINARY_MODE(stdin);
++                      fileSize = (UInt64)(Int64)-1;
++
++                      inhandle = STDIN_FILENO;
++
++                      outStream = new CStdOutFileStream;
++                      MY_SET_BINARY_MODE(stdout);
++
++                      outhandle = STDOUT_FILENO;
++              }
++              else {
++                      mode_t infile_mode = get_file_mode(filenames[i]);
++                      if (!S_ISREG(infile_mode)) {
++                              if (S_ISDIR(infile_mode)) {
++                                      warning = true;
++                                      cerr << argv[0] << ": " << filenames[i] << ": "
++                                              << "cowardly refusing to work on directory"
++                                              << endl;
++
++                                      continue;
++                              }
++                              else if (S_ISLNK(infile_mode)) {
++                                      if (!stdoutput && !force) {
++                                              warning = true;
++
++                                      cerr << argv[0] << ": " << filenames[i] << ": "
++                                                      << "cowardly refusing to work on symbolic link "
++                                                      << "(use --force to force encoding or decoding)"
++                                                      << endl;
++
++                                              continue;
++                                      }
++                              }
++                              else {
++                                      warning = true;
++
++                                      cerr << argv[0] << ": " << filenames[i] << ": "
++                                              << "doesn't exist or is not a regular file"
++                                              << endl;
++
++                                      continue;
++                              }
++                      }
++
++                      // Test if the file already ends with *suffix.
++                      if (program_mode == PM_COMPRESS && !force
++                                      && string_ends_with(filenames[i],
++                                              suffix)) {
++                              warning = true;
++
++                              cerr << filenames[i] << " already has "
++                                      << suffix << " suffix -- unchanged\n";
++
++                              continue;
++                      }
++
++                      // Test if the file extension is known.
++                      if (program_mode == PM_DECOMPRESS
++                                      && !extension_is_known(filenames[i])) {
++                              warning = true;
++
++                              cerr << filenames[i] << ": "
++                                      << " unknown suffix -- unchanged"
++                                      << endl;
++
++                              continue;
++                      }
++
++                      try {
++                              inhandle = open_instream(filenames[i], inStream, fileSize);
++                      }
++                      catch (Exception e) {
++                              cerr << argv[0] << ": " << e.what() << endl;
++                              return STATUS_ERROR;
++                      }
++
++                      if (stdoutput) {
++                              outStream = new CStdOutFileStream;
++                              MY_SET_BINARY_MODE(stdout);
++
++                              outhandle = STDOUT_FILENO;
++                      }
++                      else {
++                              /* Testing mode is nothing else but decoding
++                               * and throwing away the result. */
++                              if (program_mode == PM_TEST)
++                                      output_filename = "/dev/null";
++                              else if (program_mode == PM_DECOMPRESS)
++                                      output_filename = replace_extension(filenames[i]);
++                              else
++                                      output_filename = filenames[i]
++                                                      + suffix;
++                              archive_name = output_filename;
++
++                              try {
++                                      outhandle = open_outstream(output_filename, outStream);
++                              }
++                              catch (Exception e) {
++                                      cerr << argv[0] << ": " << e.what() << endl;
++                                      return STATUS_ERROR;
++                              }
++                      }
++
++              }
++
++              // Unless --force is specified, do not read/write compressed
++              // data from/to a terminal.
++              if (!force) {
++                      if (program_mode == PM_COMPRESS && isatty(outhandle)) {
++                              cerr << argv[0] << ": compressed data not "
++                                      "written to a terminal. Use "
++                                      "-f to force compression.\n"
++                                      << argv[0] << ": For help, type: "
++                                      << argv[0] << " -h\n";
++                              return STATUS_ERROR;
++                      } else if (program_mode == PM_DECOMPRESS
++                                      && isatty(inhandle)) {
++                              cerr << argv[0] << ": compressed data not "
++                                      "read from a terminal. Use "
++                                      "-f to force decompression.\n"
++                                      << argv[0] << ": For help, type: "
++                                      << argv[0] << " -h\n";
++                              return STATUS_ERROR;
++                      }
++              }
++
++              if (program_mode == PM_COMPRESS) {
++                          NCompress::NLzma::CEncoder *encoderSpec =
++                                    new NCompress::NLzma::CEncoder;
++
++                      lzma_option options = option_mapping[compression_mode];
++
++                      try {
++                              encode(encoderSpec, inStream, outStream, options, fileSize);
++                      }
++                      catch (Exception e) {
++                              cerr << argv[0] << ": " << e.what() << endl;
++                              unlink(output_filename.c_str());
++                              delete(encoderSpec);
++
++                              return STATUS_ERROR;
++                      }
++
++                      delete(encoderSpec);
++              }
++              else {                  // PM_DECOMPRESS | PM_TEST
++                  NCompress::NLzma::CDecoder *decoderSpec =
++                      new NCompress::NLzma::CDecoder;
++
++                      try {
++                              decode(decoderSpec, inStream, outStream);
++                      }
++                      catch (Exception e) {
++                              cerr << argv[0] << ": " << e.what() << endl;
++                              unlink(output_filename.c_str());
++                              delete(decoderSpec);
++
++                              return STATUS_ERROR;
++                      }
++
++                      delete(decoderSpec);
++              }
++
++              /* Set permissions and owners. */
++              if ( (program_mode == PM_COMPRESS || program_mode == PM_DECOMPRESS )
++                              && (!stdinput && !stdoutput) ) {
++
++                      int ret = 0;
++                      struct stat file_stats;
++                      ret = fstat(inhandle, &file_stats);
++
++                      ret = fchmod(outhandle, file_stats.st_mode);
++                      ret = fchown(outhandle, file_stats.st_uid, file_stats.st_gid);
++                      // We need to call fchmod() again, since otherwise the SUID bits
++                      // are lost.
++                      ret = fchmod(outhandle, file_stats.st_mode);
++
++                      struct timeval file_times[2];
++                      // Access time
++                      file_times[0].tv_sec = file_stats.st_atime;
++                      file_times[0].tv_usec = 0;
++                      // Modification time
++                      file_times[1].tv_sec = file_stats.st_mtime;
++                      file_times[1].tv_usec = 0;
++
++                      ret = futimes(outhandle, file_times);
++
++                      if (!keep)
++                              unlink(filenames[i].c_str());
++              }
++
++              if (verbosity > 0) {
++                      if (stdoutput) {
++                              cerr << filenames[i] << ":\t ";
++                              cerr << "decoded succesfully"
++                                      << endl;
++                      }
++
++                      else {
++                              char buf[10] = { 0 };
++
++                              if (program_mode == PM_DECOMPRESS)
++                                      snprintf(buf, 10, "%.2f%%",
++                                                      (1 - get_ratio(outhandle, inhandle)) * 100);
++                              if (program_mode == PM_COMPRESS)
++                                      snprintf(buf, 10, "%.2f%%",
++                                                      (1 - get_ratio(inhandle, outhandle)) * 100);
++
++                              string ratio = buf;
++                              cerr << pretty_print_status(filenames[i], output_filename,
++                                              ratio)
++                                      << endl;
++                      }
++              }
++      }
++
++      if (warning)
++              return STATUS_WARNING;
++
++      return STATUS_OK;
++}
++
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h 2009-06-01 22:01:10.000000000 +0200
+@@ -0,0 +1,45 @@
++/* A couple of exceptions for lzmp.
++ *
++ * Copyright (C) 2005 Ville Koskinen
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ */
++
++#ifndef _EXCEPTION_H_
++#define _EXCEPTION_H_
++
++#include <string>
++using std::string;
++
++class Exception
++{
++private:
++      string message;
++public:
++      Exception(char *what): message(what) { }
++      Exception(string what): message(what) { }
++
++      ~Exception() { }
++
++      string what(void) { return message; }
++};
++
++class ArgumentException: public Exception
++{
++public:
++      ArgumentException(char *what): Exception(what) { }
++      ArgumentException(string what): Exception(what) { }
++
++      ~ArgumentException() { }
++};
++
++#endif
++
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
+===================================================================
+--- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc   2009-06-01 22:00:54.000000000 +0200
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc        2009-06-01 22:06:13.000000000 +0200
+@@ -1,9 +1,10 @@
+-PROG = lzma
++PROG = lzma_alone
++PROG2 = lzma
+ CXX = g++ -O2 -Wall
+ CXX_C = gcc -O2 -Wall
+ LIB = -lm
+ RM = rm -f
+-CFLAGS = -c -D_FILE_OFFSET_BITS=64
++CFLAGS = -c -I ../../../ -D_FILE_OFFSET_BITS=64 -DPACKAGE_VERSION="\"4.32.0beta3\""
+ ifdef SystemDrive
+ IS_MINGW = 1
+@@ -45,12 +46,35 @@
+   Lzma86Dec.o \
+   Lzma86Enc.o \
++OBJS2 = \
++      C_FileIO.o \
++      CRC.o \
++      Alloc.o \
++      FileStreams.o \
++      StreamUtils.o \
++      InBuffer.o \
++      OutBuffer.o \
++      LzmaDecoder.o \
++      StringConvert.o \
++      StringToInt.o \
++      LzmaEncoder.o \
++      LzmaDec.o \
++      LzmaEnc.o \
++      LzFind.o \
++      7zCrc.o \
++      lzmp.o
+-all: $(PROG)
++all: $(PROG) $(PROG2)
+ $(PROG): $(OBJS)
+       $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
++$(PROG2): $(OBJS2)
++      $(CXX) -o $(PROG2) $(LDFLAGS) $(OBJS2) $(LIB)
++
++lzmp.o: lzmp.cpp
++      $(CXX) $(CFLAGS) lzmp.cpp
++
+ LzmaAlone.o: LzmaAlone.cpp
+       $(CXX) $(CFLAGS) LzmaAlone.cpp
+@@ -131,5 +153,5 @@
+       $(CXX_C) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Enc.c
+ clean:
+-      -$(RM) $(PROG) $(OBJS)
++      -$(RM) $(PROG) $(PROG2) $(OBJS)
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h      2009-06-01 22:01:10.000000000 +0200
+@@ -0,0 +1,31 @@
++#ifndef LZMA_VERSION_H
++#define LZMA_VERSION_H
++
++/*
++    Version and copyright information used by LZMA utils.
++*/
++
++static const char *LZMA_SDK_VERSION_STRING = "4.43";
++
++static const char *LZMA_SDK_COPYRIGHT_STRING =
++              "Copyright (C) 1999-2006 Igor Pavlov";
++
++static const char *LZMA_SDK_COPYRIGHT_INFO =
++              "  See http://7-zip.org/sdk.html or the documentation of LZMA SDK for\n"
++              "  the license. For reference, the version 4.43 is free software\n"
++              "  licensed under the GNU LGPL.";
++
++
++static const char *LZMA_UTILS_VERSION_STRING = PACKAGE_VERSION;
++
++static const char *LZMA_UTILS_COPYRIGHT_STRING =
++              "Copyright (C) 2006 Lasse Collin";
++
++static const char *LZMA_UTILS_COPYRIGHT_INFO =
++              "This program comes with ABSOLUTELY NO WARRANTY.\n"
++              "You may redistribute copies of this program\n"
++              "under the terms of the GNU General Public License.\n"
++              "For more information about these matters, see the file "
++              "named COPYING.\n";
++
++#endif /* ifndef LZMA_VERSION_H */
+Index: lzma-4.65/CPP/Common/C_FileIO.h
+===================================================================
+--- lzma-4.65.orig/CPP/Common/C_FileIO.h       2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65/CPP/Common/C_FileIO.h    2009-06-01 22:06:56.000000000 +0200
+@@ -24,6 +24,7 @@
+   bool Close();
+   bool GetLength(UInt64 &length) const;
+   off_t Seek(off_t distanceToMove, int moveMethod) const;
++  int GetHandle() const { return _handle; }
+ };
+ class CInFile: public CFileBase
diff --git a/meta-openvuplus/recipes-support/lzma/lzma-4.65/003-compile_fixes.patch b/meta-openvuplus/recipes-support/lzma/lzma-4.65/003-compile_fixes.patch
new file mode 100644 (file)
index 0000000..49ae66b
--- /dev/null
@@ -0,0 +1,26 @@
+diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/FileStreams.h
+--- lzma-4.65/CPP/7zip/Common/FileStreams.h    2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65.new/CPP/7zip/Common/FileStreams.h        2009-06-01 22:30:01.000000000 +0200
+@@ -72,6 +72,7 @@
+   public IOutStream,
+   public CMyUnknownImp
+ {
++public:
+   #ifdef USE_WIN_FILE
+   NWindows::NFile::NIO::COutFile File;
+   #else
+diff -urN lzma-4.65/CPP/Common/MyWindows.h lzma-4.65.new/CPP/Common/MyWindows.h
+--- lzma-4.65/CPP/Common/MyWindows.h   2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65.new/CPP/Common/MyWindows.h       2009-06-01 22:29:26.000000000 +0200
+@@ -101,8 +101,11 @@
+ #ifdef __cplusplus
++#ifndef INITGUID
++#define INITGUID
+ DEFINE_GUID(IID_IUnknown,
+ 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
++#endif
+ struct IUnknown
+ {
+   STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE;
diff --git a/meta-openvuplus/recipes-support/lzma/lzma-4.65/100-static_library.patch b/meta-openvuplus/recipes-support/lzma/lzma-4.65/100-static_library.patch
new file mode 100644 (file)
index 0000000..15ab4e0
--- /dev/null
@@ -0,0 +1,70 @@
+--- a/C/LzmaUtil/makefile.gcc
++++ b/C/LzmaUtil/makefile.gcc
+@@ -1,44 +1,53 @@
+ PROG = lzma
+-CXX = g++
+-LIB =
++CC = gcc
++LIB = liblzma.a
+ RM = rm -f
+ CFLAGS = -c -O2 -Wall
++AR = ar
++RANLIB = ranlib
+ OBJS = \
+-  LzmaUtil.o \
+   Alloc.o \
+   LzFind.o \
+   LzmaDec.o \
+   LzmaEnc.o \
++  LzmaLib.o \
+   7zFile.o \
+   7zStream.o \
+-
+ all: $(PROG)
+-$(PROG): $(OBJS)
+-      $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
++$(PROG): LzmaUtil.o $(LIB)
++      $(CC) -o $(PROG) $(LDFLAGS) $< $(LIB)
+ LzmaUtil.o: LzmaUtil.c
+-      $(CXX) $(CFLAGS) LzmaUtil.c
++      $(CC) $(CFLAGS) LzmaUtil.c
++
++$(LIB): $(OBJS)
++      rm -f $@
++      $(AR) rcu $@ $(OBJS)
++      $(RANLIB) $@
+ Alloc.o: ../Alloc.c
+-      $(CXX) $(CFLAGS) ../Alloc.c
++      $(CC) $(CFLAGS) ../Alloc.c
+ LzFind.o: ../LzFind.c
+-      $(CXX) $(CFLAGS) ../LzFind.c
++      $(CC) $(CFLAGS) ../LzFind.c
+ LzmaDec.o: ../LzmaDec.c
+-      $(CXX) $(CFLAGS) ../LzmaDec.c
++      $(CC) $(CFLAGS) ../LzmaDec.c
+ LzmaEnc.o: ../LzmaEnc.c
+-      $(CXX) $(CFLAGS) ../LzmaEnc.c
++      $(CC) $(CFLAGS) ../LzmaEnc.c
++
++LzmaLib.o: ../LzmaLib.c
++      $(CC) $(CFLAGS) ../LzmaLib.c
+ 7zFile.o: ../7zFile.c
+-      $(CXX) $(CFLAGS) ../7zFile.c
++      $(CC) $(CFLAGS) ../7zFile.c
+ 7zStream.o: ../7zStream.c
+-      $(CXX) $(CFLAGS) ../7zStream.c
++      $(CC) $(CFLAGS) ../7zStream.c
+ clean:
+-      -$(RM) $(PROG) $(OBJS)
++      -$(RM) $(PROG) *.o *.a
diff --git a/meta-openvuplus/recipes-support/lzma/lzma-4.65/makefile-cleanup.patch b/meta-openvuplus/recipes-support/lzma/lzma-4.65/makefile-cleanup.patch
new file mode 100644 (file)
index 0000000..ccca4d9
--- /dev/null
@@ -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/meta-openvuplus/recipes-support/lzma/lzma.inc b/meta-openvuplus/recipes-support/lzma/lzma.inc
new file mode 100644 (file)
index 0000000..762c11b
--- /dev/null
@@ -0,0 +1,35 @@
+DESCRIPTION = "LZMA is a general compression method. LZMA provides high compression ratio and very fast decompression."
+HOMEPAGE = "http://www.7-zip.org/"
+LICENSE = "LGPL"
+LIC_FILES_CHKSUM = "file://lzma.txt;md5=20251cdc2e3793cceab11878d0aa11b1"
+INC_PR = "r6"
+
+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 \
+           file://makefile-cleanup.patch"
+
+EXTRA_OEMAKE = "-f makefile.gcc"
+
+do_unpack_append() {
+    bb.process.run("find . -type f -print0 | xargs -0 sed 's/\r$//' -i", cwd=d.getVar("S", True))
+}
+
+do_compile() {
+    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() {
+    install -d ${D}${bindir} ${D}${libdir}
+    install -m 0755 CPP/7zip/Compress/LZMA_Alone/lzma ${D}${bindir}
+    oe_libinstall -a -C C/LzmaUtil liblzma ${D}${libdir}
+}
+
+do_populate_sysroot() {
+}
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/meta-openvuplus/recipes-support/lzma/lzma_4.65.bb b/meta-openvuplus/recipes-support/lzma/lzma_4.65.bb
new file mode 100644 (file)
index 0000000..5295cd9
--- /dev/null
@@ -0,0 +1,5 @@
+require lzma.inc
+PR = "${INC_PR}.1"
+
+SRC_URI[md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
+SRC_URI[sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
index 1cb9999..a505911 100644 (file)
@@ -2,7 +2,7 @@ SUMMARY = "Vuplus: Base set of packages for Vuplus."
 SECTION = "vuplus/base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-PR = "r1"
+PR = "r2"
 
 inherit packagegroup
 
@@ -32,6 +32,7 @@ VUPLUS_BASE_ESSENTIAL = "\
     usbtunerhelper \
     killall \
     openresolv \
+    module-init-tools \
     ${@base_contains("VUPLUS_FEATURES", "dvbproxy", "libgles vuplus-platform-util", "", d)} \
 "