Skip to content

Commit

Permalink
innotop: fix build on 10.15+
Browse files Browse the repository at this point in the history
The TermReadKey perl package fails to build due to a restriction
apple added on dealing with .bundle files by their relative path
name.  This was diagnosed in 2019 by fink and I am adapting
a workaround that @TheSin- proposed then:
  fink/fink-distributions#461 (comment)

Also:
- bump the sub-resources to their most recent versions while here
- build failed until I added Devel::CheckLib too

Closes #66699.

Signed-off-by: chenrui <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
mitchblank authored and BrewTestBot committed Dec 12, 2020
1 parent 7ecf564 commit fb378a0
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Formula/innotop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Innotop < Formula
homepage "https://github.com/innotop/innotop/"
url "https://github.com/innotop/innotop/archive/v1.12.0.tar.gz"
sha256 "f56d51b2c33a9c03f1b9d4fc5f7480f1c2104ef1e8f04def84a16f35d0bc42f6"
license "GPL-2.0"
revision 2
license any_of: ["GPL-2.0-only", "Artistic-1.0-Perl"]
revision 3
head "https://github.com/innotop/innotop.git"

bottle do
Expand All @@ -17,26 +17,36 @@ class Innotop < Formula
depends_on "mysql-client"
depends_on "[email protected]"

resource "Devel::CheckLib" do
url "https://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-1.14.tar.gz"
sha256 "f21c5e299ad3ce0fdc0cb0f41378dca85a70e8d6c9a7599f0e56a957200ec294"
end

resource "DBI" do
url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.636.tar.gz"
sha256 "8f7ddce97c04b4b7a000e65e5d05f679c964d62c8b02c94c1a7d815bb2dd676c"
url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.643.tar.gz"
sha256 "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa"
end

resource "DBD::mysql" do
url "https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.046.tar.gz"
sha256 "6165652ec959d05b97f5413fa3dff014b78a44cf6de21ae87283b28378daf1f7"
url "https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz"
sha256 "4f48541ff15a0a7405f76adc10f81627c33996fbf56c95c26c094444c0928d78"
end

resource "TermReadKey" do
url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz"
sha256 "4a9383cf2e0e0194668fe2bd546e894ffad41d556b41d2f2f577c8db682db241"
url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz"
sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290"
end

def install
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
resources.each do |r|
r.stage do
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
# Work around restriction on 10.15+ where .bundle files cannot be loaded
# from a relative path -- while in the middle of our build we need to
# refer to them by their full path. Workaround adapted from:
# https://github.com/fink/fink-distributions/issues/461#issuecomment-563331868
inreplace "Makefile", "blib/", "$(shell pwd)/blib/" if r.name == "TermReadKey"
system "make", "install"
end
end
Expand Down

0 comments on commit fb378a0

Please sign in to comment.