gettext: unvendor libxml (#43622)
This commit is contained in:
parent
96a13a97e6
commit
7f13518225
1 changed files with 21 additions and 5 deletions
|
@ -68,13 +68,29 @@ 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):
|
||||
# Apply this only where we know that the system libc is glibc, be very careful:
|
||||
if self.spec.satisfies("@:0.21.0 target=ppc64le"):
|
||||
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")
|
||||
|
||||
# From the configure script: "we don't want to use an external libxml, because its
|
||||
# dependencies and their dynamic relocations have an impact on the startup time", well,
|
||||
# *we* do.
|
||||
filter_file(
|
||||
"gl_cv_libxml_force_included=yes",
|
||||
"gl_cv_libxml_force_included=no",
|
||||
"libtextstyle/configure",
|
||||
string=True,
|
||||
)
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
# this goes together with gl_cv_libxml_force_included=no
|
||||
if name == "ldflags":
|
||||
flags.append("-lxml2")
|
||||
return (flags, None, None)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, exe):
|
||||
gettext = Executable(exe)
|
||||
|
|
Loading…
Reference in a new issue