aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorNibbles 2bits2012-02-15 00:01:15 -0800
committerJack Nagel2012-03-04 22:01:07 -0600
commit71a53dc415efd35d70ff0526db3148e4f3fc0816 (patch)
tree4bbe31e2377c6f6f351ee6961916c2115573aa0c /Library
parent529e948c84bd71b5c3af5176f89f9efe858ef670 (diff)
downloadhomebrew-71a53dc415efd35d70ff0526db3148e4f3fc0816.tar.bz2
libzzip 0.13.60
- Fix link error with clang Fix a link error with clang & libtool. Configure chooses --export-dynamic but that flag doesn't normally start with two dashes, only one. There are no overrides or switches available for that. The fix is an inline patch for configure, adding the compiler case for darwin*) to set ZZIPLIB_LDFLAGS="-export-dynamic". Add the inline patch and bug report url to the formula. Add the 2sec make check for this compression library. Checks on Lion 10.7.3 and SL 10.6.8 with all five compilers from the 4.3 CLT and XCode-4.0.2 (4D502). Closes #10672. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libzzip.rb38
1 files changed, 36 insertions, 2 deletions
diff --git a/Library/Formula/libzzip.rb b/Library/Formula/libzzip.rb
index a10aa081d..2d98fb6b8 100644
--- a/Library/Formula/libzzip.rb
+++ b/Library/Formula/libzzip.rb
@@ -1,14 +1,48 @@
require 'formula'
class Libzzip < Formula
- url 'http://downloads.sourceforge.net/project/zziplib/zziplib13/0.13.57/zziplib-0.13.57.tar.bz2'
+ url 'http://downloads.sourceforge.net/project/zziplib/zziplib13/0.13.60/zziplib-0.13.60.tar.bz2'
homepage 'http://sourceforge.net/projects/zziplib/'
- md5 '7ebb644bbd880b130435ce6dcbd3cdd3'
+ sha1 '821ff9a7984ddccb6734e4a753e401e93c7d47ee'
depends_on 'pkg-config' => :build
+ 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
+
def install
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make install"
+ ENV.deparallelize # fails without this when a compressed file isn't ready.
+ system "make check" # runing this after install bypasses DYLD issues.
end
end
+
+__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; }
+