Files

98 lines
3.7 KiB
Tcl

# -*- 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
PortSystem 1.0
name ldas-tools-diskcacheAPI
version 2.5.6
categories science
maintainers nomaintainer
description Filters library used by ldas-tools
long_description {*}${description}
homepage https://wiki.ligo.org/DASWG/LDASTools
master_sites https://software.igwn.org/lscsoft/source/
checksums rmd160 c544032228f5c93d1238f38daeba29c53bb3520c \
sha256 2e0be2e5193f900a3db0da8c495b277560b96f5228ee117d456c54782fb9e713
depends_build port:pkgconfig
depends_lib port:ldas-tools-ldasgen
configure.args --disable-warnings-as-errors \
--disable-silent-rules \
--with-optimization=high \
--disable-tcl \
--disable-python \
--without-doxygen \
--without-dot \
--disable-latex
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
use_parallel_build yes
if {${os.platform} eq "darwin" && ${os.major} < 11} {
known_fail yes
pre-fetch {
ui_error "${name} only runs on Mac OS X 10.7 or greater."
return -code error "incompatible Mac OS X version"
}
}
#------------------------------------------------------------------------
livecheck.type regex
livecheck.url ${master_sites}
livecheck.regex {ldas-tools-diskcacheAPI-(\d+(?:\.\d+)*).tar.gz}
#========================================================================
# Create subports for each supported Python version
#========================================================================
foreach v {27} {
set python.version ${v}
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
subport py${v}-${name} {
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
post-destroot {
if {${subport} eq "py27-${name}"} {
foreach script [glob -tails -nocomplain -directory ${destroot}${python.prefix}/bin *] {
file link -symbolic ${destroot}${prefix}/bin/${script} ../Library/Frameworks/Python.framework/Versions/${python.version}/bin/${script}
}
}
}
livecheck.type none
}
}