summaryrefslogtreecommitdiff
path: root/pcr/qgis/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-11-24 12:15:34 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-11-24 12:15:34 -0500
commited57dec4352fc419507ba1f7222c85f53cf68a4d (patch)
tree6e6a3e04e7d0e76a28187aca71ba60af06a65792 /pcr/qgis/PKGBUILD
parentef4e9ed3ff6e39e8008309d86855b47f28b6ed05 (diff)
qgis-2.12.0-2.parabola1: updating version
Diffstat (limited to 'pcr/qgis/PKGBUILD')
-rw-r--r--pcr/qgis/PKGBUILD175
1 files changed, 72 insertions, 103 deletions
diff --git a/pcr/qgis/PKGBUILD b/pcr/qgis/PKGBUILD
index e520de9c7..cee9c291f 100644
--- a/pcr/qgis/PKGBUILD
+++ b/pcr/qgis/PKGBUILD
@@ -1,137 +1,106 @@
+# Maintainer (Arch): Doug Newgard <scimmia at archlinux dot info>
# Contributor (Arch): SaultDon <sault.don gmail>
-# Contributor (Arch): pjduplooy <pjduplooy gmail>
-# Contributor (Arch): Lantald <lantald at gmx.com>
-# Contributor (Arch): Thomas Dziedzic <gostrc at gmail>
-# Contributor (Arch): dibblethewrecker <dibblethewrecker.at.jiwe.dot.org>
+# Contributor: (Arch) Lantald < lantald at gmx.com >
+# Contributor (Arch): Thomas Dziedzic < gostrc at gmail >
+# Contributor (Arch): dibblethewrecker dibblethewrecker.at.jiwe.dot.org
# Contributor (Arch): Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
-# Contributor (Arch): Eric Forgeot <http://esclinux.tk>
+# Contributor (Arch): Eric Forgeot < http://esclinux.tk >
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
-# GRASS Plugin, Globe Plugin and QGIS Map Server are disabled in cmake by default.
-# Uncomment them in the build() portion if you'd like enabled during the build.
+# Globe Plugin and QGIS Map Server are disabled in cmake by default.
+# Uncomment them in the build() portion if you'd like them enabled.
+# You will also need to install osgearth or fcgi, respectively, before building.
pkgname=qgis
-pkgver=2.8.2
-pkgrel=1
-pkgdesc='Quantum GIS is a Geographic Information System (GIS) that supports vector, raster & database formats'
+pkgver=2.12.0
+pkgrel=2.parabola1
+pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats'
url='http://qgis.org/'
license=('GPL')
arch=('i686' 'x86_64')
-# https://raw.githubusercontent.com/qgis/QGIS/final-2_6_0/INSTALL
-depends=('qt4'
- 'proj'
- 'geos'
- 'sqlite'
- 'gdal'
- 'gsl'
- 'expat'
- 'qwt'
- 'qwtpolar'
- 'python2'
- 'python2-pyqt4'
- 'python2-qscintilla'
- 'python2-sip'
- 'python2-psycopg2'
- 'python2-pygments'
- 'python2-dateutil'
- 'python2-jinja'
- 'python2-markupsafe'
- 'python2-pytz'
- 'python2-httplib2'
- 'libspatialite'
- 'spatialindex')
-makedepends=('cmake'
- 'flex'
- 'bison'
- 'txt2tags'
- 'perl'
- 'git')
-optdepends=('grass: GRASS plugin support' # Uncomment relevant cmake option in build() below
- 'fcgi: QGIS Map Server support' # if you want GRASS, QGIS Map Server
- 'osgearth: QGIS Globe plugin support' # or the Globe Plugin enabled
- 'gpsbabel: GPS toolbar support')
-provides=("${pkgname}=${pkgver}")
-conflicts=("${pkgname}-git" "${pkgname}")
-install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/qgis/QGIS/archive/final-${pkgver//./_}.tar.gz"
- "https://raw.githubusercontent.com/Ariki/QGIS/support-configure-ng/python/console/console.py")
-md5sums=('ed4e2de0dd929583d3ed1d0e6ae1bbd7'
- '57efd9c869ed2d0a50fb7cf35048d99d')
-#options=(!makeflags)
+depends=('qca-qt4' 'gdal' 'qwtpolar' 'gsl' 'spatialindex' 'icu'
+ 'python2-qscintilla' 'python2-sip' 'python2-psycopg2' 'python2-six' 'python2-dateutil'
+ 'python2-httplib2' 'python2-jinja' 'python2-markupsafe' 'python2-pygments' 'python2-pytz')
+makedepends=('cmake' 'txt2tags' 'perl')
+optdepends=('gpsbabel: GPS Tool plugin')
+install="$pkgname.install"
+mksource=("http://qgis.org/downloads/$pkgname-$pkgver.tar.bz2")
+source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.gz"
+ "console_pyqt4.diff"
+ "libre.patch")
+mkmd5sums=('099efb9482a67e3c57f54f4947986e39')
+md5sums=('4f1122610833228e6952028a4f29ba45'
+ '636b0fd147d19f50e82080a5819ae10a'
+ '6c5f082d7f41f45762030a80aa89d5ff')
+
+mksource() {
+ cd $pkgname-$pkgver
+
+ # remove nonfree resource
+ rm -rv "resources/cpt-city-qgis-min/es"
+}
prepare() {
- mv "${srcdir}/QGIS-final-${pkgver//./_}" "${srcdir}/${pkgname}"
+ cd $pkgname-$pkgver
- cd "${srcdir}/${pkgname}"
+ patch -Np1 -i "$srcdir/console_pyqt4.diff"
- mv "${srcdir}/console.py" python/console/
+ # Fixing shebang for .py files
+ sed -i 's/\(env \|\/usr\/bin\/\)python$/&2/' $(find . -iname "*.py")
- # Fixing by hand shebang for .py files.
- find . -iname '*.py' | xargs sed -ie 's:^#!/usr/bin/env python$:#!/usr/bin/env python2:'
- find . -iname '*.py' | xargs sed -ie 's:^#!/usr/bin/python$:#!/usr/bin/env python2:'
+ [[ -d build ]] || mkdir build
}
build() {
- # Fix insecure RPATH is weird, but just works ;)
- # echo "os.system(\"sed -i '/^LFLAGS/s|-Wl,-rpath,.\+ ||g' gui/Makefile core/Makefile\")" >> python/configure.py.in
-
- cd "${srcdir}/${pkgname}"
-
- if [ -d build ]; then
- rm -rf build
- fi
- mkdir build
- cd build
+ cd $pkgname-$pkgver/build
- cmake ../ \
- -Wno-dev \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_SKIP_RPATH=ON \
+ cmake -G "Unix Makefiles" ../ \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DENABLE_TESTS=OFF \
-DQGIS_MANUAL_SUBDIR=share/man \
+ -DENABLE_TESTS=FALSE \
+ -DCMAKE_SKIP_RPATH=TRUE \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
- -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
- -DPYTHON_INCLUDE_PATH=/usr/include/python2.7 \
- -DPYTHON_SITE_PACKAGES_DIR=/usr/lib/python2.7/site-packages \
- -DPYQT4_SIP_DIR=/usr/share/sip/PyQt4 \
- -DQSCI_SIP_DIR=/usr/share/sip/PyQt4 \
- -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 \
-DWITH_INTERNAL_QWTPOLAR=FALSE \
- -DQWTPOLAR_LIBRARY=/usr/lib/libqwtpolar.so \
- -DQWT_LIBRARY=/usr/lib/libqwt.so \
-# -DWITH_GRASS=ON \
-# -DGRASS_PREFIX=/opt/grass \
-# -DGRASS_INCLUDE_DIR=/opt/grass/include/ \
+ -DWITH_INTERNAL_SIX=FALSE \
+ -DWITH_INTERNAL_DATEUTIL=FALSE \
+ -DWITH_INTERNAL_HTTPLIB2=FALSE \
+ -DWITH_INTERNAL_JINJA2=FALSE \
+ -DWITH_INTERNAL_MARKUPSAFE=FALSE \
+ -DWITH_INTERNAL_PYGMENTS=FALSE \
+ -DWITH_INTERNAL_PYTZ=FALSE \
# -DWITH_SERVER=TRUE \
-# -DWITH_SERVER_PLUGINS=TRUE \
-# -DWITH_GLOBE=TRUE \
+# -DWITH_GLOBE=TRUE
make
-
- # TODO: fix $srcdir warning if it's a real problem...
- # Looks like it's only showing up in non-critical files so can ignore warning.
}
package() {
- cd "${srcdir}/${pkgname}"
- cd build
+ cd $pkgname-$pkgver
+
+ # Add optional deps based on selected or autodetected options
+ [[ -n "$(awk -F= '/^GRASS_PREFIX:/ {print $2}' build/CMakeCache.txt)" ]] && \
+ optdepends+=('grass6: GRASS6 plugin')
+ [[ -n "$(awk -F= '/^GRASS_PREFIX7:/ {print $2}' build/CMakeCache.txt)" ]] && \
+ optdepends+=('grass: GRASS7 plugin')
+ [[ "$(awk -F= '/^WITH_SERVER:/ {print $2}' build/CMakeCache.txt)" == "TRUE" ]] && \
+ optdepends+=('fcgi: QGIS Map Server')
+ [[ "$(awk -F= '/^WITH_GLOBE:/ {print $2}' build/CMakeCache.txt)" == "TRUE" ]] && \
+ optdepends+=('osgearth: QGIS Globe plugin')
+
+ make -C build DESTDIR="$pkgdir" install
- make DESTDIR="${pkgdir}/" install
-
# install some freedesktop.org compatibility
- install -D -m644 "${srcdir}/${pkgname}/debian/qgis.desktop" \
- "${pkgdir}/usr/share/applications/qgis.desktop"
- install -D -m644 "${srcdir}/${pkgname}/debian/qbrowser.desktop" \
- "${pkgdir}/usr/share/applications/qbrowser.desktop"
+ install -Dm644 debian/{qgis,qbrowser}.desktop -t "$pkgdir/usr/share/applications/"
+ install -Dm644 debian/qgis-icon512x512.png "$pkgdir/usr/share/pixmaps/qgis.png"
+ install -Dm644 debian/qbrowser-icon512x512.png "$pkgdir/usr/share/pixmaps/qbrowser.png"
+ install -Dm644 images/icons/qgis-mime-icon.png "$pkgdir/usr/share/pixmaps/qgis-mime.png"
# TODO: these aren't working for some reason, ie, .qgs files are not opened by QGIS...
- # Appears to be a conflict with xml file types being defaulted to google-chrome/chromium if it's installed.
- install -dm755 "${pkgdir}/usr/share/pixmaps" \
- "${pkgdir}/usr/share/mimelnk/application"
- for mime in "${srcdir}/${pkgname}/debian/mime/application/"*.desktop
- do install -m644 "$mime" "${pkgdir}/usr/share/mimelnk/application"
+ # Appears to be a conflict with some file types being defaulted to google-chrome/chromium if that's installed as well.
+ for mime in debian/mime/application/*.desktop
+ do install -Dm644 "$mime" -t "$pkgdir/usr/share/mimelnk/application/"
done
- ln -s /usr/share/qgis/images/icons/qgis-icon.png "${pkgdir}/usr/share/pixmaps/qgis.png"
- ln -s /usr/share/qgis/images/icons/qgis-mime-icon.png "${pkgdir}/usr/share/pixmaps/qgis-mime-icon.png"
+
+ # compile python files, since the cmake option doesn't seem to account for DESTDIR
+ python2 -m compileall -q "$pkgdir"
}