# -*- 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
PortGroup compiler_blacklist_versions 1.0
maintainers {ligo.org:ed.maros @emaros}
description Filters library used by ldas-tools
long_description ${description}
homepage https://wiki.ligo.org/DASWG/LDASTools
master_sites http://software.ligo.org/lscsoft/source/
checksums rmd160 ba4f9388161772ab3840ece688c1178c3c559509 \
sha256 2a9130cb932fbe10ac1c9a22809e188a78d598f8419a3b45b161fda8b14bf5e2
depends_build port:pkgconfig \
depends_lib port:ldas-tools-al
configure.args --disable-warnings-as-errors \
--with-optimization=high \
if {${configure.cxx_stdlib} eq "libstdc++" } {
configure.args-append --disable-cxx11
# requires clang from Xcode5 or higher to build
compiler.blacklist-append {clang < 500.2.75} llvm-gcc-4.2 gcc-4.2
if {${os.platform} eq "darwin" && ${os.major} < 11} {
ui_error "${name} only runs on Mac OS X 10.7 or greater."
return -code error "incompatible Mac OS X version"
#------------------------------------------------------------------------
livecheck.url ${master_sites}
livecheck.regex {ldas-tools-ldasgen-(\d+(?:\.\d+)*).tar.gz}
#========================================================================
# Create subports for each supported Python version
#========================================================================
set python.branch [string range ${python.version} 0 end-1].[string index ${python.version} end]
set python.bin ${prefix}/bin/python${python.branch}
set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
set python.site_packages "${python.prefix}/lib/python${python.branch}/site-packages"
set python.pkgname LDAStools
categories-prepend python
description Python ${python.version} bindings for ${description}
long_description ${long_description} This package provides Python \
${python.version} bindings, modules, and scripts.
depends_build-append port:swig-python
depends_lib-append port:${name}
depends_lib-append port:py${python.version}-ldas-tools-al
depends_lib-append port:python${python.version}
configure.python ${python.bin}
configure.args-replace PYTHON=false PYTHON=${python.prefix}/bin/python${python.version}
configure.args-replace --disable-python --enable-python
configure.args-append SWIG_CPPFLAGS="-I${python.prefix}/include"
destroot.args-append pythondir="${python.site_packages}" \
pyexecdir="${python.site_packages}" \
pkgpythondir="${python.site_packages}/${python.pkgname}" \
pkgpyexecdir="${python.site_packages}/${python.pkgname}" \
-C ${worksrcpath}/swig/python
if {${subport} eq "py27-${name}"} {