From 5b718391277bc3bb80f4a299094ec86a6c99c956 Mon Sep 17 00:00:00 2001 From: Olivier Cessenat Date: Fri, 11 Feb 2022 09:40:29 +0100 Subject: [PATCH] subversion: add the external find feature using svn (#28862) --- var/spack/repos/builtin/packages/subversion/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index f4fc5a212e..a6ef24c553 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import re + from spack import * @@ -42,6 +44,8 @@ class Subversion(AutotoolsPackage): depends_on('swig@1.3.24:3.0.0', when='+perl') depends_on('perl-termreadkey', when='+perl') + executables = [r'^svn$'] + # https://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html def configure_args(self): spec = self.spec @@ -108,3 +112,9 @@ def install(self, spec, prefix): with working_dir(join_path( 'subversion', 'bindings', 'swig', 'perl', 'native')): make('install') + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('--version', output=str, error=str) + match = re.search(r'^svn, version\s+([\d\.]+)', output) + return match.group(1) if match else None