2010-02-02 12:17:29 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libzzip < Formula
|
2012-02-15 08:01:15 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/zziplib/zziplib13/0.13.60/zziplib-0.13.60.tar.bz2'
|
2010-02-02 12:17:29 +00:00
|
|
|
homepage 'http://sourceforge.net/projects/zziplib/'
|
2012-02-15 08:01:15 +00:00
|
|
|
sha1 '821ff9a7984ddccb6734e4a753e401e93c7d47ee'
|
2010-02-02 12:17:29 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-02-02 12:17:29 +00:00
|
|
|
|
2012-02-15 08:01:15 +00:00
|
|
|
def patches
|
|
|
|
# Darwin links with libtool, and when the compiler is clang or gcc-4.6, link fails:
|
|
|
|
# clang: error: unsupported option '--export-dynamic'
|
|
|
|
# Reported upstream and patch submitted.
|
|
|
|
# https://sourceforge.net/tracker/?func=detail&aid=3496704&group_id=6389&atid=306389
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2010-02-02 12:17:29 +00:00
|
|
|
def install
|
2010-07-25 19:33:55 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
|
2010-02-02 12:17:29 +00:00
|
|
|
system "make install"
|
2012-02-15 08:01:15 +00:00
|
|
|
ENV.deparallelize # fails without this when a compressed file isn't ready.
|
|
|
|
system "make check" # runing this after install bypasses DYLD issues.
|
2010-02-02 12:17:29 +00:00
|
|
|
end
|
|
|
|
end
|
2012-02-15 08:01:15 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/configure 2010-12-29 08:07:16.000000000 -0800
|
|
|
|
+++ b/configure 2012-03-03 20:28:28.000000000 -0800
|
|
|
|
@@ -13715,10 +13715,17 @@
|
|
|
|
ZZIPLIB_LDFLAGS=""
|
|
|
|
test ".$can_build_shared" != ".no" && ZZIPLIB_LDFLAGS="--export-dynamic"
|
|
|
|
RESOLVES=" # "
|
|
|
|
-case "$host_os" in mingw*)
|
|
|
|
+case "$host_os" in
|
|
|
|
+ mingw*)
|
|
|
|
ZZIPLIB_LDFLAGS="-no-undefined -export-all-symbols -mconsole"
|
|
|
|
RESOLVES=' '
|
|
|
|
-;; esac
|
|
|
|
+ ;;
|
|
|
|
+ # Darwin links with libtool, and when the compiler is clang or gcc-4.6,
|
|
|
|
+ # clang: error: unsupported option '--export-dynamic'
|
|
|
|
+ darwin*)
|
|
|
|
+ ZZIPLIB_LDFLAGS="-export-dynamic"
|
|
|
|
+ ;;
|
|
|
|
+esac
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZZIPLIB_LDFLAGS $RESOLVES" >&5
|
|
|
|
$as_echo "$ZZIPLIB_LDFLAGS $RESOLVES" >&6; }
|
|
|
|
|