Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edirect 22.4 #1824

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 14 additions & 47 deletions Formula/edirect.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Edirect < Formula
desc "Access NCBI databases via the command-line"
homepage "https://www.ncbi.nlm.nih.gov/books/NBK179288/"
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/edirect.tar.gz"
version "22.1"
sha256 "28d9cc2d353323375a2102e9031e229943d1f1f975f140d0815db3e5a111f235"
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.4.20240812/edirect-22.4.20240812.tar.gz"
version "22.4"
sha256 "3320e0b0859b85ecd21248323c792d671bfed8c9c60b1f414a3e0e3c648d8681"

bottle do
root_url "https://ghcr.io/v2/brewsci/bio"
Expand All @@ -13,51 +13,13 @@ class Edirect < Formula
end

depends_on "cpanminus" => :build
depends_on "openssl"
depends_on "go" => :build
depends_on "openssl@3"

uses_from_macos "expat"
uses_from_macos "perl"
uses_from_macos "zlib"

# macOS CIRCLE-CI often fails on https accesses. Use ftp accesses.
resource "xtract" do
if OS.mac? && Hardware::CPU.arm?
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/xtract.Silicon.gz"
sha256 "7c841d4e2aeaf4e095ca721d2a6266422580c8fdfc5f9f33b5c55d3c8d9ca543"
elsif OS.mac?
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/xtract.Darwin.gz"
sha256 "394d2af9fe4b5595907b7cce70dd2f2f0a92a6975bb8b1502a7cdeeecbb1cfa2"
else
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/xtract.Linux.gz"
sha256 "1e97ecfda18e45311c14b1628a097443a0079013ab16da47548d4da696063152"
end
end

resource "rchive" do
if OS.mac? && Hardware::CPU.arm?
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/rchive.Silicon.gz"
sha256 "b1035e3ebf0e123303ce58f98ec17395348a3e000844a01223b3734a157ac372"
elsif OS.mac?
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/rchive.Darwin.gz"
sha256 "8fd39230d9c9dcd5c3d263201b04b065fbacf09e77e2e75000aaed38ce8f88f5"
else
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/rchive.Linux.gz"
sha256 "4a0af7405d6fc1da52ec554f4906ad6004d9662316852dd0e5816b3c0f519d5b"
end
end

resource "transmute" do
if OS.mac? && Hardware::CPU.arm?
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/transmute.Silicon.gz"
sha256 "031822fede0e89beed8f7041c973ce4af1232e377341697bb6a6501c2dbca779"
elsif OS.mac?
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/transmute.Darwin.gz"
sha256 "3dd7724b97a69f12205cbe3b09358d57f3224aadf789251f50b60ed8f3c964df"
else
url "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.1.20240517/transmute.Linux.gz"
sha256 "295e369d2ab42c62ea289e698513a468a456a67ea6360bb9d7474aa6e1f006c8"
end
end

def install
rm %w[Mozilla-CA.tar.gz]
rm Dir["*.go"]
Expand All @@ -83,12 +45,17 @@ def install
name = File.basename script
(bin/name).write_env_script(script, PERL5LIB: ENV["PERL5LIB"])
end
bin.install resource("xtract")
bin.install resource("rchive")

cd "#{libexec}/cmd" do
system "./build.sh", bin
end
cd "#{libexec}/extern" do
system "./build.sh", bin
end
end

test do
%w[efetch esearch einfo efilter epost elink].each do |exe|
%w[efetch esearch einfo efilter epost elink xtract transmute rchive].each do |exe|
assert_match version.to_s, shell_output("#{bin}/#{exe} -version")
end
# CIRCLE-CI MacOS often fails on https accesses
Expand Down