ports/160018: [PATCH] graphics/qgis: build & plist fixes for different options
Dmitry Marakasov
amdmi3 at amdmi3.ru
Tue Aug 23 10:10:01 UTC 2011
>Number: 160018
>Category: ports
>Synopsis: [PATCH] graphics/qgis: build & plist fixes for different 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: Tue Aug 23 10:10:00 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:
Qgis has incorrect plist for some options combinations, namely WITH_MAPSERVER and WITH_POSTGIS:
http://people.freebsd.org/~amdmi3/qgis-mapserver-1.7.0_1.log
http://people.freebsd.org/~amdmi3/qgis-postgis-1.7.0_1.log
The patch fixes them, also cleans the port up a bit: removes unneeded
QMAKESPEC/QTDIR sets and obsolete CONFIGURE* statements and no-op
REINPLACE_CMD's.
Port maintainer (wen at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- qgis-1.7.0_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/graphics/qgis/Makefile,v
retrieving revision 1.48
diff -u -u -r1.48 Makefile
--- Makefile 9 Aug 2011 12:05:34 -0000 1.48
+++ Makefile 22 Aug 2011 22:01:22 -0000
@@ -7,7 +7,7 @@
PORTNAME= qgis
PORTVERSION= 1.7.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics geography
MASTER_SITES= http://qgis.org/downloads/ \
http://download.osgeo.org/qgis/src/
@@ -28,15 +28,13 @@
USE_QT_VER= 4
USE_SQLITE= yes
CMAKE_USE_PTHREAD= yes
-CMAKE_ENV+= QMAKESPEC=${QMAKESPEC}
QT_COMPONENTS= gui svg xml network sql designer linguist_build \
qmake_build moc_build rcc_build uic_build
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-qtdir=${QTDIR}
USE_LDCONFIG= yes
+MAN1= qgis.1
+
OPTIONS= GRASS "Enable GRASS support" Off \
POSTGIS "Enable PostGIS support" Off \
MAPSERVER "Enable MapServer support" off \
@@ -48,38 +46,36 @@
BROKEN= does not compile on 7.X
.endif
-.if !defined (QTDIR)
-QTDIR= ${QT_PREFIX}
-.endif
-
-.if !defined (GRASS_INST_DIR)
-GRASS_INST_DIR= grass
-.endif
-
.if defined(WITH_GRASS)
-CONFIGURE_ARGS+=--with-grass=${LOCALBASE}/${GRASS_INST_DIR}
+CMAKE_ARGS+= -DWITH_GRASS:BOOL=TRUE
RUN_DEPENDS+= ${LOCALBASE}/lib/gdalplugins/gdal_GRASS.so:${PORTSDIR}/graphics/gdal-grass
+.else
+CMAKE_ARGS+= -DWITH_GRASS:BOOL=FALSE
.endif
.if defined(WITH_POSTGIS)
-CONFIGURE_ARGS+=--with-postgresql
+CMAKE_ARGS+= -DWITH_POSTGRESQL:BOOL=TRUE
BUILD_DEPENDS+= ${LOCALBASE}/share/postgis:${PORTSDIR}/databases/postgis
PLIST_SUB+= PGSQL=""
.else
-CONFIGURE_ARGS+=--without-postgresql
+CMAKE_ARGS+= -DWITH_POSTGRESQL:BOOL=FALSE
PLIST_SUB+= PGSQL="@comment "
.endif
.if defined(WITH_MAPSERVER)
+CMAKE_ARGS+= -DWITH_MAPSERVER:BOOL=TRUE
PLIST_SUB+= QGIS_FCGI=""
LIB_DEPENDS+= fcgi.0:${PORTSDIR}/www/fcgi
.else
+CMAKE_ARGS+= -DWITH_MAPSERVER:BOOL=FALSE
PLIST_SUB+= QGIS_FCGI="@comment "
.endif
.if defined(WITHOUT_PYTHON)
+CMAKE_ARGS+= -DWITH_BINDINGS:BOOL=FALSE
PLIST_SUB+= QGIS_PYTHON="@comment "
.else
+CMAKE_ARGS+= -DWITH_BINDINGS:BOOL=TRUE
PLIST_SUB+= QGIS_PYTHON=""
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}sip>=4.8.2:${PORTSDIR}/devel/py-sip \
${PYTHON_PKGNAMEPREFIX}qt4-gui>=4.5.4:${PORTSDIR}/x11-toolkits/py-qt4-gui \
@@ -90,22 +86,4 @@
${PYTHON_PKGNAMEPREFIX}sqlite3>=2.6.5:${PORTSDIR}/databases/py-sqlite3
.endif
-MAN1= qgis.1
-
-post-patch:
- ${REINPLACE_CMD} -e 's# dl##g' \
- ${WRKSRC}/src/core/CMakeLists.txt
- ${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \
- ${WRKSRC}/cmake/FindGRASS.cmake
-
-.if !defined(WITH_MAPSERVER)
- ${REINPLACE_CMD} -e 's#WITH_MAPSERVER TRUE#WITH_MAPSERVER FALSE#g' \
- ${WRKSRC}/CMakeLists.txt
-.endif
-
-.if defined(WITHOUT_PYTHON)
- ${REINPLACE_CMD} -e 's#WITH_BINDINGS TRUE#WITH_BINDINGS FALSE#g' \
- ${WRKSRC}/CMakeLists.txt
-.endif
-
.include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/graphics/qgis/pkg-plist,v
retrieving revision 1.11
diff -u -u -r1.11 pkg-plist
--- pkg-plist 23 Jun 2011 07:20:51 -0000 1.11
+++ pkg-plist 22 Aug 2011 23:08:22 -0000
@@ -648,9 +648,8 @@
%%DATADIR%%/svg/transport/transport_train_station2.svg
%%DATADIR%%/svg/transport/transport_train_station.svg
%%DATADIR%%/svg/transport/transport_tram_stop.svg
-%%PGSQL%%lib/qgis/libpggeoprocessingplugin.so
-%%PGSQL%%lib/qgis/libpostgresprovider.so
-%%PGSQL%%lib/qgis/libspitplugin.so
+%%PGSQL%%lib/qgis/plugins/libpostgresprovider.so
+%%PGSQL%%lib/qgis/plugins/libspitplugin.so
%%QGIS_PYTHON%%%%DATADIR%%/python/plugins/GdalTools/GdalTools.py
%%QGIS_PYTHON%%%%DATADIR%%/python/plugins/GdalTools/icons/about.png
%%QGIS_PYTHON%%%%DATADIR%%/python/plugins/GdalTools/icons/contour.png
--- qgis-1.7.0_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list