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

Last change on this file was 153628, checked in by mps@…, 10 months ago

octave-database: remove mysql, sqlite3 and unixODBC support, as these databases are currently not supported.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 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 153628 2016-10-06 12:33:29Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           octave 1.0
6
7octave.setup        database 2.4.2
8revision            2
9platforms           darwin
10license             GPL-3+
11maintainers         mps openmaintainer
12description         Interface to SQL databases, currently only \
13                    postgresql using libpq.
14long_description    ${description}
15
16checksums           rmd160 35f282e20f1af8c7a67c4427f4b2acb7757a1776 \
17                    sha256 7e2ded9cd8e99acbb4772cc6e1f1010dd51ebe81af016aa8e34e1bff9bd90809
18
19depends_lib-append  port:octave-struct \
20                    port:swig-octave
21
22# set postgresql variants
23set postgresql_suffixes {83 84 90 91 92 93 94 95 96}
24set default_postgresql_suffix 95
25
26set postgresql_ports {}
27set postgresql_variants {}
28foreach s ${postgresql_suffixes} {
29    lappend postgresql_ports postgresql${s}
30    set postgresql_variants "${postgresql_variants} && !\[variant_isset postgresql${s}\]"
31}
32
33set postgresql_variants [string trimleft ${postgresql_variants} " && "]
34
35foreach s ${postgresql_suffixes} {
36    set p postgresql${s}
37    set v [join [split ${s} ""] "."]
38    set i [lsearch -exact ${postgresql_ports} ${p}]
39    set c [lreplace ${postgresql_ports} ${i} ${i}]
40    eval [subst {
41        variant ${p} description "Build ${name} using postgresql ${v}" \
42            conflicts ${c} {
43
44                depends_lib-append \
45                    port:postgresql${s}
46                configure.env \
47                    PATH=${prefix}/lib/postgresql${s}/bin:$env(PATH)
48
49            }
50    }]
51}
52
53eval [subst {
54    # postgresql is required; default to ${default_postgresql_suffix}.
55
56    if {${postgresql_variants}} {
57        default_variants +postgresql${default_postgresql_suffix}
58    }
59
60    # Make sure -postgresql${default_postgresql_suffix}
61    # was not specified alone
62
63    if {${postgresql_variants}} {
64        ui_error "${name} requires a postgresql to be selected; you cannot use -postgresql${default_postgresql_suffix} as a variant alone."
65        return -code error "Invalid variant selection"
66    }
67}]
Note: See TracBrowser for help on using the repository browser.