source: trunk/dports/databases/postgis/Portfile

Last change on this file was 148393, checked in by ryandesign@…, 17 months ago

mariadb-10.0, mariadb-10.1, mariadb, mysql51, mysql55, mysql56, mysql57, percona, postgis, postgis2: remove archcheck portgroup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 148393 2016-05-06 23:42:48Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                postgis
7version             1.5.8
8revision            0
9categories          databases
10license             GPL-2
11platforms           darwin
12maintainers         stromnov openmaintainer
13
14description         PostGIS adds support for geographic objects to the PostgreSQL database
15
16long_description \
17    PostGIS adds support for geographic objects to the PostgreSQL \
18    object-relational database.  In effect, PostGIS \"spatially enables\" \
19    the PostgreSQL server, allowing it to be used as a backend spatial \
20    database for geographic information systems (GIS), much like ESRI's \
21    SDE or Oracle's Spatial extension.  PostGIS follows the OpenGIS \
22    Simple Features Specification for SQL and will be submitted for \
23    conformance testing at version 1.0.
24
25homepage            http://postgis.refractions.net/
26master_sites        http://download.osgeo.org/postgis/source/
27
28checksums           rmd160  825be8892a22c660200bb6005608375cb47c920d \
29                    sha256  4896fdae2f814b88c3ca458b7d01d7eca7e9aca021599c817919f131a1b0d804
30
31depends_build \
32    port:docbook-xsl \
33    port:libxslt \
34    port:ImageMagick
35
36depends_lib \
37    port:geos \
38    port:proj \
39    port:libiconv \
40    port:libxml2
41
42use_parallel_build  no
43
44patchfiles          patch-postgis-Makefile.in.diff
45
46configure.args \
47    --datadir=${prefix}/share/${name} \
48    --with-projdir=${prefix} \
49    --with-xsldir=${prefix}/share/xsl/docbook-xsl
50
51configure.cflags-append \
52    -Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close
53
54build.target-append comments
55build.args-append   ICONV_LDFLAGS='-L${prefix}/lib -liconv'
56
57# Workaround for https://trac.osgeo.org/postgis/ticket/1694 (actually the same internal result as in postgis2 port)
58build.args-append   CPP="cpp"
59
60destroot.target-append docs-install comments-install
61
62set pgsql_suffixes {82 83 84 90 91 92}
63
64set pgsql_ports {}
65foreach s ${pgsql_suffixes} {
66    lappend pgsql_ports postgresql${s}
67}
68
69foreach s ${pgsql_suffixes} {
70    set p postgresql${s}
71    set v [string index ${s} 0].[string index ${s} 1]
72    set i [lsearch -exact ${pgsql_ports} ${p}]
73    set c [lreplace ${pgsql_ports} ${i} ${i}]
74    eval [subst {
75        variant ${p} description "Build with PostgreSQL ${v}" conflicts ${c} {
76            post-patch {
77                set args {
78                     PGSQL_DOCDIR=${prefix}/share/doc/${p}
79                     PGSQL_MANDIR=${prefix}/share/man
80                     PGSQL_SHAREDIR=${prefix}/share/${p}
81                }
82
83                reinplace -E "/doc .*install\\\$/s|\\\$| \[join \${args}\]|" ${worksrcpath}/GNUmakefile
84            }
85            depends_lib-append  port:${p}
86
87            configure.args-append   --libdir=${prefix}/lib/${p} \
88                                    --with-pgconfig=${prefix}/lib/${p}/bin/pg_config
89
90            build.args-append   PGSQL_DOCDIR=${prefix}/share/doc/${p} \
91                                PGSQL_MANDIR=${prefix}/share/man
92        }
93    }]
94}
95
96proc has_pgsql_variant {} {
97    global pgsql_ports
98    foreach p ${pgsql_ports} {
99        if {[variant_isset ${p}]} {
100            return 1
101        }
102    }
103    return 0
104}
105
106if {![has_pgsql_variant]} {
107    set p [lindex ${pgsql_ports} end]
108    default_variants +${p}
109
110    if {![has_pgsql_variant]} {
111        error "One of the following variants must be set: [join ${pgsql_ports}]"
112    }
113}
114
115livecheck.type      regex
116livecheck.url       ${master_sites}
117livecheck.regex     "${name}-(1(?:\\.\\d+)*)\\.\[tz\]"
Note: See TracBrowser for help on using the repository browser.