2010-11-07 20:32:53 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Dcmtk < Formula
|
2010-11-07 20:32:53 +00:00
|
|
|
homepage 'http://dicom.offis.de/dcmtk.php.en'
|
2011-02-17 13:45:44 +00:00
|
|
|
url 'ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk360/dcmtk-3.6.0.tar.gz'
|
|
|
|
md5 '19409e039e29a330893caea98715390e'
|
2010-11-07 20:32:53 +00:00
|
|
|
|
|
|
|
depends_on 'libtiff'
|
2011-10-15 19:28:01 +00:00
|
|
|
depends_on 'doxygen' if ARGV.include? '--with-docs'
|
2011-03-04 14:22:38 +00:00
|
|
|
|
|
|
|
def options
|
2011-10-15 19:28:01 +00:00
|
|
|
[['--with-docs', 'Install development libraries/headers and HTML docs']]
|
2011-03-04 14:22:38 +00:00
|
|
|
end
|
2010-11-07 20:32:53 +00:00
|
|
|
|
2012-03-13 04:58:59 +00:00
|
|
|
# fails_with_clang: https://github.com/mxcl/homebrew/issues/10884#issuecomment-4467514
|
|
|
|
|
2010-11-07 20:32:53 +00:00
|
|
|
def install
|
2011-03-18 17:30:47 +00:00
|
|
|
ENV.m64 if MacOS.prefer_64_bit?
|
2010-11-12 19:54:16 +00:00
|
|
|
ENV.x11
|
2011-10-15 19:28:01 +00:00
|
|
|
|
|
|
|
args = std_cmake_parameters.split
|
|
|
|
args << '-DDCMTK_WITH_DOXYGEN=YES' if ARGV.include? '--with-docs'
|
|
|
|
|
2012-02-22 04:48:36 +00:00
|
|
|
mkdir 'build' do
|
2011-10-15 19:28:01 +00:00
|
|
|
system 'cmake', '..', *args
|
|
|
|
system 'make DOXYGEN' if ARGV.include? '--with-docs'
|
|
|
|
system 'make install'
|
2011-03-04 14:22:38 +00:00
|
|
|
end
|
2010-11-07 20:32:53 +00:00
|
|
|
end
|
|
|
|
end
|