# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name poco version 1.6.0 categories devel maintainers nomaintainer platforms darwin license Boost-1 supported_archs i386 x86_64 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 ${homepage}releases/poco-[strsed ${version} {s/[^0-9.].*$//}]/ distname ${name}-${version}-all checksums rmd160 ff6069681246bafc546a842d92ec627b683b62fb \ sha256 17506e0f7abc2a6e933ef0f46a6c5ca6f7cb599370b11979f4e61b604ada240f set docdir ${prefix}/share/doc/${name} if {${subport} eq ${name}} { use_bzip2 yes set omit {NetSSL_OpenSSL Data/ODBC Data/MySQL Crypto} if {[string match *clang* ${configure.compiler}]} { set config Darwin-clang } else { set config Darwin } universal_variant no # Something in the dependency checking matches the macports.org in the path # as a *.o file. It's all downhill from there. This patch removes the # dependency (.dep) file creation & use from the Makefiles. # # Note future maintainers / contributors: you will find you won't need # this patch when building outside the *macports.org* path. Don't remove it # without testing within the *macports.org* build path. See ticket #19486. patchfiles patch-rules-deps.diff configure.args --no-samples --config=${config} # Make sure poco build uses the right compiler. build.args-append CC=${configure.cc} \ CXX=${configure.cxx} \ CPP=${configure.cpp} \ POCO_HOST_OSARCH=${configure.build_arch} pre-configure { configure.args-append --omit=[join ${omit} ,] } post-patch { reinplace -E "/^C(XX)?FLAGS +=/s|\$| ${configure.cppflags} ${configure.cflags}|" \ ${worksrcpath}/build/config/${config} reinplace -E "/^((SH|DY)LIB|LINKFLAGS) +=/s|\$| -L\$(LIBPATH) ${configure.ldflags}|" \ ${worksrcpath}/build/config/${config} reinplace -E "/^SHLIB +=/s|\$| -Wl,-install_name,${prefix}/lib/\$(notdir \$@)|" \ ${worksrcpath}/build/config/${config} } use_parallel_build yes 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"} } } } post-destroot { xinstall -d ${destroot}${docdir}/html xinstall -m 0644 -W ${worksrcpath} CHANGELOG CONTRIBUTORS LICENSE NEWS README VERSION \ ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath}/doc Acknowledgements.html ${destroot}${docdir}/html copy ${worksrcpath}/CppUnit/doc ${destroot}${docdir}/html/CppUnit } variant ssl description {Build NetSSL and Crypto library} { depends_lib-append path:lib/libssl.dylib:openssl set omit [ldelete [ldelete ${omit} NetSSL_OpenSSL] Crypto] } variant odbc description {Build ODBC backend for Data library} { depends_lib-append lib:libiodbc:unixODBC set omit [ldelete ${omit} Data/ODBC] } variant mysql description {Build MySQL backend for Data library} { depends_lib-append path:bin/mysql_config5:mysql5 configure.cppflags-append -I${prefix}/include/mysql5/mysql configure.ldflags-append -L${prefix}/lib/mysql5/mysql set omit [ldelete ${omit} Data/MySQL] } } subport ${name}-docs { license unknown supported_archs noarch description documentation for POCO long_description This port contains an offline copy of the POCO documentation. homepage ${homepage}documentation/ distname ${distname}-doc checksums rmd160 9ff1b461532cb7391ea631e33c6d288692c07dac \ sha256 6fe1a541353580cf1d91b211e710d1d579b1ddc82a0a5fbcd9c8907063c77c81 use_configure no build {} destroot { xinstall -d ${destroot}${docdir} copy ${worksrcpath} ${destroot}${docdir}/html } } if {${subport} eq ${name}} { livecheck.type regex livecheck.url ${homepage}download/ livecheck.regex /${name}-(\[0-9.p\]+)\\.tar } else { livecheck.type none }