mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
* perl -> 5.32.1 * fix url * perl rebuild with lto, adjustment of conflicts * texinfo rebuild * working version on all architectures * simply logic * Cleanup, backport of gcc11 package changes * more cleanup * restore some depends * Use specific revision for mpfr patchset * Update links to release links * Replace gcc10 with libssp in install.sh * Change links to gcc10.3.0 release links * install not a dependency libssp when installing gcc10 to avoid breaking any libssp dependent packages. * Adjust gcc10 postinstall logic * preinstall and postinstall changes for gcc 10.3.0 * Add gcc uninstall message * Add ruby require for gcc10 package file * libssp => gcc11.1 * Initial add of gcc 11.1 * change buildessential to use gcc11 instead of gcc10 * x86_64 workaround still needed * Still need PATH_MAX patching * add libssp 11.1.0 binaries * add gcc11 binaries * convert gcc10 to an is_fake package requiring libssp * Update gcc_tools with new libssp & gcc11 * revert gcc_tools update * update to gitlab links * switch to gitlab links * use gitlab links * use gitlab links * move to gitlab, add more symlinks * change to gitlab * switch to gitlab take 2 * use nproc * New binary packages * use gnumirror * Add llvm 12.0.0 * remove lld dep * finish merge * switch to gcc11 as primary * update stow * fix stow * replace lzma with current xz-utils * add po4a build dep to xzutils * file conflict fix * initial perl 5.32.1 fixes * add stow * deal with conflict * deal with conflict take 2 * work crew modifications * have crew delete conflict files from crew module builds * move delete packfile function to crew * remove need for po4a * Add xzutils, pixz * is_fake doesn't need source_url * add pixz tpxz format support to crew * add more perl 5.32.1 binaries * modify pixz settings * pixz changes * tpxz fixes * crew debugging * crew debugging * crew debugging * crew debugging * crew debugging * crew debugging * crew debugging * crew debugging * crew debugging * fix gcc10 gcc11 packages * Add xzutils to pixz deps * Add pixz if not installed. * change pixz logic * pixz changes * xzutils is a runtime dep for pixz * grammar fix * Keep crew from crashing on reading malformed package files * clean up * don't show duplicate error for syntax error * don't show duplicate error for syntax error * Fix comparison * Use safe navigation operator. * Use same fix for list compatible * refactor compatibility * bump * add binary_url to package.rb * cleanup empty space * minimal rubocop suggested cleanup * requested changes * revert code changes which don't work in ruby * simplify list compatible * requested changes... * hide message behind debug flag. * libdrm -> 2.4.105 * add mesa 21.1.0 * make full gcc11 package * replace stow with perl_stow and update gcc10 to full package * gcc11 hash update * Add pixz to core * remove libgcc_s1 * libgcc_s1 -> dummy package * cleanup perl package files * requested changes * remove libgcc_s1.rb * gcc changes * rubocop changes * modify crew to use PIXZ by default * enable pixz in install.sh * move postinstall to install * bump gcc versions * fix gcc10 url * make gcc_version logic changes * Add new gcc10 binaries * add new gcc11 and libssp armv7l binaries, bump const.rb version * modify already installed logic * install.sh and crew bump * back out core_packages.txt install changes
83 lines
3.5 KiB
Ruby
83 lines
3.5 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/'
|
|
@_ver = '5.32.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'
|
|
|
|
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'
|
|
})
|
|
binary_sha256({
|
|
aarch64: '8f96c4ac4e4927ff643670ba362568e5483ba4ef970acd742877ef49b48829df',
|
|
armv7l: '8f96c4ac4e4927ff643670ba362568e5483ba4ef970acd742877ef49b48829df',
|
|
i686: '2193da9719f91be5aa261471aae0314b19da430ae3f09006c30d7d276b5f230d',
|
|
x86_64: '8c12ba41052f0f49f1dccc7cc1de795d4b4c55ba70c4ed1eff866580405e300a'
|
|
})
|
|
|
|
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' \
|
|
-Dusethreads \
|
|
-de -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"
|
|
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
|
|
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 || true'
|
|
end
|
|
end
|