Gentoo Archives: gentoo-commits

From: Amy Winston <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/qgis/
Date: Mon, 02 Jan 2017 07:32:55
Message-Id: 1483342284.b240880559f28d3175eef3309713d64b467cb447.amynka@gentoo
1 commit: b240880559f28d3175eef3309713d64b467cb447
2 Author: Chris Mayo <aklhfex <AT> gmail <DOT> com>
3 AuthorDate: Sun Jan 1 20:38:28 2017 +0000
4 Commit: Amy Winston <amynka <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 07:31:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2408805
7
8 sci-geosciences/qgis: fix Python and Oracle dependencies and icons
9
10 Closes:#3299
11
12 Package-Manager: portage-2.3.3
13
14 sci-geosciences/qgis/qgis-2.18.2-r2.ebuild | 181 +++++++++++++++++++++++++++++
15 1 file changed, 181 insertions(+)
16
17 diff --git a/sci-geosciences/qgis/qgis-2.18.2-r2.ebuild b/sci-geosciences/qgis/qgis-2.18.2-r2.ebuild
18 new file mode 100644
19 index 00000000..2dddf93
20 --- /dev/null
21 +++ b/sci-geosciences/qgis/qgis-2.18.2-r2.ebuild
22 @@ -0,0 +1,181 @@
23 +# Copyright 1999-2017 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI="6"
28 +
29 +PYTHON_COMPAT=( python2_7 )
30 +PYTHON_REQ_USE="sqlite"
31 +
32 +inherit eutils gnome2-utils cmake-utils python-single-r1
33 +
34 +DESCRIPTION="User friendly Geographic Information System"
35 +HOMEPAGE="http://www.qgis.org/"
36 +SRC_URI="
37 + http://qgis.org/downloads/qgis-${PV}.tar.bz2
38 + examples? ( http://download.osgeo.org/qgis/data/qgis_sample_data.tar.gz )"
39 +
40 +LICENSE="GPL-2+ GPL-3+"
41 +SLOT="0"
42 +KEYWORDS="~amd64 ~x86"
43 +IUSE="examples georeferencer grass mapserver oracle postgres python"
44 +
45 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
46 + mapserver? ( python )"
47 +
48 +RDEPEND="
49 + ${PYTHON_DEPS}
50 + dev-libs/expat
51 + sci-geosciences/gpsbabel
52 + >=sci-libs/gdal-1.6.1:=[geos,oracle?,python?,${PYTHON_USEDEP}]
53 + sci-libs/geos
54 + sci-libs/libspatialindex:=
55 + sci-libs/proj
56 + dev-libs/qjson
57 + dev-qt/designer:4
58 + dev-qt/qtcore:4
59 + dev-qt/qtgui:4
60 + dev-qt/qtscript:4
61 + dev-qt/qtsvg:4
62 + dev-qt/qtsql:4
63 + dev-qt/qtwebkit:4
64 + x11-libs/qscintilla:=[qt4(-)]
65 + || (
66 + ( || ( <x11-libs/qwt-6.1.2:6[svg] >=x11-libs/qwt-6.1.2:6[svg,qt4] ) >=x11-libs/qwtpolar-1 )
67 + ( x11-libs/qwt:5[svg] <x11-libs/qwtpolar-1 )
68 + )
69 + georeferencer? ( sci-libs/gsl:= )
70 + grass? ( || ( >=sci-geosciences/grass-7.0.0:= ) )
71 + mapserver? ( dev-libs/fcgi )
72 + oracle? ( dev-db/oracle-instantclient:= )
73 + postgres? ( dev-db/postgresql:= )
74 + python? (
75 + dev-python/PyQt4[X,sql,svg,webkit,${PYTHON_USEDEP}]
76 + <dev-python/sip-4.19:=[${PYTHON_USEDEP}]
77 + dev-python/qscintilla-python[${PYTHON_USEDEP}]
78 + dev-python/python-dateutil[${PYTHON_USEDEP}]
79 + dev-python/httplib2[${PYTHON_USEDEP}]
80 + dev-python/jinja[${PYTHON_USEDEP}]
81 + dev-python/markupsafe[${PYTHON_USEDEP}]
82 + dev-python/pygments[${PYTHON_USEDEP}]
83 + dev-python/pytz[${PYTHON_USEDEP}]
84 + dev-python/requests[${PYTHON_USEDEP}]
85 + dev-python/six[${PYTHON_USEDEP}]
86 + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
87 + ${PYTHON_DEPS}
88 + )
89 + dev-db/sqlite:3
90 + >=dev-db/spatialite-4.1.0
91 + app-crypt/qca:2[qt4,ssl]
92 +"
93 +
94 +DEPEND="${RDEPEND}
95 + sys-devel/bison
96 + sys-devel/flex"
97 +
98 +DOCS=( BUGS ChangeLog NEWS )
99 +
100 +# Disabling test suite because upstream disallow running from install path
101 +RESTRICT="test"
102 +
103 +pkg_setup() {
104 + python-single-r1_pkg_setup
105 +}
106 +
107 +src_prepare() {
108 + default
109 +
110 + cd src/plugins || die
111 + use georeferencer || cmake_comment_add_subdirectory "georeferencer"
112 +}
113 +
114 +src_configure() {
115 + local mycmakeargs=(
116 + -DQGIS_MANUAL_SUBDIR=/share/man/
117 + -DBUILD_SHARED_LIBS=ON
118 + -DQGIS_LIB_SUBDIR=$(get_libdir)
119 + -DQGIS_PLUGIN_SUBDIR=$(get_libdir)/qgis
120 + -DWITH_INTERNAL_DATEUTIL=OFF
121 + -DWITH_INTERNAL_HTTPLIB2=OFF
122 + -DWITH_INTERNAL_JINJA2=OFF
123 + -DWITH_INTERNAL_MARKUPSAFE=OFF
124 + -DWITH_INTERNAL_PYGMENTS=OFF
125 + -DWITH_INTERNAL_PYTZ=OFF
126 + -DWITH_INTERNAL_QWTPOLAR=OFF
127 + -DWITH_INTERNAL_SIX=OFF
128 + -DPEDANTIC=OFF
129 + -DWITH_APIDOC=OFF
130 + -DWITH_QSPATIALITE=ON
131 + -DENABLE_TESTS=OFF
132 + -DWITH_BINDINGS="$(usex python)"
133 + -DWITH_GRASS7="$(usex grass)"
134 + $(usex grass "-DGRASS_PREFIX=/usr/" "")
135 + -DWITH_ORACLE="$(usex oracle)"
136 + -DWITH_POSTGRESQL="$(usex postgres)"
137 + -DWITH_PYSPATIALITE="$(usex python)"
138 + -DWITH_SERVER="$(usex mapserver)"
139 + )
140 +
141 + if has_version '>=x11-libs/qwtpolar-1' && has_version 'x11-libs/qwt:5' ; then
142 + elog "Both >=x11-libs/qwtpolar-1 and x11-libs/qwt:5 installed. Force build with qwt6"
143 + if has_version '>=x11-libs/qwt-6.1.2' ; then
144 + mycmakeargs+=(
145 + "-DQWT_INCLUDE_DIR=/usr/include/qwt6"
146 + "-DQWT_LIBRARY=/usr/$(get_libdir)/libqwt6-qt4.so"
147 + )
148 + else
149 + mycmakeargs+=(
150 + "-DQWT_INCLUDE_DIR=/usr/include/qwt6"
151 + "-DQWT_LIBRARY=/usr/$(get_libdir)/libqwt6.so"
152 + )
153 + fi
154 + fi
155 +
156 + cmake-utils_src_configure
157 +}
158 +
159 +src_install() {
160 + cmake-utils_src_install
161 +
162 + newicon -s 16 images/icons/qgis-icon-16x16.png qgis.png
163 + newicon -s 512 images/icons/qgis-icon.png qgis.png
164 + newicon -s scalable images/icons/qgis_icon.svg qgis.svg
165 + make_desktop_entry qgis "QGIS" qgis
166 +
167 + if use examples; then
168 + insinto /usr/share/doc/${PF}/examples
169 + doins -r "${WORKDIR}"/qgis_sample_data/*
170 + fi
171 +
172 + python_optimize "${D}"/usr/share/qgis/python \
173 + "${D}"/$(python_get_sitedir)/qgis \
174 + "${D}"/$(python_get_sitedir)/pyspatialite
175 +
176 + if use grass; then
177 + python_fix_shebang "${D}"/usr/share/qgis/grass/scripts
178 + python_optimize "${D}"/usr/share/qgis/grass/scripts
179 + fi
180 +}
181 +
182 +pkg_preinst() {
183 + gnome2_icon_savelist
184 +}
185 +
186 +pkg_postinst() {
187 + if use postgres; then
188 + elog "If you don't intend to use an external PostGIS server"
189 + elog "you should install:"
190 + elog " dev-db/postgis"
191 + elif use python; then
192 + elog "Support of PostgreSQL is disabled."
193 + elog "But some installed python-plugins import the psycopg2 module."
194 + elog "If you do not need these plugins just disable them"
195 + elog "in the Plugins menu, else you need to set USE=\"postgres\""
196 + fi
197 +
198 + gnome2_icon_cache_update
199 +}
200 +
201 +pkg_postrm() {
202 + gnome2_icon_cache_update
203 +}