2009-12-20 22:42:33 +00:00
|
|
|
class Libmagic < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Implementation of the file(1) command"
|
2014-12-27 16:09:30 +00:00
|
|
|
homepage "http://www.darwinsys.com/file/"
|
2015-06-14 00:54:53 +00:00
|
|
|
url "ftp://ftp.astron.com/pub/file/file-5.23.tar.gz"
|
|
|
|
mirror "https://fossies.org/unix/misc/file-5.23.tar.gz"
|
|
|
|
sha256 "2c8ab3ff143e2cdfb5ecee381752f80a79e0b4cfe9ca4cc6e1c3e5ec15e6157c"
|
2009-12-20 22:42:33 +00:00
|
|
|
|
2014-02-24 15:11:24 +00:00
|
|
|
bottle do
|
2015-06-14 01:47:50 +00:00
|
|
|
sha256 "59bb0f198492cab776647823b467b60a25c851fe5f03c06de15dfec008c38827" => :yosemite
|
|
|
|
sha256 "073b5db84f8b641c0e6d2f8ff8caca751e42e8cfc0c31d60ec42863e3afd4ea4" => :mavericks
|
|
|
|
sha256 "a613459fd15e1a648ecc9179e398ee1de76ea56d72fcfc902fd441683b1ea8b3" => :mountain_lion
|
2014-02-24 15:11:24 +00:00
|
|
|
end
|
|
|
|
|
2013-05-20 17:50:44 +00:00
|
|
|
option :universal
|
|
|
|
|
2013-06-13 16:10:04 +00:00
|
|
|
depends_on :python => :optional
|
|
|
|
|
2009-12-20 22:42:33 +00:00
|
|
|
def install
|
2013-05-20 17:50:44 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
|
|
|
|
2014-02-25 15:39:33 +00:00
|
|
|
# Clean up "src/magic.h" as per http://bugs.gw.com/view.php?id=330
|
|
|
|
rm "src/magic.h"
|
|
|
|
|
2012-02-15 07:21:57 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2015-04-12 00:49:42 +00:00
|
|
|
"--disable-silent-rules",
|
2012-02-15 07:21:57 +00:00
|
|
|
"--prefix=#{prefix}",
|
2015-03-05 22:02:26 +00:00
|
|
|
"--enable-fsect-man5",
|
|
|
|
"--enable-static"
|
2014-12-27 16:09:30 +00:00
|
|
|
system "make", "install"
|
2015-04-12 00:49:42 +00:00
|
|
|
(share+"misc/magic").install Dir["magic/Magdir/*"]
|
2011-09-02 11:31:58 +00:00
|
|
|
|
2015-01-12 03:03:35 +00:00
|
|
|
if build.with? "python"
|
|
|
|
cd "python" do
|
|
|
|
system "python", *Language::Python.setup_install_args(prefix)
|
|
|
|
end
|
2013-06-13 16:10:04 +00:00
|
|
|
end
|
|
|
|
|
2014-12-27 20:07:24 +00:00
|
|
|
# Don't dupe this system utility
|
2011-09-02 11:31:58 +00:00
|
|
|
rm bin/"file"
|
|
|
|
rm man1/"file.1"
|
2009-12-20 22:42:33 +00:00
|
|
|
end
|
|
|
|
end
|