2011-03-10 05:11:03 +00:00
|
|
|
class Dcmtk < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "OFFIS DICOM toolkit command-line utilities"
|
2015-04-20 21:26:06 +00:00
|
|
|
homepage "http://dicom.offis.de/dcmtk.php.en"
|
2015-05-20 18:07:14 +00:00
|
|
|
|
|
|
|
# Current snapshot used for stable now.
|
2015-08-03 09:30:02 +00:00
|
|
|
url "http://dicom.offis.de/download/dcmtk/snapshot/dcmtk-3.6.1_20150629.tar.gz"
|
|
|
|
sha256 "6af8a4683a8f4995cefbad00e727fd760e0e5f535d7c4ad622ce280a701888e2"
|
|
|
|
version "3.6.1-20150629"
|
2010-11-07 20:32:53 +00:00
|
|
|
|
2015-05-20 18:07:14 +00:00
|
|
|
head "git://git.dcmtk.org/dcmtk.git"
|
2014-07-28 07:42:38 +00:00
|
|
|
|
2015-05-22 06:38:47 +00:00
|
|
|
bottle do
|
2015-09-24 05:04:41 +00:00
|
|
|
sha256 "18907eb4b86a9062ca242649903defbba472fdd1879afa3886d1fdcf4740999d" => :el_capitan
|
2015-08-03 09:53:05 +00:00
|
|
|
sha256 "4dbb44f19f96db2a6d6324dbcb7eb1127581d156000659c45892d4500937c9bf" => :yosemite
|
|
|
|
sha256 "943ec5d29513a70317af4b8d5da846578d610af635c6631329f55ed4a6935cb3" => :mavericks
|
|
|
|
sha256 "df00c07351533cedd1b17cb255e58ce80f123db1d77828684ef2991785d2318d" => :mountain_lion
|
2015-05-22 06:38:47 +00:00
|
|
|
end
|
|
|
|
|
2015-04-20 21:26:06 +00:00
|
|
|
option "with-docs", "Install development libraries/headers and HTML docs"
|
|
|
|
option "with-openssl", "Configure DCMTK with support for OpenSSL"
|
2015-05-20 18:07:14 +00:00
|
|
|
option "with-libiconv", "Build with brewed libiconv. Dcmtk and system libiconv can have problems with utf8."
|
2012-08-27 05:25:33 +00:00
|
|
|
|
2015-04-20 21:26:06 +00:00
|
|
|
depends_on "cmake" => :build
|
2014-11-14 20:35:07 +00:00
|
|
|
depends_on "doxygen" => :build if build.with? "docs"
|
2015-04-20 21:26:06 +00:00
|
|
|
depends_on "libpng"
|
|
|
|
depends_on "libtiff"
|
|
|
|
depends_on "openssl"
|
2015-05-20 18:07:14 +00:00
|
|
|
depends_on "homebrew/dupes/libiconv" => :optional
|
2012-03-13 04:58:59 +00:00
|
|
|
|
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?
|
2011-10-15 19:28:01 +00:00
|
|
|
|
2012-05-22 21:37:04 +00:00
|
|
|
args = std_cmake_args
|
2015-04-20 21:26:06 +00:00
|
|
|
args << "-DDCMTK_WITH_DOXYGEN=YES" if build.with? "docs"
|
|
|
|
args << "-DDCMTK_WITH_OPENSSL=YES" if build.with? "openssl"
|
2015-05-20 18:07:14 +00:00
|
|
|
args << "-DDCMTK_WITH_ICONV=YES -DLIBICONV_DIR=#{Formula["libiconv"].opt_prefix}" if build.with? "libiconv"
|
2015-04-20 21:26:06 +00:00
|
|
|
args << ".."
|
|
|
|
|
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", *args
|
|
|
|
system "make", "DOXYGEN" if build.with? "docs"
|
|
|
|
system "make", "install"
|
2011-03-04 14:22:38 +00:00
|
|
|
end
|
2010-11-07 20:32:53 +00:00
|
|
|
end
|
2013-10-28 14:35:28 +00:00
|
|
|
|
2015-04-20 21:26:06 +00:00
|
|
|
test do
|
|
|
|
system bin/"pdf2dcm", "--verbose",
|
|
|
|
test_fixtures("test.pdf"), testpath/"out.dcm"
|
2015-05-20 18:07:14 +00:00
|
|
|
system bin/"dcmftest", testpath/"out.dcm"
|
2015-04-20 21:26:06 +00:00
|
|
|
end
|
|
|
|
end
|