2010-10-15 20:44:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Liblas < Formula
|
2010-10-15 20:44:02 +00:00
|
|
|
homepage 'http://liblas.org'
|
2012-03-31 04:10:27 +00:00
|
|
|
url 'http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz'
|
|
|
|
md5 '03de7a61132902846c12f3b28c38eb37'
|
2010-10-15 20:44:02 +00:00
|
|
|
|
2011-11-30 02:54:32 +00:00
|
|
|
depends_on 'cmake' => :build
|
2010-10-15 20:44:02 +00:00
|
|
|
depends_on 'libgeotiff'
|
|
|
|
depends_on 'gdal'
|
|
|
|
depends_on 'boost'
|
|
|
|
|
2011-10-27 20:12:03 +00:00
|
|
|
def options
|
2012-02-05 20:48:35 +00:00
|
|
|
[['--with-test', 'Verify during install with `make test`.']]
|
2011-10-27 20:12:03 +00:00
|
|
|
end
|
|
|
|
|
2010-10-15 20:44:02 +00:00
|
|
|
def install
|
2012-02-22 04:48:36 +00:00
|
|
|
mkdir 'macbuild' do
|
2011-10-27 20:12:03 +00:00
|
|
|
# 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"
|
2012-05-22 21:37:04 +00:00
|
|
|
system "cmake", "..", *std_cmake_args
|
2011-10-27 20:12:03 +00:00
|
|
|
system "make"
|
|
|
|
system "make test" if ARGV.include? '--with-test'
|
|
|
|
system "make install"
|
|
|
|
end
|
2010-10-15 20:44:02 +00:00
|
|
|
end
|
|
|
|
end
|