diff options
author | becker33 <becker33@llnl.gov> | 2016-08-02 10:10:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-02 10:10:04 -0700 |
commit | a03a35565e250818aeeebdc16c647ef5b30250a5 (patch) | |
tree | 29620617e97e8d397346ee3ec8e1d22699033d30 /var | |
parent | 326b9838ed0d59f8a91dba72785ad9eb6fe4f054 (diff) | |
parent | fa70a837d4d2f5ba7e96298d57d92833c3c9b09c (diff) | |
download | spack-a03a35565e250818aeeebdc16c647ef5b30250a5.tar.gz spack-a03a35565e250818aeeebdc16c647ef5b30250a5.tar.bz2 spack-a03a35565e250818aeeebdc16c647ef5b30250a5.tar.xz spack-a03a35565e250818aeeebdc16c647ef5b30250a5.zip |
Merge pull request #1339 from hartzell/features/add-perl
Add perl package
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/perl/package.py | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py new file mode 100644 index 0000000000..d71a7492ba --- /dev/null +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -0,0 +1,75 @@ +############################################################################## +# 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 +############################################################################## +# +# Author: George Hartzell <hartzell@alerce.com> +# Date: July 21, 2016 +# Author: Justin Too <justin@doubleotoo.com> +# Date: September 6, 2015 +# +from spack import * + + +class Perl(Package): + """Perl 5 is a highly capable, feature-rich programming language with over + 27 years of development.""" + homepage = "http://www.perl.org" + url = "http://www.cpan.org/src/5.0/perl-5.22.2.tar.gz" + + version('5.24.0', 'c5bf7f3285439a2d3b6a488e14503701') + version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b') + version('5.20.3', 'd647d0ea5a7a8194c34759ab9f2610cd') + # 5.18.4 fails with gcc-5 + # https://rt.perl.org/Public/Bug/Display.html?id=123784 + # version('5.18.4' , '1f9334ff730adc05acd3dd7130d295db') + + # Installing cpanm alongside the core makes it safe and simple for + # people/projects to install their own sets of perl modules. Not + # having it in core increases the "energy of activation" for doing + # things cleanly. + variant('cpanm', default=True, + description='Optionally install cpanm with the core packages.') + + resource( + name="cpanm", + url="http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7042.tar.gz", + md5="e87f55fbcb3c13a4754500c18e89219f", + destination="cpanm", + placement="cpanm" + ) + + def install(self, spec, prefix): + configure = Executable('./Configure') + configure("-des", "-Dprefix=" + prefix) + make() + if self.run_tests: + make("test") + make("install") + + if '+cpanm' in spec: + with working_dir(join_path('cpanm', 'cpanm')): + perl = Executable(join_path(prefix.bin, 'perl')) + perl('Makefile.PL') + make() + make('install') |