From 0b35ea06106f39a4c1448881a5d19c65f0579a16 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Thu, 26 Feb 2015 02:48:21 +0000 Subject: [PATCH] libuv 1.4.1 Version bump, and added documentation for fun. Closes Homebrew/homebrew#37207. Signed-off-by: Mike McQuaid --- Formula/libuv.rb | 50 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/Formula/libuv.rb b/Formula/libuv.rb index b52fc2bf8d..f4bb39352e 100644 --- a/Formula/libuv.rb +++ b/Formula/libuv.rb @@ -1,7 +1,7 @@ class Libuv < Formula homepage "https://github.com/libuv/libuv" - url "https://github.com/libuv/libuv/archive/v1.2.1.tar.gz" - sha1 "500421538aaa84aa6ab054205275f59968556654" + url "https://github.com/libuv/libuv/archive/v1.4.1.tar.gz" + sha1 "c545efa7fee0e3f4850b2cbd03611ac4c76a8c90" head "https://github.com/libuv/libuv.git", :branch => "v1.x" bottle do @@ -11,16 +11,60 @@ class Libuv < Formula sha1 "715d7fd7d6f7a408093a66d7005b4816f2c63929" => :mountain_lion end + option "without-docs", "Don't build and install documentation" + option :universal + depends_on "pkg-config" => :build depends_on "automake" => :build depends_on "autoconf" => :build depends_on "libtool" => :build + depends_on :python => :build if MacOS.version <= :snow_leopard && build.with?("docs") - option :universal + resource "sphinx" do + url "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz" + sha1 "3a11f130c63b057532ca37fe49c8967d0cbae1d5" + end + + resource "docutils" do + url "https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz" + sha1 "002450621b33c5690060345b0aac25bc2426d675" + end + + resource "pygments" do + url "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.2.tar.gz" + sha1 "fe2c8178a039b6820a7a86b2132a2626df99c7f8" + end + + resource "jinja2" do + url "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz" + sha1 "25ab3881f0c1adfcf79053b58de829c5ae65d3ac" + end + + resource "markupsafe" do + url "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz" + sha1 "cd5c22acf6dd69046d6cb6a3920d84ea66bdf62a" + end def install ENV.universal_binary if build.universal? + if build.with? "docs" + ENV.prepend_create_path "PYTHONPATH", buildpath+"sphinx/lib/python2.7/site-packages" + resources.each do |r| + r.stage do + system "python", *Language::Python.setup_install_args(buildpath/"sphinx") + end + end + ENV.prepend_path "PATH", (buildpath/"sphinx/bin") + # This isn't yet handled by the make install process sadly. + cd "docs" do + system "make", "man" + system "make", "singlehtml" + man1.install "build/man/libuv.1" + doc.install Dir["build/singlehtml/*"] + end + end + system "./autogen.sh" system "./configure", "--disable-dependency-tracking", "--disable-silent-rules",