summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/subversion/package.py10
1 files changed, 10 insertions, 0 deletions
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 @@ class Subversion(AutotoolsPackage):
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