# $Id$ PortSystem 1.0 name poco version 1.3.1 categories devel maintainers nox platforms darwin description POCO C++ Libraries long_description \ POCO aims to be for network-centric, cross-platform C++ software development \ what Apple's Cocoa is for Mac development, or Ruby on Rails is for Web \ development -- a powerful, yet easy to use platform to build your applications upon. homepage http://pocoproject.org/ master_sites sourceforge use_bzip2 yes set my_distname ${distname} checksums [suffix ${distname}] \ md5 e6ef09835af19498552f530964e06267 \ sha1 e1be1c364af8bd8edf7855ffa11fc2ad15796263 \ rmd160 c79227a33b62528a69d4869c48855bb496e24bfe \ [suffix ${distname}-ssl] \ md5 8d0010ad6dd06e414107d46b3d06de72 \ sha1 ba6a03a119e791a653dd6c9e2d07dd9b77caf997 \ rmd160 b52ca94dae5813d7254bece1e71e86430e9a86d9 \ [suffix ${distname}-data] \ md5 22eb8f7cc8ab5276ba37a9937515f016 \ sha1 f8367f2f10946d8cbc096e7d3736f34c1ac09454 \ rmd160 a39c9f197255959bc2e44bfbbec1aba72a46dd6c \ ${my_distname}-doc.tar.gz \ md5 d952ebe3fc3e012857b2636b582133e3 \ sha1 912de8e62ae264408b130c760e08b6867d674f00 \ rmd160 2de13a5c8f93364730da685c201ef1a894b2da4c set config Darwin post-patch { reinplace -E "/^CFLAGS\[\[:>:\]\]/s|\$|[join ${configure.cppflags} " "] [join ${configure.cflags} " "]|" \ ${worksrcpath}/build/config/${config} reinplace -E "/^LINKFLAGS\[\[:>:\]\]/s|\$|[join ${configure.ldflags} " "]|" \ ${worksrcpath}/build/config/${config} } configure.args --no-samples build.target poco test.run yes test { proc luniq {list} { set x() {}; unset x foreach {item} ${list} { set x(${item}) "" } return [array names x] } set file [open ${worksrcpath}/components] set components {} while {[gets ${file} component] != -1} { lappend components ${component} } close ${file} foreach {component} [luniq ${components}] { foreach {testrunner} [glob -nocomplain ${worksrcpath}/${component}/testsuite/bin/*/*/testrunner{,d}] { catch {system "${testrunner} -all -print"} } } } set docdir ${prefix}/share/doc/${name}-${version} post-destroot { xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} CHANGELOG CONTRIBUTORS LICENSE NEWS README VERSION \ ${destroot}${docdir} if {! [variant_isset doc]} { xinstall -d ${destroot}${docdir}/html xinstall -m 0644 -W ${worksrcpath}/doc Acknowledgements.html ${destroot}${docdir}/html } } variant ssl description {Build NetSSL library} { distname ${my_distname}-ssl depends_lib-append port:openssl } variant data description {Build Data library} { distname ${my_distname}-data depends_lib-append lib:libiodbc:unixODBC post-patch { if {! [variant_isset ssl]} { reinplace -E {/^(COMPONENTS|\.PHONY|libexecs|tests|samples)/s/NetSSL_OpenSSL[^ ]*//} \ ${worksrcpath}/Makefile reinplace {/NETSSL_OpenSSL/d} ${worksrcpath}/components } } } variant doc description {Install extra documentation} { extract.only ${distfiles} distfiles-append ${my_distname}-doc.tar.gz post-extract { system "tar xzf ${distpath}/${my_distname}-doc.tar.gz -C ${workpath}" } post-destroot { set workdocpath ${workpath}/${my_distname}-doc xinstall -d ${destroot}${docdir}/html/CppUnit eval xinstall -m 0644 [glob ${workdocpath}/*.html] ${destroot}${docdir}/html eval xinstall -m 0644 [glob ${worksrcpath}/CppUnit/doc/*] ${destroot}${docdir}/html/CppUnit foreach {dir} {images css} { xinstall -d ${destroot}${docdir}/html/${dir} eval xinstall -m 0644 [glob ${workdocpath}/${dir}/*] ${destroot}${docdir}/html/${dir} } } } platform darwin { post-destroot { set libdir ${prefix}/lib foreach {dylib} [glob -type f -directory ${destroot}${libdir} -tail *.dylib] { system "install_name_tool -id ${libdir}/${dylib} ${destroot}${libdir}/${dylib}" set otool [lrange [split [exec otool -L ${dylib}] \n] 2 end] foreach {otoolentry} ${otool} { set lib [lindex ${otoolentry} 0] if {! [string match ${worksrcpath}/* ${lib}]} { continue } system "install_name_tool -change ${lib} ${libdir}/[file tail ${lib}] \ ${destroot}${libdir}/${dylib}" } } } } platform darwin 7 { set config Darwin7 configure.args-append --config=${config} } livecheck.regex "sources ${name}-(.*) released.*"