# -*- 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: Portfile 138175 2015-07-01 11:54:54Z hum@macports.org $ PortSystem 1.0 PortGroup github 1.0 PortGroup waf 1.0 github.setup jubatus jubatus_core 0.2.0 categories devel math textproc maintainers hum openmaintainer description Jubatus algorithm component long_description ${description} homepage http://jubat.us/ platforms darwin license {LGPL-2.1 MPL-2} checksums rmd160 ddf7cf90f51661085558168fdeb8b9bcdc4b3285 \ sha256 a760bae6f854ab1eb65343edb4b652120a8999a78bfc7fbc029f148b55e1c2ba depends_build-append port:pkgconfig depends_lib port:msgpack \ port:oniguruma5 platform darwin { if {${os.major} <= 10} { pre-fetch { ui_error "$name does not build on Snow Leopard or earlier." error "unsupported platform" } } } post-destroot { # fix to install_name for installed libraries. set libdir ${destroot}${prefix}/lib foreach libname [glob -tails -directory ${libdir} *.dylib] { system "install_name_tool -id ${prefix}/lib/${libname} ${libdir}/${libname}" } foreach path [glob ${libdir}/*.dylib] { set libpathes [regexp -all -inline {\S+\/libjuba\S+dylib \(} [exec otool -L ${path}]] foreach libpath ${libpathes} { regexp {\S+\/(lib[^\/]+dylib)} ${libpath} srcpath libname system "install_name_tool -change ${srcpath} ${prefix}/lib/${libname} ${path}" } } # install an additional document. set doc_dir ${destroot}${prefix}/share/doc/${name} xinstall -d ${doc_dir} xinstall -m 644 -W ${worksrcpath} \ CONTRIBUTING.md \ ChangeLog.rst \ LICENSE \ LICENSE.MPL2 \ README.rst \ ${doc_dir} }