2019-01-01 14:04:23 +08:00
|
|
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-07-28 02:26:23 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2016-07-28 02:26:23 +08:00
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
2017-02-04 06:22:50 +08:00
|
|
|
class Ocaml(Package):
|
2016-07-28 02:26:23 +08:00
|
|
|
"""OCaml is an industrial strength programming language supporting
|
|
|
|
functional, imperative and object-oriented styles"""
|
|
|
|
|
|
|
|
homepage = "http://ocaml.org/"
|
2019-10-12 16:49:54 +08:00
|
|
|
url = "https://caml.inria.fr/pub/distrib/ocaml-4.06/ocaml-4.06.0.tar.gz"
|
2016-07-28 02:26:23 +08:00
|
|
|
|
2019-10-12 16:49:54 +08:00
|
|
|
version('4.06.0', sha256='c17578e243c4b889fe53a104d8927eb8749c7be2e6b622db8b3c7b386723bf50')
|
|
|
|
version('4.03.0', sha256='7fdf280cc6c0a2de4fc9891d0bf4633ea417046ece619f011fd44540fcfc8da2')
|
2016-07-28 02:26:23 +08:00
|
|
|
|
|
|
|
depends_on('ncurses')
|
|
|
|
|
2018-01-31 20:49:17 +08:00
|
|
|
def url_for_version(self, version):
|
|
|
|
url = "http://caml.inria.fr/pub/distrib/ocaml-{0}/ocaml-{1}.tar.gz"
|
|
|
|
return url.format(version.up_to(2), version)
|
|
|
|
|
2017-02-04 06:22:50 +08:00
|
|
|
def install(self, spec, prefix):
|
|
|
|
configure('-prefix', '{0}'.format(prefix))
|
2017-06-25 13:22:55 +08:00
|
|
|
|
2017-02-04 06:22:50 +08:00
|
|
|
make('world.opt')
|
2018-01-31 20:49:17 +08:00
|
|
|
make('install', 'PREFIX={0}'.format(prefix))
|