Add dummy perl+open variant, use it in external find, require it in libxcrypt (#34867)
This commit is contained in:
parent
37c8ebcafd
commit
ffae0db115
@ -32,6 +32,15 @@ def url_for_version(self, version):
|
|||||||
|
|
||||||
patch("truncating-conversion.patch", when="@4.4.30")
|
patch("truncating-conversion.patch", when="@4.4.30")
|
||||||
|
|
||||||
|
with when("@:4.4.17"):
|
||||||
|
depends_on("autoconf", type="build")
|
||||||
|
depends_on("automake@1.14:", type="build")
|
||||||
|
depends_on("libtool", type="build")
|
||||||
|
depends_on("m4", type="build")
|
||||||
|
|
||||||
|
# Some distros have incomplete perl installs, +open catches that.
|
||||||
|
depends_on("perl@5.14.0: +open", type="build", when="@4.4.18:")
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = [
|
args = [
|
||||||
# Disable test dependency on Python (Python itself depends on libxcrypt).
|
# Disable test dependency on Python (Python itself depends on libxcrypt).
|
||||||
@ -45,9 +54,3 @@ def configure_args(self):
|
|||||||
@property
|
@property
|
||||||
def libs(self):
|
def libs(self):
|
||||||
return find_libraries("libcrypt", root=self.prefix, recursive=True)
|
return find_libraries("libcrypt", root=self.prefix, recursive=True)
|
||||||
|
|
||||||
with when("@:4.4.17"):
|
|
||||||
depends_on("autoconf", type="build")
|
|
||||||
depends_on("automake@1.14:", type="build")
|
|
||||||
depends_on("libtool", type="build")
|
|
||||||
depends_on("m4", type="build")
|
|
||||||
|
@ -159,10 +159,9 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
|
|||||||
# having it in core increases the "energy of activation" for doing
|
# having it in core increases the "energy of activation" for doing
|
||||||
# things cleanly.
|
# things cleanly.
|
||||||
variant("cpanm", default=True, description="Optionally install cpanm with the core packages.")
|
variant("cpanm", default=True, description="Optionally install cpanm with the core packages.")
|
||||||
|
|
||||||
variant("shared", default=True, description="Build a shared libperl.so library")
|
variant("shared", default=True, description="Build a shared libperl.so library")
|
||||||
|
|
||||||
variant("threads", default=True, description="Build perl with threads support")
|
variant("threads", default=True, description="Build perl with threads support")
|
||||||
|
variant("open", default=True, description="Support open.pm")
|
||||||
|
|
||||||
resource(
|
resource(
|
||||||
name="cpanm",
|
name="cpanm",
|
||||||
@ -211,6 +210,16 @@ def determine_variants(cls, exes, version):
|
|||||||
variants += "+cpanm"
|
variants += "+cpanm"
|
||||||
else:
|
else:
|
||||||
variants += "~cpanm"
|
variants += "~cpanm"
|
||||||
|
# this is just to detect incomplete installs
|
||||||
|
# normally perl installs open.pm
|
||||||
|
perl(
|
||||||
|
"-e",
|
||||||
|
"use open OUT => qw(:raw)",
|
||||||
|
output=os.devnull,
|
||||||
|
error=os.devnull,
|
||||||
|
fail_on_error=False,
|
||||||
|
)
|
||||||
|
variants += "+open" if perl.returncode == 0 else "~open"
|
||||||
return variants
|
return variants
|
||||||
|
|
||||||
# On a lustre filesystem, patch may fail when files
|
# On a lustre filesystem, patch may fail when files
|
||||||
|
Loading…
Reference in New Issue
Block a user