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