[procps] Improve gettext/libintl handling (#38646)

Fixes #38639.
This commit is contained in:
Chris Green 2023-07-11 17:35:55 -05:00 committed by GitHub
parent 0d51faf6cb
commit 1e1b086484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -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

View File

@ -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"]