diff --git a/README.md b/README.md index ef5ebed..7fd9d08 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This holds a set of Spack packages for common HEP software. It relies on Spack and the builtin Spack packages, some of which are overridden by this repo. +Note that a number of packages have already been migrated to the builtin Spack repository, and it is encouraged to add stable recipes there. + ## Getting started Initial setup like: diff --git a/packages/aida/package.py b/packages/aida/package.py deleted file mode 100644 index 4f69697..0000000 --- a/packages/aida/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * -import os -import glob - -class Aida(Package): - """AIDA Headers.""" - homepage = "http://www.example.com" - url = "http://service-spi.web.cern.ch/service-spi/external/tarFiles/aida-3.2.1-src.tar.gz" - - version('3.2.1', 'c35073da04abfdd96ac9f4801f3da473') - - def install(self, spec, prefix): - mkdirp(prefix.include) - cp = which('cp') - cp('-r', 'src/cpp/AIDA', prefix + '/include') diff --git a/packages/dd4hep/package.py b/packages/dd4hep/package.py deleted file mode 100644 index 54921ba..0000000 --- a/packages/dd4hep/package.py +++ /dev/null @@ -1,78 +0,0 @@ -############################################################################## -# 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 Dd4hep(CMakePackage): - """software framework of the FCC project""" - homepage = "https://github.com/AIDASoft/DD4hep/" - url = "https://github.com/AIDASoft/DD4hep/archive/v01-02.tar.gz" - - version('01.05', 'ab9aaa59e9d9ad9d60205151d984ec2b') - version('01.02', 'bcef07aaf7a28b5ed9062a76a7ba5633') - version('00.19', 'f5e162261433082c6363e6c96c08c66e') - version('00.18', 'ab4f3033c9ac7494f863bc88eedbdcf5') - version('00.17', '9b9ea29790aa887893484ed8a4afae68') - version('00.16', '4df618f2f7b10f0e995d7f30214f0850') - version('00.15', 'cf0b50903e37c30f2361318c79f115ce') - - depends_on('cmake', type='build') - depends_on('boost') - depends_on('xerces-c') - depends_on('geant4') - depends_on('root') - - def cmake_args(self): - spec = self.spec - - options = [] - - # Set the correct compiler flag - if self.compiler.cxx11_flag: - options.extend(['-DDD4HEP_USE_CXX11=ON']) - if self.compiler.cxx14_flag: - options.extend(['-DDD4HEP_USE_CXX14=ON']) - if self.compiler.cxx17_flag: - options.extend(['-DDD4HEP_USE_CXX17=ON']) - - options.extend([ - '-DROOTSYS=%s' % spec['root'].prefix, - '-DDD4HEP_USE_GEANT4=ON', - '-DDD4HEP_USE_XERCESC=ON', - '-DXERCESC_ROOT_DIR=%s' % spec['xerces-c'].prefix - ]) - - return options - - def setup_dependent_environment(self, spack_env, run_env, dspec): - spack_env.set('DD4hep_DIR', self.prefix) - - def url_for_version(self, version): - url = "https://github.com/AIDASoft/DD4hep/archive/v{0}.tar.gz" - - if(version.up_to(1) < Version(10)): - return url.format('0'+version.dashed.string) - return url.format(version.dashed.string) diff --git a/packages/gaudi/package.py b/packages/gaudi/package.py deleted file mode 100644 index 148b2f0..0000000 --- a/packages/gaudi/package.py +++ /dev/null @@ -1,40 +0,0 @@ -from spack import * - -class Gaudi(Package): - """Gaudi framework.""" - homepage = "https://gaudi.cern.ch" - url = "https://gaudi.cern.ch" - - version('v27r1', git='https://gitlab.cern.ch/gaudi/Gaudi.git', tag='v27r1') - version('v28r0', git='https://gitlab.cern.ch/gaudi/Gaudi.git', tag='v28r0') - version('v28r1', git='https://gitlab.cern.ch/gaudi/Gaudi.git', tag='v28r1') - - depends_on("python") - depends_on("root") - depends_on("py-qmtest") - depends_on("clhep") - depends_on("boost") - depends_on("cppunit") - depends_on("aida") - depends_on("tbb") - depends_on("gperftools") - depends_on("heppdt") - - def install(self, spec, prefix): - options = [] - options.extend(std_cmake_args) - - build_directory = join_path(self.stage.path, 'spack-build') - source_directory = self.stage.source_path - - if '+debug' in spec: - options.append('-DCMAKE_BUILD_TYPE:STRING=Debug ') - - #options.append("-DCMAKE_TOOLCHAIN_FILE=" + source_directory +"/toolchain.cmake") - - with working_dir(build_directory, create=True): - import os - cmake(source_directory , *options) - make(" VERBOSE=1") - make("install") - diff --git a/packages/lcov/package.py b/packages/lcov/package.py deleted file mode 100644 index f3c96dc..0000000 --- a/packages/lcov/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class Lcov(Package): - """ - LCOV is a graphical front-end for GCC's coverage testing tool gcov. - """ - - homepage = "http://ltp.sourceforge.net/coverage/lcov.php" - url = "http://downloads.sourceforge.net/ltp/lcov-1.12.tar.gz" - - version('1.12', 'e497f9b77a93c6dda4e594cd8a67f634') - - def install(self, spec, prefix): - make() - make("install",'PREFIX=%s' % prefix) diff --git a/packages/mysql/mysql-5.7.11.patch b/packages/mysql/mysql-5.7.11.patch deleted file mode 100644 index 6f20753..0000000 --- a/packages/mysql/mysql-5.7.11.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ef812a25619d37924dbc856ba73384aae13be8e1 Mon Sep 17 00:00:00 2001 -From: Daniel Black -Date: Tue, 5 Apr 2016 17:04:23 +1000 -Subject: [PATCH] correct make_pair for c++11 - ---- - client/auth_utils.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/client/auth_utils.cc b/client/auth_utils.cc -index 21416bb..1a77661 100644 ---- a/client/auth_utils.cc -+++ b/client/auth_utils.cc -@@ -61,7 +61,7 @@ int parse_cnf_file(istream &sin, map *options, - getline(sin, option_value); - trim(&option_value); - if (option_name.length() > 0) -- options->insert(make_pair(option_name, option_value)); -+ options->insert(make_pair(option_name, option_value)); - } - return ALL_OK; - } catch(...) -diff -ur mysql-5.7.11/cmake/boost.cmake mysql/5.7.11/cmake/boost.cmake ---- a/cmake/boost.cmake 2016-02-02 00:31:58.000000000 +0100 -+++ b/cmake/boost.cmake 2016-06-18 11:53:18.000000000 +0200 -@@ -34,7 +34,7 @@ - SET(BOOST_PACKAGE_NAME "boost_1_59_0") - SET(BOOST_TARBALL "${BOOST_PACKAGE_NAME}.tar.gz") - SET(BOOST_DOWNLOAD_URL -- "http://sourceforge.net/projects/boost/files/boost/1.59.0/${BOOST_TARBALL}" -+ "http://service-spi.web.cern.ch/service-spi/external/tarFiles/${BOOST_TARBALL}" - ) - - SET(OLD_PACKAGE_NAMES "boost_1_55_0 boost_1_56_0 boost_1_57_0 boost_1_58_0") diff --git a/packages/mysql/package.py b/packages/mysql/package.py deleted file mode 100644 index ca85ad4..0000000 --- a/packages/mysql/package.py +++ /dev/null @@ -1,70 +0,0 @@ -############################################################################## -# 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 * -import os - -class Mysql(Package): - """The MySQL software delivers a very fast, multi-threaded, multi-user, - and robust SQL (Structured Query Language) database server.""" - - homepage = "http://dev.mysql.com/" - url = "http://pkgs.fedoraproject.org/repo/pkgs/community-mysql/mysql-5.7.11.tar.gz/f84d945a40ed876d10f8d5a7f4ccba32/mysql-5.7.11.tar.gz" - list_url = "http://pkgs.fedoraproject.org/repo/pkgs/community-mysql/" - - version('5.7.11', 'f84d945a40ed876d10f8d5a7f4ccba32') - version('5.5.30', 'de881c1940aa05e78266e77c9ac3d129') - version('5.5.27', '070340bc98dcb7f646287c97f1b91a1e') - version('5.5.19', 'a78cf450974e9202bd43674860349b5a') - version('5.5.18', '38b65815249f3bcacf3b0ee85171c486') - - patch('mysql-5.7.11.patch', when='@5.7.11') - - depends_on('cmake', type='build') - depends_on('libaio') - - def install(self, spec, prefix): - build_directory = join_path(self.stage.path, 'spack-build') - source_directory = self.stage.source_path - - cmake_args = [] - - if '+debug' in spec: - cmake_args.append('-DCMAKE_BUILD_TYPE:STRING=Debug') - else: - cmake_args.append('-DCMAKE_BUILD_TYPE:STRING=Release') - - cmake_args.extend([ - '-DDOWNLOAD_BOOST=1', - '-DWITH_BOOST='+build_directory+'/boost', - '-DWITH_SSL=system', - ]) - - cmake_args.extend(std_cmake_args) - - with working_dir(build_directory, create=True): - cmake(source_directory,*cmake_args) - make() - make("install") diff --git a/packages/podio/package.py b/packages/podio/package.py deleted file mode 100644 index 3850d15..0000000 --- a/packages/podio/package.py +++ /dev/null @@ -1,86 +0,0 @@ -############################################################################## -# Copyright (c) 2013-2017, 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/spack/spack -# Please also see the NOTICE and LICENSE files 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 Podio(CMakePackage): - """PODIO, or plain-old-data I/O, is a C++ library to support the creation - and handling of data models in particle physics.""" - - homepage = "https://github.com/AIDASOFT/podio" - url = "https://github.com/AIDASoft/podio/archive/v00-09-02.tar.gz" - - version('00-09-02', sha256='8234d1b9636029124235ef81199a1220968dcc7fdaeab81cdc96a47af332d240', extension='tar.gz', preferred=True) - version('00-09', sha256='3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f') - version('00-08', sha256='9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327') - version('develop', git='https://github.com/AIDASOFT/podio.git', branch='master') - - variant('build_type', default='Release', - description='The build type to build', - values=('Debug', 'Release')) - - variant('cxxstd', - default='17', - values=('14', '17'), - multi=False, - description='Use the specified C++ standard when building.') - - depends_on('cmake') - depends_on('root@6.08.06:') - depends_on('python@2.7:') - depends_on('py-pyyaml') - depends_on('tbb') - depends_on('davix', when='@:00-09') - - def cmake_args(self): - args = [] - # C++ Standard - args.append('-DCMAKE_CXX_STANDARD=%s' % self.spec.variants['cxxstd'].value) - args.append('-DBUILD_TESTING=OFF') - return args - - # in LCG_96 ROOT is installed with an external xz rather than the builtin, - # so the genreflex binary needs to find it. - # As root is installed as an external package we cannot modify its - # setup_dependent_environment function to add the xz lib folder to the - # LD_LIBRARY_PATH hence we need to do it here. - depends_on('xz', when='^root@6.16:') - - def setup_environment(self, spack_env, run_env): - if 'xz' in self.spec: - spack_env.prepend_path('LD_LIBRARY_PATH', self.spec['xz'].prefix.lib) - - def setup_dependent_environment(self, spack_env, run_env, dspec): - spack_env.set('PODIO', self.prefix) - - def setup_build_environment(self, build_env): - build_env.prepend_path('LD_LIBRARY_PATH', self.spec['root'].prefix.lib) - if 'xz' in self.spec: - build_env.prepend_path('LD_LIBRARY_PATH', self.spec['xz'].prefix.lib) - - def setup_run_environment(self, run_env): - run_env.prepend_path('LD_LIBRARY_PATH', self.spec['root'].prefix.lib) - if 'xz' in self.spec: - spack_env.prepend_path('LD_LIBRARY_PATH', self.spec['xz'].prefix.lib) diff --git a/packages/pythia6/package.py b/packages/pythia6/package.py deleted file mode 100644 index 8c47e0a..0000000 --- a/packages/pythia6/package.py +++ /dev/null @@ -1,71 +0,0 @@ -############################################################################## -# 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 -############################################################################## -# -# This is a template package file for Spack. We've put "FIXME" -# next to all the things you'll want to change. Once you've handled -# them, you can save this file and test your package like this: -# -# spack install pythia -# -# You can edit this file again by typing: -# -# spack edit pythia -# -# See the Spack documentation for more information on packaging. -# If you submit this package back to Spack as a pull request, -# please first remove this boilerplate and all FIXME comments. -# -from spack import * - - -class Pythia6(Package): - """PYTHIA is a program for the generation of high-energy physics events, - i.e. for the description of collisions at high energies between elementary - particles such as e+, e-, p and pbar in various combinations.""" - - homepage = "https://pythia6.hepforge.org/" - url = "http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/spackmirror/pythia6/pythia-6.4.28.tar.gz" - - version('6.4.28', '3cf2b78d08bc6319749e524b3b7b38e3') - - depends_on('cmake') - - def install(self, spec, prefix): - build_directory = join_path(self.stage.path, 'spack-build') - source_directory = self.stage.source_path - cmake_args = [source_directory] - - cmake('-DHEPEVT_SIZE=10000', '-P', 'preparePythia6.cmake') - - cmake_args.extend([ - '-DCMAKE_INSTALL_PREFIX=%s' % prefix - ]) - - cmake_args.extend(std_cmake_args) - - with working_dir(build_directory, create=True): - cmake(*cmake_args) - make() - make("install") diff --git a/packages/pythia8/package.py b/packages/pythia8/package.py deleted file mode 100644 index 4147c7d..0000000 --- a/packages/pythia8/package.py +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################## -# 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 * -import os - -class Pythia8(Package): - """Event generator pythia""" - - homepage = "http://home.thep.lu.se/~torbjorn/Pythia.html" - url = "http://home.thep.lu.se/~torbjorn/pythia8/pythia8219.tgz" - - version('8219', '3459b52b5da1deae52cbddefa6196feb') - version('8215', 'b4653133e6ab1782a5a4aa66eda6a54b') - version('8212', '0886d1b2827d8f0cd2ae69b925045f40') - version('8210', '685d61f08ca486caa6d5dfa35089e4ab') - version('8209', '1b9e9dc2f8a2c2db63bce739242fbc12') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") - - def setup_dependent_environment(self, spack_env, run_env, dspec): - spack_env.set('PYTHIA8_DIR', self.prefix) - spack_env.set('PYTHIA8_XML', os.path.join(self.prefix, "share", "Pythia8", "xmldoc")) - spack_env.set('PYTHIA8DATA', os.path.join(self.prefix, "share", "Pythia8", "xmldoc"))