diff options
| author | nibbles 2bits | 2012-08-19 09:51:41 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-22 20:56:56 -0700 |
| commit | c812469310cafb5062cb9ab70525a4b6b549ede0 (patch) | |
| tree | 94b003de9c050ec61f8b633b8fd59b9cf542a872 /Library | |
| parent | 96c9c40c37e4d9ac0d89787922d95a80e1f108d6 (diff) | |
| download | homebrew-c812469310cafb5062cb9ab70525a4b6b549ede0.tar.bz2 | |
zeromq: fix errors, use external libpgm, add devel
zeromq gets a makeover to fix build errors and to offer the devel
version. This has been tested with clang and llvm from XCode-4.4.1.
* Add a devel block
* Add a dep on libpgm, a new formula. The internal libpgm is b0rked
* Add a `do_config` function that gets run for devel or head builds.
* Add ENV.universal_binary for devel and head, it works.
* Add conditionals so that the manual lipo to UB is only for stable
Fixes #14210
Closes #14292.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/zeromq.rb | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/Library/Formula/zeromq.rb b/Library/Formula/zeromq.rb index 421552e49..56ea1b7cc 100644 --- a/Library/Formula/zeromq.rb +++ b/Library/Formula/zeromq.rb @@ -1,7 +1,7 @@ require 'formula' def pgm_flags - return ARGV.include?('--with-pgm') ? "--with-pgm" : "" + return build.include? '--with-pgm' ? '--with-system-pgm' : '' end class Zeromq < Formula @@ -11,6 +11,14 @@ class Zeromq < Formula head 'https://github.com/zeromq/libzmq.git' + devel do + url 'http://download.zeromq.org/zeromq-3.2.0-rc1.tar.gz' + sha1 '1a5195a61150c0a653798e5babde70f473a8a3b0' + end + + depends_on 'pkg-config' => :build + depends_on 'libpgm' if build.include? 'with-pgm' + if build.head? depends_on :automake depends_on :libtool @@ -24,6 +32,7 @@ class Zeromq < Formula option :universal option 'with-pgm', 'Build with PGM extension' + # This can be removed at stable >= 3.2.0 because ENV.universal_binary works. def build_fat # make 32-bit system "CFLAGS=\"$CFLAGS -arch i386\" CXXFLAGS=\"$CXXFLAGS -arch i386\" ./configure --disable-dependency-tracking --prefix='#{prefix}' #{pgm_flags}" @@ -42,15 +51,29 @@ class Zeromq < Formula "-output", "src/.libs/libzmq.1.dylib" end + def do_config + args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] + if build.include? 'with-pgm' + # Use HB libpgm-5.2 because their internal 5.1 is b0rked. + ENV['OpenPGM_CFLAGS'] = %x[pkg-config --cflags openpgm-5.2].chomp + ENV['OpenPGM_LIBS'] = %x[pkg-config --libs openpgm-5.2].chomp + args << "--with-system-pgm" + end + system "./configure", *args + end + def install system "./autogen.sh" if build.head? - if ARGV.build_universal? - build_fat + if build.universal? + if build.devel? or build.head? + ENV.universal_binary + do_config + else + build_fat + end else - args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] - args << "--with-pgm" if build.include? 'with-pgm' - system "./configure", *args + do_config end system "make" |
