# $Id: Portfile 151388 2016-08-14 16:11:30Z ram@macports.org $ PortSystem 1.0 PortGroup active_variants 1.1 name lalinference version 1.7.0 categories science platforms darwin maintainers ram aronnax license GPL-2+ description LSC Algorithm Library - Inference long_description \ LIGO Scientific Collaboration Algorithm Library - Inference containing \ routines for Bayesian inference data analysis. homepage https://www.lsc-group.phys.uwm.edu/daswg/projects/lalsuite.html master_sites http://software.ligo.org/lscsoft/source/lalsuite use_xz yes checksums rmd160 c2e41deac545cd4c1b8700b2fc1255627001798e \ sha256 5d8568279cf31698b1615e1a9cfac25b828853414d461cdedc6dc8e5579f198f depends_build port:pkgconfig depends_lib port:gsl \ port:libomp \ port:metaio \ port:libxml2 \ port:lal \ port:lalframe \ port:lalmetaio \ port:lalxml \ port:lalsimulation \ port:lalburst \ port:lalinspiral \ port:lalpulsar \ port:healpix-c \ port:ligo-lvalert # Add missing HAVE_PYTHON conditional. # Fixed on master; remove upon next release of LALSuite. use_autoreconf yes patchfiles patch-python_tiger_Makefile.am.diff # Choose a compiler that supports OpenMP. compiler.whitelist macports-clang-3.8 macports-clang-3.7 macports-clang-3.9 compiler.fallback macports-clang-3.8 configure.args --mandir=${prefix}/share/man \ --disable-silent-rules \ --disable-gcc-flags \ --disable-debug \ --enable-openmp \ PYTHON=false use_parallel_build yes pre-activate { # lalinference now contains files that used to be provided by lalapps if {![catch {set installed [lindex [registry_active lalapps] 0]}]} { set _version [lindex $installed 1] if {[vercmp $_version 6.19.0] < 0} { # lalapps used to install some files now provided by lalinference in versions < 6.19.0 registry_deactivate_composite lalapps "" [list ports_nodepcheck 1] } } } # lalxml is currently enabled by default but may change in the future #variant lalxml description {Build with LALXML support} { # require_active_variants lalpulsar lalxml # depends_lib-append port:libxml2 \ # port:lalxml # configure.args-append --enable-lalxml #} livecheck.type regex livecheck.url ${master_sites} livecheck.regex {lalinference-(\d+(?:\.\d+)*).tar.xz} # Create subports for each supported Python version foreach v {27 34 35} { 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_lib-strsed g/port:lal/port:py${v}-lal/ depends_lib-append port:${name} depends_lib-prepend port:python${v} port:py${v}-numpy depends_run-append port:py${v}-healpy configure.args-delete PYTHON=false configure.args-append PYTHON=${pythonhome}/bin/python${pythonversion} --enable-swig-python configure.args-append SWIG_CPPFLAGS="-I${pythonhome}/include" 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 { 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} } } } livecheck.type none } }