# $Id: Portfile 149815 2016-06-30 22:36:05Z eborisch@macports.org $ PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup muniversal 1.0 PortGroup conflicts_build 1.0 name dcmtk PortGroup cmake 1.0 # 3.6.0 is almost 4 years old, with no 3.6.1 "release" in sight. Moving to # snapshot for support of Yosemite as well as numerous bug fixes / updates. version 3.6.1_20160630 revision 0 #set unpatched_version [lindex [split ${version} _] 0] #set stripped_version [string map {. ""} ${unpatched_version}] categories graphics platforms darwin license {BSD Apache-2} maintainers eborisch \ openmaintainer description The DICOM Toolkit. long_description DCMTK is a collection of libraries and applications \ implementing large parts the DICOM standard. It \ includes software for examining, constructing and \ converting DICOM image files, handling offline media, \ sending and receiving images over a network connection,\ as well as demonstrative image storage and worklist \ servers. DCMTK is is written in a mixture of ANSI C \ and C++. It comes in complete source code and is made \ available as "open source" software. homepage http://dicom.offis.de/dcmtk #Go back to non-snapshots once a new release finally comes... #master_sites \ ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk${stripped_version}/ \ http://dicom.offis.de/download/dcmtk/dcmtk${stripped_version}/ master_sites http://dicom.offis.de/download/dcmtk/snapshot/ \ http://dicom.offis.de/download/dcmtk/snapshot/old/ distname ${name}-${version} checksums \ rmd160 52736eaf670709c5f3f520ffdd1bba91fb506883 \ sha256 7dacf0e704f9b5a3a92bd40f1391be3e4473c06c0adb4dbf5855b5c5ddc5f12a cmake.out_of_source yes compiler.blacklist *gcc* {clang < 137} # There have been issues with build grabbing old headers from installed # version. conflicts_build ${name} depends_lib port:zlib \ port:libiconv \ port:tcp_wrappers configure.args-append -DDCMTK_WITH_TIFF=OFF \ -DDCMTK_WITH_PNG=OFF \ -DDCMTK_WITH_OPENSSL=OFF \ -DDCMTK_WITH_XML=OFF \ -DDCMTK_WITH_ICONV=ON \ -DDCMTK_ENABLE_PRIVATE_TAGS=OFF \ -DDCMTK_WITH_DOXYGEN=OFF \ -DBUILD_SHARED_LIBS=ON \ -DDCMTK_WITH_SNDFILE=OFF \ -DDCMTK_WITH_WRAP=ON \ -DDCMTK_USE_CXX11_STL=OFF variant doc description "Install documentation" { depends_build-append port:doxygen \ port:graphviz build.target-append DOXYGEN configure.args-delete -DDCMTK_WITH_DOXYGEN=OFF configure.args-append -DDCMTK_WITH_DOXYGEN=ON post-patch { reinplace -E "s/^(HAVE_DOT.*)NO/\\1YES/" doxygen/htmldocs.cfg } } variant private description "Install private tags dictionary" { configure.args-delete -DDCMTK_ENABLE_PRIVATE_TAGS=OFF configure.args-append -DDCMTK_ENABLE_PRIVATE_TAGS=ON } variant png description "Enable png support" { depends_lib-append port:libpng configure.args-delete -DDCMTK_WITH_PNG=OFF configure.args-append -DDCMTK_WITH_PNG=ON } variant sound description "Enable sndfile support" { depends_lib-append port:libsndfile configure.args-delete -DDCMTK_WITH_SNDFILE=OFF configure.args-append -DDCMTK_WITH_SNDFILE=ON } variant ssl description "Enable openssl support" { depends_lib-append path:lib/libssl.dylib:openssl configure.args-delete -DDCMTK_WITH_OPENSSL=OFF configure.args-append -DDCMTK_WITH_OPENSSL=ON } variant tiff description "Enable tiff support" { depends_lib-append port:tiff configure.args-delete -DDCMTK_WITH_TIFF=OFF configure.args-append -DDCMTK_WITH_TIFF=ON } variant xml description "Enable xml support" { depends_lib-append port:libxml2 configure.args-delete -DDCMTK_WITH_XML=OFF configure.args-append -DDCMTK_WITH_XML=ON } variant cxx11 description "Compile with c++11 support" { configure.args-delete -DDCMTK_USE_CXX11_STL=OFF configure.args-append -DDCMTK_USE_CXX11_STL=ON } default_variants +png +ssl +tiff +xml if {[variant_isset doc]} { post-destroot { # Don't really want these man pages. system -W ${destroot}${prefix}/share/man/man1 "rm -f *_${distname}_*" } set DOCDIR file://${prefix}/share/doc/dcmtk/html/index.html notes "DCMTK documentation available at:\n ${DOCDIR}" } destroot.args docdir=${prefix}/share/doc/${name} test.run yes test.cmd env DYLD_LIBRARY_PATH=${cmake.build_dir}/lib make test.target -j 1 test livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex ${name}-(\[0-9._\]+)${extract.suffix}