parent
90e46fce8d
commit
4495c6e493
@ -0,0 +1,43 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/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}"
|
||||
|
||||
# fix autoupdate user profile
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_update.patch"
|
||||
# fix ati name
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_ati_name.patch"
|
||||
# fix detect video by /etc/X11/xorg.conf
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_detect_video.patch"
|
||||
# fix detect ability gzip for squashfs-tools
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_detect_compress.patch"
|
||||
# fix detect util path and ifconfig
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_ifconfig.patch"
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
commit 0ac464c8461b23f53a54c71da07be75cd00fdc85
|
||||
Author: Mike Hiretsky <mh@calculate.ru>
|
||||
Date: Fri Mar 30 10:38:36 2012 +0400
|
||||
|
||||
Fix detect utils without path. Fix using ifconfig.
|
||||
|
||||
diff --git a/pym/cl_utils.py b/pym/cl_utils.py
|
||||
index 7ae5015..93580e8 100644
|
||||
--- a/pym/cl_utils.py
|
||||
+++ b/pym/cl_utils.py
|
||||
@@ -934,7 +934,7 @@ def getProgPath(progname):
|
||||
env = {"LANG":"C"}
|
||||
env.update(os.environ.items() + [("PATH",getpathenv())] +\
|
||||
env.items())
|
||||
- res = runOsCommand("which %s"%progname,env_dict=env)
|
||||
+ res = runOsCommand("which %s"%baseprogname,env_dict=env)
|
||||
if res[0] == 0:
|
||||
return res[1][0].strip()
|
||||
elif path.isabs(progname) and path.exists(progname):
|
||||
diff --git a/pym/utils/ip.py b/pym/utils/ip.py
|
||||
index 37ba88f..8425cda 100644
|
||||
--- a/pym/utils/ip.py
|
||||
+++ b/pym/utils/ip.py
|
||||
@@ -84,8 +84,10 @@ def checkMask(mask):
|
||||
|
||||
def getIpAndMask(interface="eth0"):
|
||||
"""Get ip and mask from interface"""
|
||||
- ifconfig = process('/sbin/ifconfig',interface)
|
||||
- res = re.search(r"inet addr:(\S+)\s.*Mask:(\S+)",ifconfig.read(),re.S)
|
||||
+ ipconfigProg = checkUtils('/sbin/ifconfig')
|
||||
+ ifconfig = process(ipconfigProg,interface)
|
||||
+ res = re.search(r"inet(?: addr:| )(\S+)\s.*(?:Mask:|netmask )(\S+)",
|
||||
+ ifconfig.read(),re.S)
|
||||
if res:
|
||||
return res.groups()
|
||||
else:
|
||||
@@ -139,7 +141,7 @@ def receiveMac(interface="eth0"):
|
||||
"""Get MAC from interface"""
|
||||
ipconfigProg = checkUtils('/sbin/ifconfig')
|
||||
ifconfig = process(ipconfigProg,interface)
|
||||
- res = re.search(r"HWaddr\s(\S+)",ifconfig.read(),re.S)
|
||||
+ res = re.search(r"(?:HWaddr|ether)\s(\S+)",ifconfig.read(),re.S)
|
||||
if res:
|
||||
return res.group(1)
|
||||
else:
|
||||
@@ -149,7 +151,8 @@ def receiveIpAndMask(interface="eth0"):
|
||||
"""Get ip and mask from interface"""
|
||||
ipconfigProg = checkUtils('/sbin/ifconfig')
|
||||
ifconfig = process(ipconfigProg,interface)
|
||||
- res = re.search(r"inet addr:(\S+)\s.*Mask:(\S+)",ifconfig.read(),re.S)
|
||||
+ res = re.search(r"inet(?: addr:| )(\S+)\s.*(?:Mask:|netmask )(\S+)",
|
||||
+ ifconfig.read(),re.S)
|
||||
if res:
|
||||
return res.groups()
|
||||
else:
|
@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=3
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="
|
||||
cl_assemble
|
||||
cl_builder
|
||||
cl_client
|
||||
cl_desktop
|
||||
cl_installgui
|
||||
cl_server
|
||||
"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
!sys-apps/calculate-templates
|
||||
=sys-apps/calculate-install-2.2.28-r1
|
||||
=sys-apps/calculate-lib-2.2.28-r5
|
||||
=sys-apps/calculate-i18n-2.2.28
|
||||
|
||||
cl_assemble? ( =sys-apps/calculate-assemble-2.2.28-r1 )
|
||||
cl_builder? ( =sys-apps/calculate-builder-2.2.28 )
|
||||
cl_client? ( =sys-apps/calculate-client-2.2.28-r1 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-2.2.28 )
|
||||
cl_installgui? ( =app-misc/calculate-install-gui-2.2.28 )
|
||||
|
||||
cl_server? ( =sys-apps/calculate-server-2.1.15-r4 )
|
||||
"
|
Loading…
Reference in new issue