2014-05-23 22:15:26 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Quazip < Formula
|
|
|
|
homepage "http://quazip.sourceforge.net/"
|
2014-08-17 03:19:02 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/quazip/quazip/0.7/quazip-0.7.tar.gz"
|
|
|
|
sha1 "861ab4efc048fdb272161848bb8829848857ec97"
|
2014-05-23 22:15:26 +00:00
|
|
|
|
2014-07-18 23:59:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-08-17 03:25:13 +00:00
|
|
|
sha1 "446a5af6f7cd0d9d480d1ffe935866cebeacea81" => :mavericks
|
|
|
|
sha1 "0558adc8641a1e9a76f2555914a08b5ed1495a13" => :mountain_lion
|
|
|
|
sha1 "2a622f7b99eee61883bbcf5eedc755d34f73730a" => :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
|
|
|
|
if ENV.compiler == :clang and MacOS.version >= :mavericks
|
|
|
|
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
|