summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gettext/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py
index b528e8a8b0..de077821f2 100644
--- a/var/spack/repos/builtin/packages/gettext/package.py
+++ b/var/spack/repos/builtin/packages/gettext/package.py
@@ -58,6 +58,13 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
patch("nvhpc-export-symbols.patch", when="%nvhpc")
patch("nvhpc-long-width.patch", when="%nvhpc")
+ # Apply this only where we know that the system libc is glibc, be very careful:
+ @when("@:0.21.0 target=ppc64le:")
+ def patch(self):
+ for fn in ("gettext-tools/gnulib-lib/cdefs.h", "gettext-tools/libgrep/cdefs.h"):
+ with open(fn, "w") as f:
+ f.write("#include <sys/cdefs.h>\n")
+
@classmethod
def determine_version(cls, exe):
gettext = Executable(exe)