gettext: unvendor libxml (#43622)
This commit is contained in:
parent
96a13a97e6
commit
7f13518225
@ -68,12 +68,28 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
|
|||||||
patch("nvhpc-export-symbols.patch", when="%nvhpc")
|
patch("nvhpc-export-symbols.patch", when="%nvhpc")
|
||||||
patch("nvhpc-long-width.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):
|
def patch(self):
|
||||||
for fn in ("gettext-tools/gnulib-lib/cdefs.h", "gettext-tools/libgrep/cdefs.h"):
|
# Apply this only where we know that the system libc is glibc, be very careful:
|
||||||
with open(fn, "w") as f:
|
if self.spec.satisfies("@:0.21.0 target=ppc64le"):
|
||||||
f.write("#include <sys/cdefs.h>\n")
|
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
|
@classmethod
|
||||||
def determine_version(cls, exe):
|
def determine_version(cls, exe):
|
||||||
|
Loading…
Reference in New Issue
Block a user