2004-06-01 17:01:47 +02:00
|
|
|
# New ports collection Makefile for: mapserver
|
|
|
|
# Date created: 2004-05-20
|
|
|
|
# Whom: Douglas K. Rand <rand@meridian-enviro.com>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= mapserver
|
2010-09-01 08:19:40 +02:00
|
|
|
PORTVERSION= 5.6.5
|
2010-11-05 03:51:32 +01:00
|
|
|
PORTREVISION= 1
|
2007-07-22 21:33:55 +02:00
|
|
|
CATEGORIES= graphics www geography
|
2008-04-26 19:23:37 +02:00
|
|
|
MASTER_SITES= http://download.osgeo.org/mapserver/
|
2004-06-01 17:01:47 +02:00
|
|
|
|
2009-09-26 02:37:43 +02:00
|
|
|
MAINTAINER= wen@FreeBSD.org
|
2004-06-01 17:01:47 +02:00
|
|
|
COMMENT= System for developing web-based GIS applications
|
|
|
|
|
|
|
|
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd \
|
2009-11-28 00:17:38 +01:00
|
|
|
proj.6:${PORTSDIR}/graphics/proj
|
2004-06-01 17:01:47 +02:00
|
|
|
|
2004-10-18 03:32:38 +02:00
|
|
|
USE_GMAKE= yes
|
2004-06-01 17:01:47 +02:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS= --enable-runpath \
|
|
|
|
--with-gd=${LOCALBASE} \
|
|
|
|
--with-proj=${LOCALBASE}
|
2009-11-20 23:53:09 +01:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2004-06-01 17:01:47 +02:00
|
|
|
|
2009-02-09 22:04:52 +01:00
|
|
|
OPTIONS= AGG "Support for AGG image rendering (req: FreeType)" off \
|
|
|
|
TIFF "Support for TIFF (but not GeoTIFF) files" off \
|
2004-06-12 17:09:21 +02:00
|
|
|
MING "Support for Macromedia Flash output" off \
|
|
|
|
PDF "Support for PDF output via pdflib" off \
|
|
|
|
GDAL "Support for a number of input raster formats" off \
|
2009-09-26 02:37:43 +02:00
|
|
|
GEOS "Use GEOS engine where possible" off \
|
2010-03-27 07:41:49 +01:00
|
|
|
POSTGIS "Support for PostGIS" off \
|
2004-06-12 17:09:21 +02:00
|
|
|
PHP "Support for MapScript/PHP" off \
|
2004-10-18 03:32:38 +02:00
|
|
|
PERL "Support for MapScript/PERL" off \
|
2004-06-12 17:09:21 +02:00
|
|
|
WMS "Support for web map service server and client" off \
|
2004-12-13 21:25:34 +01:00
|
|
|
WFS "Support for web feature service (req: GDAL)" off \
|
|
|
|
MAPSERV "Install mapserv cgi interface" on \
|
2010-01-29 04:56:19 +01:00
|
|
|
FASTCGI "Support FASTCGI" off \
|
2004-06-12 17:09:21 +02:00
|
|
|
DEBUG "Enable debugging output" off
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2009-02-09 22:04:52 +01:00
|
|
|
.if defined(WITH_AGG)
|
|
|
|
LIB_DEPENDS+= agg.2:${PORTSDIR}/graphics/agg
|
|
|
|
CONFIGURE_ARGS+= --with-agg=${LOCALBASE} --with-freetype=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
|
2004-06-01 17:01:47 +02:00
|
|
|
.if defined(WITH_TIFF)
|
2004-10-18 03:32:38 +02:00
|
|
|
.if !defined(WITH_GDAL)
|
2004-06-01 17:01:47 +02:00
|
|
|
LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
|
|
|
|
CONFIGURE_ARGS+= --with-tiff=${LOCALBASE}
|
2004-10-18 03:32:38 +02:00
|
|
|
.endif
|
2004-06-12 17:09:21 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-tiff
|
2004-06-01 17:01:47 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_MING)
|
2006-04-24 14:40:19 +02:00
|
|
|
LIB_DEPENDS+= ming.4:${PORTSDIR}/graphics/ming
|
2004-06-01 17:01:47 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ming=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PDF)
|
2010-11-05 03:51:32 +01:00
|
|
|
LIB_DEPENDS+= pdf.8:${PORTSDIR}/print/pdflib \
|
|
|
|
png.6:${PORTSDIR}/graphics/png \
|
|
|
|
tiff.4:${PORTSDIR}/graphics/tiff
|
|
|
|
CONFIGURE_ARGS+= --with-pdf=${LOCALBASE} --with-tiff=${LOCALBASE} --with-png=${LOCALBASE}
|
2004-06-01 17:01:47 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_WMS)
|
2004-06-12 17:09:21 +02:00
|
|
|
WITH_CURL= YES
|
|
|
|
CONFIGURE_ARGS+= --with-wms --with-wmsclient
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_WFS)
|
|
|
|
WITH_CURL= YES
|
|
|
|
WITH_GDAL= YES
|
|
|
|
CONFIGURE_ARGS+= --with-wfs --with-wfsclient
|
2004-06-01 17:01:47 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_GDAL)
|
2010-08-03 15:35:21 +02:00
|
|
|
LIB_DEPENDS+= gdal.15:${PORTSDIR}/graphics/gdal
|
2004-06-12 17:09:21 +02:00
|
|
|
CONFIGURE_ARGS+= --with-gdal=${LOCALBASE}/bin/gdal-config \
|
|
|
|
--with-ogr=${LOCALBASE}/bin/gdal-config
|
2004-06-01 17:01:47 +02:00
|
|
|
.endif
|
|
|
|
|
2009-09-26 02:37:43 +02:00
|
|
|
.if defined(WITH_GEOS)
|
|
|
|
LIB_DEPENDS+= geos.0:${PORTSDIR}/graphics/geos
|
|
|
|
CONFIGURE_ARGS+= --with-geos=${LOCALBASE}/bin/geos-config
|
|
|
|
.endif
|
|
|
|
|
2004-10-18 03:32:38 +02:00
|
|
|
.if defined(WITH_POSTGIS)
|
2010-03-24 01:23:20 +01:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libpgport.a:${PORTSDIR}/databases/postgresql82-server
|
2004-06-01 17:01:47 +02:00
|
|
|
CONFIGURE_ARGS+= --with-postgis=${LOCALBASE}/bin/pg_config
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PHP)
|
2009-02-09 22:04:52 +01:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/php-config:${PORTSDIR}/lang/php5
|
|
|
|
RUN_BUILDS= ${BUILD_DEPENDS}
|
|
|
|
CONFIGURE_ARGS+= --with-php=${LOCALBASE}/include/php/
|
2004-10-18 03:32:38 +02:00
|
|
|
PHP_EXTENSION_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -e 's,/usr/local/,,'
|
|
|
|
PLIST_SUB+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
|
|
|
|
PLIST_SUB+= WITH_PHP=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITH_PHP="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PERL)
|
|
|
|
USE_PERL5=yes
|
|
|
|
PLIST_SUB+= WITH_PERL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITH_PERL="@comment "
|
2004-06-01 17:01:47 +02:00
|
|
|
.endif
|
|
|
|
|
2004-06-12 17:09:21 +02:00
|
|
|
.if defined(WITH_CURL)
|
2010-04-03 12:44:36 +02:00
|
|
|
LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl
|
2004-06-12 17:09:21 +02:00
|
|
|
CONFIGURE_ARGS+= --with-curl=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
|
2004-12-13 21:25:34 +01:00
|
|
|
.if defined(WITH_MAPSERV)
|
2009-12-24 09:28:43 +01:00
|
|
|
USE_APACHE= 13+
|
2004-12-13 21:25:34 +01:00
|
|
|
PLIST_SUB+= WITH_MAPSERV=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITH_MAPSERV="@comment "
|
|
|
|
.endif
|
|
|
|
|
2010-01-29 04:56:19 +01:00
|
|
|
.if defined(WITH_FASTCGI)
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/cgi-fcgi:${PORTSDIR}/www/fcgi
|
|
|
|
CONFIGURE_ARGS+= --with-fastcgi=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
|
2004-06-01 17:01:47 +02:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
CONFIGURE_ARGS+= --enable-debug
|
|
|
|
.endif
|
|
|
|
|
2004-10-18 03:32:38 +02:00
|
|
|
PROG_FILES= legend scalebar shp2img shp2pdf shptree shptreetst shptreevis sortshp
|
|
|
|
|
|
|
|
post-build:
|
|
|
|
.if defined(WITH_PERL)
|
|
|
|
(cd ${WRKSRC}/mapscript/perl && ${PERL5} Makefile.PL && make)
|
|
|
|
.endif
|
2004-06-01 17:01:47 +02:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
.for f in ${PROG_FILES}
|
2004-10-18 03:32:38 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
|
2004-06-01 17:01:47 +02:00
|
|
|
.endfor
|
2004-10-18 03:32:38 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/shp2mysql.pl ${PREFIX}/bin/shp2mysql
|
2004-12-13 21:25:34 +01:00
|
|
|
.if defined(WITH_MAPSERV)
|
|
|
|
${MKDIR} ${LOCALBASE}/www/cgi-bin/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mapserv ${LOCALBASE}/www/cgi-bin/mapserv
|
|
|
|
.endif
|
2004-10-18 03:32:38 +02:00
|
|
|
.if defined(WITH_PHP)
|
|
|
|
@${MKDIR} ${LOCALBASE}/${PHP_EXTENSION_DIR}
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mapscript/php3/php_mapscript.so ${LOCALBASE}/${PHP_EXTENSION_DIR}/
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_PERL)
|
|
|
|
(cd ${WRKSRC}/mapscript/perl && make install)
|
|
|
|
.endif
|
2004-06-01 17:01:47 +02:00
|
|
|
|
2009-02-09 22:04:52 +01:00
|
|
|
post-install:
|
|
|
|
.if defined(WITH_PHP)
|
|
|
|
@${ECHO_MSG} "Please add the line extension=php_mapscript.so to ${LOCALBASE}/etc/php/extensions.ini"
|
|
|
|
.endif
|
|
|
|
|
2004-06-12 17:09:21 +02:00
|
|
|
.include <bsd.port.post.mk>
|