From ffbf3abdddee0f4e185e65e4dbd32b40577d1302 Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Wed, 13 Aug 2014 22:28:53 -0700 Subject: rabbitmq-c formula enhancements. Update rabbitmq-c to latest stable version (v0.5.1). Additionally improve the formula: - 'rabbitmq' is not a required dependency. - Codegen directory isn't required to build. - Use CMake to build the package. - Disable building of test and examples. - Conditionally enable building command line tools, add popt dependency. --- Library/Formula/rabbitmq-c.rb | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/rabbitmq-c.rb b/Library/Formula/rabbitmq-c.rb index 9d3bf3242..2168624af 100644 --- a/Library/Formula/rabbitmq-c.rb +++ b/Library/Formula/rabbitmq-c.rb @@ -2,30 +2,28 @@ require "formula" class RabbitmqC < Formula homepage "https://github.com/alanxz/rabbitmq-c" - url "https://github.com/alanxz/rabbitmq-c/archive/v0.5.0.tar.gz" - sha1 "826286c3f04695bdc231d8e7b0541f871975cdcc" + url "https://github.com/alanxz/rabbitmq-c/archive/v0.5.1.tar.gz" + sha1 "3a2fad69f65ef3a733fbfd9320717d2aedec5aa2" head "https://github.com/alanxz/rabbitmq-c.git" option :universal + option "without-tools", "Build without command-line tools" depends_on "pkg-config" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "rabbitmq" - depends_on "simplejson" => :python if MacOS.version <= :leopard - - resource "codegen" do - url "https://github.com/rabbitmq/rabbitmq-codegen/archive/rabbitmq_v3_3_1.tar.gz" - sha1 "62cfff4d3d3707b263a4e1b0d5d3b094e39d24f1" - end + depends_on "cmake" => :build + depends_on "rabbitmq" => :recommended + depends_on "popt" if build.with? "tools" def install ENV.universal_binary if build.universal? - (buildpath/"codegen").install resource("codegen") - system "autoreconf", "-i" - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" + args = std_cmake_args + args << "-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_API_DOCS=OFF" + + args << "-DBUILD_TOOLS=ON" if build.with? "tools" + args << "-DBUILD_TOOLS=OFF" if build.without? "tools" + + system "cmake", ".", *args system "make install" end end -- cgit v1.2.3