Files
chromebrew/packages/perl.rb
Casey Strouse 8d38d37993 Update perl from 5.24.1-3 to 5.26.1
This is a bugfix and maintenance release.

Tested as working on Samsung Chromebook Plus (aarch64).
2017-11-17 04:41:21 -07:00

55 lines
1.8 KiB
Ruby

require 'package'
class Perl < Package
description 'Perl 5 is a highly capable, feature-rich programming language with over 29 years of development.'
homepage 'https://www.perl.org/'
version '5.26.1'
source_url 'http://www.cpan.org/src/5.0/perl-5.26.1.tar.gz'
source_sha256 'e763aa485e8dc1a70483dbe6d615986bbf32b977f38016480d68c99237e701dd'
binary_url ({
})
binary_sha256 ({
})
depends_on 'patch' => :build
def self.build
# Use system zlib and bzip2
# Create shared library
# Install manual files into /usr/local/share/man/man* even if groff is not installed.
system "BUILD_ZLIB=False BUILD_BZIP2=0 ./Configure -de -Duseshrplib -Dman1dir=#{CREW_PREFIX}/share/man/man1 -Dman3dir=#{CREW_PREFIX}/share/man/man3"
system "make"
system "curl -o cpanm https://cpanmin.us"
system "chmod +x cpanm"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
system "mkdir -p #{CREW_DEST_PREFIX}/bin/"
system "cp cpanm #{CREW_DEST_PREFIX}/bin/"
end
def self.check
# having strange error as explained at https://patchwork.openembedded.org/patch/95795/
# so, apply patch from https://github.com/habitat-sh/core-plans/blob/master/perl/skip-wide-character-test.patch
# to ignore this single test
system 'patch -p1 << EOF
diff -ur perl-5.22.1.orig/t/lib/warnings/regexec perl-5.22.1/t/lib/warnings/regexec
--- perl-5.22.1.orig/t/lib/warnings/regexec 2015-10-30 21:14:29.000000000 +0000
+++ perl-5.22.1/t/lib/warnings/regexec 2016-01-19 05:05:50.218474114 +0000
@@ -188,6 +188,7 @@
########
# NAME \b{} in UTF-8 locale
require \'../loc_tools.pl\';
+print("SKIPPED\n# This test causes a failure in the test suite\n"),exit;
unless (locales_enabled()) {
print("SKIPPED\n# locales not available\n"),exit;
}
EOF'
# test
system "make test"
end
end