homebrew-core/Formula/liblas.rb

29 lines
898 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Liblas < Formula
homepage 'http://liblas.org'
url 'http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz'
sha1 'f31070efdf7bb7d6675c23c6c6c84584e3a10869'
2011-11-30 02:54:32 +00:00
depends_on 'cmake' => :build
depends_on 'libgeotiff'
depends_on 'gdal'
depends_on 'boost'
2012-09-03 19:27:56 +00:00
option 'with-test', 'Verify during install with `make test`'
def install
2012-02-22 04:48:36 +00:00
mkdir 'macbuild' do
# CMake finds boost, but variables like this were set in the last
# version of this formula. Now using the variables listed here:
# http://liblas.org/compilation.html
ENV['Boost_INCLUDE_DIR'] = "#{HOMEBREW_PREFIX}/include"
ENV['Boost_LIBRARY_DIRS'] = "#{HOMEBREW_PREFIX}/lib"
system "cmake", "..", "-DWITH_GEOTIFF=ON", "-DWITH_GDAL=ON", *std_cmake_args
system "make"
2012-09-03 19:27:56 +00:00
system "make test" if build.include? 'with-test'
system "make install"
end
end
end