Ticket #22840: Portfile.diff

File Portfile.diff, 4.4 KB (added by guidolorenz@…, 14 years ago)
  • Portfile

    old new  
    44
    55name                        dcmtk
    66version                     3.5.4_p2
     7set unpatched_version       [lindex [split ${version} _] 0]
     8set stripped_version        [string map {. ""} ${unpatched_version}]
     9revision                    1
    710categories                  graphics
    811platforms                   darwin
    9 maintainers                 uni-koblenz.de:guidolorenz \
    10                             openmaintainer
     12maintainers                 nomaintainer
    1113description                 The DICOM Toolkit.
    1214long_description            DCMTK is a collection of libraries and applications implementing \
    1315                            large parts of the DICOM standard. It includes software for examining, \
     
    1719
    1820homepage                    http://dicom.offis.de/dcmtk
    1921
    20 master_sites                ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk354/ \
    21                             http://dicom.offis.de/download/dcmtk/dcmtk354/
    22 distname                    dcmtk-3.5.4
    23 
    24 checksums                   md5 0afd971cdf976a5b336722ef2f68e6d7 \
    25                             sha1 169056874947083e68eb941fcd53faaebc862ae5 \
    26                             rmd160 d1558c9c68e53e0ea3b080fd2fb50b9d8e30eeba
     22master_sites                ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk${stripped_version}/:dcmtk \
     23                            http://dicom.offis.de/download/dcmtk/dcmtk${stripped_version}/:dcmtk \
     24                            ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk${stripped_version}/patch/:patch \
     25                            http://dicom.offis.de/download/dcmtk/dcmtk${stripped_version}/patch/:patch
     26
     27distname                    ${name}-${unpatched_version}
     28distfiles                   ${distname}${extract.suffix}:dcmtk \
     29                            dcmtk-3.5.4_p2.tar.gz:patch
     30
     31checksums                   ${distname}${extract.suffix} \
     32                                md5 0afd971cdf976a5b336722ef2f68e6d7 \
     33                                sha1 169056874947083e68eb941fcd53faaebc862ae5 \
     34                                rmd160 d1558c9c68e53e0ea3b080fd2fb50b9d8e30eeba \
     35                            dcmtk-3.5.4_p2.tar.gz \
     36                                md5 d6df5f5c34291d44dd74d6fd0e146a23 \
     37                                sha1 41c96c8054d3d74529a5b6f67552b2d5b9aea0c2 \
     38                                rmd160 34c19b62c56b6242bf5ca75e620503c40895efb6
    2739
    2840depends_lib                 port:zlib \
    2941                            port:tiff \
     
    3244
    3345destroot.target-append      install-lib
    3446
    35 # Apply changes made in ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk354/patch/dcmtk-3.5.4_p2.tar.gz
    36 patchfiles                  patch-dcmnet-apps-findscu.cc.diff \
    37                             patch-dcmnet-apps-movescu.cc.diff
    38 
    39 platform darwin 9 {
    40         # See http://forum.dcmtk.org/viewtopic.php?t=1372
    41        
    42         patchfiles-append       patch-config-configure.in.diff
    43        
    44         post-patch {
    45                 # Usually, we would system "cd ${worksrcpath}/config && ./autoall" here, but due to a
    46                 # conflict with the MacPorts installation of autoconf, we must make sure that the
    47                 # original autoconf distrubuted with Leopard (from /usr/bin) is used.
    48                 system "cd ${worksrcpath}/config && /usr/bin/autoheader"
    49                 system "cd ${worksrcpath}/config && /usr/bin/autoconf"
    50                 system "cd ${worksrcpath}/config && /usr/bin/autoconf confmod.in > confmod"
    51         }
     47post-extract {
     48    # Two files have to be replaced by patched ones from dcmtk-3.5.4_p2.tar.gz
     49    move -force ${worksrcpath}_p2/dcmnet/apps/findscu.cc ${worksrcpath}/dcmnet/apps/findscu.cc
     50    move -force ${worksrcpath}_p2/dcmnet/apps/movescu.cc ${worksrcpath}/dcmnet/apps/movescu.cc
     51}
     52
     53# Darwin 9+10 compatibility, see http://forum.dcmtk.org/viewtopic.php?t=1372
     54patchfiles                  patch-config-configure.in.diff
     55
     56post-patch {
     57    # After patching config/configure.in, autotools have to be run again.
     58    # Usually, we would system "cd ${worksrcpath}/config && ./autoall" here,
     59    # but due to a conflict with the MacPorts version of autoconf, we must
     60    # make sure that autoconf from /usr/bin is used.
     61    system "cd ${worksrcpath}/config && /usr/bin/autoheader"
     62    system "cd ${worksrcpath}/config && /usr/bin/autoconf"
     63    system "cd ${worksrcpath}/config && /usr/bin/autoconf confmod.in > confmod"
    5264}
    5365
    5466use_parallel_build          no