source: trunk/dports/gis/mapserver/Portfile

Last change on this file was 144772, checked in by khindenburg@…, 18 months ago

mapserver: use variant requires instead of default_variants #49484

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 144772 2016-01-18 00:08:02Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mapserver
7version             6.2.1
8revision            3
9maintainers         hbaspecto.com:jea openmaintainer
10categories          gis
11license             permissive
12platforms           darwin
13
14description         mapserver
15long_description    MapServer is an Open Source development environment for \
16                    building spatially-enabled internet applications.
17
18homepage            http://mapserver.org
19master_sites        http://download.osgeo.org/mapserver
20
21checksums           md5     8c48991dc54a307076b1fb670bc59ef9 \
22                    rmd160  4914dd5c5d400bc4f5d4cbdb40277b0b21967f24 \
23                    sha256  77087306246451df2cea3711e601f56ebf8a55f29ede4ca8e5f0433dfad743d5
24
25depends_lib         port:gd2 \
26                    port:jpeg \
27                    port:libpng \
28                    port:freetype \
29                    port:giflib
30
31# fix gd version check
32patchfiles-append   patch-configure.diff
33
34configure.args      --with-gd=${prefix} \
35                    --with-png=${prefix} \
36                    --with-zlib=${prefix} \
37                    --with-jpeg=${prefix} \
38                    --with-gif=${prefix} \
39
40default_variants    +wms +gdal +ogr +proj +cairo +wfs +proj \
41                    +geos +postgis +wmsclient +wfsclient \
42                    +wcs +sos +kml +fastcgi
43
44if {[variant_isset postgis]} {
45    # check for most recent version of postgresql installed
46    set HAVE_PGCONFIG [llength [glob -nocomplain -d ${prefix}/lib postgresql*/bin/pg_config]]
47    # if not found, intall the postgresql port
48    if {$HAVE_PGCONFIG == 0} {
49        depends_lib-append  port:postgresql90
50    }
51}
52
53variant postgis description {Add support for postgis sources} {
54    set PGSQL_DIR [lindex [lsort -dec [glob -nocomplain -d ${prefix}/lib postgresql*]] 0]
55    configure.args-append   "--with-postgis=${PGSQL_DIR}/bin/pg_config"
56}
57
58variant wms requires proj description {Add WMS server support} {
59}
60
61variant wfs requires proj ogr geos description {Add WFS server support} {
62    depends_lib-append      port:libxml2
63    configure.args-append   --with-wfs
64}
65
66variant sos requires proj ogr description {Add SOS server support} {
67    depends_lib-append      port:libxml2
68    configure.args-append   --with-sos
69}
70
71variant wcs requires proj gdal description {Add WCS server support} {
72    configure.args-append   --with-wcs
73}
74
75variant wmsclient requires proj gdal description {Add WMS client support} {
76    depends_lib-append      port:curl
77    configure.args-append   --with-wmsclient
78}
79
80variant kml description {Add KML output support} {
81    configure.args-append   --with-kml
82}
83
84variant wfsclient requires proj ogr geos description {Add WFS client support} {
85    depends_lib-append      port:libxml2 \
86                            port:curl
87    configure.args-append   --with-wfsclient
88}
89
90variant cairo description {Add SVG and PDF support through cairo} {
91    depends_lib-append      path:lib/pkgconfig/cairo.pc:cairo
92    configure.args-append   --with-cairo
93}
94
95variant gdal description {Add GDAL input format support} {
96    depends_lib-append      port:gdal
97    configure.args-append   --with-gdal
98}
99
100variant ogr description {Add OGR input format support} {
101    depends_lib-append      port:gdal
102    configure.args-append   --with-ogr
103}
104
105variant proj description {Proj.4 reprojection support} {
106    depends_lib-append      port:proj
107    configure.args-append   --with-proj=${prefix}
108}
109
110variant fastcgi description {FastCGI support} {
111    depends_lib-append      port:fcgi
112    configure.args-append   --with-fastcgi=${prefix}
113}
114
115variant geos description {Add GEOS operations support} {
116    depends_lib-append      port:geos
117    configure.args-append   --with-geos
118}
119
120variant apache conflicts apache2 apache_apple description {Use MacPorts Apache 1} {
121    depends_run-append      port:apache
122    global cgi_path
123    set cgi_path "${prefix}/www/cgi-bin/"
124}
125
126variant apache2 conflicts apache apache_apple description {Use MacPorts Apache 2} {
127    depends_run-append      port:apache2
128    global cgi_path
129    set cgi_path "${prefix}/apache2/cgi-bin/"
130}
131
132variant apache_apple conflicts apache apache2 description {Use Apple Apache} {
133    global cgi_path
134    set cgi_path "/Library/WebServer/CGI-Executables/"
135}
136
137if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache_apple]} {
138    # default to the apple apache version if none specified
139    default_variants +apache_apple
140}
141
142destroot.violate_mtree yes
143
144post-destroot {
145    file mkdir ${destroot}${cgi_path}
146    # There's no good reason to keep the executable in ${prefix}/bin.
147    move ${destroot}${prefix}/bin/mapserv ${destroot}${cgi_path}
148}
149
150livecheck.type      regex
151livecheck.url       [lindex ${master_sites} 0]
152livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.