Ticket #11976: poco-1.3.0_1.diff

File poco-1.3.0_1.diff, 3.9 KB (added by n.oxyde@…, 17 years ago)

Forgot to close file in test target.

  • Portfile

    old new  
    44
    55name            poco
    66version         1.3.0
     7revision        1
    78categories      devel
    89maintainers     n.oxyde@gmail.com
    910description     POCO C++ Libraries
     
    1617homepage        http://pocoproject.org/
    1718master_sites    sourceforge
    1819use_bzip2       yes
     20set my_distname ${distname}
    1921
    2022checksums       [suffix ${distname}] \
    2123                    md5 798e3e99f3ed97fe4d2151acec12024e \
     
    2527                    md5 c5169f92f2787a609f9611346d221e78 \
    2628                    sha1 1429b7fb925e61e88df8d19648ef87c29144b6b4 \
    2729                    rmd160 aeb24c2382a13e21d14bba4160bc7d144bb2780b \
    28                 ${name}-${version}-doc.tar.gz \
     30                [suffix ${distname}-data] \
     31                    md5 edd64a9245dcd06a3bacfc0b12716600 \
     32                    sha1 7ee415462b3abc37fb02b799eeee9d61feaec346 \
     33                    rmd160 be8aba090d0553b868984d5564d3830c0467c724 \
     34                ${my_distname}-doc.tar.gz \
    2935                    md5 6107295904c6203a58377b2e7f97ed33 \
    3036                    sha1 1374f44a3f82477c6587037e0d990cd26d0eb61e \
    3137                    rmd160 433a7ff6f5db661fb799f09c4bfbf439f4cbc841
    3238
    3339platforms       darwin
    3440
    35 configure.args  --no-tests \
    36                 --no-samples
     41configure.args  --no-samples
    3742
    3843build.target    poco
    3944
     45test.run        yes
     46
     47test {
     48    proc luniq {list} {
     49        set x() {}; unset x
     50        foreach {item} ${list} {
     51            set x(${item}) ""
     52        }
     53        return [array names x]
     54    }
     55
     56    cd ${worksrcpath}
     57    set file [open components]
     58
     59    set components {}
     60    while {[gets ${file} component] != -1} {
     61        lappend components ${component}
     62    }
     63
     64    close ${file}
     65
     66    foreach {component} [luniq ${components}] {
     67        foreach {testrunner} [glob -nocomplain ${component}/testsuite/bin/*/*/testrunner{,d}] {
     68            catch {system "${testrunner} -all -print"}
     69        }
     70    }
     71}
     72
    4073set docdir      ${prefix}/share/doc/${name}-${version}
    4174
    4275post-destroot {
     
    5083    }
    5184}
    5285
    53 variant ipv6 requires darwin_8 {}
     86variant ipv6 description {Support IPv6 protocol in Net library (Requires Darwin 8)} requires darwin_8 {}
    5487
    55 variant ssl {
    56     distname                ${distname}-ssl
     88variant ssl description {Build NetSSL library} {
     89    distname                ${my_distname}-ssl
    5790    depends_lib-append      port:openssl
    5891}
    5992
    60 variant doc {
     93variant data description {Build Data library} {
     94    distname                ${my_distname}-data
     95    depends_lib-append      lib:libiodbc:unixODBC
     96
     97    post-patch {
     98        if {! [variant_isset ssl]} {
     99            reinplace -E {/^(COMPONENTS|\.PHONY|libexecs|tests|samples)/s/NetSSL_OpenSSL[^ ]*//} \
     100                ${worksrcpath}/Makefile
     101            reinplace {/NETSSL_OpenSSL/d} ${worksrcpath}/components
     102        }
     103    }
     104}
     105
     106variant doc description {Install extra documentation} {
    61107    extract.only            ${distfiles}
    62     distfiles-append        ${name}-${version}-doc.tar.gz
     108    distfiles-append        ${my_distname}-doc.tar.gz
    63109
    64110    post-extract {
    65         system "tar xzf ${distpath}/${name}-${version}-doc.tar.gz -C ${workpath}"
     111        system "tar xzf ${distpath}/${my_distname}-doc.tar.gz -C ${workpath}"
    66112    }
    67113
    68114    post-destroot {
    69         set workdocpath ${workpath}/${name}-${version}-doc
     115        set workdocpath ${workpath}/${my_distname}-doc
    70116
    71         xinstall -m 0755 -d ${destroot}${docdir}/html
     117        xinstall -m 0755 -d ${destroot}${docdir}/html/CppUnit
    72118        eval xinstall -m 0644 [glob ${workdocpath}/*.html] ${destroot}${docdir}/html
     119        eval xinstall -m 0644 [glob ${worksrcpath}/CppUnit/doc/*] ${destroot}${docdir}/html/CppUnit
    73120
    74121        foreach {dir} {images css} {
    75122            xinstall -m 0755 -d ${destroot}${docdir}/html/${dir}
     
    112159        }
    113160    }
    114161}
     162
     163livecheck.regex "<title>sources ${name}-(.*) released "