2012-08-21 07:55:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Dgtal < Formula
|
2012-12-09 10:08:42 +00:00
|
|
|
homepage 'http://libdgtal.org'
|
2013-03-04 15:28:09 +00:00
|
|
|
url 'http://liris.cnrs.fr/dgtal/releases/DGtal-0.6.0-Source.tar.gz'
|
|
|
|
sha1 '7eebf636bb356fe7672eed8295647ca9a36c452d'
|
2012-08-21 07:55:10 +00:00
|
|
|
|
|
|
|
head 'https://github.com/DGtal-team/DGtal.git'
|
|
|
|
|
2013-10-05 20:02:51 +00:00
|
|
|
option 'with-qglviewer', "Enable QGLViewer vizualisation"
|
2012-08-21 07:55:10 +00:00
|
|
|
option 'with-magick', "Enable GraphicsMagick for 2d image readers"
|
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
depends_on 'boost'
|
2013-02-02 22:22:53 +00:00
|
|
|
depends_on 'gmp' => :optional
|
|
|
|
depends_on 'cairo' => :optional
|
|
|
|
depends_on 'libqglviewer' if build.with? 'qglviewer'
|
|
|
|
depends_on 'graphicsmagick' if build.with? 'magick'
|
2012-08-21 07:55:10 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
args = std_cmake_args
|
|
|
|
args << "-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
args << "-DBUILD_EXAMPLES=OFF"
|
2013-03-04 15:28:09 +00:00
|
|
|
args << "-DDGTAL_BUILD_TESTING=OFF"
|
2012-08-21 07:55:10 +00:00
|
|
|
args << "-DWITH_C11:bool=false"
|
|
|
|
|
2013-02-02 22:22:53 +00:00
|
|
|
args << "-DWITH_GMP=ON" if build.with? 'gmp'
|
|
|
|
args << "-DWITH_CAIRO=ON" if build.with? 'cairo'
|
|
|
|
args << "-DWITH_QGLVIEWER=ON" if build.with? 'qglviewer'
|
2012-08-21 07:55:10 +00:00
|
|
|
|
|
|
|
mkdir 'build' do
|
|
|
|
system "cmake", "..", *args
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|