# $Id: Portfile 105689 2013-05-02 02:45:04Z ram@macports.org $

PortSystem    1.0
PortGroup     active_variants 1.1

name          lalpulsar
version       1.7.0
revision      1
categories    science
platforms     darwin
maintainers   ram
license       GPL

description   LSC Algorithm Library - Pulsar
long_description \
  LIGO Scientific Collaboration Algorithm Library - Pulsar containing \
  routines for continuous gravitatin wave gravitational data analysis.

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 5a56c75f1ff012de14769b3410adaa7db7b18c3a \
              sha256 85545f573a8ea933c0f60c212c941af8e2bbb3d2dad907d7746c82399f116e31

depends_build port:pkgconfig

depends_lib   port:python27 \
              port:gsl \
              port:lal

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

use_parallel_build yes

variant lalxml description {Build with LALXML support} {
  if {[variant_isset swig_python]} {
    require_active_variants lalxml swig_python
  }
  depends_lib-append   port:libxml2 \
                       port:lalxml
  configure.args-append --enable-lalxml
}

variant swig_python description {Build python SWIG bindings} {
  require_active_variants lal swig_python
  depends_build-append  port:swig-python
  depends_lib-append    port:py27-numpy
  configure.args-append --enable-swig-python
}

default_variants +lalxml +swig_python

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