37 lines
1.3 KiB
Ruby
37 lines
1.3 KiB
Ruby
class Sysbench < Formula
|
|
desc "System performance benchmark tool"
|
|
homepage "https://github.com/akopytov/sysbench"
|
|
url "https://github.com/akopytov/sysbench/archive/1.0.19.tar.gz"
|
|
sha256 "39cde56b58754d97b2fe6a1688ffc0e888d80c262cf66daee19acfb2997f9bdd"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "6b71a2ae66e021e31ac79c3924fffeec0dffa9f3aeeea073cc47005bd1ef2c4f" => :catalina
|
|
sha256 "ae9b590957ecca03a87614dfb0cf8ba70d0645d2b105cd259955b5353858ab45" => :mojave
|
|
sha256 "793f35c8eb8db96af5f54d8fdda7590cfb6c592b0d3f2cd384e74ff75c5f4fdc" => :high_sierra
|
|
end
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "mysql-client"
|
|
depends_on "openssl@1.1"
|
|
|
|
def install
|
|
system "./autogen.sh"
|
|
|
|
# Fix for luajit build breakage.
|
|
# Per https://luajit.org/install.html: If MACOSX_DEPLOYMENT_TARGET
|
|
# is not set then it's forced to 10.4, which breaks compile on Mojave.
|
|
# https://github.com/LuaJIT/LuaJIT/issues/518: set to 10.14 to build on Catalina.
|
|
ENV["MACOSX_DEPLOYMENT_TARGET"] = (DevelopmentTools.clang_build_version >= 1100) ? "10.14" : MacOS.version
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--with-mysql"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/sysbench", "--test=cpu", "--cpu-max-prime=1", "run"
|
|
end
|
|
end
|