[128998] trunk/dports/graphics/dcmtk/Portfile

eborisch at macports.org eborisch at macports.org
Tue Dec 2 12:09:46 PST 2014


Revision: 128998
          https://trac.macports.org/changeset/128998
Author:   eborisch at macports.org
Date:     2014-12-02 12:09:46 -0800 (Tue, 02 Dec 2014)
Log Message:
-----------
dcmtk: Move all platforms to snapshot release. Use cmake build; now produces dynamic libraries.

Modified Paths:
--------------
    trunk/dports/graphics/dcmtk/Portfile

Modified: trunk/dports/graphics/dcmtk/Portfile
===================================================================
--- trunk/dports/graphics/dcmtk/Portfile	2014-12-02 20:00:04 UTC (rev 128997)
+++ trunk/dports/graphics/dcmtk/Portfile	2014-12-02 20:09:46 UTC (rev 128998)
@@ -4,10 +4,15 @@
 PortGroup               muniversal 1.0
 
 name                    dcmtk
-version                 3.6.0
-revision                4
-set unpatched_version   [lindex [split ${version} _] 0]
-set stripped_version    [string map {. ""} ${unpatched_version}]
+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_20140617
+revision                0
+#set unpatched_version   [lindex [split ${version} _] 0]
+#set stripped_version    [string map {. ""} ${unpatched_version}]
 categories              graphics
 platforms               darwin
 license                 {BSD Apache-2}
@@ -28,107 +33,95 @@
 
 homepage                http://dicom.offis.de/dcmtk
 
-master_sites \
+#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}-${unpatched_version}
+distname                ${name}-${version}
 
-checksums               md5     19409e039e29a330893caea98715390e \
-                        sha1    469e017cffc56f36e834aa19c8612111f964f757 \
-                        rmd160  ad80a4b6cff9ed275e6153036bdce9e2d912721b
+checksums \
+    rmd160  cdd103fbf3bf526909ae29f854623f634fff6d66 \
+    sha256  c0aab5a3809e20f8b4eae2f181c77a1668d0665e86a590821a59808f45656cdc
 
-platform darwin {
-    if {${os.major} >= 13} {
-        pre-activate {
-            ui_warn "${subport} uses a pre-release (snapshot) on Mavericks and later."
-        }
-        version             3.6.1_20140617
-        revision            0
-        distname            ${name}-${version}
-        checksums           rmd160  cdd103fbf3bf526909ae29f854623f634fff6d66 \
-                            sha256  c0aab5a3809e20f8b4eae2f181c77a1668d0665e86a590821a59808f45656cdc
-        master_sites        http://dicom.offis.de/download/dcmtk/snapshot/ \
-                            http://dicom.offis.de/download/dcmtk/snapshot/old/
-    } else {
-        # TODO: This project has buggy C++ which clang rejects
-        compiler.blacklist-append *clang*
-        patchfiles              patch-config-configure.diff
-    }
-}
+compiler.whitelist      clang macports-clang-3.5
+build.target            all
 
-depends_lib             port:libiconv \
-                        port:zlib
+depends_lib             port:zlib \
+                        port:libiconv \
+                        port:tcp_wrappers \
+                        port:libsndfile
 
+configure.args-append   -DDCMTK_WITH_TIFF=OFF \
+                        -DDCMTK_WITH_PNG=OFF \
+                        -DDCMTK_WITH_OPENSSL=OFF \
+                        -DDCMTK_WITH_XML=OFF \
+                        -DDCMTK_WITH_ICONV=ON \
+                        -DDCMTK_WITH_PRIVATE_TAGS=OFF \
+                        -DDCMTK_WITH_DOXYGEN=OFF \
+                        -DBUILD_SHARED_LIBS=ON \
+                        -DDCMTK_WITH_SNDFILE=ON \
+                        -DDCMTK_WITH_WRAP=ON
 
-# To enable building while previous version is in ${prefix}
-
-post-extract {
-  reinplace "s|\$\(LDFLAGS\) \$\(LIBDIRS\)|\$(LIBDIRS) \$(LDFLAGS)|g" \
-            ${worksrcpath}/dcmdata/apps/Makefile.in \
-            ${worksrcpath}/dcmdata/libsrc/Makefile.in \
-            ${worksrcpath}/dcmdata/tests/Makefile.in \
-            ${worksrcpath}/dcmimage/apps/Makefile.in \
-            ${worksrcpath}/dcmimgle/apps/Makefile.in \
-            ${worksrcpath}/dcmjpeg/apps/Makefile.in \
-            ${worksrcpath}/dcmjpls/apps/Makefile.in \
-            ${worksrcpath}/dcmnet/apps/Makefile.in \
-            ${worksrcpath}/dcmpstat/apps/Makefile.in \
-            ${worksrcpath}/dcmpstat/jni/Makefile.in \
-            ${worksrcpath}/dcmpstat/tests/Makefile.in \
-            ${worksrcpath}/dcmqrdb/apps/Makefile.in \
-            ${worksrcpath}/dcmsign/apps/Makefile.in \
-            ${worksrcpath}/dcmsr/apps/Makefile.in \
-            ${worksrcpath}/dcmsr/tests/Makefile.in \
-            ${worksrcpath}/dcmwlm/apps/Makefile.in \
-            ${worksrcpath}/dcmwlm/tests/Makefile.in \
-            ${worksrcpath}/dcmwlm/wwwapps/Makefile.in \
-            ${worksrcpath}/ofstd/tests/Makefile.in
+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
+    }
 }
 
-configure.args-append   --without-libtiff \
-                        --without-libpng \
-                        --without-openssl \
-                        --without-libxml
-
-destroot.target-append  install-lib
-
-use_parallel_build      no
-
 variant private description "Install private tags dictionary" {
-  configure.args-append --with-private-tags
+    configure.args-delete   -DDCMTK_WITH_PRIVATE_TAGS=OFF
+    configure.args-append   -DDCMTK_WITH_PRIVATE_TAGS=ON
 }
 
-variant doc description "Install html documentation" {
-  destroot.target-delete install-lib
-  destroot.target-append install-all
-  depends_build-append  port:doxygen
-}
-
 variant png description "Enable png support" {
-  depends_lib-append    port:libpng
-  configure.args-delete --without-libpng  
+    depends_lib-append      port:libpng
+    configure.args-delete   -DDCMTK_WITH_PNG=OFF
+    configure.args-append   -DDCMTK_WITH_PNG=ON
 }
 
 variant ssl description "Enable openssl support" {
-  depends_lib-append    port:openssl
-  configure.args-delete --without-openssl  
+    depends_lib-append      port: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 --without-libtiff  
+    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 --without-libxml  
+    depends_lib-append      port:libxml2
+    configure.args-delete   -DDCMTK_WITH_XML=OFF
+    configure.args-append   -DDCMTK_WITH_XML=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=${worksrcpath}/lib make
+test.target             -j 1 test
+
 livecheck.type          regex
 livecheck.regex         {dcmtk\-(\d+(?:\.\d+)*).tar.gz}
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141202/6f250308/attachment.html>


More information about the macports-changes mailing list