extract_url 1.6.1
use "make install" disable dynamic selection of perl Closes #9041. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
4276167ac8
commit
c5c8d86ffc
1 changed files with 31 additions and 20 deletions
|
@ -1,8 +1,8 @@
|
|||
class ExtractUrl < Formula
|
||||
desc "Perl script to extracts URLs from emails or plain text."
|
||||
homepage "http://www.memoryhole.net/~kyle/extract_url/"
|
||||
url "https://github.com/m3m0ryh0l3/extracturl/archive/v1.6.tar.gz"
|
||||
sha256 "2f8fb4c361a02ee0053d2e1791d283e9b202297e4b861d7ff676ac00438ddcaf"
|
||||
url "https://github.com/m3m0ryh0l3/extracturl/archive/v1.6.1.tar.gz"
|
||||
sha256 "6ce3a977477cce6c7c8355500db4ef660d5b22118df6534d3ab022124c62a393"
|
||||
|
||||
bottle do
|
||||
cellar :any_skip_relocation
|
||||
|
@ -14,18 +14,18 @@ class ExtractUrl < Formula
|
|||
end
|
||||
|
||||
resource "MIME::Parser" do
|
||||
url "https://cpan.metacpan.org/authors/id/D/DS/DSKOLL/MIME-tools-5.506.tar.gz"
|
||||
sha256 "dbed9bf46830c4a1df9840a546824ee44d14902012870f0c34bc4f5cc86af812"
|
||||
url "https://cpan.metacpan.org/authors/id/D/DS/DSKOLL/MIME-tools-5.508.tar.gz"
|
||||
sha256 "adffe86cd0b045d5a1553f48e72e89b9834fbda4f334c98215995b98cb17c917"
|
||||
end
|
||||
|
||||
resource "HTML::Parser" do
|
||||
url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTML-Parser-3.71.tar.gz"
|
||||
sha256 "be918b3749d3ff93627f72ee4b825683332ecb4c81c67a3a8d72b0435ffbd802"
|
||||
url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTML-Parser-3.72.tar.gz"
|
||||
sha256 "ec28c7e1d9e67c45eca197077f7cdc41ead1bb4c538c7f02a3296a4bb92f608b"
|
||||
end
|
||||
|
||||
resource "Pod::Usage" do
|
||||
url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Usage-1.67.tar.gz"
|
||||
sha256 "c8be6d29b0dfe304c4ddfcc140f93d4c4de7a8362ea6e2651611c288b53cc68a"
|
||||
url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Usage-1.69.tar.gz"
|
||||
sha256 "1a920c067b3c905b72291a76efcdf1935ba5423ab0187b9a5a63cfc930965132"
|
||||
end
|
||||
|
||||
resource "Env" do
|
||||
|
@ -34,18 +34,18 @@ class ExtractUrl < Formula
|
|||
end
|
||||
|
||||
resource "Getopt::Long" do
|
||||
url "https://cpan.metacpan.org/authors/id/J/JV/JV/Getopt-Long-2.47.tar.gz"
|
||||
sha256 "f5e6633ccda3f56a2df7a29f4187f4c787be4b746d97e9eb4aabd3aec1d9ed7b"
|
||||
url "https://cpan.metacpan.org/authors/id/J/JV/JV/Getopt-Long-2.49.1.tar.gz"
|
||||
sha256 "98fad4235509aa24608d9ef895b5c60fe2acd2bca70ebdf1acaf6824e17a882f"
|
||||
end
|
||||
|
||||
resource "URI::Find" do
|
||||
url "https://cpan.metacpan.org/authors/id/M/MS/MSCHWERN/URI-Find-20140709.tar.gz"
|
||||
sha256 "c0c34c5f7eddacc1c6553099015fe776797f1ec5a70e11e6e8fa68810224ec33"
|
||||
url "https://cpan.metacpan.org/authors/id/M/MS/MSCHWERN/URI-Find-20160806.tar.gz"
|
||||
sha256 "e213a425a51b5f55324211f37909d78749d0bacdea259ba51a9855d0d19663d6"
|
||||
end
|
||||
|
||||
resource "Curses" do
|
||||
url "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.32.tgz"
|
||||
sha256 "5dba44fd7964806d9765e6692bc7eb8eb30aeced2740f28b9a4070a5d14ba650"
|
||||
url "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.36.tar.gz"
|
||||
sha256 "a414795ba031c5918c70279fe534fee594a96ec4b0c78f44ce453090796add64"
|
||||
end
|
||||
|
||||
resource "Curses::UI" do
|
||||
|
@ -53,10 +53,24 @@ class ExtractUrl < Formula
|
|||
sha256 "0ab827a513b6e14403184fb065a8ea1d2ebda122d2178cbf45c781f311240eaf"
|
||||
end
|
||||
|
||||
# Remove for > 1.6.1
|
||||
# Fix test failure "Can't locate sys/ioctl.ph in @INC (did you run h2ph?)"
|
||||
# Upstream commit from 19 Jan 2017 "ioctl.ph is not often installed; do a
|
||||
# better job of loading modules for term size detection"
|
||||
patch do
|
||||
url "https://github.com/m3m0ryh0l3/extracturl/commit/fad68f2.patch"
|
||||
sha256 "cccd76d73afd9e5fbb98a9685dba27c15311671de3cf4388829f43f230b13698"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
|
||||
ENV.prepend_path "PERL5LIB", libexec/"lib"
|
||||
|
||||
# Disable dynamic selection of perl, which may cause "Can't locate
|
||||
# Mail/Header.pm in @INC" if brew perl is picked up. If the missing modules
|
||||
# are added to the formula, mismatched perl will cause segfault instead.
|
||||
inreplace "extract_url.pl", "#!/usr/bin/env perl", "#!/usr/bin/perl"
|
||||
|
||||
%w[MIME::Parser HTML::Parser Pod::Usage Env Getopt::Long Curses Curses::UI].each do |r|
|
||||
resource(r).stage do
|
||||
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
|
||||
|
@ -71,12 +85,9 @@ class ExtractUrl < Formula
|
|||
system "./Build", "install"
|
||||
end
|
||||
|
||||
system "make", "man"
|
||||
|
||||
libexec.install "extract_url.pl"
|
||||
chmod 0755, libexec/"extract_url.pl"
|
||||
(bin/"extract_url").write_env_script("#{libexec}/extract_url.pl", :PERL5LIB => ENV["PERL5LIB"])
|
||||
man1.install "extract_url.1"
|
||||
system "make", "prefix=#{prefix}"
|
||||
system "make", "prefix=#{prefix}", "install"
|
||||
bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"])
|
||||
end
|
||||
|
||||
test do
|
||||
|
|
Loading…
Reference in a new issue