homebrew-core/Formula/zeromq.rb

54 lines
1.4 KiB
Ruby
Raw Normal View History

2010-03-25 04:45:05 +00:00
require 'formula'
2011-03-10 05:11:03 +00:00
class Zeromq < Formula
2010-03-25 04:45:05 +00:00
homepage 'http://www.zeromq.org/'
url 'http://download.zeromq.org/zeromq-3.2.2.tar.gz'
sha1 '0e8734c773b6a757b474c16fc3c517993ba47283'
2012-07-30 20:04:29 +00:00
head 'https://github.com/zeromq/libzmq.git'
2010-03-25 04:45:05 +00:00
depends_on 'pkg-config' => :build
depends_on 'libpgm' if build.include? 'with-pgm'
2012-07-30 20:01:46 +00:00
if build.head?
2012-07-07 18:08:22 +00:00
depends_on :automake
depends_on :libtool
end
fails_with :llvm do
build 2326
cause "Segfault while linking"
end
2012-07-30 20:01:46 +00:00
option :universal
option 'with-pgm', 'Build with PGM extension'
def install
ENV.universal_binary if build.universal?
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
2012-07-30 20:01:46 +00:00
system "./autogen.sh" if build.head?
system "./configure", *args
system "make"
2010-03-25 04:45:05 +00:00
system "make install"
end
2010-09-09 20:17:14 +00:00
def caveats; <<-EOS.undent
To install the zmq gem on 10.6 with the system Ruby on a 64-bit machine,
you may need to do:
ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=#{HOMEBREW_PREFIX}
2010-11-12 15:43:28 +00:00
If you want to build the Java bindings from https://github.com/zeromq/jzmq
you will need the Java Developer Package from http://connect.apple.com/
2010-09-09 20:17:14 +00:00
EOS
end
2011-03-10 05:11:03 +00:00
end