Permalink
Fetching contributors…
Cannot retrieve contributors at this time
153 lines (121 sloc) 4.86 KB
# -*- 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
PortSystem 1.0
name mapserver
version 6.2.4
revision 3
maintainers hbaspecto.com:jea openmaintainer
categories gis
license permissive
platforms darwin
description mapserver
long_description MapServer is an Open Source development environment for \
building spatially-enabled internet applications.
homepage http://mapserver.org
master_sites http://download.osgeo.org/mapserver
checksums rmd160 690374d43a1b733c3b7acd73c37099d95554c599 \
sha256 237d83f84042fef8a63c590256aaa3bc1400668a470b52252fae197d9689e41c
depends_build port:pkgconfig
depends_lib port:gd2 \
port:jpeg \
port:libpng \
port:freetype \
port:giflib
# fix gd version check
patchfiles-append patch-configure.diff
configure.args --with-gd=${prefix} \
--with-png=${prefix} \
--with-zlib=${prefix} \
--with-jpeg=${prefix} \
--with-gif=${prefix}
default_variants +wms +gdal +ogr +proj +cairo +wfs +proj \
+geos +postgis +wmsclient +wfsclient \
+wcs +sos +kml +fastcgi
if {[variant_isset postgis]} {
# check for most recent version of postgresql installed
set HAVE_PGCONFIG [llength [glob -nocomplain -d ${prefix}/lib postgresql*/bin/pg_config]]
# if not found, intall the postgresql port
if {$HAVE_PGCONFIG == 0} {
depends_lib-append port:postgresql96
}
}
variant postgis description {Add support for postgis sources} {
set PGSQL_DIR [lindex [lsort -dec [glob -nocomplain -d ${prefix}/lib postgresql*]] 0]
configure.args-append "--with-postgis=${PGSQL_DIR}/bin/pg_config"
}
variant wms requires proj description {Add WMS server support} {
}
variant wfs requires proj ogr geos description {Add WFS server support} {
depends_lib-append port:libxml2
configure.args-append --with-wfs
}
variant sos requires proj ogr description {Add SOS server support} {
depends_lib-append port:libxml2
configure.args-append --with-sos
}
variant wcs requires proj gdal description {Add WCS server support} {
configure.args-append --with-wcs
}
variant wmsclient requires proj gdal description {Add WMS client support} {
depends_lib-append port:curl
configure.args-append --with-wmsclient
}
variant kml description {Add KML output support} {
configure.args-append --with-kml
}
variant wfsclient requires proj ogr geos description {Add WFS client support} {
depends_lib-append port:libxml2 \
port:curl
configure.args-append --with-wfsclient
}
variant cairo description {Add SVG and PDF support through cairo} {
depends_lib-append path:lib/pkgconfig/cairo.pc:cairo
configure.args-append --with-cairo
}
variant gdal description {Add GDAL input format support} {
depends_lib-append port:gdal
configure.args-append --with-gdal
}
variant ogr description {Add OGR input format support} {
depends_lib-append port:gdal
configure.args-append --with-ogr
}
variant proj description {Proj.4 reprojection support} {
depends_lib-append port:proj4
configure.args-append --with-proj=${prefix}/lib/proj49
}
variant fastcgi description {FastCGI support} {
depends_lib-append port:fcgi
configure.args-append --with-fastcgi=${prefix}
}
variant geos description {Add GEOS operations support} {
depends_lib-append port:geos
configure.args-append --with-geos
}
variant apache2 conflicts apache_apple apache22 description {Use MacPorts Apache 2} {
depends_run-append port:apache2
global cgi_path
set cgi_path "${prefix}/www/apache2/cgi-bin/"
}
variant apache22 conflicts apache_apple apache2 description {Use MacPorts Apache 2} {
depends_run-append port:apache22
global cgi_path
set cgi_path "${prefix}/apache2/cgi-bin/"
destroot.violate_mtree yes
}
variant apache_apple conflicts apache2 description {Use Apple Apache} {
global cgi_path
set cgi_path "/Library/WebServer/CGI-Executables/"
destroot.violate_mtree yes
}
if {![variant_isset apache2] && ![variant_isset apache22] && ![variant_isset apache_apple]} {
# default to the apple apache version if none specified
default_variants +apache_apple
}
post-destroot {
file mkdir ${destroot}${cgi_path}
# There's no good reason to keep the executable in ${prefix}/bin.
move ${destroot}${prefix}/bin/mapserv ${destroot}${cgi_path}
}
livecheck.type regex
livecheck.url [lindex ${master_sites} 0]
livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}