aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorDavid Coeurjolly2012-08-21 09:55:10 +0200
committerAdam Vandenberg2012-10-27 18:34:10 -0700
commit38954da8378524262f404538edf2433a489e17de (patch)
treeae8c21c1ec4c9880b6ad212200c4491878a537dc /Library/Formula
parent8ca066a542c4678d3da39a7a3ec1b368e588a0fe (diff)
downloadhomebrew-38954da8378524262f404538edf2433a489e17de.tar.bz2
DGtal 0.5.1
Closes #14332. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/dgtal.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/Library/Formula/dgtal.rb b/Library/Formula/dgtal.rb
new file mode 100644
index 000000000..a1d556b69
--- /dev/null
+++ b/Library/Formula/dgtal.rb
@@ -0,0 +1,38 @@
+require 'formula'
+
+class Dgtal < Formula
+ homepage 'http://liris.cnrs.fr/dgtal'
+ url 'http://liris.cnrs.fr/dgtal/releases/DGtal-0.5.1-Source.tar.gz'
+ sha1 'ab3e70186b3d1da1a698d3407e3603c69951e0f0'
+
+ head 'https://github.com/DGtal-team/DGtal.git'
+
+ option 'with-cairo', "Enable cairographics in DGtal"
+ option 'with-gmp', "Enable GNU Multiple Precision Arithmetic Library in DGtal"
+ option 'with-qglview', "Enable QGLViewer vizualisation"
+ option 'with-magick', "Enable GraphicsMagick for 2d image readers"
+
+ depends_on 'cmake' => :build
+ depends_on 'boost'
+ depends_on 'gmp' if build.include? 'with-gmp'
+ depends_on 'cairo' if build.include? 'with-cairo'
+ depends_on 'libqglviewer' if build.include? 'with-qglviewer'
+ depends_on 'graphicsmagick' if build.include? 'with-magick'
+
+ def install
+ args = std_cmake_args
+ args << "-DCMAKE_BUILD_TYPE=Release"
+ args << "-DBUILD_EXAMPLES=OFF"
+ args << "-DWITH_C11:bool=false"
+
+ args << "-DWITH_GMP=ON" if build.include? 'with-gmp'
+ args << "-DWITH_CAIRO=ON" if build.include? 'with-cairo'
+ args << "-DWITH_QGLVIEWER=ON" if build.include? 'with-qglviewer'
+
+ mkdir 'build' do
+ system "cmake", "..", *args
+ system "make"
+ system "make install"
+ end
+ end
+end