gettext: Fix ~libxml2: Skip patch for external libxml (#46870)
This commit is contained in:
parent
a0611650e2
commit
0f3fea511e
@ -31,8 +31,8 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
|
||||
version("0.19.8.1", sha256="105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4")
|
||||
version("0.19.7", sha256="378fa86a091cec3acdece3c961bb8d8c0689906287809a8daa79dc0c6398d934")
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
# Recommended variants
|
||||
variant("curses", default=True, description="Use libncurses")
|
||||
@ -83,7 +83,7 @@ def patch(self):
|
||||
# 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.
|
||||
if self.spec.satisfies("@0.20:"): # libtextstyle/configure not present prior
|
||||
if self.spec.satisfies("@0.20:+libxml2"): # libtextstyle/configure not present prior
|
||||
filter_file(
|
||||
"gl_cv_libxml_force_included=yes",
|
||||
"gl_cv_libxml_force_included=no",
|
||||
@ -93,7 +93,7 @@ def patch(self):
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
# this goes together with gl_cv_libxml_force_included=no
|
||||
if name == "ldflags":
|
||||
if name == "ldflags" and self.spec.satisfies("+libxml2"):
|
||||
flags.append("-lxml2")
|
||||
return (flags, None, None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user