From 1e1b086484e9a9a585ad8ed592a76fe99746b068 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 11 Jul 2023 17:35:55 -0500 Subject: [procps] Improve gettext/libintl handling (#38646) Fixes #38639. --- var/spack/repos/builtin/packages/procps/libintl.patch | 10 ++++++++++ var/spack/repos/builtin/packages/procps/package.py | 12 +++++------- 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 var/spack/repos/builtin/packages/procps/libintl.patch 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"] -- cgit v1.2.3-60-g2f50