Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to pdal v0.6

PDAL development continues to evolve. This is updates the formula
from v0.1 to v0.6. Adds many options and their associated dependencies,
e.g., GDAL.

Updated based on feedback from pull request.

Use or clause for dependencies triggered with multiple flags. Transitioned to
'mkdir' block. Temporarily removed support for GDAL and libgeotiff, which must
be built from trunk of their repos, and added a caveat to explain the situation
for users who require them.
  • Loading branch information...
commit ca254e04286b2a86dd312abac1e643bca5fd7ea3 1 parent 1015eda
@chambbj authored
Showing with 106 additions and 5 deletions.
  1. +106 −5 Library/Formula/pdal.rb
View
111 Library/Formula/pdal.rb
@@ -2,14 +2,115 @@
class Pdal < Formula
homepage 'http://pointcloud.org'
- url 'https://github.com/PDAL/PDAL/zipball/0.1.0'
- md5 'fd5766b2da2337971cbf0e465dc5bd50'
+ url 'https://github.com/PDAL/PDAL/zipball/0.6.0'
+ md5 'e21c2227a9302f033f8ecf513baedf51'
+
+ def options
+ [
+ ['--embed-boost', 'Use embedded Boost?'],
+# ['--with-gdal', 'Use GDAL?'],
+# ['--with-geotiff', 'Use GeoTIFF?'],
+ ['--with-iconv', 'Use ICONV?'],
+ ['--with-laszip', 'Use LASZIP?'],
+ ['--with-libxml2', 'Use libXML2?'],
+ ['--with-mrsid', 'Use MRSID?'],
+ ['--with-oracle', 'Use Oracle?'],
+ ['--with-p2g', 'Use P2G?'],
+ ['--with-pkgconfig', 'Use PkgConfig?'],
+ ['--with-python', 'Use Python?'],
+ ['--with-swig-csharp', 'Use SWIG C#?'],
+ ['--with-swig-python', 'Use SWIG Python?'],
+ ['--with-tests', 'Use tests?']
+ ]
+ end
depends_on 'cmake' => :build
- depends_on 'boost'
+ depends_on 'boost' unless ARGV.include? '--embed-boost'
+
+# depends_on 'libgeotiff' if ARGV.include? '--with-geotiff' || '--with-gdal'
@adamv
adamv added a note

Don't leave in commented-out code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+# depends_on 'gdal' if ARGV.include? '--with-gdal'
+ depends_on 'iconv' if ARGV.include? '--with-iconv'
+ depends_on 'laszip' if ARGV.include? '--with-laszip'
+ depends_on 'libxml2' if ARGV.include? '--with-libxml2'
+ depends_on 'mrsid' if ARGV.include? '--with-mrsid'
+ depends_on 'oracle' if ARGV.include? '--with-oracle'
@adamv
adamv added a note

There's no oracle brew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ depends_on 'p2k' if ARGV.include? '--with-p2g'
+ depends_on 'pkgconfig' if ARGV.include? '--with-pkgconfig'
@adamv
adamv added a note

Why would pkg-config be optional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ depends_on 'python' if ARGV.include? '--with-python'
+ depends_on 'swig' if ARGV.include? '--with-swig-csharp' || '--with-swig-python'
def install
- system "cmake #{std_cmake_parameters} ."
- system "make install"
+ args = std_cmake_parameters.split
+
+ if ARGV.include? '--with-gdal'
+ args << "-DWITH_GDAL:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-geotiff'
+ args << "-DWITH_GEOTIFF:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-iconv'
+ args << "-DWITH_ICONV:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-laszip'
+ args << "-DWITH_LASZIP:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-libxml2'
+ args << "-DWITH_LIBXML2:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-mrsid'
+ args << "-DWITH_MRSID:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-oracle'
+ args << "-DWITH_ORACLE:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-p2g'
+ args << "-DWITH_P2G:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-pkgconfig'
+ args << "-DWITH_PKGCONFIG:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-python'
+ args << "-DWITH_PYTHON:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-swig-csharp'
+ args << "-DWITH_SWIG_CSHARP:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-swig-python'
+ args << "-DWITH_SWIG_PYTHON:BOOL=ON"
+ end
+
+ if ARGV.include? '--with-tests'
+ args << "-DWITH_TESTS:BOOL=ON"
+ end
+
+# system "mkdir build"
@adamv
adamv added a note

This line needs to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ args << ".."
+
+ mkdir 'build' do
+ ENV['Boost_INCLUDE_DIR'] = "#{HOMEBREW_PREFIX}/include"
+ ENV['Boost_LIBRARYS_DIRS'] = "#{HOMEBREW_PREFIX}/lib"
+ system "cmake", *args
+ system "make install"
+ end
+ end
+
+ def caveats
+ <<-EOS
+There is currently a bug when attempting to build with the latest
+release versions of GDAL and libgeotiff. If this functionality is
+required, it is best to build from trunk of the respective SVN
+repositories.
+ EOS
end
end
@adamv

This line needs to be removed.

@adamv

Why would pkg-config be optional?

@adamv

There's no oracle brew!

@adamv

Don't leave in commented-out code

Please sign in to comment.
Something went wrong with that request. Please try again.