From cdb7c7a1db8f2c13dc6b82d33debac86323648ef Mon Sep 17 00:00:00 2001 From: nicolas le goff <14815625+nicolaslg@users.noreply.github.com> Date: Tue, 12 Jul 2022 18:04:51 +0200 Subject: fixed the cgal recipe and added the latest release. (#31523) * fixed the cgal recipe and added the latest release. * Update var/spack/repos/builtin/packages/cgal/package.py Co-authored-by: Adam J. Stewart * updated cgal recipe to new URL for tarballs Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/cgal/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py index bd53c6f026..dcbf581a72 100644 --- a/var/spack/repos/builtin/packages/cgal/package.py +++ b/var/spack/repos/builtin/packages/cgal/package.py @@ -14,8 +14,9 @@ class Cgal(CMakePackage): molecular biology, medical imaging, computer graphics, and robotics. """ homepage = 'https://www.cgal.org/' - url = "https://github.com/CGAL/cgal/releases/download/releases/CGAL-5.0.3/CGAL-5.0.3.tar.xz" + url = "https://github.com/CGAL/cgal/releases/download/v5.4.1/CGAL-5.4.1.tar.xz" + version('5.4.1', sha256='4c3dd7ee4d36d237111a4d72b6e14170093271595d5b695148532daa95323d76') version('5.1.5', sha256='b1bb8a6053aa12baa5981aef20a542cd3e617a86826963fb8fb6852b1a0da97c') version('5.0.3', sha256='e5a3672e35e5e92e3c1b4452cd3c1d554f3177dc512bd98b29edf21866a4288c') version('5.0', sha256='e1e7e932988c5d149aa471c1afd69915b7603b5b31b9b317a0debb20ecd42dcc') @@ -81,6 +82,15 @@ class Cgal(CMakePackage): msg="Header only builds became optional in 4.9," " default thereafter") + def url_for_version(self, version): + url = "https://github.com/CGAL/cgal/releases/download/" + if version <= Version('5.0.3'): + url += "releases/CGAL-{0}/CGAL-{0}.tar.xz" + else: + url += "v{0}/CGAL-{0}.tar.xz" + + return url.format(version) + def setup_build_environment(self, env): spec = self.spec -- cgit v1.2.3-60-g2f50