perl => 5.34.1 (#6860)

* perl => 5.34.1

* fix perl library versioning

* update YAML::Tiny

* update XML::Simple

* update XML::SAX::Parserfactory

* update XML::Parser

* update Unicode::Linebreak

* update Unicode::Eastasianwidth

* update Time::Hires

* update Text::Wrapi18n

* update Text::Unidecode

* update Text:Charwidth

* add Test::Output

* update Term::Readkey

* update Term::ANSIColor

* update GNU stow

* update SGLMS

* remove duplicate Term::Readkey

* update Pod::Parser

* update Parse::YAPP

* update Net::SSLeay

* update Mozilla::CA

* update Module::Build

* update Locale::Messages

* update Locale::Messages

* remove duplicate Unicode::LineBreak

* update IO::Socket::SSL

* update File::Tail

* update Date::Manip

* update Date::Format

* update Date::Calc

* update Carp::Clan

* add App::Cpanminus

* perl: Download Cpan Minus in prebuild phase

* App::Cpanminus conflicts with #{CREW_PREFIX}/bin/cpanm from perl.rb

* fix Mozilla::CA checksum

* add x86_64 and i686 binaries

* recompile perl binaries #1 >:(

* recompile perl binaries #2 >:(

* File::Tail correct spelling

* add dep to XML::SAX::ParserFactory

* add more binaries

* xml source stuff

* perl xml binaries

* misc fixes

* rest of binaries (x86_64 and i686)

* quote ldflags

* Add perl binaries

* add conflicts_ok to allow builds

* Add binaries for all successful armv7l builds

* rubocop perl

* add more armv7l binaries

Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Cassandra Watergate
2022-03-16 21:43:02 -07:00
committed by GitHub
parent eb84e75ef3
commit 1d60778b1c
35 changed files with 675 additions and 585 deletions

View File

@@ -3,66 +3,73 @@ 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/'
@_ver = '5.32.1'
@_ver = '5.34.1'
version @_ver
license 'GPL-1+ or Artistic'
compatibility 'all'
source_url "http://www.cpan.org/src/5.0/perl-#{@_ver}.tar.gz"
source_sha256 '03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c'
source_url "https://www.cpan.org/src/5.0/perl-#{@_ver}.tar.xz"
source_sha256 '6d52cf833ff1af27bb5e986870a2c30cec73c044b41e3458cd991f94374039f7'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.32.1_armv7l/perl-5.32.1-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.32.1_armv7l/perl-5.32.1-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.32.1_i686/perl-5.32.1-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.32.1_x86_64/perl-5.32.1-chromeos-x86_64.tar.xz'
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.34.1_armv7l/perl-5.34.1-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.34.1_armv7l/perl-5.34.1-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.34.1_i686/perl-5.34.1-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perl/5.34.1_x86_64/perl-5.34.1-chromeos-x86_64.tar.zst'
})
binary_sha256({
aarch64: '8f96c4ac4e4927ff643670ba362568e5483ba4ef970acd742877ef49b48829df',
armv7l: '8f96c4ac4e4927ff643670ba362568e5483ba4ef970acd742877ef49b48829df',
i686: '2193da9719f91be5aa261471aae0314b19da430ae3f09006c30d7d276b5f230d',
x86_64: '8c12ba41052f0f49f1dccc7cc1de795d4b4c55ba70c4ed1eff866580405e300a'
aarch64: 'dfffdd358c4863f28a7865e7087f6a716478509b7ebeafab0b1200bc5e65fe3d',
armv7l: 'dfffdd358c4863f28a7865e7087f6a716478509b7ebeafab0b1200bc5e65fe3d',
i686: '49c0701b82abe192ec20a22f435df153689c7269f36da9ab38299496a6360233',
x86_64: '09abf3ae359466bb0451e9ed890b4d95bc7721de05fa65f8acba5ee131797b46'
})
depends_on 'patch' => :build
@perl_fullversion = @_ver.split('-')[0]
@perl_version = @_ver.rpartition('.')[0]
def self.build
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/libnsl.so.1", "#{CREW_LIB_PREFIX}/libnsl.so"
# Use system zlib and bzip2
# Create shared library
# Install manual files into #{CREW_PREFIX}/share/man/man* even if groff is not installed.
system "env AR=gcc-ar RANLIB=gcc-ranlib NM=gcc-nm \
CFLAGS='-Os -pipe -flto=auto' \
CXXFLAGS='-Os -pipe -flto=auto' \
LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -flto -fuse-linker-plugin' \
BUILD_ZLIB=False BUILD_BZIP2=0 \
./Configure \
-Doptimize='-Os -pipe -flto=auto' \
-de \
-Dprefix=#{CREW_PREFIX} \
-Dvendorprefix=#{CREW_PREFIX} \
-Dprivlib=#{CREW_PREFIX}/share/perl5/core_perl \
-Darchlib=#{CREW_LIB_PREFIX}/perl5/#{@_ver}/core_perl \
-Dsitelib=#{CREW_PREFIX}/share/perl5/site_perl \
-Dsitearch=#{CREW_LIB_PREFIX}/perl5/#{@_ver}/site_perl \
-Dvendorlib=#{CREW_PREFIX}/share/perl5/vendor_perl \
-Dvendorarch=#{CREW_LIB_PREFIX}/perl5/#{@_ver}/vendor_perl \
-Dcc=#{CREW_TGT}-gcc \
-Doptimize='#{CREW_COMMON_FLAGS}' \
-Dlldlflags='-shared #{CREW_LDFLAGS}' -Dldflags='#{CREW_LDFLAGS}' \
-Dusethreads \
-de -Duseshrplib -Dman1dir=#{CREW_MAN_PREFIX}/man1 -Dman3dir=#{CREW_MAN_PREFIX}/man3"
-Dinstallusrbinperl=n \
-Duseshrplib -Dman1dir=#{CREW_MAN_PREFIX}/man1 -Dman3dir=#{CREW_MAN_PREFIX}/man3"
system 'make'
system 'curl -o cpanm https://cpanmin.us'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
FileUtils.mkdir_p CREW_DEST_LIB_PREFIX
FileUtils.ln_sf "#{CREW_PREFIX}/lib/perl5/#{@perl_fullversion}/#{ARCH}-linux-thread-multi/CORE/libperl.so",
"#{CREW_DEST_LIB_PREFIX}/libperl.so"
# Make libperl symlinks into standard locations
libperl_so = "#{CREW_PREFIX}/lib/perl5/#{@perl_fullversion}/#{ARCH}-linux-thread-multi/CORE/libperl.so"
FileUtils.ln_sf libperl_so, "#{CREW_DEST_LIB_PREFIX}/libperl.so.#{@_ver}" # e.g., libperl.so.5.34.1
FileUtils.ln_sf libperl_so, "#{CREW_DEST_LIB_PREFIX}/libperl.so.#{@_ver.sub(/\.\d$/, '')}" # e.g., libperl.so.5.34
FileUtils.ln_sf libperl_so, "#{CREW_DEST_LIB_PREFIX}/libperl.so#{@_ver.sub(/\.\d\.\d$/, '')}" # e.g., libperl.so.5
FileUtils.ln_sf libperl_so, "#{CREW_DEST_LIB_PREFIX}/libperl.so" # e.g., libperl.so
# Consider adding this symlink to the glibc package
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/libnsl.so.1", "#{CREW_DEST_LIB_PREFIX}/libnsl.so"
# Avoid File conflict with tcl, ocaml
FileUtils.mv "#{CREW_DEST_MAN_PREFIX}/man3/Thread.3", "#{CREW_DEST_MAN_PREFIX}/man3/Thread.3perl"
system "install -Dm755 cpanm #{CREW_DEST_PREFIX}/bin/cpanm"
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
system 'patch -Np1 << 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
@@ -77,6 +84,6 @@ diff -ur perl-5.22.1.orig/t/lib/warnings/regexec perl-5.22.1/t/lib/warnings/rege
EOF'
# test
system 'make test || true'
# system 'make test || true'
end
end