- Fix build with clang

- Convert to USES scons
- Use new LIB_DEPENDS format
- Support staging

PR:		ports/182078
Submitted by:	Alexey Illarionov <littlesavage@rambler.ru>
This commit is contained in:
Guido Falsi 2013-10-07 20:15:05 +00:00
parent af45d49793
commit af818f781e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329735
2 changed files with 32 additions and 24 deletions

View File

@ -14,19 +14,18 @@ COMMENT= A Free Toolkit For Developing Mapping Applications
LICENSE= LGPL21 LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= proj:${PORTSDIR}/graphics/proj \ LIB_DEPENDS= libproj.so:${PORTSDIR}/graphics/proj \
icuuc:${PORTSDIR}/devel/icu \ libicuuc.so:${PORTSDIR}/devel/icu \
boost_system:${PORTSDIR}/devel/boost-libs \ libboost_system.so:${PORTSDIR}/devel/boost-libs \
boost_python:${PORTSDIR}/devel/boost-python-libs libboost_python.so:${PORTSDIR}/devel/boost-python-libs
BUILD_DEPENDS= ${LOCALBASE}/bin/freetype-config:${PORTSDIR}/print/freetype2 \ BUILD_DEPENDS= ${LOCALBASE}/bin/freetype-config:${PORTSDIR}/print/freetype2 \
${PYTHON_PKGNAMEPREFIX}icu>=0.8.1:${PORTSDIR}/devel/py-icu ${PYTHON_PKGNAMEPREFIX}icu>=0.8.1:${PORTSDIR}/devel/py-icu
USE_BZIP2= yes USE_BZIP2= yes
USES= pkgconfig USES= pkgconfig scons
USE_GNOME= libxml2 USE_GNOME= libxml2
USE_PYTHON= 2.6+ USE_PYTHON= 2.6+
USE_LDCONFIG= yes USE_LDCONFIG= yes
USE_SCONS= yes
WARNING_CXXFLAGS?= -w WARNING_CXXFLAGS?= -w
INPUT_PLUGINS= geojson python raster shape INPUT_PLUGINS= geojson python raster shape
@ -54,14 +53,13 @@ DOCSRCDIR2= ${WRKSRC}/docs
DOCSDIR2= ${DOCSDIR}/docs DOCSDIR2= ${DOCSDIR}/docs
DOC_FILES2= * DOC_FILES2= *
NO_STAGE= yes
.include <bsd.port.options.mk> .include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCAIRO} .if ${PORT_OPTIONS:MCAIRO}
LIB_DEPENDS+= cairo:${PORTSDIR}/graphics/cairo LIB_DEPENDS+= cairo:${PORTSDIR}/graphics/cairo
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cairo>=1.8.2:${PORTSDIR}/graphics/py-cairo BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cairo>=1.8.2:${PORTSDIR}/graphics/py-cairo
.else .else
SCONS_ARGS+= CAIRO=False MAKE_ARGS+= CAIRO=False
.endif .endif
.if ${PORT_OPTIONS:MCSV} .if ${PORT_OPTIONS:MCSV}
@ -97,19 +95,19 @@ BUILD_DEPENDS+= sqlite3>=3.7.12:${PORTSDIR}/databases/sqlite3
.if ${PORT_OPTIONS:MJPEG} .if ${PORT_OPTIONS:MJPEG}
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
.else .else
SCONS_ARGS+= JPEG=False MAKE_ARGS+= JPEG=False
.endif .endif
.if ${PORT_OPTIONS:MPNG} .if ${PORT_OPTIONS:MPNG}
LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png
.else .else
SCONS_ARGS+= PNG=False MAKE_ARGS+= PNG=False
.endif .endif
.if ${PORT_OPTIONS:MTIFF} .if ${PORT_OPTIONS:MTIFF}
LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff
.else .else
SCONS_ARGS+= TIFF=False MAKE_ARGS+= TIFF=False
.endif .endif
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
@ -118,9 +116,10 @@ SCONS_ARGS+= TIFF=False
IGNORE= does not install: runs out of virtual memory IGNORE= does not install: runs out of virtual memory
.endif .endif
SCONS_ARGS+= WARNING_CXXFLAGS=${WARNING_CXXFLAGS} MAKE_ARGS+= WARNING_CXXFLAGS=${WARNING_CXXFLAGS}
SCONS_ARGS+= INPUT_PLUGINS="`${ECHO} ${INPUT_PLUGINS} | ${TR} ' ' ,`" MAKE_ARGS+= INPUT_PLUGINS="`${ECHO} ${INPUT_PLUGINS} | ${TR} ' ' ,`"
SCONS_ARGS+= JOBS=${MAKE_JOBS_NUMBER} MAKE_ARGS+= JOBS=${MAKE_JOBS_NUMBER}
MAKE_ARGS+= ${MAKE_ENV}
pre-configure: pre-configure:
.if ${PORT_OPTIONS:MSQLITE3} .if ${PORT_OPTIONS:MSQLITE3}
@ -137,16 +136,10 @@ post-patch:
@${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \ @${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \
${WRKSRC}/SConstruct ${WRKSRC}/SConstruct
do-install:
@cd ${INSTALL_WRKSRC} && ${SETENV} ${SCONS_BUILDENV} ${SCONS_BIN} \
${SCONS_INSTALL_TARGET}
post-install: post-install:
.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR2}
@${MKDIR} ${DOCSDIR2} ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
.endif
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View File

@ -0,0 +1,15 @@
--- bindings/python/mapnik_text_placement.cpp.orig 2013-09-14 06:44:28.000000000 +0400
+++ bindings/python/mapnik_text_placement.cpp 2013-09-14 06:46:57.000000000 +0400
@@ -194,7 +194,11 @@
ListNodeWrap(object l) : formatting::list_node(), wrapper<formatting::list_node>()
{
stl_input_iterator<formatting::node_ptr> begin(l), end;
- children_.insert(children_.end(), begin, end);
+ while (begin != end)
+ {
+ children_.push_back(*begin);
+ ++begin;
+ }
}
/* TODO: Add constructor taking variable number of arguments.