source: trunk/dports/science/spot/Portfile

Last change on this file was 151614, checked in by mmoll@…, 13 months ago

science/spot: update to version 2.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: Portfile 151614 2016-08-18 15:52:03Z ryandesign@macports.org $
2PortSystem          1.0
3PortGroup           cxx11 1.0
4name                spot
5version             2.1
6categories          science math
7maintainers         mmoll openmaintainer
8description         Spot is an object-oriented model checking library written in C++.
9long_description    ${description}
10homepage            https://spot.lrde.epita.fr/index.html
11platforms           darwin
12license             GPL-3
13master_sites        http://www.lrde.epita.fr/dload/spot/
14checksums           md5     7ba63345e247edf6a7938b1e42ce634b \
15                    sha1    5dce42e6c295138ea47d269ca1d11e4d78a5ef7a \
16                    rmd160  4e0e4d1c4993989532fdd4f7593aa2a765424b3a
17depends_lib-append  port:boost
18
19configure.args-append --disable-python
20
21set pythons_suffixes {34 35}
22
23set pythons_ports {}
24foreach s ${pythons_suffixes} {
25    lappend pythons_ports python${s}
26}
27
28proc python_dir {} {
29    global pythons_suffixes
30    foreach s ${pythons_suffixes} {
31        if {[variant_isset python${s}]} {
32            set p python[string index ${s} 0].[string index ${s} 1]
33            return [file normalize [exec ${p} -c "import sys; print(sys.prefix)"]/lib/${p}/site-packages]
34        }
35    }
36    error "Python support not enabled."
37}
38
39foreach s ${pythons_suffixes} {
40    set p python${s}
41    set v [string index ${s} 0].[string index ${s} 1]
42    set i [lsearch -exact ${pythons_ports} ${p}]
43    set c [lreplace ${pythons_ports} ${i} ${i}]
44    set packagepath ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/${v}/lib/python${v}
45    eval [subst {
46        variant ${p} description "Use Python ${v} for python bindings" conflicts ${c} {
47            depends_lib-append      port:${p}
48            configure.env-append    PYTHON=${prefix}/bin/python${v}
49            configure.args-delete   --disable-python
50            post-destroot {
51                file mkdir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/${v}/lib/python${v}
52                move ${destroot}${prefix}/lib/python${v}/site-packages ${packagepath}/site-packages
53            }
54        }
55    }]
56}
57
58# enable one python variant so that the python bindings can be compiled
59set selected_python python34
60foreach s ${pythons_suffixes} {
61    if {[variant_isset python${s}]} {
62        set selected_python python${s}
63    }
64}
65default_variants +${selected_python}
66
67livecheck.type  regex
68livecheck.url   ${master_sites}
69livecheck.regex ${name}-(\[0-9.\]+).tar.gz
Note: See TracBrowser for help on using the repository browser.