parent
12d16431ec
commit
a63c1afb73
@ -0,0 +1,35 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The library for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS=""
|
||||
IUSE="minimal"
|
||||
DEPEND="!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
dev-python/pyinotify
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-lib-3.1.1_alpha2-r2.patch"
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index 24ad307..08f796f 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -2799,6 +2799,36 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
||||
else:
|
||||
return ""
|
||||
|
||||
+ def funcPkgw(self, funArgv, resS, localVars, textTemplateTmp, nameTemp):
|
||||
+ """Функция шаблона pkgw(), возвращает аргумент если программа установлена"""
|
||||
+ # Название программы
|
||||
+ import time
|
||||
+ t = time.time()
|
||||
+ nameProg = funArgv.replace(" ","")
|
||||
+ origProg = nameProg
|
||||
+ # Замена функции в тексте шаблона
|
||||
+ replace = ""
|
||||
+ if "/" in nameProg:
|
||||
+ category, spl, nameProg = nameProg.partition("/")
|
||||
+ nameProg, spl, slot = nameProg.partition(":")
|
||||
+ if not category in self.installCategory:
|
||||
+ self.getInstallPkgGentoo(category=category)
|
||||
+ self.installCategory.append(category)
|
||||
+ replace = self.pkg(nameProg, slot=slot or None)
|
||||
+ else:
|
||||
+ if not self.flagAllPkgScan:
|
||||
+ self.getInstallPkgGentoo()
|
||||
+ templateFunction.flagAllPkgScan = True
|
||||
+ nameProg,spl,slot = nameProg.partition(":")
|
||||
+ replace = self.pkg(nameProg,
|
||||
+ slot=slot)
|
||||
+ if replace:
|
||||
+ replace = origProg
|
||||
+ textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\
|
||||
+ textTemplateTmp[resS.end():]
|
||||
+ print "TIME",time.time() -t
|
||||
+ return textTemplateTmp
|
||||
+
|
||||
def funcPkg(self, funArgv, resS, localVars, textTemplateTmp, nameTemp):
|
||||
"""Функция шаблона pkg(), выдает номер версии программы"""
|
||||
# Название программы
|
||||
@@ -2810,6 +2840,7 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
||||
nameProg, spl, slot = nameProg.partition(":")
|
||||
if not category in self.installCategory:
|
||||
self.getInstallPkgGentoo(category=category)
|
||||
+ self.installCategory.append(category)
|
||||
replace = self.pkg(nameProg, slot=slot or None)
|
||||
else:
|
||||
if not self.flagAllPkgScan:
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS=""
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.1.1_alpha2-r3
|
||||
=sys-apps/calculate-i18n-3.1.1_alpha2
|
||||
=sys-apps/calculate-lib-3.1.1_alpha2-r2
|
||||
=sys-apps/calculate-core-3.1.1_alpha2
|
||||
=sys-apps/calculate-update-3.1.1_alpha2-r1
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.1_alpha2 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.1_alpha2-r1 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.1_alpha2 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.1_alpha2 )
|
||||
"
|
Loading…
Reference in new issue