homebrew-core/Formula/file-formula.rb
2017-05-23 22:19:44 -07:00

59 lines
1.8 KiB
Ruby

# "File" is a reserved class name
class FileFormula < Formula
desc "Utility to determine file types"
homepage "https://www.darwinsys.com/file/"
url "ftp://ftp.astron.com/pub/file/file-5.31.tar.gz"
mirror "https://fossies.org/linux/misc/file-5.31.tar.gz"
sha256 "09c588dac9cff4baa054f51a36141793bcf64926edc909594111ceae60fce4ee"
head "https://github.com/file/file.git"
bottle do
cellar :any
sha256 "94defeca333534a5c8029c96f82a8a51f6b6d8d2e38d7a14b55146ecb84bc7f1" => :sierra
sha256 "461106ebaea7f18af0bf9aafdac131f901038f8b04d595e32bc050eafaa43731" => :el_capitan
sha256 "a9600f214a411f73615c432268c4aa76ab318e39835f8c3e20288cd746307888" => :yosemite
end
keg_only :provided_by_osx
depends_on "libmagic"
patch :DATA
def install
ENV.prepend "LDFLAGS", "-L#{Formula["libmagic"].opt_lib} -lmagic"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install-exec"
system "make", "-C", "doc", "install-man1"
rm_r lib
end
test do
system "#{bin}/file", test_fixtures("test.mp3")
end
end
__END__
diff --git a/src/Makefile.in b/src/Makefile.in
index b6eeb20..4a7ae91 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -150,7 +150,6 @@ libmagic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
PROGRAMS = $(bin_PROGRAMS)
am_file_OBJECTS = file.$(OBJEXT)
file_OBJECTS = $(am_file_OBJECTS)
-file_DEPENDENCIES = libmagic.la
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -352,7 +351,7 @@ libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0
@MINGW_TRUE@MINGWLIBS = -lgnurx -lshlwapi
libmagic_la_LIBADD = $(LTLIBOBJS) $(MINGWLIBS)
file_SOURCES = file.c
-file_LDADD = libmagic.la
+file_LDADD = $(LDADD)
CLEANFILES = magic.h
EXTRA_DIST = magic.h.in
HDR = $(top_srcdir)/src/magic.h.in