diff options
| author | Larry Shaffer | 2013-12-29 14:16:14 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2013-12-29 14:16:14 +0000 |
| commit | cbb0a12f484c3f9df43e527745399d8fa68c6a8f (patch) | |
| tree | 5a92dc3efb04fa4aa61a8f8d54ac7e81467ca47a /Library | |
| parent | 94081a3637ff4fdfcf117b61764eb805f945fde8 (diff) | |
| download | homebrew-cbb0a12f484c3f9df43e527745399d8fa68c6a8f.tar.bz2 | |
minizip 1.2.8
Built from zlib.
Closes #24281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/minizip.rb | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Library/Formula/minizip.rb b/Library/Formula/minizip.rb new file mode 100644 index 000000000..a99418c5d --- /dev/null +++ b/Library/Formula/minizip.rb @@ -0,0 +1,64 @@ +require 'formula' + +class Minizip < Formula + homepage 'http://www.winimage.com/zLibDll/minizip.html' + url 'http://zlib.net/zlib-1.2.8.tar.gz' + sha1 'a4d316c404ff54ca545ea71a27af7dbc29817088' + + # version for minizip, not zlib + version '1.1' + + option :universal + + depends_on :autoconf => :build + depends_on :automake => :build + depends_on :libtool => :build + + def patches + # configure script fails to detect the right compiler when "cc" is + # clang, not gcc. + # see: https://github.com/Homebrew/homebrew-dupes/pull/228 + # https://github.com/madler/zlib/pull/54 + DATA + end + + def install + ENV.universal_binary if build.universal? + system './configure', "--prefix=#{prefix}" + system 'make' + + cd 'contrib/minizip' do + # edits to statically link to libz.a + inreplace 'Makefile.am' do |s| + s.sub! '-L$(zlib_top_builddir)', '$(zlib_top_builddir)/libz.a' + s.sub! '-version-info 1:0:0 -lz', '-version-info 1:0:0' + s.sub! 'libminizip.la -lz', 'libminizip.la' + end + system 'autoreconf', '-fi' + system './configure', "--prefix=#{prefix}" + system 'make install' + end + + end + + def caveats + <<-EOS.undent + Minizip headers installed in 'minizip' subdirectory, since they conflict + with the venerable 'unzip' library. + EOS + end +end + +__END__ +diff --git a/configure b/configure +index b77a8a8..54f33f7 100755 +--- a/configure ++++ b/configure +@@ -159,6 +159,7 @@ case "$cc" in + esac + case `$cc -v 2>&1` in + *gcc*) gcc=1 ;; ++ *clang*) gcc=1 ;; + esac + + show $cc -c $test.c |
