diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-10 00:59:15 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-10 00:59:15 -0800 |
commit | ad6625456e02aedd0bf7c3ec707a01ad252414d7 (patch) | |
tree | 58548728887cfc5a6122d0c99c12c7bb205c1572 /var | |
parent | c31f797ab01a2d1db0f6161302c1d3d5e95eef7c (diff) | |
parent | 383e73a5f53e0ab3d1f448789bc5a1b4a7c85292 (diff) | |
download | spack-ad6625456e02aedd0bf7c3ec707a01ad252414d7.tar.gz spack-ad6625456e02aedd0bf7c3ec707a01ad252414d7.tar.bz2 spack-ad6625456e02aedd0bf7c3ec707a01ad252414d7.tar.xz spack-ad6625456e02aedd0bf7c3ec707a01ad252414d7.zip |
Merge pull request #513 from alfredo-gimenez/develop
Variants and fixes to thrift package
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/thrift/package.py | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py index 0e15052f64..6430f40e80 100644 --- a/var/spack/repos/builtin/packages/thrift/package.py +++ b/var/spack/repos/builtin/packages/thrift/package.py @@ -12,33 +12,44 @@ class Thrift(Package): version('0.9.2', '89f63cc4d0100912f4a1f8a9dee63678') - extends("python") - - depends_on("autoconf") - depends_on("automake") - depends_on("bison") - depends_on("boost") - depends_on("flex") - depends_on("jdk") - depends_on("libtool") - depends_on("openssl") - depends_on("python") - - # Compilation fails for most languages, fortunately cpp installs fine - # All other languages (yes, including C) are omitted until someone needs them + # Currently only support for c-family and python + variant('c', default=True, description="Build support for C-family languages") + variant('python', default=True, description="Build support for python") + + depends_on('jdk') + depends_on('autoconf') + depends_on('automake') + depends_on('libtool') + depends_on('boost@1.53:') + depends_on('bison') + depends_on('flex') + depends_on('openssl') + + # Variant dependencies + extends('python', when='+python') + + depends_on('zlib', when='+c') + depends_on('libevent', when='+c') + def install(self, spec, prefix): - env["PY_PREFIX"] = prefix - env["JAVA_PREFIX"] = prefix - - configure("--prefix=%s" % prefix, - "--with-boost=%s" % spec['boost'].prefix, - "--with-c=no", - "--with-go=no", - "--with-python=yes", - "--with-lua=no", - "--with-php=no", - "--with-qt4=no", - "--enable-tests=no") + env['PY_PREFIX'] = prefix + env['JAVA_HOME'] = spec['jdk'].prefix + + # configure options + options = ['--prefix=%s' % prefix] + + options.append('--with-boost=%s' % spec['boost'].prefix) + options.append('--enable-tests=no') + + options.append('--with-c=%s' % ('yes' if '+c' in spec else 'no')) + options.append('--with-python=%s' % ('yes' if '+python' in spec else 'no')) + options.append('--with-java=%s' % ('yes' if '+java' in spec else 'no')) + options.append('--with-go=%s' % ('yes' if '+go' in spec else 'no')) + options.append('--with-lua=%s' % ('yes' if '+lua' in spec else 'no')) + options.append('--with-php=%s' % ('yes' if '+php' in spec else 'no')) + options.append('--with-qt4=%s' % ('yes' if '+qt4' in spec else 'no')) + + configure(*options) make() make("install") |