diff options
| author | Tim D. Smith | 2014-10-19 10:11:19 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2014-10-19 15:47:41 -0700 |
| commit | b0b79d5e58e6a73fa9c27fba018f2f2d55ba895a (patch) | |
| tree | 8cf49f3b59b432fcc10aeee0ebcc2edc721c13d3 /Library/Formula/cmake.rb | |
| parent | 12f01c6d55cca1f2aaf100049a8aa2e2f2fe0be8 (diff) | |
| download | homebrew-b0b79d5e58e6a73fa9c27fba018f2f2d55ba895a.tar.bz2 | |
cmake: fix docs build
Closes #33356.
Signed-off-by: Tim D. Smith <git@tim-smith.us>
Diffstat (limited to 'Library/Formula/cmake.rb')
| -rw-r--r-- | Library/Formula/cmake.rb | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Library/Formula/cmake.rb b/Library/Formula/cmake.rb index 6ba0dc4e2..569700f14 100644 --- a/Library/Formula/cmake.rb +++ b/Library/Formula/cmake.rb @@ -35,7 +35,8 @@ class Cmake < Formula sha1 "842240c9febb4123918cf62a3cea5ca4207ad860" => :lion end - depends_on :python => :build if MacOS.version <= :snow_leopard + option "without-docs", "Don't build man pages" + depends_on :python => :build if MacOS.version <= :snow_leopard && build.with?("docs") resource "sphinx" do url "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz" @@ -65,16 +66,22 @@ class Cmake < Formula depends_on NoExpatFramework def install - ENV.prepend_create_path "PYTHONPATH", buildpath+"sphinx/lib/python2.7/site-packages" - %w[markupsafe docutils pygments jinja2 sphinx].each do |r| - resource(r).stage do - system "python", "setup.py", "install", "--prefix=#{buildpath}/sphinx" + if build.with? "docs" + ENV.prepend_create_path "PYTHONPATH", buildpath+"sphinx/lib/python2.7/site-packages" + %w[markupsafe docutils pygments jinja2 sphinx].each do |r| + resource(r).stage do + pyargs = ["setup.py", "install", "--prefix=#{buildpath}/sphinx"] + unless r == "docutils" + pyargs << "--single-version-externally-managed" << "--record=installed.txt" + end + system "python", *pyargs + end end - end - # There is an existing issue around OS X & Python locale setting - # See http://bugs.python.org/issue18378#msg215215 for explanation - ENV["LC_ALL"] = "en_US.UTF-8" + # There is an existing issue around OS X & Python locale setting + # See http://bugs.python.org/issue18378#msg215215 for explanation + ENV["LC_ALL"] = "en_US.UTF-8" + end args = %W[ --prefix=#{prefix} @@ -83,9 +90,10 @@ class Cmake < Formula --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man - --sphinx-man - --sphinx-build=#{buildpath}/sphinx/bin/sphinx-build ] + if build.with? "docs" + args << "--sphinx-man" << "--sphinx-build=#{buildpath}/sphinx/bin/sphinx-build" + end system "./bootstrap", *args system "make" |
