# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name poco version 1.4.3p1 revision 1 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 sourceforge:project/poco/sources/poco-[strsed ${version} {s/[^0-9.].*$//}]:source \ sourceforge:project/poco/docs/poco-[strsed ${version} {s/[^0-9.].*$//}]-doc:doc use_bzip2 yes distname ${name}-${version}-all distfiles ${distname}${extract.suffix}:source extract.only ${distname}${extract.suffix} set docdistname ${name}-[strsed ${version} {s/[a-z].*$//}]-all-doc checksums ${distname}${extract.suffix} \ rmd160 3ec28ef3a78bb9850965eef29a81150b4ea7d4a3 \ sha256 8a3fd41234a8015e5c46470baa90140c7726cd7dc70d8300c655f08d71fdc35a \ ${docdistname}.tar.gz \ rmd160 15cff661019f96bdd1ba2b7b00725117d9e2605c \ sha256 c72c29835a4922356da197c08597e448f79e4e2a0202d8dbe0936114d13a0028 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"} } } } set docdir ${prefix}/share/doc/${name} 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 and Crypto library} { depends_lib-append port: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] } variant doc description {Install extra documentation} { distfiles-append ${docdistname}.tar.gz:doc post-extract { system "tar xzf ${distpath}/${docdistname}.tar.gz -C ${workpath}" } post-destroot { set workdocpath ${workpath}/${docdistname} xinstall -d ${destroot}${docdir}/html/CppUnit eval xinstall -m 0644 [glob -directory ${workdocpath} *.html] ${destroot}${docdir}/html eval xinstall -m 0644 [glob -directory ${worksrcpath}/CppUnit/doc *] ${destroot}${docdir}/html/CppUnit foreach {dir} {images css} { xinstall -d ${destroot}${docdir}/html/${dir} eval xinstall -m 0644 [glob -directory ${workdocpath}/${dir} *] ${destroot}${docdir}/html/${dir} } } } livecheck.regex /${name}-(\[0-9.p\]+)${extract.suffix}