Files

43 lines
1.5 KiB
Ruby

class Libtommath < Formula
bottle do
root_url "https://homebrew.mirror.ygg/bottles"
sha256 cellar: :any, arm64_sequoia: "180de0f47bf4ce7ec3a513db509d368e148b42e50cf310666bf9c60a78cf778b"
sha256 cellar: :any, arm64_tahoe: "fe707123e6ec8488bae4013ce49404a63b00dc6c1c11b12202e25f53a62ef586"
sha256 cellar: :any_skip_relocation, x86_64_linux: "a7023ad5964a1ccfbbbe850cb0979ffa220a65177efd87e0bb751bcf5a3832ba"
end
desc "C library for number theoretic multiple-precision integers"
homepage "https://www.libtom.net/LibTomMath/"
url "https://github.com/libtom/libtommath/releases/download/v1.3.0/ltm-1.3.0.tar.xz"
sha256 "296272d93435991308eb73607600c034b558807a07e829e751142e65ccfa9d08"
license "Unlicense"
compatibility_version 1
head "https://github.com/libtom/libtommath.git", branch: "develop"
depends_on "libtool" => :build
# Fixes mp_set_double being missing on macOS.
# This is needed by some dependents in homebrew-core.
# NOTE: This patch has been merged upstream but we take a backport
# from a fork due to file name differences between 1.2.0 and master.
# Remove with the next version.
patch do
url "https://github.com/MoarVM/libtommath/commit/db0d387b808d557bd408a6a253c5bf3a688ef274.patch?full_index=1"
sha256 "e5eef1762dd3e92125e36034afa72552d77f066eaa19a0fd03cd4f1a656f9ab0"
type :unofficial
end
def install
ENV["PREFIX"] = prefix
system "make", "-f", "makefile.shared", "install"
system "make", "test"
pkgshare.install "test"
end
test do
system pkgshare/"test"
end
end