2010-02-02 12:17:29 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libzzip < Formula
|
2010-02-02 12:17:29 +00:00
|
|
|
homepage 'http://sourceforge.net/projects/zziplib/'
|
2012-09-06 14:59:50 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/zziplib/zziplib13/0.13.62/zziplib-0.13.62.tar.bz2'
|
|
|
|
sha1 'cf8b642abd9db618324a1b98cc71492a007cd687'
|
|
|
|
|
|
|
|
option 'sdl', 'Enable SDL usage and create SDL_rwops_zzip.pc'
|
2010-02-02 12:17:29 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-09-06 14:59:50 +00:00
|
|
|
depends_on 'sdl' if build.include? 'sdl'
|
2010-02-02 12:17:29 +00:00
|
|
|
|
2012-08-12 17:56:55 +00:00
|
|
|
option :universal
|
2012-03-24 17:35:42 +00:00
|
|
|
|
2010-02-02 12:17:29 +00:00
|
|
|
def install
|
2012-08-12 17:56:55 +00:00
|
|
|
if build.universal?
|
2012-03-24 17:35:42 +00:00
|
|
|
ENV.universal_binary
|
|
|
|
# See: https://sourceforge.net/tracker/?func=detail&aid=3511669&group_id=6389&atid=356389
|
|
|
|
ENV["ac_cv_sizeof_long"] = "(LONG_BIT/8)"
|
|
|
|
end
|
|
|
|
|
2012-09-06 14:59:50 +00:00
|
|
|
args = %W[
|
|
|
|
--without-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
|
|
|
args << '--enable-sdl' if build.include? 'sdl'
|
|
|
|
system './configure', *args
|
|
|
|
system 'make install'
|
2012-02-15 08:01:15 +00:00
|
|
|
ENV.deparallelize # fails without this when a compressed file isn't ready.
|
2012-09-06 14:59:50 +00:00
|
|
|
system 'make check' # runing this after install bypasses DYLD issues.
|
2010-02-02 12:17:29 +00:00
|
|
|
end
|
|
|
|
end
|