aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/qgis/Makefile
blob: 1ed1728ea3cb2c07963ceabd5bef8dad547b5bf2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# New ports collection makefile for:    qgis
# Date created:     Apr 2006
# Whom:         Laurent Courty
#
# $FreeBSD$
#

PORTNAME=   qgis
PORTVERSION=    1.6.0
PORTREVISION=   1
CATEGORIES= graphics geography
MASTER_SITES=   http://qgis.org/downloads/ \
        http://download.osgeo.org/qgis/src/

MAINTAINER= wen@FreeBSD.org
COMMENT=    Geographical Information System (GIS) data viewer

LIB_DEPENDS=    geos:${PORTSDIR}/graphics/geos \
        proj:${PORTSDIR}/graphics/proj \
        gsl.15:${PORTSDIR}/math/gsl \
        qwt.5:${PORTSDIR}/x11-toolkits/qwt5 \
        gdal:${PORTSDIR}/graphics/gdal

USE_BZIP2=  yes
USE_PYTHON= yes
USE_BISON=  build
USE_CMAKE=  yes
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

OPTIONS=    GRASS "Enable GRASS support" Off \
        POSTGIS "Enable PostGIS support" Off \
        MAPSERVER "Enable MapServer support" off \
        PYTHON "Enable Python support" On

.include <bsd.port.pre.mk>

.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}
RUN_DEPENDS+=   ${LOCALBASE}/lib/gdalplugins/gdal_GRASS.so:${PORTSDIR}/graphics/gdal-grass
.endif

.if defined(WITH_POSTGIS)
CONFIGURE_ARGS+=--with-postgresql
BUILD_DEPENDS+= ${LOCALBASE}/share/postgis:${PORTSDIR}/databases/postgis
PLIST_SUB+= PGSQL=""
.else
CONFIGURE_ARGS+=--without-postgresql
PLIST_SUB+= PGSQL="@comment "
.endif

.if defined(WITH_MAPSERVER)
PLIST_SUB+= QGIS_FCGI=""
LIB_DEPENDS+=   fcgi.0:${PORTSDIR}/www/fcgi
.else
PLIST_SUB+= QGIS_FCGI="@comment "
.endif

.if defined(WITHOUT_PYTHON)
PLIST_SUB+= QGIS_PYTHON="@comment "
.else
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 \
        ${PYTHON_PKGNAMEPREFIX}qt4-network>=4.5.4:${PORTSDIR}/net/py-qt4-network \
        ${PYTHON_PKGNAMEPREFIX}qt4-svg>=4.5.4:${PORTSDIR}/graphics/py-qt4-svg \
        ${PYTHON_PKGNAMEPREFIX}qt4-xml>=4.5.4:${PORTSDIR}/textproc/py-qt4-xml \
        ${PYTHON_PKGNAMEPREFIX}qt4-core>=4.5.4:${PORTSDIR}/devel/py-qt4-core \
        ${PYTHON_PKGNAMEPREFIX}sqlite3>=2.6.5:${PORTSDIR}/databases/py-sqlite3
.endif

MAN1=       qgis.1 qgis_help.1

post-patch:
        ${REINPLACE_CMD} -e 's# dl##g' \
            ${WRKSRC}/src/core/CMakeLists.txt

.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>