# $Id: Portfile 117162 2014-02-18 00:04:28Z ram@macports.org $

PortSystem    1.0
PortGroup     active_variants 1.1

name          lalapps
version       6.14.0
categories    science
platforms     darwin
maintainers   ram
license       GPL

description   LSC Algorithm Library Applications
long_description \
  LALApps is a set of codes for gravitational wave data analysis, \
  against the LSC Algorithm Library.

homepage      https://www.lsc-group.phys.uwm.edu/daswg/projects/lalsuite.html
master_sites  http://www.lsc-group.phys.uwm.edu/daswg/download/software/source/lalsuite/

checksums     rmd160 e763326bee427d512b9d63649e1b91f8c5a4ffce \
              sha256 9d09c453ad6b32c68523d82bd97f991e6cac0375dc9e26890788d50a5d906531

depends_build port:pkgconfig

depends_lib   port:python27 \
              port:gsl \
              port:fftw-3 \
              port:fftw-3-single \
              port:libframe \
              port:metaio \
              port:lal \
              port:lalframe \
              port:lalmetaio \
              port:lalsimulation \
              port:lalburst \
              port:lalinspiral \
              port:lalpulsar \
              port:lalinference \
              port:lalstochastic \
              port:glue

configure.python ${prefix}/bin/python2.7
configure.args   --mandir=${prefix}/share/man \
                 --disable-silent-rules \
                 --disable-gcc-flags \
                 --disable-debug

use_parallel_build yes

set pythondir "${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages"
destroot.args-append \
              pythondir="${pythondir}" \
              pyexecdir="${pythondir}" \
              pkgpythondir="${pythondir}/${name}" \
              pkgpyexecdir="${pythondir}/${name}"

variant lalxml description {Build with LALXML support} {
  require_active_variants lalpulsar lalxml
  require_active_variants lalinference lalxml
  depends_lib-append    port:libxml2 \
                        port:lalxml
  configure.args-append --enable-lalxml
}

default_variants +lalxml

livecheck.type   regex
livecheck.url    ${master_sites}
livecheck.regex  {lalapps-(\d+(?:\.\d+)*).tar.gz}
