Skip to content

Commit

Permalink
octave: use pcre2 for @8: (#42636)
Browse files Browse the repository at this point in the history
* 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 <hi@alecbcs.com>

---------

Co-authored-by: Alex Richert <alexander.richert@noaa.gov>
Co-authored-by: Alec Scott <hi@alecbcs.com>
  • Loading branch information
3 people committed May 12, 2024
1 parent d594f84 commit cff35c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion var/spack/repos/builtin/packages/octave/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")

Expand Down Expand Up @@ -350,6 +353,8 @@ def configure_args(self):
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")
Expand Down

0 comments on commit cff35c4

Please sign in to comment.