source: trunk/dports/science/lalmetaio/Portfile

Last change on this file was 151366, checked in by ram@…, 11 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.0 KB
Line 
1# $Id: Portfile 151366 2016-08-13 15:36:28Z ryandesign@macports.org $
2
3PortSystem    1.0
4
5name          lalmetaio
6version       1.2.8
7categories    science
8platforms     darwin
9maintainers   ram aronnax
10license       GPL-2+
11
12description   LSC Algorithm Library - MetaIO
13long_description \
14  LIGO Scientific Collaboration Algorithm Library - MetaIO containing \
15  routines for reading/writing LIGO_LW XML files.
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 42314e9e189bf9f4761ef2473dae457d938b1107 \
22              sha256 1e8d14affe06d9885c62d95a60e71926fdcb54a4759d198ed45c72bff399487c
23
24depends_build port:pkgconfig
25
26depends_lib   port:lal \
27              port:metaio
28
29# Choose a compiler that supports OpenMP.
30compiler.whitelist macports-clang-3.8 macports-clang-3.7 macports-clang-3.9
31compiler.fallback  macports-clang-3.8
32
33configure.args --mandir=${prefix}/share/man \
34               --disable-silent-rules \
35               --disable-gcc-flags \
36               --disable-debug \
37               PYTHON=false
38
39use_parallel_build yes
40
41livecheck.type   regex
42livecheck.url    ${master_sites}
43livecheck.regex  {lalmetaio-(\d+(?:\.\d+)*).tar.xz}
44
45# Create subports for each supported Python version
46foreach v {27 34 35} {
47  subport py${v}-${name} {
48    set pythonversion     [string range ${v} 0 end-1].[string index ${v} end]
49    set pythonhome \
50      "${frameworks_dir}/Python.framework/Versions/${pythonversion}"
51    set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages"
52
53    categories-prepend    python
54    description           Python ${pythonversion} bindings for ${description}
55    long_description      ${long_description} This package provides Python \
56                          ${pythonversion} bindings, modules, and scripts.
57
58    depends_build-append  port:swig-python
59    depends_lib-strsed    g/port:lal/port:py${v}-lal/
60    depends_lib-append    port:${name}
61    depends_lib-prepend   port:python${v} port:py${v}-numpy
62
63    configure.args-delete PYTHON=false
64    configure.args-append PYTHON=${pythonhome}/bin/python${pythonversion} --enable-swig-python
65    configure.args-append SWIG_CPPFLAGS="-I${pythonhome}/include"
66
67    destroot.args-append  pythondir="${pythondir}" \
68                          pyexecdir="${pythondir}" \
69                          pkgpythondir="${pythondir}/${name}" \
70                          pkgpyexecdir="${pythondir}/${name}" \
71                          prefix="${pythonhome}"
72
73    # Only install SWIG bindings, Python libraries, and Python scripts
74    destroot {
75      command_exec destroot "" "-C swig"
76      command_exec destroot "" "-C python"
77    }
78
79    post-destroot {
80      if {${subport} eq "py27-${name}"} {
81        foreach script [glob -tails -nocomplain -directory ${destroot}${pythonhome}/bin *] {
82          file link -symbolic ${destroot}${prefix}/bin/${script} ../Library/Frameworks/Python.framework/Versions/${pythonversion}/bin/${script}
83        }
84      }
85    }
86
87    livecheck.type        none
88  }
89}
Note: See TracBrowser for help on using the repository browser.