2014-05-23 22:15:26 +00:00
|
|
|
class Quazip < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "C++ wrapper over Gilles Vollant's ZIP/UNZIP package"
|
2014-05-23 22:15:26 +00:00
|
|
|
homepage "http://quazip.sourceforge.net/"
|
2015-05-08 00:52:11 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/quazip/quazip/0.7.1/quazip-0.7.1.tar.gz"
|
|
|
|
sha256 "78c984103555c51e6f7ef52e3a2128e2beb9896871b2cc4d4dbd4d64bff132de"
|
2014-05-23 22:15:26 +00:00
|
|
|
|
2014-07-18 23:59:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-08 01:08:50 +00:00
|
|
|
sha256 "d15a12c624d377bd818458635ad078782659f313c223836f1689ed89cca32a63" => :yosemite
|
|
|
|
sha256 "d6ea39c00ad991be78e2b6fdd1d69a5c4079fc85ef6dbdbedab7c8becf77d0c7" => :mavericks
|
|
|
|
sha256 "a6a988cb89a12f6e7c2d5bd8ebe180f40b18f586f3bd1e09a6b881350daee637" => :mountain_lion
|
2014-07-18 23:59:18 +00:00
|
|
|
end
|
|
|
|
|
2014-05-23 22:15:26 +00:00
|
|
|
depends_on "qt"
|
|
|
|
|
|
|
|
def install
|
|
|
|
# On Mavericks we want to target libc++, this requires a unsupported/macx-clang-libc++ flag
|
2015-05-08 00:52:11 +00:00
|
|
|
if ENV.compiler == :clang && MacOS.version >= :mavericks
|
2014-05-23 22:15:26 +00:00
|
|
|
spec = "unsupported/macx-clang-libc++"
|
|
|
|
else
|
|
|
|
spec = "macx-g++"
|
|
|
|
end
|
|
|
|
|
|
|
|
args = %W[
|
|
|
|
-config release -spec #{spec}
|
|
|
|
PREFIX=#{prefix}
|
|
|
|
LIBS+=-L/usr/lib LIBS+=-lz
|
|
|
|
INCLUDEPATH+=/usr/include
|
|
|
|
]
|
|
|
|
|
|
|
|
system "qmake", "quazip.pro", *args
|
|
|
|
system "make", "install"
|
|
|
|
|
|
|
|
cd "qztest" do
|
|
|
|
args = %W[-config release -spec #{spec}]
|
|
|
|
system "qmake", *args
|
|
|
|
system "make"
|
2014-07-18 23:47:28 +00:00
|
|
|
bin.install "qztest"
|
2014-05-23 22:15:26 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-07-18 23:47:28 +00:00
|
|
|
system "#{bin}/qztest"
|
2014-05-23 22:15:26 +00:00
|
|
|
end
|
|
|
|
end
|