mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 14:28:15 -05:00
gnu: perl: Hack the replacement perl to think it is version 5.26.1.
Fixes <https://bugs.gnu.org/31216>. This is a followup to commits217b8c2e06
,44b98b0002
, and 35fbe194c3da264859a5addc661b9fbc2dc8ecc7. Complications arise when grafting perl unless the version of the replacement perl matches that of the original. So, here we add 'perl/fixed', which is built from the perl-5.26.2 source but hacked to believe it is version 5.26.1. * gnu/packages/perl.scm (perl)[replacement]: Use perl/fixed, not perl-5.26.2. (perl-5.26.2): Remove compatibility symlinks. (perl/fixed): New variable.
This commit is contained in:
parent
5618193694
commit
b5178b3254
1 changed files with 18 additions and 14 deletions
|
@ -62,7 +62,7 @@ (define-public perl
|
||||||
(package
|
(package
|
||||||
(name "perl")
|
(name "perl")
|
||||||
(version "5.26.1")
|
(version "5.26.1")
|
||||||
(replacement perl-5.26.2)
|
(replacement perl/fixed)
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://cpan/src/5.0/perl-"
|
(uri (string-append "mirror://cpan/src/5.0/perl-"
|
||||||
|
@ -171,22 +171,26 @@ (define-public perl-5.26.2
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp"))))
|
"03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp"))))))
|
||||||
|
|
||||||
|
;; When grafting perl, complications arise when the replacement perl has a
|
||||||
|
;; different version number than the original. So, here we create a version
|
||||||
|
;; of perl-5.26.2 that thinks it is version 5.26.1. See
|
||||||
|
;; <https://bugs.gnu.org/31210> and <https://bugs.gnu.org/31216>.
|
||||||
|
(define perl/fixed
|
||||||
|
(package
|
||||||
|
(inherit perl-5.26.2)
|
||||||
|
(version "5.26.1")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments perl)
|
(substitute-keyword-arguments (package-arguments perl-5.26.2)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
`(modify-phases ,phases
|
||||||
;; The path to several installed components include the Perl
|
(add-after 'unpack 'revert-perl-subversion
|
||||||
;; version number, and these is not rewritten by grafting. See
|
(lambda _
|
||||||
;; <https://bugs.gnu.org/31210> and <https://bugs.gnu.org/31216>.
|
(substitute* "patchlevel.h"
|
||||||
(add-after 'install 'install-compatibility-symlinks
|
(("^#define PERL_SUBVERSION 2")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
"#define PERL_SUBVERSION 1"))
|
||||||
(let ((out (assoc-ref outputs "out")))
|
#t))))))))
|
||||||
(symlink "perl5.26.2" (string-append out "/bin/perl5.26.1"))
|
|
||||||
(symlink "5.26.2" (string-append out "/lib/perl5/5.26.1"))
|
|
||||||
(symlink "5.26.2"
|
|
||||||
(string-append out "/lib/perl5/site_perl/5.26.1"))
|
|
||||||
#t)))))))))
|
|
||||||
|
|
||||||
(define-public perl-algorithm-c3
|
(define-public perl-algorithm-c3
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in a new issue