perl: change permissions in order to apply patch on version 5.38.0 (#40609)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
parent
f2ba25e09d
commit
e30f53f206
1 changed files with 16 additions and 4 deletions
|
@ -32,6 +32,8 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
|
|||
url = "http://www.cpan.org/src/5.0/perl-5.34.0.tar.gz"
|
||||
tags = ["windows"]
|
||||
|
||||
maintainers("LydDeb")
|
||||
|
||||
executables = [r"^perl(-?\d+.*)?$"]
|
||||
|
||||
# see https://www.cpan.org/src/README.html for
|
||||
|
@ -258,13 +260,23 @@ def determine_variants(cls, exes, version):
|
|||
# aren't writeable so make pp.c user writeable
|
||||
# before patching. This should probably walk the
|
||||
# source and make everything writeable in the future.
|
||||
# The patch "zlib-ng.patch" also fail. So, apply chmod
|
||||
# to Makefile.PL and Zlib.xs too.
|
||||
def do_stage(self, mirror_only=False):
|
||||
# Do Spack's regular stage
|
||||
super().do_stage(mirror_only)
|
||||
# Add write permissions on file to be patched
|
||||
filename = join_path(self.stage.source_path, "pp.c")
|
||||
perm = os.stat(filename).st_mode
|
||||
os.chmod(filename, perm | 0o200)
|
||||
# Add write permissions on files to be patched
|
||||
files_to_chmod = [
|
||||
join_path(self.stage.source_path, "pp.c"),
|
||||
join_path(self.stage.source_path, "cpan/Compress-Raw-Zlib/Makefile.PL"),
|
||||
join_path(self.stage.source_path, "cpan/Compress-Raw-Zlib/Zlib.xs"),
|
||||
]
|
||||
for filename in files_to_chmod:
|
||||
try:
|
||||
perm = os.stat(filename).st_mode
|
||||
os.chmod(filename, perm | 0o200)
|
||||
except IOError:
|
||||
continue
|
||||
|
||||
def nmake_arguments(self):
|
||||
args = []
|
||||
|
|
Loading…
Reference in a new issue