forked from iLCSoft/iLCInstall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
xercesc.py
68 lines (52 loc) · 2.05 KB
/
xercesc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
##################################################
#
# XercesC module
#
# Author: F.Gaede, DESY
# based on GSL module by J. Engels, Desy
# Date: Apr, 2013
#
##################################################
# custom imports
from .baseilc import BaseILC
from .util import *
class XercesC(BaseILC):
""" Responsible for the XercesC installation process. """
def __init__(self, userInput):
BaseILC.__init__(self, userInput, "XercesC","xercesc")
self.download.supportedTypes = [ "GitHub" ]
self.download.gituser = 'apache'
self.download.gitrepo = 'xerces-c'
self.reqfiles = [[
"lib/libxerces-c.a",
"lib/libxerces-c.so",
"lib/libxerces-c.dylib",
"lib64/libxerces-c.a",
"lib64/libxerces-c.so",
"lib64/libxerces-c.dylib",
]]
def setMode(self, mode):
BaseILC.setMode(self, mode)
self.cmakeconfig = self.installPath + "/lib/cmake/XercesC"
def compile(self):
""" compile XercesC """
os.chdir( self.installPath + "/build" )
if self.rebuild:
tryunlink( "CMakeCache.txt" )
self.envcmake['CMAKE_INSTALL_PREFIX']=self.installPath
if( os.system( self.genCMakeCmd() + " 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to configure!!" )
if( os.system( "make ${MAKEOPTS} 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to compile!!" )
if( os.system( "make install 2>&1 | tee -a " + self.logfile ) != 0 ):
self.abort( "failed to install!!" )
def cleanupInstall(self):
BaseILC.cleanupInstall(self)
os.chdir( self.installPath + "/build" )
os.system( "make clean" )
def postCheckDeps(self):
BaseILC.postCheckDeps(self)
self.env["XercesC_HOME"] = self.installPath
if self.installPath != "/usr":
self.envpath["PATH"].append( "$XercesC_HOME/bin" )
self.envpath["LD_LIBRARY_PATH"].append( "$XercesC_HOME/lib" )