summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gmake/package.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py
index 919b33527e..5fe49b28cf 100644
--- a/var/spack/repos/builtin/packages/gmake/package.py
+++ b/var/spack/repos/builtin/packages/gmake/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
import re
from spack.build_environment import MakeExecutable, determine_number_of_jobs
@@ -24,14 +25,14 @@ class Gmake(AutotoolsPackage, GNUMirrorPackage):
version("4.0", sha256="fc42139fb0d4b4291929788ebaf77e2a4de7eaca95e31f3634ef7d4932051f69")
variant("guile", default=False, description="Support GNU Guile for embedded scripting")
- variant("nls", default=True, description="Enable Native Language Support")
- depends_on("gettext", when="+nls")
- depends_on("guile", when="+guile")
+ with when("+guile"):
+ depends_on("guile@:2.0", when="@:4.2")
+ depends_on("guile@:3.0")
+ depends_on("pkgconfig", type="build")
- depends_on("texinfo", type="build")
-
- build_directory = "spack-build"
+ # build.sh requires it in 4.0 (SV 40254)
+ conflicts("~guile", when="@4.0")
patch(
"https://src.fedoraproject.org/rpms/make/raw/519a7c5bcbead22e6ea2d2c2341d981ef9e25c0d/f/make-4.2.1-glob-fix-2.patch",
@@ -62,13 +63,18 @@ class Gmake(AutotoolsPackage, GNUMirrorPackage):
def configure_args(self):
args = []
args.extend(self.with_or_without("guile"))
- args.extend(self.with_or_without("nls"))
+ args.append("--disable-nls")
return args
- @run_after("install")
- def symlink_gmake(self):
- with working_dir(self.prefix.bin):
- symlink("make", "gmake")
+ def build(self, spec, prefix):
+ with working_dir(self.build_directory):
+ Executable(os.path.join(os.curdir, "build.sh"))()
+
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ os.mkdir(prefix.bin)
+ install("make", prefix.bin)
+ os.symlink("make", prefix.bin.gmake)
def setup_dependent_package(self, module, dspec):
module.make = MakeExecutable(