aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2011-06-29 22:58:26 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2011-06-29 22:58:26 +0800
commit3c46c0f47b251ccd35bff13a671b9deb6c235513 (patch)
tree29915470a2072a90098fdf8bbd680bebe6ff1cdb
parent2a6f49cff359420c1d37a6fbef4180eeba2763b5 (diff)
downloadfreebsd-ports-gnome-3c46c0f47b251ccd35bff13a671b9deb6c235513.tar.gz
freebsd-ports-gnome-3c46c0f47b251ccd35bff13a671b9deb6c235513.tar.zst
freebsd-ports-gnome-3c46c0f47b251ccd35bff13a671b9deb6c235513.zip
- Fix incorrectly set MASTER_SITES
- Make PostGIS input plugin optional - Add options for other input plugins, including OSM - Mark MAKE_JOBS_SAFE - Cosmetix fix around SCONS_ENV PR: 158412 Submitted by: myself Approved by: wen heping <wenheping@gmail.com> (maintainer via private email)
-rw-r--r--graphics/mapnik/Makefile58
-rw-r--r--graphics/mapnik/pkg-plist6
2 files changed, 59 insertions, 5 deletions
diff --git a/graphics/mapnik/Makefile b/graphics/mapnik/Makefile
index 8a3f03b5890a..f97613ac019e 100644
--- a/graphics/mapnik/Makefile
+++ b/graphics/mapnik/Makefile
@@ -7,8 +7,9 @@
PORTNAME= mapnik
PORTVERSION= 0.7.1
+PORTREVISION= 1
CATEGORIES= graphics geography
-MASTER_SITES= ${MASTER_SITE_BERLIOS}/${PORTNAME}/
+MASTER_SITES= BERLIOS
MAINTAINER= wenheping@gmail.com
COMMENT= A Free Toolkit For Developing Mapping Applications
@@ -28,16 +29,23 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/freetype-config:${PORTSDIR}/print/freetype2 \
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
-USE_PGSQL= yes
USE_BZIP2= yes
USE_PYTHON= 2.5+
USE_LDCONFIG= yes
USE_SCONS= yes
USE_AUTOTOOLS= libltdl
USE_GNOME= pkgconfig libxml2
+MAKE_JOBS_SAFE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-OPTIONS= CAIRO "Enable cairo rendering" on
+INPUT_PLUGINS= raster shape
+
+OPTIONS= CAIRO "Enable cairo rendering" on \
+ POSTGIS "Postgis input plugin" on \
+ GDAL "gdal input plugin" off \
+ OGR "ogr input plugin" off \
+ SQLITE "SQLite input plugin" off \
+ OSM "OSM input plugin" off
.include <bsd.port.options.mk>
@@ -49,10 +57,52 @@ LIB_DEPENDS+= cairo.2:${PORTSDIR}/graphics/cairo \
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cairo>=1.8.2:${PORTSDIR}/graphics/py-cairo
.endif
+.if !defined(WITHOUT_POSTGIS)
+INPUT_PLUGINS+= postgis
+USE_PGSQL= yes
+PLIST_SUB+= POSTGIS=""
+.else
+PLIST_SUB+= POSTGIS="@comment "
+.endif
+
+.if defined(WITH_GDAL)
+INPUT_PLUGINS+= gdal
+LIB_DEPENDS+= gdal:${PORTSDIR}/graphics/gdal
+PLIST_SUB+= GDAL=""
+.else
+PLIST_SUB+= GDAL="@comment "
+.endif
+
+.if defined(WITH_OGR)
+INPUT_PLUGINS+= ogr
+LIB_DEPENDS+= gdal:${PORTSDIR}/graphics/gdal
+PLIST_SUB+= OGR=""
+.else
+PLIST_SUB+= OGR="@comment "
+.endif
+
+.if defined(WITH_SQLITE)
+INPUT_PLUGINS+= sqlite
+LIB_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3
+PLIST_SUB+= SQLITE=""
+.else
+PLIST_SUB+= SQLITE="@comment "
+.endif
+
+.if defined(WITH_OSM)
+INPUT_PLUGINS+= osm
+LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl
+PLIST_SUB+= OSM=""
+.else
+PLIST_SUB+= OSM="@comment "
+.endif
+
+SCONS_ENV+= INPUT_PLUGINS="`${ECHO} ${INPUT_PLUGINS} | ${TR} ' ' ,`"
+
.include <bsd.port.pre.mk>
.if defined (MAKE_JOBS_NUMBER)
-SCONS_ARGS+= JOBS=${MAKE_JOBS_NUMBER}
+SCONS_ENV+= JOBS=${MAKE_JOBS_NUMBER}
.endif
post-patch:
diff --git a/graphics/mapnik/pkg-plist b/graphics/mapnik/pkg-plist
index d26374af847f..aec33ceddfa4 100644
--- a/graphics/mapnik/pkg-plist
+++ b/graphics/mapnik/pkg-plist
@@ -103,9 +103,13 @@ include/mapnik/proj_transform.hpp
include/mapnik/distance.hpp
lib/libmapnik.so
lib/libmapnik.so.0
-lib/mapnik/input/postgis.input
+%%GDAL%%lib/mapnik/input/gdal.input
+%%OGR%%lib/mapnik/input/ogr.input
+%%OSM%%lib/mapnik/input/osm.input
+%%POSTGIS%%lib/mapnik/input/postgis.input
lib/mapnik/input/raster.input
lib/mapnik/input/shape.input
+%%SQLITE%%lib/mapnik/input/sqlite.input
lib/mapnik/fonts/unifont-5.1.20080907.ttf
lib/mapnik/fonts/DejaVuSerif-BoldItalic.ttf
lib/mapnik/fonts/DejaVuSerifCondensed-BoldItalic.ttf