parent
90af592c8e
commit
60bbcc3a66
@ -0,0 +1,37 @@
|
||||
# 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="amd64 x86"
|
||||
IUSE="minimal"
|
||||
DEPEND="!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
dev-python/progressbar
|
||||
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.2.0_alpha10-r3.patch"
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index 7363a50..2a91c1a 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -4764,7 +4764,7 @@ gettext -d cl_template "$*"
|
||||
self.postmergePkgs.append(pkg)
|
||||
except:
|
||||
self.printWARNING(
|
||||
- _("Failed to reconfigure %s package")%pkg)
|
||||
+ _("Failed to reconfigure package %s")%pkg)
|
||||
else:
|
||||
mergePkgs = mergePkgs + postmergePkgs
|
||||
|
||||
@@ -4959,9 +4959,8 @@ gettext -d cl_template "$*"
|
||||
try:
|
||||
os.chmod(applyDir, mode)
|
||||
except:
|
||||
- self.setError(
|
||||
- _("Failed to change mode for directory: ") +\
|
||||
- applyDir)
|
||||
+ self.setError(_("Failed to change the mode for "
|
||||
+ "the directory: ") +applyDir)
|
||||
else:
|
||||
self.setError(_("Wrong value 'chmod' in the template") + ": " +\
|
||||
templateDirFile)
|
||||
diff --git calculate/lib/datavars.py calculate/lib/datavars.py
|
||||
index eb7f38d..052a5e5 100644
|
||||
--- calculate/lib/datavars.py
|
||||
+++ calculate/lib/datavars.py
|
||||
@@ -394,13 +394,13 @@ class Variable:
|
||||
if "list" in self.type:
|
||||
if not type(value) in (list,tuple):
|
||||
raise VariableError(
|
||||
- _("Value for variable '{varname}' may be {vartype} only").format(
|
||||
+ _("The value for variable '{varname}' may be {vartype} only").format(
|
||||
varname=self.label or self.name,
|
||||
vartype="list"))
|
||||
error = _("Values for variable '{varname}' may be {vartype} only")
|
||||
else:
|
||||
value = repeat(value,1)
|
||||
- error = _("Value for variable '{varname}' may be {vartype} only")
|
||||
+ error = _("The value for variable '{varname}' may be {vartype} only")
|
||||
if "string" in self.type:
|
||||
value, valuecopy = tee(value,2)
|
||||
for v in (x for x in valuecopy if not type(x) in (str,unicode)):
|
||||
@@ -425,7 +425,7 @@ class Variable:
|
||||
error = _("Values for variable '{varname}' may "
|
||||
"be {vartype}")
|
||||
else:
|
||||
- error = _("Value for variable '{varname}' may be "
|
||||
+ error = _("The value for variable '{varname}' may be "
|
||||
"{vartype}")
|
||||
self.raiseWrongChoice(name, tipChoice, val, error)
|
||||
if "choice" in self.type and not "choiceedit" in self.type:
|
||||
@@ -589,7 +589,7 @@ class TableVariable(Variable):
|
||||
if not type(value) in (list,tuple) or \
|
||||
any(i for i in value if not type(i) in (tuple,list)):
|
||||
raise VariableError(
|
||||
- _("Value for {varname} may be '{vartype}' only").format(
|
||||
+ _("The value for {varname} may be '{vartype}' only").format(
|
||||
varname=self.label or self.name,
|
||||
vartype="table"))
|
||||
# check len all entries
|
||||
diff --git calculate/lib/utils/colortext/info.py calculate/lib/utils/colortext/info.py
|
||||
index 218c72f..64d94d4 100644
|
||||
--- calculate/lib/utils/colortext/info.py
|
||||
+++ calculate/lib/utils/colortext/info.py
|
||||
@@ -30,13 +30,20 @@ class Terminal(object):
|
||||
WRONG = -1
|
||||
|
||||
def __init__(self):
|
||||
- curses.setupterm(environ.get('TERM', 'linux'))
|
||||
+ try:
|
||||
+ curses.setupterm(environ.get('TERM', 'linux'))
|
||||
+ self.curses = curses
|
||||
+ except curses.error:
|
||||
+ self.curses = None
|
||||
self.__echo = True
|
||||
self.__cursor = True
|
||||
|
||||
@property
|
||||
def colors(self):
|
||||
- return curses.tigetnum('colors')
|
||||
+ if self.curses:
|
||||
+ return self.curses.tigetnum('colors')
|
||||
+ else:
|
||||
+ return 16
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
@@ -78,7 +85,8 @@ class Terminal(object):
|
||||
|
||||
@cursor.setter
|
||||
def cursor(self, flag):
|
||||
- param = "cnorm" if flag else "civis"
|
||||
- sys.stdout.write(curses.tigetstr(param))
|
||||
- sys.stdout.flush()
|
||||
- self.__cursor = flag
|
||||
+ if self.curses:
|
||||
+ param = "cnorm" if flag else "civis"
|
||||
+ sys.stdout.write(self.curses.tigetstr(param))
|
||||
+ sys.stdout.flush()
|
||||
+ self.__cursor = flag
|
||||
diff --git calculate/lib/utils/colortext/printing.py calculate/lib/utils/colortext/printing.py
|
||||
index c8ef675..0e5753f 100644
|
||||
--- calculate/lib/utils/colortext/printing.py
|
||||
+++ calculate/lib/utils/colortext/printing.py
|
||||
@@ -82,7 +82,8 @@ class Print(object):
|
||||
return self
|
||||
|
||||
def __call__(self, s, *args, **kwargs):
|
||||
- s = s.format(*args, **kwargs)
|
||||
+ if args or kwargs:
|
||||
+ s = s.format(*args, **kwargs)
|
||||
self.buffer.append(self.output.outputText(s))
|
||||
self.buffer.append(self.output.endText())
|
||||
try:
|
||||
diff --git calculate/lib/utils/common.py calculate/lib/utils/common.py
|
||||
index 9f13c66..75dcdce 100644
|
||||
--- calculate/lib/utils/common.py
|
||||
+++ calculate/lib/utils/common.py
|
||||
@@ -178,8 +178,9 @@ def getDistfilesVideo(prefix="/"):
|
||||
return list(set(
|
||||
map(lambda x:'fglrx' if "amd" in x or "ati" in x else "nvidia",
|
||||
filter(lambda x:"ati" in x or "amd" in x or
|
||||
- x.startswith('NVIDIA-Linux'),
|
||||
- listDirectory(distFiles)))))
|
||||
+ x.startswith('nvidia-linux'),
|
||||
+ map(lambda x:x.lower(),
|
||||
+ listDirectory(distFiles))))))
|
||||
|
||||
def getAvailableVideo(prefix="/"):
|
||||
"""Get available video drivers (installed and maybe installed)"""
|
||||
diff --git calculate/lib/variables/env.py calculate/lib/variables/env.py
|
||||
index f35e3f7..8788dc4 100644
|
||||
--- calculate/lib/variables/env.py
|
||||
+++ calculate/lib/variables/env.py
|
||||
@@ -366,7 +366,7 @@ class VariableClTemplatesLocate(Variable):
|
||||
|
||||
descriptionMap = {'overlay': _('Overlay templates'),
|
||||
'local': _('Local templates'),
|
||||
- 'distro': _('Distributive templates'),
|
||||
+ 'distro': _('Distribution templates'),
|
||||
'remote': _('Remote templates'),
|
||||
'clt': _('clt templates')}
|
||||
|
||||
@@ -427,5 +427,5 @@ class VariableClMakeProfile(Variable):
|
||||
val = self.get_work_link(
|
||||
*[path.join(self.systemRoot, x) for x in files])
|
||||
if not val:
|
||||
- raise VariableError(_("Failed to detect system profile"))
|
||||
+ raise VariableError(_("Failed to detect the system profile"))
|
||||
return val
|
@ -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="amd64 x86"
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.2.0_alpha10-r1
|
||||
=sys-apps/calculate-i18n-3.2.0_alpha10-r2
|
||||
=sys-apps/calculate-lib-3.2.0_alpha10-r3
|
||||
=sys-apps/calculate-core-3.2.0_alpha10-r4
|
||||
=sys-apps/calculate-update-3.2.0_alpha10-r5
|
||||
cl_client? ( =sys-apps/calculate-client-3.2.0_alpha10-r1 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha10 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha10 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.2.0_alpha10-r1 )
|
||||
"
|
Loading…
Reference in new issue