From 7ced07a14150e34f86ed1152bbca029efa0552e1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 2 Jul 2021 01:48:32 -0500 Subject: GEOS: add v3.9.1, switch to CMake (#24629) --- var/spack/repos/builtin/packages/geos/package.py | 47 ++++++------------------ 1 file changed, 12 insertions(+), 35 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py index a01b8c65d8..d4d905d4a5 100644 --- a/var/spack/repos/builtin/packages/geos/package.py +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -6,7 +6,7 @@ from spack import * -class Geos(AutotoolsPackage): +class Geos(CMakePackage): """GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). As such, it aims to contain the complete functionality of JTS in C++. This includes all the OpenGIS @@ -18,6 +18,7 @@ class Geos(AutotoolsPackage): maintainers = ['adamjstewart'] + version('3.9.1', sha256='7e630507dcac9dc07565d249a26f06a15c9f5b0c52dd29129a0e3d381d7e382a') version('3.8.1', sha256='4258af4308deb9dbb5047379026b4cd9838513627cb943a44e16c40e42ae17f7') version('3.7.2', sha256='2166e65be6d612317115bfec07827c11b403c3f303e0a7420a2106bc999d7707') version('3.6.2', sha256='045a13df84d605a866602f6020fc6cbf8bf4c42fb50de237a08926e1d7d7652a') @@ -37,44 +38,20 @@ class Geos(AutotoolsPackage): version('3.3.4', sha256='cd5400aa5f3fe32246dfed5d238c5017e1808162c865c016480b3e6c07271904') version('3.3.3', sha256='dfcf4bd70ab212a5b7bad21d01b84748f101a545092b56dafdc3882ef3bddec9') - # Ruby bindings are fully supported - variant('ruby', default=False, description='Enable Ruby support') + depends_on('cmake@3.8:', type='build') + depends_on('ninja', type='build') - # Since version 3.0, the Python bindings are unsupported - variant('python', default=False, description='Enable Python support') + generator = 'Ninja' - extends('ruby', when='+ruby') - extends('python', when='+python') + patch('https://patch-diff.githubusercontent.com/raw/libgeos/geos/pull/461.patch', + sha256='58795ae79f168851f27aa488a589796f9a7563d368ffa32e1fe315eb71699877', + when='@3.7:') - # SWIG bindings dropped in 3.9, so no python/ruby bindings - conflicts('+python', when='@3.9:', msg='SWIG bindings dropped in 3.9') - conflicts('+ruby', when='@3.9:', msg='SWIG bindings dropped in 3.9') - - # Python 3 is supposedly supported, but I couldn't get it to work - # https://trac.osgeo.org/geos/ticket/774 - depends_on('python@:2', when='@:3.5') - # This patch should fix above issue. - # Only tested on 3.8.1, but patch at least applies on 3.5 - patch('geos_python3_config.patch', when='+python @3.5:3.8.99') - - depends_on('swig', type='build', when='+ruby') - depends_on('swig', type='build', when='+python') - - # I wasn't able to get the ruby bindings working. - # It resulted in "Undefined symbols for architecture x86_64". - - def configure_args(self): - spec = self.spec + def cmake_args(self): args = [] - if '+ruby' in spec: - args.append('--enable-ruby') - else: - args.append('--disable-ruby') - - if '+python' in spec: - args.append('--enable-python') - else: - args.append('--disable-python') + # https://github.com/libgeos/geos/issues/460 + if '%intel' in self.spec: + args.append(self.define('BUILD_ASTYLE', False)) return args -- cgit v1.2.3-70-g09d2