forked from macports/macports-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPortfile
73 lines (56 loc) · 2.39 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup octave 1.0
octave.setup sourceforge octave database 2.4.4
revision 5
license GPL-3+
maintainers {mps @Schamschula} openmaintainer
description Interface to SQL databases, currently only \
postgresql using libpq.
long_description {*}${description}
checksums rmd160 322ffc24271b370ffe9a00b3e3df66a2935dd624 \
sha256 3761962f08beed41aadae27f8a14336b1ad5bcdc046861fa325c82d8943916b0 \
size 156339
depends_lib-append port:octave-struct \
port:swig-octave
# compensate for Octave 5 changes
patchfiles-append patch-octave5.diff
# compensate for Octave 8 changes
patchfiles-append patch-octave8.diff
# compensate for Octave 9 changes
configure.ldflags-append \
-L${prefix}/lib/octave/9.x.x
# set postgresql variants
set postgresql_suffixes {83 84 90 91 92 93 94 95 96 10 11 12 13 14 15}
set default_postgresql_suffix 15
set postgresql_ports {}
set postgresql_variants {}
foreach s ${postgresql_suffixes} {
lappend postgresql_ports postgresql${s}
set postgresql_variants "${postgresql_variants} && !\[variant_isset postgresql${s}\]"
}
set postgresql_variants [string trimleft ${postgresql_variants} " && "]
foreach s ${postgresql_suffixes} {
set p postgresql${s}
set v [join [split ${s} ""] "."]
set i [lsearch -exact ${postgresql_ports} ${p}]
set c [lreplace ${postgresql_ports} ${i} ${i}]
variant ${p} description "Build ${name} using postgresql ${v}" \
conflicts {*}${c} "
depends_lib-append \
port:postgresql${s}
configure.env \
PATH=${prefix}/lib/postgresql${s}/bin:$env(PATH)
configure.ldflags-append -L${prefix}/lib/postgresql${s}
"
}
# postgresql is required; default to ${default_postgresql_suffix}.
if ${postgresql_variants} {
default_variants +postgresql${default_postgresql_suffix}
}
# Make sure -postgresql${default_postgresql_suffix}
# was not specified alone
if ${postgresql_variants} {
ui_error "${name} requires a postgresql to be selected; you cannot use -postgresql${default_postgresql_suffix} as a variant alone."
return -code error "Invalid variant selection"
}