Permalink
Fetching contributors…
Cannot retrieve contributors at this time
193 lines (144 sloc) 7.02 KB
# -*- 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
PortGroup cmake 1.0
name nds2-client
version 0.15.2
revision 1
categories science
platforms darwin
license GPL-2
maintainers {ligo.org:ed.maros @emaros} openmaintainer
description Network Data Server Client
long_description \
Client tool for accessing streamed LIGO data using the Network \
Data Server version 2.
homepage https://wiki.ligo.org/DASWG/NDSClient
master_sites http://software.ligo.org/lscsoft/source/
checksums rmd160 46a1c7d6cfe9c3e1c6a7e04c5421efe026edee00 \
sha256 39e9f04b6cb454fe6de992b10e323299bc291ad7685662a9693d1a977368c667
depends_build-append \
port:pkgconfig \
port:swig
depends_lib-append port:sqlite3
if {![variant_isset sasl]} {
default_variants +gssapi
}
cmake.out_of_source yes
configure.args -DPYTHON=false \
-DPYTHON_EXECUTABLE=false \
-DENABLE_SWIG_JAVA=no \
-DENABLE_SWIG_MATLAB=no \
-DENABLE_SWIG_OCTAVE=no \
-DENABLE_SWIG_PYTHON=no \
-DWITH_SASL=no \
-DWITH_GSSAPI=no \
-DCMAKE_INSTALL_SYSCONFDIR=${prefix}/etc \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1
variant sasl description "Use cyrus-sasl2 for authentication" conflicts gssapi {
configure.args-replace -DWITH_SASL=no -DWITH_SASL=${prefix}
depends_lib-append port:cyrus-sasl2
}
variant gssapi description "Use kerberos5 gssapi for authentication" conflicts sasl {
configure.args-replace -DWITH_GSSAPI=no -DWITH_GSSAPI=${prefix}
depends_lib-append port:kerberos5
}
test.run yes
test.cmd ${prefix}/bin/ctest
test.target -R '.*'
use_parallel_build yes
livecheck.type regex
livecheck.url ${master_sites}
livecheck.regex {nds2-client-(\d+(?:\.\d+)*).tar.gz}
#========================================================================
# Create subports for Java
#========================================================================
subport ${name}-java {
categories-append java
description Java bindings for ${description}
long_description ${long_description} This package provides Java \
bindings, modules, and scripts.
# Need GNU Classpath to get jni.h header
depends_build-append port:swig-java port:gnu-classpath
depends_lib-append bin:java:kaffe
depends_lib-append port:${name}
configure.javac /usr/bin/javac -source 1.5 -target 1.5
configure.args-replace -DENABLE_SWIG_JAVA=no -DENABLE_SWIG_JAVA=yes
destroot.target install
destroot.args-append -C ${worksrcpath}/../build/swig/java
livecheck.type none
}
#========================================================================
# Create subports for MATLAB
#========================================================================
subport ${name}-matlab {
categories-append matlab
description MATLAB bindings for ${description}
long_description ${long_description} This package provides MATLAB \
bindings, modules, and scripts.
# Need GNU Classpath to get jni.h header
depends_build-append port:swig-java port:gnu-classpath
depends_lib-append port:${name}-java
destroot.target install
configure.args-replace -DENABLE_SWIG_JAVA=no -DENABLE_SWIG_JAVA=yes
configure.args-replace -DENABLE_SWIG_MATLAB=no -DENABLE_SWIG_MATLAB=yes
destroot.args-append -C ${worksrcpath}/../build/swig/matlab
livecheck.type none
}
#========================================================================
# Create subports for Octave
#========================================================================
subport ${name}-octave {
categories-append octave
description Octave bindings for ${description}
long_description ${long_description} This package provides Octave \
bindings, modules, and scripts.
depends_build-append port:swig-octave
depends_lib-append path:bin/octave:octave
depends_lib-append port:${name}
destroot.target install
destroot.args-append pkgoctexecdir="${prefix}/share/octave/site/m"
# At least as of Octave 3.2.4, the Octave C++ API does not work with clang.
# compiler.blacklist-append *clang*
configure.args-replace -DENABLE_SWIG_OCTAVE=no -DENABLE_SWIG_OCTAVE=yes
destroot.args-append -C ${worksrcpath}/../build/swig/octave
livecheck.type none
}
#========================================================================
# 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 ""
subport py${v}-${name} {
categories-append 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:python${python.version}
depends_lib-append port:py${python.version}-numpy
configure.python ${python.bin}
configure.args-replace -DPYTHON=false -DPYTHON=${python.prefix}/bin/python${python.branch}
configure.args-replace -DPYTHON_EXECUTABLE=false -DPYTHON_EXECUTABLE=${python.prefix}/bin/python${python.branch}
configure.args-replace -DENABLE_SWIG_PYTHON=no -DENABLE_SWIG_PYTHON=yes
configure.args-append -DPYTHON_MODULE_INSTALL_DIR="${python.site_packages}" \
-DPYTHON_EXTMODULE_INSTALL_DIR="${python.site_packages}" \
-DSWIG_CPPFLAGS="-I${python.prefix}/include"
destroot.target install
destroot.args-append -C ${worksrcpath}/../build/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
}
}