41 lines
972 B
Ruby
41 lines
972 B
Ruby
|
require "formula"
|
||
|
|
||
|
class Quazip < Formula
|
||
|
homepage "http://quazip.sourceforge.net/"
|
||
|
url "https://downloads.sourceforge.net/project/quazip/quazip/0.6.2/quazip-0.6.2.tar.gz"
|
||
|
sha1 "2fdcd063df645f94f047374d7d540b102fc683dc"
|
||
|
|
||
|
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"
|
||
|
libexec.install "qztest"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
ENV["DYLD_LIBRARY_PATH"] = "#{lib}"
|
||
|
system "#{libexec}/qztest"
|
||
|
end
|
||
|
end
|