Updates rose definition (#4411)
* Adds z3 package * Adds binwalk package * Updates spot package definition * Updates rose package definition * Modifications for code review * Fixes string formatting * Remove python version requirement
This commit is contained in:
parent
f4f2f25838
commit
bc2c4a14c2
39
var/spack/repos/builtin/packages/py-binwalk/package.py
Normal file
39
var/spack/repos/builtin/packages/py-binwalk/package.py
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||||
|
# Produced at the Lawrence Livermore National Laboratory.
|
||||||
|
#
|
||||||
|
# This file is part of Spack.
|
||||||
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||||
|
# LLNL-CODE-647188
|
||||||
|
#
|
||||||
|
# For details, see https://github.com/llnl/spack
|
||||||
|
# Please also see the LICENSE file for our notice and the LGPL.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License (as
|
||||||
|
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||||
|
# conditions of the GNU Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
|
class PyBinwalk(PythonPackage):
|
||||||
|
"""Binwalk is a fast, easy to use tool for analyzing, reverse engineering,
|
||||||
|
and extracting firmware images."""
|
||||||
|
|
||||||
|
homepage = "https://github.com/devttys0/binwalk"
|
||||||
|
url = "https://pypi.io/packages/source/b/binwalk/binwalk-2.1.0.tar.gz"
|
||||||
|
|
||||||
|
version('2.1.0', '054867d9abe6a05f43200cf2591051e6')
|
||||||
|
|
||||||
|
depends_on('python')
|
||||||
|
depends_on('py-setuptools', type='build')
|
@ -46,20 +46,56 @@ class Rose(Package):
|
|||||||
depends_on("autoconf@2.69", type='build')
|
depends_on("autoconf@2.69", type='build')
|
||||||
depends_on("automake@1.14", type='build')
|
depends_on("automake@1.14", type='build')
|
||||||
depends_on("libtool@2.4", type='build')
|
depends_on("libtool@2.4", type='build')
|
||||||
depends_on("boost@1.54.0")
|
depends_on("boost@1.47.0:")
|
||||||
depends_on("jdk@8u25")
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
variant('tests', default=False, description='Build the tests directory')
|
||||||
# Bootstrap with autotools
|
|
||||||
|
variant('binanalysis', default=False, description='Enable binary analysis tooling')
|
||||||
|
depends_on('libgcrypt', when='+binanalysis', type='build')
|
||||||
|
depends_on('py-binwalk', when='+binanalysis', type='run')
|
||||||
|
|
||||||
|
variant('c', default=True, description='Enable c language support')
|
||||||
|
variant('cxx', default=True, description='Enable c++ language support')
|
||||||
|
|
||||||
|
variant('fortran', default=False, description='Enable fortran language support')
|
||||||
|
|
||||||
|
variant('java', default=False, description='Enable java language support')
|
||||||
|
depends_on('jdk', when='+java')
|
||||||
|
|
||||||
|
variant('z3', default=False, description='Enable z3 theorem prover')
|
||||||
|
depends_on('z3', when='+z3')
|
||||||
|
|
||||||
|
build_directory = 'spack-build'
|
||||||
|
|
||||||
|
def autoreconf(self, spec, prefix):
|
||||||
bash = which('bash')
|
bash = which('bash')
|
||||||
bash('build')
|
bash('build')
|
||||||
|
|
||||||
# Configure, compile & install
|
@property
|
||||||
with working_dir('rose-build', create=True):
|
def languages(self):
|
||||||
boost = spec['boost']
|
spec = self.spec
|
||||||
|
langs = [
|
||||||
|
'binaries' if '+binanalysis' in spec else '',
|
||||||
|
'c' if '+c' in spec else '',
|
||||||
|
'c++' if '+cxx' in spec else '',
|
||||||
|
'java' if '+java' in spec else '',
|
||||||
|
'fortran' if '+fortran' in spec else ''
|
||||||
|
]
|
||||||
|
return list(filter(None, langs))
|
||||||
|
|
||||||
configure = Executable('../configure')
|
def configure_args(self):
|
||||||
configure("--prefix=" + prefix,
|
spec = self.spec
|
||||||
"--with-boost=" + boost.prefix,
|
cc = self.compiler.cc
|
||||||
"--disable-boost-version-check")
|
cxx = self.compiler.cxx
|
||||||
make("install-core")
|
return [
|
||||||
|
'--disable-boost-version-check',
|
||||||
|
"--with-alternate_backend_C_compiler={0}".format(cc),
|
||||||
|
"--with-alternate_backend_Cxx_compiler={0}".format(cxx),
|
||||||
|
"--with-boost={0}".format(spec['boost'].prefix),
|
||||||
|
"--enable-languages={0}".format(",".join(self.languages)),
|
||||||
|
"--with-z3={0}".format(spec['z3'].prefix) if '+z3' in spec else '',
|
||||||
|
'--disable-tests-directory' if '+tests' not in spec else '',
|
||||||
|
'--enable-tutorial-directory={0}'.format('no'),
|
||||||
|
]
|
||||||
|
|
||||||
|
install_targets = ["install-core"]
|
||||||
|
@ -28,10 +28,15 @@
|
|||||||
class Spot(AutotoolsPackage):
|
class Spot(AutotoolsPackage):
|
||||||
"""Spot is a C++11 library for omega-automata manipulation and model
|
"""Spot is a C++11 library for omega-automata manipulation and model
|
||||||
checking."""
|
checking."""
|
||||||
homepage = "https://spot.lrde.epita.fr/index.html"
|
homepage = "https://spot.lrde.epita.fr/"
|
||||||
url = "http://www.lrde.epita.fr/dload/spot/spot-1.99.3.tar.gz"
|
url = "http://www.lrde.epita.fr/dload/spot/spot-1.99.3.tar.gz"
|
||||||
|
|
||||||
version('1.99.3', 'd53adcb2d0fe7c69f45d4e595a58254e')
|
version('1.99.3', 'd53adcb2d0fe7c69f45d4e595a58254e')
|
||||||
|
version('1.2.6', '799bf59ccdee646d12e00f0fe6c23902')
|
||||||
|
|
||||||
# depends_on("gcc@4.8:", type='build')
|
variant('python', default=True, description='Enable python API')
|
||||||
depends_on("python@3.2:")
|
|
||||||
|
depends_on("python@3.3:", when='@1.99.5: +python')
|
||||||
|
depends_on("python@3.2:", when='@1.99: +python')
|
||||||
|
depends_on("python@2:", when='+python')
|
||||||
|
depends_on('boost', when='@:1.2.6')
|
||||||
|
55
var/spack/repos/builtin/packages/z3/package.py
Normal file
55
var/spack/repos/builtin/packages/z3/package.py
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||||
|
# Produced at the Lawrence Livermore National Laboratory.
|
||||||
|
#
|
||||||
|
# This file is part of Spack.
|
||||||
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||||
|
# LLNL-CODE-647188
|
||||||
|
#
|
||||||
|
# For details, see https://github.com/llnl/spack
|
||||||
|
# Please also see the LICENSE file for our notice and the LGPL.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License (as
|
||||||
|
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||||
|
# conditions of the GNU Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
|
class Z3(MakefilePackage):
|
||||||
|
"""Z3 is a theorem prover from Microsoft Research.
|
||||||
|
It is licensed under the MIT license."""
|
||||||
|
|
||||||
|
homepage = "https://github.com/Z3Prover/z3/wiki"
|
||||||
|
url = "https://github.com/Z3Prover/z3/archive/z3-4.5.0.tar.gz"
|
||||||
|
|
||||||
|
version('4.5.0', 'f332befa0d66d81818a06279a0973e25')
|
||||||
|
version('4.4.1', '4336a9df24f090e711c6d42fd4e2b1fc')
|
||||||
|
version('4.4.0', '2bcbb0381cc1572cace99aac8af08990')
|
||||||
|
|
||||||
|
phases = ['bootstrap', 'build', 'install']
|
||||||
|
|
||||||
|
variant('python', default=False, description='Enable python support')
|
||||||
|
depends_on('python', when='+python')
|
||||||
|
|
||||||
|
build_directory = 'build'
|
||||||
|
|
||||||
|
def configure_args(self):
|
||||||
|
spec = self.spec
|
||||||
|
return [
|
||||||
|
'--python' if '+python' in spec else ''
|
||||||
|
]
|
||||||
|
|
||||||
|
def bootstrap(self, spec, prefix):
|
||||||
|
options = ['--prefix={0}'.format(prefix)] + self.configure_args()
|
||||||
|
spec['python'].command('scripts/mk_make.py', *options)
|
Loading…
Reference in New Issue
Block a user