desktop/qgis/PKGBUILD

73 lines
2.3 KiB
Bash
Raw Normal View History

2011-04-16 18:53:15 +08:00
pkgname=qgis
2018-10-28 22:27:12 +08:00
pkgver=3.4.0
2018-11-09 23:45:38 +08:00
pkgrel=2
2018-11-08 17:24:48 +08:00
pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats'
url='https://qgis.org/'
license=(GPL)
arch=(x86_64)
depends=(gdal hicolor-icon-theme libzip python3-qscintilla-qt5 qca
qt5-3d qt5-webkit qtkeychain qt5-serialport
spatialindex python3-sip qt5-svg qwt proj)
makedepends=(cmake fcgi gsl python3-six qt5-tools sip grass opencl-headers)
optdepends=('fcgi: Map server'
'gpsbabel: GPS Tools plugin'
'gsl: Georeferencer plugin'
'python3-gdal: DB Manager plugin; Processing plugin'
'python3-jinja: MetaSearch plugin'
'python3-owslib: MetaSearch plugin'
'python3-psycopg2: DB Manager plugin; Processing plugin'
'python3-pygments: MetaSearch plugin'
'python3-numpy: Processing plugin'
'python3-yaml: Processing plugin')
2018-10-28 22:27:12 +08:00
source=("https://qgis.org/downloads/$pkgname-$pkgver.tar.bz2")
sha256sums=('b63a6ebbd4e4afb2820887b18b0aa41e3c7862f7fbdc8a121d6fcd75f0321e98')
2015-12-07 08:10:41 +08:00
2016-07-28 07:25:11 +08:00
prepare() {
cd $pkgname-$pkgver
2018-11-08 17:24:48 +08:00
# Find osgQt
sed -e 's/osgQt5 osgQt/osgQt/' \
-e 's/osgQt5d osgQtd/osgQt/' \
-i src/plugins/globe/CMakeModules/FindOSG.cmake
2017-03-12 22:21:03 +08:00
# Remove mime types already defined by freedesktop.org
sed -e '/type="image\/tiff"/,/<\/mime-type>/d' \
-e '/type="image\/jpeg"/,/<\/mime-type>/d' \
-e '/type="image\/jp2"/,/<\/mime-type>/d' \
-e '/type="application\/x-adobe-mif"/,/<\/mime-type>/d' \
-i debian/qgis.xml
2018-11-08 17:24:48 +08:00
2018-11-09 23:45:38 +08:00
sed 's,QCA REQUIRED,Qca-qt5 REQUIRED,' -i CMakeLists.txt
2016-07-28 07:25:11 +08:00
[[ -d build ]] || mkdir build
}
2012-08-11 18:13:50 +08:00
2014-06-28 17:33:08 +08:00
build() {
2017-12-12 19:44:38 +08:00
cd $pkgname-$pkgver/build
2018-11-08 17:24:48 +08:00
2016-03-19 19:57:53 +08:00
cmake -G "Unix Makefiles" ../ \
2014-06-28 17:33:08 +08:00
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
2018-11-09 23:45:38 +08:00
-DQCA_LIBRARY=/usr/lib/libqca-qt5.so.2 \
2018-11-10 01:37:56 +08:00
-DQCA_INCLUDE_DIR=/usr/include/qt5/Qca-qt5/QtCrypto \
2014-06-28 17:33:08 +08:00
-DGRASS_PREFIX=/opt/grass \
2018-11-08 17:24:48 +08:00
-DWITH_3D=TRUE \
-DWITH_SERVER=TRUE \
-DWITH_CUSTOM_WIDGETS=TRUE \
-DBINDINGS_GLOBAL_INSTALL=TRUE \
2018-07-05 22:57:03 +08:00
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
2018-11-08 17:24:48 +08:00
-DQGIS_MANUAL_SUBDIR=share/man \
-DWITH_QWTPOLAR=TRUE
2016-03-19 19:57:53 +08:00
make
2018-11-08 17:24:48 +08:00
# Rebuild srs database, QGIS distributes an old, buggy one
LD_LIBRARY_PATH="$PWD/output/lib/" make synccrsdb
mv /tmp/srs.db ../resources/
2011-04-16 18:53:15 +08:00
}
package() {
2018-11-08 17:24:48 +08:00
cd $pkgname-$pkgver/build
make DESTDIR="$pkgdir" install
2015-11-30 04:01:37 +08:00
}