Created
November 27, 2013 19:36
-
-
Save dakcarto/7681808 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/osgearth.rb b/osgearth.rb | |
index 5ead3fa..e2b5ffa 100644 | |
--- a/osgearth.rb | |
+++ b/osgearth.rb | |
@@ -5,14 +5,11 @@ class Osgearth < Formula | |
url 'https://github.com/gwaldron/osgearth/archive/osgearth-2.5.tar.gz' | |
sha1 '97ed0075422c3efcb7b958f89ae02b32d670c48e' | |
- head do | |
- url 'https://github.com/gwaldron/osgearth.git', :branch => 'master' | |
- end | |
+ head 'https://github.com/gwaldron/osgearth.git', :branch => 'master' | |
option 'without-minizip', 'Build without Google KMZ file access support' | |
option 'with-v8', 'Build with Google\'s V8 JavaScript engine support' | |
- option 'with-libnoise', 'Build with coherent noise-generating terrain support' | |
- option 'external-tinyxml', 'Use external libtinyxml, instead of internal' | |
+ option 'with-tinyxml', 'Use external libtinyxml, instead of internal' | |
option 'with-docs-examples', 'Build and install html documentation and examples' | |
option :cxx11 | |
@@ -21,12 +18,8 @@ class Osgearth < Formula | |
depends_on 'gdal' | |
depends_on 'sqlite' | |
depends_on 'qt' => :recommended | |
- depends_on 'minizip' => :recommended | |
- depends_on 'v8' => :optional | |
- depends_on 'libnoise' => :optional | |
- depends_on 'tinyxml' if build.include? 'external-tinyxml' | |
- depends_on :python => ['sphinx'] if build.include? 'with-docs-examples' | |
+ depends_on :python => ['sphinx'] if build.with? 'docs-examples' | |
def install | |
cxxstdlib_check :skip | |
@@ -60,31 +53,25 @@ class Osgearth < Formula | |
args << "-DV8_DIR='#{HOMEBREW_PREFIX}'" | |
end | |
- if build.with? 'libnoise' | |
- args << "-DLIBNOISE_INCLUDE_DIR='#{HOMEBREW_PREFIX}/include/noise'" | |
- args << "-DLIBNOISE_LIBRARY='#{HOMEBREW_PREFIX}/lib/libnoise.dylib'" | |
- end | |
- | |
- if build.include? 'external-tinyxml' | |
+ if build.with? 'tinyxml' | |
args << '-DWITH_EXTERNAL_TINYXML=ON' | |
args << "-DTINYXML_INCLUDE_DIR='#{HOMEBREW_PREFIX}/include'" | |
args << "-DTINYXML_LIBRARY='#{HOMEBREW_PREFIX}/lib/libtinyxml.dylib'" | |
end | |
- args << '..' | |
- | |
mkdir 'build' do | |
- system 'cmake', *args | |
+ system 'cmake', '..', *args | |
system 'make install' | |
end | |
- if build.include? 'with-docs-examples' | |
+ if build.with? 'docs-examples' | |
cd 'docs' do | |
inreplace "Makefile", "sphinx-build", "#{HOMEBREW_PREFIX}/bin/sphinx-build" | |
system 'make', 'html' | |
doc.install "build/html" => 'html' | |
end | |
- doc.install ['data', 'tests'] | |
+ doc.install 'data' | |
+ doc.install 'tests' => 'examples' | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment