parent
d926fa6a73
commit
b11f02d543
@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=(python2_7)
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/calculate2/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The library for Calculate 2"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="2.2"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
DEPEND="!<sys-apps/calculate-lib-2.1.8-r1
|
||||
!=sys-apps/calculate-lib-2.1.9
|
||||
!=sys-apps/calculate-lib-2.1.10
|
||||
!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# create revision for calculate lib
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.32-r2.patch"
|
||||
|
||||
# fix for compabitble with file-5.19
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.32-fix_file.patch"
|
||||
|
||||
# fix for clean kernel from builder
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.32-fix_clean_kernel.patch"
|
||||
|
||||
# fix lock ini file
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.32-fix_lock_ini.patch"
|
||||
|
||||
# fix work with lz4 initramfs
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.32-fix_lz4.patch"
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
diff --git pym/cl_utils.py pym/cl_utils.py
|
||||
index da5ef2e..2e1a607 100644
|
||||
--- pym/cl_utils.py
|
||||
+++ pym/cl_utils.py
|
||||
@@ -1499,7 +1499,15 @@ class InitrdFile(object):
|
||||
if not path.exists(self._file):
|
||||
# raise IOError
|
||||
open(self._file)
|
||||
- gz = Popen(['/bin/gzip', "-dc", self._file], stdout=PIPE, stderr=PIPE,
|
||||
+ ftype = typeFile(magic=0x4).getMType
|
||||
+ rdtype = ftype(self._file)
|
||||
+ if "LZ4" in rdtype:
|
||||
+ arch_cmd = '/usr/bin/lz4'
|
||||
+ elif "XZ" in rdtype:
|
||||
+ arch_cmd = '/usr/bin/xz'
|
||||
+ else:
|
||||
+ arch_cmd = '/bin/gzip'
|
||||
+ gz = Popen([arch_cmd, "-dc", self._file], stdout=PIPE, stderr=PIPE,
|
||||
close_fds=True)
|
||||
cpio = Popen(["/bin/cpio","-tf"], stdout=PIPE, stdin=gz.stdout,
|
||||
stderr=PIPE, close_fds=True)
|
Loading…
Reference in new issue