59 lines
1.9 KiB
Ruby
59 lines
1.9 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.33.tar.gz"
|
|
mirror "https://fossies.org/linux/misc/file-5.33.tar.gz"
|
|
sha256 "1c52c8c3d271cd898d5511c36a68059cda94036111ab293f01f83c3525b737c6"
|
|
head "https://github.com/file/file.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "41eb8793256fe3b2b9a08ef9afd9b22d17ffe76f9951dfd968c06779476cf322" => :high_sierra
|
|
sha256 "1f923e0a09989ede49310a531b5aa0974895498c6f8aaf56eec81947868bf5e6" => :sierra
|
|
sha256 "3a15075da883b5a538756d2b3ae8f853853132ea9c88634ce2b3f69a30bca6d1" => :el_capitan
|
|
end
|
|
|
|
keg_only :provided_by_macos
|
|
|
|
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 c096c71..583a0ba 100644
|
|
--- a/src/Makefile.in
|
|
+++ b/src/Makefile.in
|
|
@@ -115,7 +115,6 @@ libmagic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
|
PROGRAMS = $(bin_PROGRAMS)
|
|
am_file_OBJECTS = file.$(OBJEXT) seccomp.$(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
|
|
@@ -311,7 +310,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 seccomp.c
|
|
-file_LDADD = libmagic.la
|
|
+file_LDADD = $(LDADD)
|
|
CLEANFILES = magic.h
|
|
EXTRA_DIST = magic.h.in
|
|
HDR = $(top_srcdir)/src/magic.h.in
|