source: trunk/dports/graphics/dcmtk/Portfile

Last change on this file was 149815, checked in by eborisch@…, 13 months ago

dcmtk: Update to latest.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.3 KB
Line 
1# $Id: Portfile 149815 2016-06-30 22:36:05Z ryandesign@macports.org $
2
3PortSystem              1.0
4PortGroup               compiler_blacklist_versions 1.0
5PortGroup               muniversal 1.0
6PortGroup               conflicts_build 1.0
7
8name                    dcmtk
9PortGroup               cmake 1.0
10
11# 3.6.0 is almost 4 years old, with no 3.6.1 "release" in sight. Moving to
12# snapshot for support of Yosemite as well as numerous bug fixes / updates.
13
14version                 3.6.1_20160630
15revision                0
16#set unpatched_version   [lindex [split ${version} _] 0]
17#set stripped_version    [string map {. ""} ${unpatched_version}]
18categories              graphics
19platforms               darwin
20license                 {BSD Apache-2}
21
22maintainers             eborisch \
23                        openmaintainer
24
25description             The DICOM Toolkit.
26long_description        DCMTK is a collection of libraries and applications    \
27                        implementing large parts the DICOM standard. It        \
28                        includes software for examining, constructing and      \
29                        converting DICOM image files, handling offline media,  \
30                        sending and receiving images over a network connection,\
31                        as well as demonstrative image storage and worklist    \
32                        servers. DCMTK is is written in a mixture of ANSI C    \
33                        and C++. It comes in complete source code and is made  \
34                        available as "open source" software.
35
36homepage                http://dicom.offis.de/dcmtk
37
38#Go back to non-snapshots once a new release finally comes...
39#master_sites \
40 ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk${stripped_version}/ \
41 http://dicom.offis.de/download/dcmtk/dcmtk${stripped_version}/
42master_sites            http://dicom.offis.de/download/dcmtk/snapshot/ \
43                        http://dicom.offis.de/download/dcmtk/snapshot/old/
44
45distname                ${name}-${version}
46
47checksums \
48    rmd160  52736eaf670709c5f3f520ffdd1bba91fb506883 \
49    sha256  7dacf0e704f9b5a3a92bd40f1391be3e4473c06c0adb4dbf5855b5c5ddc5f12a
50
51cmake.out_of_source     yes
52
53compiler.blacklist      *gcc* {clang < 137}
54
55# There have been issues with build grabbing old headers from installed
56# version.
57conflicts_build         ${name}
58
59depends_lib             port:zlib \
60                        port:libiconv \
61                        port:tcp_wrappers
62
63configure.args-append   -DDCMTK_WITH_TIFF=OFF \
64                        -DDCMTK_WITH_PNG=OFF \
65                        -DDCMTK_WITH_OPENSSL=OFF \
66                        -DDCMTK_WITH_XML=OFF \
67                        -DDCMTK_WITH_ICONV=ON \
68                        -DDCMTK_ENABLE_PRIVATE_TAGS=OFF \
69                        -DDCMTK_WITH_DOXYGEN=OFF \
70                        -DBUILD_SHARED_LIBS=ON \
71                        -DDCMTK_WITH_SNDFILE=OFF \
72                        -DDCMTK_WITH_WRAP=ON \
73                        -DDCMTK_USE_CXX11_STL=OFF
74
75variant doc description "Install documentation" {
76    depends_build-append    port:doxygen \
77                            port:graphviz
78    build.target-append     DOXYGEN
79    configure.args-delete   -DDCMTK_WITH_DOXYGEN=OFF
80    configure.args-append   -DDCMTK_WITH_DOXYGEN=ON
81    post-patch {
82        reinplace -E "s/^(HAVE_DOT.*)NO/\\1YES/" doxygen/htmldocs.cfg
83    }
84}
85
86variant private description "Install private tags dictionary" {
87    configure.args-delete   -DDCMTK_ENABLE_PRIVATE_TAGS=OFF
88    configure.args-append   -DDCMTK_ENABLE_PRIVATE_TAGS=ON
89}
90
91variant png description "Enable png support" {
92    depends_lib-append      port:libpng
93    configure.args-delete   -DDCMTK_WITH_PNG=OFF
94    configure.args-append   -DDCMTK_WITH_PNG=ON
95}
96
97variant sound description "Enable sndfile support" {
98    depends_lib-append      port:libsndfile
99    configure.args-delete   -DDCMTK_WITH_SNDFILE=OFF
100    configure.args-append   -DDCMTK_WITH_SNDFILE=ON
101}
102
103variant ssl description "Enable openssl support" {
104    depends_lib-append      path:lib/libssl.dylib:openssl
105    configure.args-delete   -DDCMTK_WITH_OPENSSL=OFF
106    configure.args-append   -DDCMTK_WITH_OPENSSL=ON
107}
108
109variant tiff description "Enable tiff support" {
110    depends_lib-append      port:tiff
111    configure.args-delete   -DDCMTK_WITH_TIFF=OFF
112    configure.args-append   -DDCMTK_WITH_TIFF=ON
113}
114
115variant xml description "Enable xml support" {
116    depends_lib-append      port:libxml2
117    configure.args-delete   -DDCMTK_WITH_XML=OFF
118    configure.args-append   -DDCMTK_WITH_XML=ON
119}
120
121variant cxx11 description "Compile with c++11 support" {
122    configure.args-delete   -DDCMTK_USE_CXX11_STL=OFF
123    configure.args-append   -DDCMTK_USE_CXX11_STL=ON
124}
125
126default_variants        +png +ssl +tiff +xml
127
128if {[variant_isset doc]} {
129    post-destroot {
130        # Don't really want these man pages.
131        system -W ${destroot}${prefix}/share/man/man1 "rm -f *_${distname}_*"
132    }
133    set DOCDIR          file://${prefix}/share/doc/dcmtk/html/index.html
134    notes               "DCMTK documentation available at:\n  ${DOCDIR}"
135}
136
137destroot.args           docdir=${prefix}/share/doc/${name}
138
139test.run                yes
140test.cmd                env DYLD_LIBRARY_PATH=${cmake.build_dir}/lib make
141test.target             -j 1 test
142
143livecheck.type          regex
144livecheck.url           [lindex ${master_sites} 0]
145livecheck.regex         ${name}-(\[0-9._\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.