Permalink
Fetching contributors…
Cannot retrieve contributors at this time
147 lines (118 sloc) 5.29 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
name lalmetaio
version 1.3.1
revision 5
description LSC Algorithm Library - MetaIO
long_description \
LIGO Scientific Collaboration Algorithm Library - MetaIO containing \
routines for reading/writing LIGO_LW XML files.
checksums rmd160 c64391a177bce7bc316eefb9d7fd36de997ee8af \
sha256 f88e4baed92fd064e055ec7975d3098dfd6978b1a3209b220d1e87fdd4da2991
depends_lib port:lal \
port:metaio
###############################################################################
### Everything below this line is common to all LALSuite ports. ###############
###############################################################################
categories science
platforms darwin
maintainers {ram @skymoo} {aronnax @lpsinger}
license GPL-2+
# The GPL and OpenSSL licenses conflict with each other, and our build
# dependency on Python results in an indirect dependency on OpenSSL.
# However, there is no real conflict in the case of LALSuite because Python
# is used (1) as an interpreter to run part of the build and (2) as a
# separately installed interpreter that is invoked when the user runs some of
# our scripts.
license_noconflict openssl
homepage https://wiki.ligo.org/DASWG/LALSuite
master_sites http://software.ligo.org/lscsoft/source/lalsuite
use_xz yes
depends_build-append \
port:pkgconfig \
port:swig \
port:python27
# Choose a compiler that supports OpenMP.
compiler.whitelist macports-clang-6.0 macports-clang-5.0 macports-clang-4.0 macports-clang-7.0 macports-clang-3.9
compiler.fallback macports-clang-6.0
set default_pythonarg PYTHON=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7
configure.args-append \
--mandir=${prefix}/share/man \
--disable-silent-rules \
--disable-gcc-flags \
--enable-swig-iface \
--disable-python \
${default_pythonarg}
test.run yes
test.target check
# Create subports for each supported Python version
foreach v {27 35 36 37} {
subport py${v}-${name} {
set pythonversion [string range ${v} 0 end-1].[string index ${v} end]
set pythonhome \
"${frameworks_dir}/Python.framework/Versions/${pythonversion}"
set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages"
categories-prepend python
description Python ${pythonversion} bindings for ${description}
long_description ${long_description} This package provides Python \
${pythonversion} bindings, modules, and scripts.
depends_build-append port:swig-python
depends_build-replace port:python27 port:python${v}
depends_lib-strsed g/port:lal/port:py${v}-lal/
depends_lib-append port:${name} port:py${v}-numpy
configure.args-replace ${default_pythonarg} PYTHON=${pythonhome}/bin/python${pythonversion}
configure.args-replace --disable-python --enable-python
configure.args-append --enable-swig-python
destroot.args-append pythondir="${pythondir}" \
pyexecdir="${pythondir}" \
pkgpythondir="${pythondir}/${name}" \
pkgpyexecdir="${pythondir}/${name}" \
prefix="${pythonhome}"
# Only install SWIG bindings, Python libraries, and Python scripts
destroot {
command_exec destroot "" "-C swig"
command_exec destroot "" "-C python"
}
post-destroot {
# Remove Python include directory
# (duplicate of SWIG headers in ${prefix}/include)
file delete -force ${destroot}${pythonhome}/include
# Create symbolic links in ${prefix}/bin to Python 2.7 scripts
if {${subport} eq "py27-${name}"} {
foreach script [glob -tails -nocomplain -directory ${destroot}${pythonhome}/bin *] {
file link -symbolic ${destroot}${prefix}/bin/${script} ../Library/Frameworks/Python.framework/Versions/${pythonversion}/bin/${script}
}
}
}
}
}
subport octave-${name} {
set pythonversion [string range ${v} 0 end-1].[string index ${v} end]
set pythonhome \
"${frameworks_dir}/Python.framework/Versions/${pythonversion}"
set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages"
categories-prepend octave
description Octave ${pythonversion} bindings for ${description}
long_description ${long_description} This package provides Octave \
bindings, modules, and scripts.
depends_build-append port:swig-octave
depends_lib-strsed g/port:lal/port:octave-lal/
depends_lib-append port:${name} port:octave
configure.args-append --enable-swig-octave
# Only install SWIG bindings, Python libraries, and Python scripts
destroot {
command_exec destroot "" "-C swig"
}
post-destroot {
# Remove Octave include directory
# (duplicate of SWIG headers in ${prefix}/include)
file delete -force ${destroot}${prefix}/include
}
}
if {${name} eq ${subport}} {
livecheck.type regex
livecheck.url ${master_sites}
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
} else {
livecheck.type none
}