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/'
|
2014-03-11 23:47:17 +00:00
|
|
|
url 'http://download.zeromq.org/zeromq-4.0.4.tar.gz'
|
|
|
|
sha1 '2328014e5990efac31390439b75c5528e38e4490'
|
2012-07-30 20:04:29 +00:00
|
|
|
|
2013-09-22 01:47:56 +00:00
|
|
|
head do
|
|
|
|
url 'https://github.com/zeromq/libzmq.git'
|
|
|
|
|
2013-11-13 17:01:29 +00:00
|
|
|
depends_on :autoconf
|
2013-09-22 01:47:56 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
|
|
|
end
|
|
|
|
|
2010-03-25 04:45:05 +00:00
|
|
|
|
2013-05-21 01:31:17 +00:00
|
|
|
option :universal
|
|
|
|
option 'with-pgm', 'Build with PGM extension'
|
|
|
|
|
2012-08-19 16:51:41 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2014-03-06 20:40:26 +00:00
|
|
|
depends_on 'libpgm' if build.with? "pgm"
|
2013-10-10 16:35:12 +00:00
|
|
|
depends_on 'libsodium' => :optional
|
2012-08-19 16:51:41 +00:00
|
|
|
|
2012-12-20 19:23:31 +00:00
|
|
|
def install
|
|
|
|
ENV.universal_binary if build.universal?
|
2010-09-30 08:20:45 +00:00
|
|
|
|
2012-08-19 16:51:41 +00:00
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
2014-03-06 20:40:26 +00:00
|
|
|
if build.with? "pgm"
|
2012-08-19 16:51:41 +00:00
|
|
|
# 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
|
|
|
|
|
2013-10-10 16:35:12 +00:00
|
|
|
args << "--with-libsodium" if build.with? 'libsodium'
|
|
|
|
|
2012-07-30 20:01:46 +00:00
|
|
|
system "./autogen.sh" if build.head?
|
2012-12-20 19:23:31 +00:00
|
|
|
system "./configure", *args
|
2011-03-31 06:36:46 +00:00
|
|
|
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
|
2010-09-30 08:20:45 +00:00
|
|
|
To install the zmq gem on 10.6 with the system Ruby on a 64-bit machine,
|
|
|
|
you may need to do:
|
2011-09-01 12:06:19 +00:00
|
|
|
|
2013-05-21 01:31:17 +00:00
|
|
|
ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=#{opt_prefix}
|
2010-09-09 20:17:14 +00:00
|
|
|
EOS
|
|
|
|
end
|
2011-03-10 05:11:03 +00:00
|
|
|
end
|