source: trunk/dports/science/lalburst/Portfile

Last change on this file was 151366, checked in by ram@…, 12 months ago

science/*lal*: latest science run release

switch python bindings to subports
support multiple python versions
compile using an OpenMP enabled compiler
add aronnax as co-maintainer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Portfile 151366 2016-08-13 15:36:28Z ryandesign@macports.org $
2
3PortSystem    1.0
4
5name          lalburst
6version       1.4.2
7categories    science
8platforms     darwin
9maintainers   ram aronnax
10license       GPL-2+
11
12description   LSC Algorithm Library - Burst
13long_description \
14  LIGO Scientific Collaboration Algorithm Library - Burst, containing \
15  routines for burst gravitational wave data analysis.
16
17homepage      https://www.lsc-group.phys.uwm.edu/daswg/projects/lalsuite.html
18master_sites  http://software.ligo.org/lscsoft/source/lalsuite
19use_xz        yes
20
21checksums     rmd160 a07161b063463f1b3ea108e80f650c95a3fd06ab \
22              sha256 0a10f43e6ea4948163484cfcd8f8c80c7de6785ce1d65e2976b99e6d720760ad
23
24depends_build port:pkgconfig
25
26depends_lib   port:lal \
27              port:lalmetaio \
28              port:lalsimulation \
29              port:gsl \
30              port:metaio
31
32# Choose a compiler that supports OpenMP.
33compiler.whitelist macports-clang-3.8 macports-clang-3.7 macports-clang-3.9
34compiler.fallback  macports-clang-3.8
35
36configure.args --mandir=${prefix}/share/man \
37               --disable-silent-rules \
38               --disable-gcc-flags \
39               --disable-debug \
40               PYTHON=false
41
42use_parallel_build yes
43
44livecheck.type   regex
45livecheck.url    ${master_sites}
46livecheck.regex  {lalburst-(\d+(?:\.\d+)*).tar.xz}
47
48# Create subports for each supported Python version
49foreach v {27 34 35} {
50  subport py${v}-${name} {
51    set pythonversion     [string range ${v} 0 end-1].[string index ${v} end]
52    set pythonhome \
53      "${frameworks_dir}/Python.framework/Versions/${pythonversion}"
54    set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages"
55
56    categories-prepend    python
57    description           Python ${pythonversion} bindings for ${description}
58    long_description      ${long_description} This package provides Python \
59                          ${pythonversion} bindings, modules, and scripts.
60
61    depends_build-append  port:swig-python
62    depends_lib-strsed    g/port:lal/port:py${v}-lal/
63    depends_lib-append    port:${name}
64    depends_lib-prepend   port:python${v} port:py${v}-numpy
65
66    configure.args-delete PYTHON=false
67    configure.args-append PYTHON=${pythonhome}/bin/python${pythonversion} --enable-swig-python
68    configure.args-append SWIG_CPPFLAGS="-I${pythonhome}/include"
69
70    destroot.args-append  pythondir="${pythondir}" \
71                          pyexecdir="${pythondir}" \
72                          pkgpythondir="${pythondir}/${name}" \
73                          pkgpyexecdir="${pythondir}/${name}" \
74                          prefix="${pythonhome}"
75
76    # Only install SWIG bindings, Python libraries, and Python scripts
77    destroot {
78      command_exec destroot "" "-C swig"
79      command_exec destroot "" "-C python"
80    }
81
82    post-destroot {
83      if {${subport} eq "py27-${name}"} {
84        foreach script [glob -tails -nocomplain -directory ${destroot}${pythonhome}/bin *] {
85          file link -symbolic ${destroot}${prefix}/bin/${script} ../Library/Frameworks/Python.framework/Versions/${pythonversion}/bin/${script}
86        }
87      }
88    }
89
90    livecheck.type        none
91  }
92}
Note: See TracBrowser for help on using the repository browser.