perl 5.28.0
- work around DYLD_LIBRARY_PATH problem with a symlink - run `make test` while bottling - re-enable option to run `make test` on El Capitan and later (was already enabled on prior versions), but make it opt-in - remove unneeded clock_gettime fix for 10.11
This commit is contained in:
parent
df59f5cf5f
commit
bec585afe4
2 changed files with 14 additions and 22 deletions
|
@ -1,8 +1,8 @@
|
|||
class Perl < Formula
|
||||
desc "Highly capable, feature-rich programming language"
|
||||
homepage "https://www.perl.org/"
|
||||
url "https://www.cpan.org/src/5.0/perl-5.26.2.tar.xz"
|
||||
sha256 "0f8c0fb1b0db4681adb75c3ba0dd77a0472b1b359b9e80efd79fc27b4352132c"
|
||||
url "https://www.cpan.org/src/5.0/perl-5.28.0.tar.xz"
|
||||
sha256 "059b3cb69970d8c8c5964caced0335b4af34ac990c8e61f7e3f90cd1c2d11e49"
|
||||
head "https://perl5.git.perl.org/perl.git", :branch => "blead"
|
||||
|
||||
bottle do
|
||||
|
@ -12,25 +12,12 @@ class Perl < Formula
|
|||
end
|
||||
|
||||
option "with-dtrace", "Build with DTrace probes"
|
||||
option "without-test", "Skip running the build test suite"
|
||||
option "with-test", "Run build-time tests"
|
||||
|
||||
# Prevent site_perl directories from being removed
|
||||
skip_clean "lib/perl5/site_perl"
|
||||
|
||||
def install
|
||||
if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
|
||||
%w[cpan/IPC-Cmd/lib/IPC/Cmd.pm dist/Time-HiRes/Changes
|
||||
dist/Time-HiRes/HiRes.pm dist/Time-HiRes/HiRes.xs
|
||||
dist/Time-HiRes/Makefile.PL dist/Time-HiRes/fallback/const-c.inc
|
||||
dist/Time-HiRes/t/clock.t pod/perl588delta.pod
|
||||
pod/perlperf.pod].each do |f|
|
||||
inreplace f do |s|
|
||||
s.gsub! "clock_gettime", "perl_clock_gettime"
|
||||
s.gsub! "clock_getres", "perl_clock_getres", false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
args = %W[
|
||||
-des
|
||||
-Dprefix=#{prefix}
|
||||
|
@ -50,15 +37,20 @@ class Perl < Formula
|
|||
args << "-Dusedevel" if build.head?
|
||||
|
||||
system "./Configure", *args
|
||||
system "make"
|
||||
|
||||
# OS X El Capitan's SIP feature prevents DYLD_LIBRARY_PATH from being
|
||||
# passed to child processes, which causes the make test step to fail.
|
||||
# macOS's SIP feature prevents DYLD_LIBRARY_PATH from being passed to child
|
||||
# processes, which causes the `make test` step to fail.
|
||||
# https://rt.perl.org/Ticket/Display.html?id=126706
|
||||
# https://github.com/Homebrew/legacy-homebrew/issues/41716
|
||||
if MacOS.version < :el_capitan
|
||||
system "make", "test" if build.with? "test"
|
||||
end
|
||||
# As of perl 5.28.0 `make` fails, too, so work around it with a symlink.
|
||||
# Reported 25 Jun 2018 https://rt.perl.org/Ticket/Display.html?id=133306
|
||||
(lib/"perl5/#{version}/darwin-thread-multi-2level/CORE").install_symlink buildpath/"libperl.dylib"
|
||||
|
||||
system "make"
|
||||
system "make", "test" if build.with?("test") || build.bottle?
|
||||
|
||||
# Remove the symlink so the library actually gets installed.
|
||||
rm lib/"perl5/#{version}/darwin-thread-multi-2level/CORE/libperl.dylib"
|
||||
|
||||
system "make", "install"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue