Ticket #51623: Portfile

File Portfile, 4.0 KB (added by emaros, 8 years ago)
Line 
1# $Id: Portfile 126910 2014-10-17 14:33:23Z aronnax@macports.org $
2
3PortSystem        1.0
4
5name              nds2-client
6version           0.12.2
7revision          1
8categories        science
9platforms         darwin
10license           GPL-2
11maintainers       ligo.org:ed.maros ram openmaintainer
12
13description       Network Data Server Client
14long_description \
15  Client tool for accessing streamed LIGO data using the Network \
16  Data Server version 2.
17
18homepage          https://wiki.ligo.org/DASWG/NDSClient
19master_sites      http://software.ligo.org/lscsoft/source/
20
21checksums         rmd160  3c853077c9bf2508866e603470aadbe1dec09e86 \
22                  sha256  fc67bf36a34c5c8b9d1f422ce2b1442f04bb56b467cbecb8c86391575c4e0787
23
24depends_build-append \
25                  port:pkgconfig
26
27default_variants  +doc +gssapi +swig_java
28
29configure.javac   /usr/bin/javac -source 1.5 -target 1.5
30configure.args    --disable-silent-rules \
31                  --disable-doc \
32                  --disable-swig-python \
33                  --disable-swig-octave \
34                  --disable-swig-java \
35                  --without-sasl \
36                  --without-gssapi
37
38set pythons_suffixes {27}
39
40set pythons_ports {}
41foreach s ${pythons_suffixes} {
42    lappend pythons_ports swig_python${s}
43}
44
45variant doc description "Enable HTML documentation" {
46
47    depends_build-append            port:docbook-xsl \
48                                    port:libxslt
49    configure.args-replace          --disable-doc --enable-doc
50}
51
52foreach s ${pythons_suffixes} {
53    set p python${s}
54    set v [string index ${s} 0].[string index ${s} 1]
55    set i [lsearch -exact ${pythons_ports} swig_${p}]
56    set c [lreplace ${pythons_ports} ${i} ${i}]
57    set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}
58    eval [subst {
59        variant swig_${p} description "Enable SWIG Python interface for Python ${v}" conflicts ${c} {
60
61            depends_build-append    port:swig-python
62            depends_lib-append      port:${p} port:py${s}-numpy
63            destroot.args-append    pythondir="${d}" pyexecdir="${d}"
64            configure.args-replace  --disable-swig-python --enable-swig-python
65            configure.python        ${prefix}/bin/python${v}
66        }
67    }]
68}
69
70if {![variant_isset swig_python34]} {
71    default_variants +swig_python27
72}
73
74variant swig_octave description "Enable SWIG Octave interface" {
75
76    depends_build-append            port:swig-octave
77    configure.args-replace          --disable-swig-octave --enable-swig-octave
78
79    # At least as of Octave 3.2.4, the Octave C++ API does not work with clang.
80    compiler.blacklist-append       *clang*
81
82}
83
84variant swig_java description "Enable SWIG Java interface" {
85
86    # Need GNU Classpath to get jni.h header
87    depends_build-append            bin:javac:gcc48 port:swig-java port:gnu-classpath
88    depends_lib-append              bin:java:kaffe
89    configure.args-replace          --disable-swig-java --enable-swig-java
90
91}
92
93variant sasl description "Use cyrus-sasl2 for authentication" conflicts gssapi {
94
95    configure.args-replace          --without-sasl --with-sasl=${prefix}
96    depends_lib-append              port:cyrus-sasl2
97
98}
99
100variant gssapi description "Use kerberos5 gssapi for authentication" conflicts sasl {
101
102    configure.args-replace          --without-gssapi --with-gssapi=${prefix}
103    depends_lib-append              port:kerberos5
104
105}
106
107set need_octave 0
108if {[variant_isset swig_octave]} {
109    set need_octave 1
110}
111if ${need_octave} {
112    # The Octave dependency can be satisfied by either octave or octave-devel.
113    depends_lib-append              path:bin/octave:octave
114    destroot.args-append            pkgoctexecdir="${prefix}/share/octave/site/m"
115}
116
117set need_sqlite 0
118foreach s ${pythons_ports} {
119    if {[variant_isset ${s}]} {
120        set need_sqlite 1
121    }
122}
123if {[variant_isset swig_octave]} {
124    set need_sqlite 1
125}
126if {[variant_isset swig_java]} {
127    set need_sqlite 1
128}
129if ${need_sqlite} {
130    depends_lib-append port:sqlite3
131}
132
133use_parallel_build yes
134
135livecheck.type    regex
136livecheck.url     ${master_sites}
137livecheck.regex   {nds2-client-(\d+(?:\.\d+)*).tar.gz}