summaryrefslogtreecommitdiff
path: root/community/python-basemap/PKGBUILD
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-03-28 16:32:45 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2013-03-28 16:32:45 +0100
commite4421c38da95569f796d29c83a54f750e5222545 (patch)
tree3b7ac69f38e8a83d0dc58b69305011d095c5ceb0 /community/python-basemap/PKGBUILD
parent3ffe7613c97fecff8c5710dfbd44a984eaae9adc (diff)
parent0fbe25a10dce8ec16455854ed6929b688f98cb36 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/erlang/PKGBUILD community/haskell-x11-xft/PKGBUILD community/libgdamm/PKGBUILD community/luasql/PKGBUILD community/myodbc/PKGBUILD community/python2-basemap/PKGBUILD community/ruby-cairo/PKGBUILD community/ruby-gtk2/PKGBUILD community/stardict/PKGBUILD core/diffutils/PKGBUILD core/libsasl/PKGBUILD core/systemd/PKGBUILD extra/anjuta/PKGBUILD extra/ardour/PKGBUILD extra/boost/PKGBUILD extra/calligra/PKGBUILD extra/gnokii/PKGBUILD extra/icu/PKGBUILD extra/libgda/PKGBUILD extra/libmtp/PKGBUILD extra/lighttpd/PKGBUILD extra/mariadb/PKGBUILD extra/mysql/PKGBUILD extra/php/PKGBUILD extra/qt3/PKGBUILD extra/qt4/PKGBUILD extra/qt5/PKGBUILD extra/tracker/PKGBUILD extra/vlc/PKGBUILD extra/webkitgtk/PKGBUILD libre/lilo/PKGBUILD libre/psi/PKGBUILD
Diffstat (limited to 'community/python-basemap/PKGBUILD')
-rw-r--r--community/python-basemap/PKGBUILD83
1 files changed, 83 insertions, 0 deletions
diff --git a/community/python-basemap/PKGBUILD b/community/python-basemap/PKGBUILD
new file mode 100644
index 000000000..916c44b6e
--- /dev/null
+++ b/community/python-basemap/PKGBUILD
@@ -0,0 +1,83 @@
+# $Id: PKGBUILD 87032 2013-03-26 01:43:08Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Matthias Ellmer <ellmer.matthias@gmail.com>
+# Contributor: Julien Morin <jmorin@cp.dias.ie>
+
+pkgbase=python-basemap
+pkgname=('python-basemap' 'python2-basemap' 'python-basemap-common')
+pkgver=1.0.6
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://matplotlib.org/basemap/"
+license=('custom')
+makedepends=('python2-numpy' 'python-numpy' 'geos' 'shapelib')
+source=("http://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-${pkgver}/basemap-${pkgver}.tar.gz")
+sha1sums=('76191964c580b3af33c169cb050bb171328298f9')
+
+_py2basever=2.7
+_py3basever=3.3
+
+build() {
+ pushd "${srcdir}"/basemap-${pkgver}
+ # Remove the bundled libraries and common data
+ rm -r geos-*
+ sed -i "s/lib64/lib/g" setup.py
+ popd
+
+ cp -a "${srcdir}"/basemap-${pkgver}{,-python2}
+
+ # Python3 Version
+ cd "${srcdir}"/basemap-${pkgver}
+ python setup.py config
+ python setup.py build
+
+ # Python2 Version
+ cd "${srcdir}"/basemap-${pkgver}-python2
+ python2 setup.py config
+ python2 setup.py build
+}
+
+package_python-basemap() {
+ pkgdesc="Toolkit for plotting data on map projections"
+ depends=('python-basemap-common' 'python-matplotlib' 'geos' 'shapelib' 'python-numpy' 'python-httplib2')
+ optdepends=('python-imaging: Python Imaging Library is only needed for bluemarble and warpimage methods.')
+
+ cd "${srcdir}"/basemap-${pkgver}
+
+ python setup.py install -O1 --skip-build --root="${pkgdir}" --prefix=/usr
+
+ # Conflict with files from python-matplotlib
+ rm "${pkgdir}"/usr/lib/python${_py3basever}/site-packages/mpl_toolkits/__init__.py
+ rm "${pkgdir}"/usr/lib/python${_py3basever}/site-packages/mpl_toolkits/__pycache__/__init__.cpython-33.{pyc,pyo}
+
+ rm -fr "${pkgdir}"/usr/lib/python${_py3basever}/site-packages/mpl_toolkits/basemap/data
+ ln -sf /usr/share/basemap/data "${pkgdir}"/usr/lib/python${_py3basever}/site-packages/mpl_toolkits/basemap/data
+}
+
+package_python2-basemap() {
+ pkgdesc="Toolkit for plotting data on map projections"
+ depends=('python-basemap-common' 'python2-matplotlib' 'geos' 'shapelib' 'python2-numpy' 'python2-httplib2')
+ optdepends=('python2-imaging: Python Imaging Library is only needed for bluemarble and warpimage methods.')
+
+ cd "${srcdir}"/basemap-${pkgver}-python2
+
+ python2 setup.py install -O1 --skip-build --root="${pkgdir}" --prefix=/usr
+
+ # Conflict with files from python2-matplotlib
+ rm "${pkgdir}"/usr/lib/python${_py2basever}/site-packages/mpl_toolkits/__init__.{py,pyc,pyo}
+
+ rm -fr "${pkgdir}"/usr/lib/python${_py2basever}/site-packages/mpl_toolkits/basemap/data
+ ln -sf /usr/share/basemap/data "${pkgdir}"/usr/lib/python${_py2basever}/site-packages/mpl_toolkits/basemap/data
+}
+
+package_python-basemap-common() {
+ pkgdesc="Data files for python-basemap"
+
+ cd "${srcdir}"/basemap-${pkgver}
+
+ install -dm755 "${pkgdir}"/usr/share/basemap
+ cp -a lib/mpl_toolkits/basemap/data/ "${pkgdir}"/usr/share/basemap/
+
+ install -dm755 "${pkgdir}"/usr/share/licenses/${pkgbase}
+ install -m644 LICENSE_{data,pyshp,proj4} README "${pkgdir}"/usr/share/licenses/${pkgbase}/
+}