source: trunk/dports/math/octave-database/Portfile @ 135907

Last change on this file since 135907 was 135907, checked in by michaelld@…, 5 years ago

octave-database:
+ update to 2.3.2;
+ move postgresql 8.[0-2] to legacy variants, using 9.2 as the default if one of those is already in use;
+ addresses ticket #47650.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# -*- 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
2# $Id: Portfile 135907 2015-05-06 18:08:43Z michaelld@macports.org $
3
4PortSystem          1.0
5PortGroup           octave 1.0
6
7octave.setup        database 2.3.2
8platforms           darwin
9license             GPL-3+
10maintainers         nomaintainer
11description         Interface to SQL databases, currently only \
12                    postgresql using libpq.
13long_description    ${description}
14
15checksums           rmd160 e0e58800e9f9906ef89afff7526bd70f608de713 \
16                    sha256 922e9c298da92f3ac9596ec4fb0db2acc0f5270aa707b67f0151c2529f658d79
17
18depends_lib-append  port:swig-octave \
19                    path:bin/mysql_config5:mysql5 \
20                    port:sqlite3 \
21                    port:unixODBC
22
23# set postgresql variants
24
25set postgresql_suffixes {83 84 90 91 92 93}
26set default_postgresql_suffix 92
27
28set postgresql_ports {}
29set postgresql_variants {}
30foreach s ${postgresql_suffixes} {
31    lappend postgresql_ports postgresql${s}
32    set postgresql_variants "${postgresql_variants} && !\[variant_isset postgresql${s}\]"
33}
34
35set postgresql_variants [string trimleft ${postgresql_variants} " && "]
36
37foreach s ${postgresql_suffixes} {
38    set p postgresql${s}
39    set v [join [split ${s} ""] "."]
40    set i [lsearch -exact ${postgresql_ports} ${p}]
41    set c [lreplace ${postgresql_ports} ${i} ${i}]
42    eval [subst {
43        variant ${p} description "Build ${name} using postgresql ${v}" \
44            conflicts ${c} {
45
46                depends_lib-append \
47                    port:postgresql${s}
48                configure.env \
49                    PATH=${prefix}/lib/postgresql${s}/bin:$env(PATH)
50
51            }
52    }]
53}
54
55eval [subst {
56    # postgresql is required; default to ${default_postgresql_suffix}.
57
58    if {${postgresql_variants}} {
59        default_variants +postgresql${default_postgresql_suffix}
60    }
61
62    # Make sure -postgresql${default_postgresql_suffix}
63    # was not specified alone
64
65    if {${postgresql_variants}} {
66        ui_error "${name} requires a postgresql to be selected; you cannot use -postgresql${default_postgresql_suffix} as a variant alone."
67        return -code error "Invalid variant selection"
68    }
69}]
70
71# legacy postgresql variants; can be removed 2016-05-01
72# use of < 8.3 removed as of 2.3.2.
73
74set legacy_postgresql_suffixes {80 81 82}
75
76foreach s ${legacy_postgresql_suffixes} {
77    set p postgresql${s}
78    eval [subst {
79        variant ${p} description "Legacy variant" \
80            requires postgresql${default_postgresql_suffix} {}
81    }]
82}
Note: See TracBrowser for help on using the repository browser.