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-02-21 06:04:21 +00:00
|
|
|
url 'http://download.osgeo.org/liblas/libLAS-1.6.1.tar.gz'
|
2011-10-27 20:12:03 +00:00
|
|
|
sha1 '0eada80c6de49e9e866f746645cb227034c3af4a'
|
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"
|
|
|
|
system "cmake #{std_cmake_parameters} .."
|
|
|
|
system "make"
|
|
|
|
system "make test" if ARGV.include? '--with-test'
|
|
|
|
system "make install"
|
|
|
|
end
|
2010-10-15 20:44:02 +00:00
|
|
|
end
|
|
|
|
end
|