diff options
author | Lydéric Debusschère <lyderic.de@gmail.com> | 2023-10-20 00:00:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-20 00:00:24 +0200 |
commit | e30f53f206a3bd10ac524f3abf10e08e9aa2369f (patch) | |
tree | 625308115c730ea8ec08d49628583af26ca1a2f1 /var/spack/repos/builtin/packages/perl/package.py | |
parent | f2ba25e09dba1f0d4eacfa778f281eb549676d1f (diff) | |
download | spack-e30f53f206a3bd10ac524f3abf10e08e9aa2369f.tar.gz spack-e30f53f206a3bd10ac524f3abf10e08e9aa2369f.tar.bz2 spack-e30f53f206a3bd10ac524f3abf10e08e9aa2369f.tar.xz spack-e30f53f206a3bd10ac524f3abf10e08e9aa2369f.zip |
perl: change permissions in order to apply patch on version 5.38.0 (#40609)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to 'var/spack/repos/builtin/packages/perl/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/perl/package.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 7a4e15c1f7..299ae19436 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -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 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package # 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 = [] |