From cff35c498705e1bc217cb433fc234c2f55910577 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Sun, 12 May 2024 10:44:31 -0700 Subject: octave: use pcre2 for @8: (#42636) * octave: use pcre2 for @8: * Add 'pcre2' variant to octave to control pcre vs. pcre2 * Update var/spack/repos/builtin/packages/octave/package.py Co-authored-by: Alec Scott --------- Co-authored-by: Alex Richert Co-authored-by: Alec Scott --- var/spack/repos/builtin/packages/octave/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 0eb3610627..8a79392c52 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -72,6 +72,7 @@ class Octave(AutotoolsPackage, GNUMirrorPackage): variant("jdk", default=False, description="Use Java") variant("llvm", default=False, description="Use LLVM") variant("opengl", default=False, description="Use OpenGL") + variant("pcre2", default=True, when="@8:", description="Use PCRE2 instead of PCRE") variant("qhull", default=False, description="Use qhull") variant("qrupdate", default=False, description="Use qrupdate") variant("qscintilla", default=False, description="Use QScintill") @@ -84,7 +85,9 @@ class Octave(AutotoolsPackage, GNUMirrorPackage): depends_on("lapack") # Octave does not configure with sed from darwin: depends_on("sed", when=sys.platform == "darwin", type="build") - depends_on("pcre") + depends_on("pcre", when="@:7") + depends_on("pcre", when="~pcre2") + depends_on("pcre2", when="+pcre2") depends_on("pkgconfig", type="build") depends_on("texinfo", type="build") @@ -350,6 +353,8 @@ class Octave(AutotoolsPackage, GNUMirrorPackage): else: config_args.append("--without-z") + if spec.satisfies("~pcre2"): + config_args.append("--without-pcre2") # If 64-bit BLAS is used: if ( spec.satisfies("^openblas+ilp64") -- cgit v1.2.3-70-g09d2