2011-03-10 05:11:03 +00:00
|
|
|
class Dcmtk < Formula
|
2015-04-20 21:26:06 +00:00
|
|
|
homepage "http://dicom.offis.de/dcmtk.php.en"
|
|
|
|
url "http://dicom.offis.de/download/dcmtk/snapshot/dcmtk-3.6.1_20150217.tar.gz"
|
|
|
|
sha256 "3cf8f3e52ed8a5240a7facc3a118de411aa54bc9beccba0cf7a975735da35304"
|
|
|
|
version "3.6.1-20150217"
|
2010-11-07 20:32:53 +00:00
|
|
|
|
2014-07-28 07:42:38 +00:00
|
|
|
bottle do
|
2015-04-20 21:39:54 +00:00
|
|
|
sha256 "0bd582c2f37ce4b9366b0a7ba2e7c6e90cddd3a6af954ebc5475938048415d5d" => :yosemite
|
|
|
|
sha256 "ff49c45d86930592662caf947cd87f011b55f533396b75957e55cd748bc4c7b2" => :mavericks
|
|
|
|
sha256 "2e06bdf73ce156ba65c95374ac5a9e6b048c02186403b66b78ea48b2b415da01" => :mountain_lion
|
2014-07-28 07:42:38 +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"
|
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"
|
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"
|
|
|
|
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"
|
|
|
|
File.exist? testpath/"out.dcm"
|
|
|
|
end
|
|
|
|
end
|