source: trunk/dports/gis/mapserver/Portfile @ 96056

Last change on this file since 96056 was 96056, checked in by and.damore@…, 7 years ago

port mapserver: fix +postgis variant when no postgresql is already installed, postgresql90 will be installed in that case - cf. http://build.macports.org/builders/buildports-lion-x86_64/builds/3079

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