Skip to content

Commit

Permalink
Merge pull request #944 from boegel/Qt3
Browse files Browse the repository at this point in the history
enhance Qt easyblock to support Qt3
  • Loading branch information
boegel committed May 31, 2016
2 parents 18d9d8a + b87a7ad commit 9062b5a
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions easybuild/easyblocks/q/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import apply_regex_substitutions
from easybuild.tools.run import run_cmd_qa
from easybuild.tools.systemtools import get_shared_lib_ext

Expand Down Expand Up @@ -62,7 +63,13 @@ def configure_step(self):
elif comp_fam in [toolchain.GCC]: #@UndefinedVariable
platform = 'linux-g++-64'
elif comp_fam in [toolchain.INTELCOMP]: #@UndefinedVariable
platform = 'linux-icc-64'
if LooseVersion(self.version) >= LooseVersion('4'):
platform = 'linux-icc-64'
else:
platform = 'linux-icc'
# fix -fPIC flag (-KPIC is not correct for recent Intel compilers)
qmake_conf = os.path.join('mkspecs', platform, 'qmake.conf')
apply_regex_substitutions(qmake_conf, [('-KPIC', '-fPIC')])

if platform:
self.cfg.update('configopts', "-platform %s" % platform)
Expand Down Expand Up @@ -102,13 +109,21 @@ def build_step(self):
def sanity_check_step(self):
"""Custom sanity check for Qt."""

libversion = ''
if LooseVersion(self.version) >= LooseVersion('5'):
libversion = self.version.split('.')[0]
shlib_ext = get_shared_lib_ext()

if LooseVersion(self.version) >= LooseVersion('4'):
libversion = ''
if LooseVersion(self.version) >= LooseVersion('5'):
libversion = self.version.split('.')[0]

libfile = os.path.join('lib', 'libQt%sCore.%s' % (libversion, shlib_ext))

else:
libfile = os.path.join('lib', 'libqt.%s' % shlib_ext)

custom_paths = {
'files': ["lib/libQt%sCore.%s" % (libversion, get_shared_lib_ext())],
'dirs': ["bin", "include", "plugins"],
'files': [libfile],
'dirs': ['bin', 'include', 'plugins'],
}

super(EB_Qt, self).sanity_check_step(custom_paths=custom_paths)

0 comments on commit 9062b5a

Please sign in to comment.