Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jun 2011 05:30:14 +0400 (MSD)
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        wenheping@gmail.com
Subject:   ports/158412: [PATCH] graphics/mapnik: fix fetch add more options
Message-ID:  <20110629013014.8296DB823@hades.panopticon>
Resent-Message-ID: <201106290140.p5T1e85O045213@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         158412
>Category:       ports
>Synopsis:       [PATCH] graphics/mapnik: fix fetch add more options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 29 01:40:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue Mar  8 09:48:52 MSK
>Description:
- Fix incorrectly set MASTER_SITES (see output of make fetch-urlall-list before and after patch)
- Make PostGIS input plugin optional
- Add options for other input plugins, including OSM
- Mark MAKE_JOBS_SAFE
- Cosmetix fix around SCONS_ENV

Port maintainer (wenheping@gmail.com) is cc'd.

Also please note that the port doesn't respect CXX/CXXFLAGS:

...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o agg/src/agg_arc.o -c -O2 -fPIC -DNDEBUG -pthread -D_THREAD_SAFE -D_REENTRANT -Iagg/include agg/src/agg_arc.cpp
g++ -o agg/src/agg_arrowhead.o -c -O2 -fPIC -DNDEBUG -pthread -D_THREAD_SAFE -D_REENTRANT -Iagg/include agg/src/agg_arrowhead.cpp
...

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- mapnik-0.7.1_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/graphics/mapnik/Makefile,v
retrieving revision 1.17
diff -u -u -r1.17 Makefile
--- Makefile	24 May 2011 23:53:38 -0000	1.17
+++ Makefile	29 Jun 2011 00:01:18 -0000
@@ -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 @@
 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 @@
 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:
Index: pkg-plist
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/graphics/mapnik/pkg-plist,v
retrieving revision 1.4
diff -u -u -r1.4 pkg-plist
--- pkg-plist	24 May 2011 23:53:38 -0000	1.4
+++ pkg-plist	29 Jun 2011 00:01:18 -0000
@@ -103,9 +103,13 @@
 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
--- mapnik-0.7.1_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110629013014.8296DB823>