summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Green <greenc@fnal.gov>2023-07-11 17:35:55 -0500
committerGitHub <noreply@github.com>2023-07-11 15:35:55 -0700
commit1e1b086484e9a9a585ad8ed592a76fe99746b068 (patch)
treec45b30f404473b790b4887176a75ca8b2a35808c
parent0d51faf6cb3de223633c49bab73e3d9d89368992 (diff)
downloadspack-1e1b086484e9a9a585ad8ed592a76fe99746b068.tar.gz
spack-1e1b086484e9a9a585ad8ed592a76fe99746b068.tar.bz2
spack-1e1b086484e9a9a585ad8ed592a76fe99746b068.tar.xz
spack-1e1b086484e9a9a585ad8ed592a76fe99746b068.zip
[procps] Improve gettext/libintl handling (#38646)
Fixes #38639.
-rw-r--r--var/spack/repos/builtin/packages/procps/libintl.patch10
-rw-r--r--var/spack/repos/builtin/packages/procps/package.py12
2 files changed, 15 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/procps/libintl.patch b/var/spack/repos/builtin/packages/procps/libintl.patch
new file mode 100644
index 0000000000..923679e6c0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/procps/libintl.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.am 2023-06-29 14:12:25.671539354 -0500
++++ b/Makefile.am 2023-06-29 14:26:58.852425405 -0500
+@@ -1,6 +1,5 @@
+-CYGWINFLAGS =
++CYGWINFLAGS = $(LTLIBINTL)
+ if CYGWIN
+-CYGWINFLAGS += -lintl
+ usrbin_exec_PROGRAMS =
+ endif
+
diff --git a/var/spack/repos/builtin/packages/procps/package.py b/var/spack/repos/builtin/packages/procps/package.py
index 5c135e2505..c7d9983693 100644
--- a/var/spack/repos/builtin/packages/procps/package.py
+++ b/var/spack/repos/builtin/packages/procps/package.py
@@ -27,22 +27,20 @@ class Procps(AutotoolsPackage):
depends_on("pkgconfig@0.9.0:", type="build")
depends_on("dejagnu", type="test")
depends_on("iconv")
+ depends_on("gettext", type="build")
depends_on("gettext", when="+nls")
depends_on("ncurses")
conflicts("platform=darwin", msg="procps is linux-only")
+ # Need to tell the build to use the tools it already has to find
+ # libintl (if appropriate).
+ patch("libintl.patch")
+
def autoreconf(self, spec, prefix):
sh = which("sh")
sh("autogen.sh")
- def flag_handler(self, name, flags):
- if name == "ldlibs":
- spec = self.spec
- if "+nls" in spec and "intl" in spec["gettext"].libs.names:
- flags.append("-lintl")
- return self.build_system_flags(name, flags)
-
def configure_args(self):
spec = self.spec
args = ["--with-ncurses"]