Skip to content

Instantly share code, notes, and snippets.

@umireon
Last active December 31, 2016 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umireon/4dbe4adbb2849be612f2d0b7dfd1d019 to your computer and use it in GitHub Desktop.
Save umireon/4dbe4adbb2849be612f2d0b7dfd1d019 to your computer and use it in GitHub Desktop.
class Afflib < Formula
desc "Advanced Forensic Format"
homepage "https://github.com/sshock/AFFLIBv3"
url "https://github.com/sshock/AFFLIBv3/archive/v3.7.14.tar.gz"
sha256 "2d09340e94a72e0d62c6fdc92d6d86a70770229bee5719caca83b532638864a1"
bottle do
cellar :any
sha256 "26f676d4afb7ef30a36b72af253aa6dc04bcafbc37682057c3e3922766ac4b55" => :sierra
sha256 "723ac0e170f6ec96da14869c54ca7260c50a7bf28334c88371a171a355226f75" => :el_capitan
sha256 "dd8f5e6ffcc205bd1ae5076d8d790ee546369cba74069f6cc3313ab028ecc456" => :yosemite
end
option "without-python", "Build without python 2 support"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "openssl"
depends_on :python if MacOS.version <= :snow_leopard
depends_on :python3 => :optional
depends_on :osxfuse => :optional
patch do
url "https://github.com/sshock/AFFLIBv3/pull/21.diff"
sha256 "631660e65abe813ac2686a2e2f1cb0bc9cc741156bdac57f344b0e758004b0cf"
end
def install
args = ["--enable-s3", "--enable-python"]
if build.with? "osxfuse"
args << "--enable-fuse"
else
args << "--disable-fuse"
end
system "autoreconf", "-fiv"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
*args
system "make", "install"
system "make", "install", "PYTHON=python3" if build.with? "python3"
end
test do
system "#{bin}/affcat", "-v"
Language::Python.each_python(build) do |python, _|
system python, "-c", "import pyaff"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment