gettext: On ppc64le, for older versions, use system cdefs.h (#33411)

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
This commit is contained in:
Jonathon Anderson 2022-11-16 19:55:02 -06:00 committed by GitHub
parent e47beceb8a
commit 497682260f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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