2013-09-17 18:35:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Nanomsg < Formula
|
|
|
|
homepage 'http://nanomsg.org'
|
2014-06-14 11:14:36 +00:00
|
|
|
url 'http://download.nanomsg.org/nanomsg-0.4-beta.tar.gz'
|
|
|
|
sha1 'a511f19f8574875e8e43f7ba27f7951f67fbe161'
|
2013-09-17 18:35:50 +00:00
|
|
|
|
2013-09-22 01:47:31 +00:00
|
|
|
head do
|
|
|
|
url 'https://github.com/nanomsg/nanomsg.git'
|
2013-09-17 18:35:50 +00:00
|
|
|
|
2014-06-01 01:11:05 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2013-09-17 18:35:50 +00:00
|
|
|
end
|
|
|
|
|
2013-09-22 01:47:31 +00:00
|
|
|
option 'with-test', 'Verify the build with make check'
|
2013-09-29 04:31:25 +00:00
|
|
|
option 'with-doc', 'Install man pages'
|
|
|
|
option 'without-nanocat', 'Do not install nanocat tool'
|
2013-10-01 19:54:25 +00:00
|
|
|
option 'with-debug', 'Compile with debug symbols'
|
2013-09-22 01:47:31 +00:00
|
|
|
|
2013-09-17 18:35:50 +00:00
|
|
|
depends_on 'pkg-config'=> :build
|
|
|
|
|
2013-09-22 01:47:31 +00:00
|
|
|
if build.with? 'doc'
|
2013-09-17 18:35:50 +00:00
|
|
|
depends_on 'asciidoc' => :build
|
|
|
|
depends_on 'xmlto' => :build
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV['XML_CATALOG_FILES'] = "#{etc}/xml/catalog" if build.with? 'doc'
|
|
|
|
|
|
|
|
system './autogen.sh' if build.head?
|
|
|
|
|
2013-10-01 19:54:25 +00:00
|
|
|
args = ["--disable-dependency-tracking",
|
2013-09-17 18:35:50 +00:00
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}"]
|
|
|
|
args << "--disable-nanocat" if build.without? 'nanocat'
|
2013-10-01 19:54:25 +00:00
|
|
|
args << "--enable-debug" if build.with? 'debug'
|
2013-09-17 18:35:50 +00:00
|
|
|
args << "--enable-doc" if build.with? 'doc'
|
|
|
|
|
|
|
|
system './configure', *args
|
|
|
|
system 'make'
|
|
|
|
system 'make', '-j1', 'check' if build.with? 'test'
|
|
|
|
system 'make', 'install'
|
|
|
|
end
|
|
|
|
end
|