Gentoo Archives: gentoo-commits

From: Sam Jorna <wraeth@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/grass/
Date: Tue, 18 Apr 2017 23:25:38
Message-Id: 1492557878.99ef59f9a1aacadacd8af07c3c56e52ece07c20c.wraeth@gentoo
1 commit: 99ef59f9a1aacadacd8af07c3c56e52ece07c20c
2 Author: Sam Jorna <wraeth <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 18 23:20:36 2017 +0000
4 Commit: Sam Jorna <wraeth <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 18 23:24:38 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99ef59f9
7
8 sci-geosciences/grass: bump to 7.2.0
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 sci-geosciences/grass/Manifest | 1 +
13 sci-geosciences/grass/grass-7.2.0.ebuild | 270 +++++++++++++++++++++++++++++++
14 2 files changed, 271 insertions(+)
15
16 diff --git a/sci-geosciences/grass/Manifest b/sci-geosciences/grass/Manifest
17 index dcf1c4b64f5..24138832790 100644
18 --- a/sci-geosciences/grass/Manifest
19 +++ b/sci-geosciences/grass/Manifest
20 @@ -1,2 +1,3 @@
21 DIST grass-7.0.4.tar.gz 40601012 SHA256 657188dc640b8482d16f889ff281abe424a0b232d03328086ba28cbf02c65af2 SHA512 5ac1359f1d1d6602a567f4d85eb4f92f665788ebba51767696894228b31b5d65c1fa343e068b5c2990c12ff023b5c09ff441b7c2e1e1d990956be3250fe45658 WHIRLPOOL b2b81aca710419f22476660462ba6c47d953621d0d02ea3b4d8ee64deec047d7947698073270d778a308782f89575ec897707db8139d85743a1eb22714ee203e
22 DIST grass-7.0.5.tar.gz 40862798 SHA256 60de3ba67eaf4f05dcff4f48ef710113f9efa9367ece784c13423bc620246f3c SHA512 42ff0577ca4fb1fe5f370090b94bec82eec1be65883152d64eacae6b3628e91e67ced045ca2a299f32e9d773995b35cc98b4cceaee6518c788f9366f3c7371bd WHIRLPOOL fb0077dd81074721e9ad53d0e3d7a76260a237426e37bb9e2ab393c7647e2204ee5f85e7936fe94e59f4e9413442e86f6ba6cf40bf31be9b833e70cebaa781bd
23 +DIST grass-7.2.0.tar.gz 48315008 SHA256 f0bc0c3cfccc98330ce01547bd86d8281f93f05a45b6115eb33044a07cf70750 SHA512 b1aa17ec554c2f0473df3726993b0891df4589c60ca9362405932a4c479b5883245b0a0ba9e787ce2e9de210b6307f34883e4e63ddfbf04eb5d75e8583bc2c5b WHIRLPOOL dfee9a8ca203a5c969b48e57ab8e97dfbb92bbe70cbc6b31d3734e2ddb21fb06402f83f9c3e1cafc4b139056fc0f601d9d6361c165b39b384e1da93382233db1
24
25 diff --git a/sci-geosciences/grass/grass-7.2.0.ebuild b/sci-geosciences/grass/grass-7.2.0.ebuild
26 new file mode 100644
27 index 00000000000..3ed122166e6
28 --- /dev/null
29 +++ b/sci-geosciences/grass/grass-7.2.0.ebuild
30 @@ -0,0 +1,270 @@
31 +# Copyright 1999-2017 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +PYTHON_COMPAT=( python2_7 )
37 +PYTHON_REQ_USE="sqlite" # bug 572440
38 +WANT_AUTOCONF="2.1"
39 +WX_GTK_VER=3.0
40 +
41 +inherit eutils gnome2 fdo-mime multilib python-single-r1 versionator wxwidgets autotools
42 +
43 +MY_PM=${PN}$(get_version_component_range 1-2 ${PV})
44 +MY_PM=${MY_PM/.}
45 +MY_P=${P/_rc/RC}
46 +
47 +DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization"
48 +HOMEPAGE="http://grass.osgeo.org/"
49 +SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0/7.2.0"
53 +KEYWORDS="~amd64 ~x86"
54 +IUSE="X blas cxx fftw geos lapack liblas mysql netcdf nls odbc opencl opengl openmp png postgres readline sqlite threads tiff truetype"
55 +
56 +RDEPEND="${PYTHON_DEPS}
57 + >=app-admin/eselect-1.2
58 + dev-python/numpy[${PYTHON_USEDEP}]
59 + media-libs/libprojectm
60 + sci-libs/proj
61 + sci-libs/xdrfile
62 + sci-libs/gdal
63 + sys-libs/gdbm
64 + sys-libs/ncurses:0=
65 + sys-libs/zlib
66 + fftw? ( sci-libs/fftw:3.0 )
67 + geos? ( sci-libs/geos )
68 + blas? ( virtual/blas
69 + sci-libs/cblas-reference )
70 + lapack? ( virtual/lapack )
71 + liblas? ( sci-geosciences/liblas )
72 + mysql? ( virtual/mysql )
73 + netcdf? ( sci-libs/netcdf )
74 + odbc? ( dev-db/unixODBC )
75 + opencl? ( virtual/opencl )
76 + opengl? ( virtual/opengl )
77 + png? ( media-libs/libpng:0= )
78 + postgres? ( >=dev-db/postgresql-8.4:= )
79 + readline? ( sys-libs/readline:0= )
80 + sqlite? ( dev-db/sqlite:3 )
81 + tiff? ( media-libs/tiff:0= )
82 + truetype? ( media-libs/freetype:2 )
83 + X? (
84 + dev-python/wxpython:3.0[cairo,opengl?]
85 + x11-libs/cairo[X,opengl?]
86 + x11-libs/libICE
87 + x11-libs/libSM
88 + x11-libs/libX11
89 + x11-libs/libXaw
90 + x11-libs/libXext
91 + x11-libs/libXmu
92 + x11-libs/libXp
93 + x11-libs/libXpm
94 + x11-libs/libXt
95 + )"
96 +
97 +DEPEND="${RDEPEND}
98 + virtual/pkgconfig
99 + sys-devel/flex
100 + sys-devel/gettext
101 + sys-devel/bison
102 + X? (
103 + dev-lang/swig
104 + x11-proto/xextproto
105 + x11-proto/xproto
106 + )"
107 +
108 +S="${WORKDIR}/${MY_P}"
109 +
110 +REQUIRED_USE="
111 + ${PYTHON_REQUIRED_USE}
112 + opengl? ( X )"
113 +
114 +PATCHES=(
115 + "${FILESDIR}/${PN}"-7.0.1-declare-inespg.patch
116 +)
117 +
118 +pkg_setup() {
119 + if use lapack; then
120 + local mylapack
121 + mylapack=$(eselect lapack show) || die
122 + if [[ -z "${mylapack/.*reference.*/}" ]] && \
123 + [[ -z "${mylapack/.*atlas.*/}" ]]; then
124 + ewarn "You need to set lapack to atlas or reference. Do:"
125 + ewarn " eselect lapack set <impl>"
126 + ewarn "where <impl> is atlas, threaded-atlas or reference"
127 + die "setup failed"
128 + fi
129 + fi
130 +
131 + if use blas; then
132 + local myblas
133 + myblas=$(eselect blas show) || die
134 + if [[ -z "${myblas/.*reference.*/}" ]] && \
135 + [[ -z "${myblas/.*atlas.*/}" ]]; then
136 + ewarn "You need to set blas to atlas or reference. Do:"
137 + ewarn " eselect blas set <impl>"
138 + ewarn "where <impl> is atlas, threaded-atlas or reference"
139 + die "setup failed"
140 + fi
141 + fi
142 +
143 + python-single-r1_pkg_setup
144 +}
145 +
146 +src_prepare() {
147 + # Fix unversioned python calls
148 + local pyver=${EPYTHON/python/}
149 + sed -e "s:GRASS_PYTHON=.*:&${pyver}:" -i "${S}/lib/init/grass.sh" || die
150 + sed -e "s:= python:&${pyver}:" -i "${S}/include/Make/Platform.make.in" || die
151 +
152 + # fix header being unconditionally included
153 + # see upstream https://trac.osgeo.org/grass/ticket/2779
154 + sed -e 's:\(#include <ogr_api.h>\):#ifdef HAVE_OGR\n\1\n#endif:' \
155 + -i "${S}/vector/v.external/main.c" || die "failed to sed main.c"
156 +
157 + epatch "${PATCHES[@]}"
158 +
159 + eapply_user
160 + eautoconf
161 +
162 + ebegin "Fixing python shebangs"
163 + python_fix_shebang -q "${S}"
164 + eend $?
165 +}
166 +
167 +src_configure() {
168 + if use X; then
169 + WX_BUILD=yes
170 + setup-wxwidgets
171 + fi
172 +
173 + addwrite "${ROOT}dev/dri/renderD128"
174 +
175 + econf \
176 + --enable-shared \
177 + --disable-w11 \
178 + $(use_with cxx) \
179 + $(use_with tiff) \
180 + $(use_with png) \
181 + $(use_with postgres) \
182 + $(use_with mysql) \
183 + $(use_with mysql mysql-includes "${ROOT}usr/include/mysql") \
184 + $(use_with mysql mysql-libs "${ROOT}usr/$(get_libdir)/mysql") \
185 + $(use_with sqlite) \
186 + $(use_with opengl) \
187 + $(use_with odbc) \
188 + $(use_with fftw) \
189 + $(use_with blas) \
190 + $(use_with lapack) \
191 + $(use_with X cairo) \
192 + $(use_with truetype freetype) \
193 + $(use_with truetype freetype-includes "${ROOT}usr/include/freetype2") \
194 + $(use_with nls) \
195 + $(use_with readline) \
196 + --without-opendwg \
197 + --with-regex \
198 + $(use_with threads pthread) \
199 + $(use_with openmp) \
200 + $(use_with opencl) \
201 + --with-gdal="${ROOT}usr/bin/gdal-config" \
202 + $(use_with liblas liblas "${ROOT}usr/bin/liblas-config") \
203 + $(use_with X wxwidgets "${WX_CONFIG}") \
204 + $(use_with netcdf netcdf "${ROOT}usr/bin/nc-config") \
205 + $(use_with geos geos "${ROOT}usr/bin/geos-config") \
206 + --with-proj-includes="${ROOT}usr/include/libprojectM" \
207 + --with-proj-libs="${ROOT}usr/$(get_libdir)" \
208 + --with-proj-share="${ROOT}usr/share/proj/" \
209 + $(use_with X x)
210 +}
211 +
212 +src_compile() {
213 + # we don't want to link against embedded mysql lib
214 + emake CC="$(tc-getCC)" MYSQLDLIB=""
215 +}
216 +
217 +src_install() {
218 + emake DESTDIR="${D}" \
219 + INST_DIR="${D}usr/${MY_PM}" \
220 + prefix="${D}usr" BINDIR="${D}usr/bin" \
221 + PREFIX="${D}usr/" \
222 + install
223 +
224 + pushd "${D}usr/${MY_PM}" &> /dev/null || die
225 +
226 + # fix docs
227 + dodoc AUTHORS CHANGES
228 + docinto html
229 + dodoc -r docs/html/*
230 + rm -rf docs/ || die
231 + rm -rf {AUTHORS,CHANGES,COPYING,GPL.TXT,REQUIREMENTS.html} || die
232 +
233 + # manuals
234 + dodir /usr/share/man/man1
235 + rm -rf man/ || die
236 +
237 + # translations
238 + if use nls; then
239 + dodir /usr/share/locale/
240 + mv locale/* "${D}usr/share/locale/" || die
241 + rm -rf locale/ || die
242 + # pt_BR is broken
243 + mv "${D}usr/share/locale/pt_br" "${D}usr/share/locale/pt_BR" || die
244 + fi
245 +
246 + popd &> /dev/null || die
247 +
248 + # place libraries where they belong
249 + mv "${D}usr/${MY_PM}/lib/" "${D}usr/$(get_libdir)/" || die
250 +
251 + # place header files where they belong
252 + mv "${D}usr/${MY_PM}/include/" "${D}usr/include/" || die
253 + # make rules are not required on installed system
254 + rm -rf "${D}usr/include/Make" || die
255 +
256 + # mv remaining gisbase stuff to libdir
257 + mv "${D}usr/${MY_PM}" "${D}usr/$(get_libdir)" || die
258 +
259 + # get proper folder for grass path in script
260 + local gisbase
261 + gisbase="${ROOT}usr/$(get_libdir)/${MY_PM}"
262 + sed -e "s:gisbase = \".*:gisbase = \"${gisbase}\":" \
263 + -i "${D}usr/bin/${MY_PM}" || die
264 +
265 + # get proper fonts path for fontcap
266 + sed -i \
267 + -e "s|${D}usr/${MY_PM}|${EPREFIX}usr/$(get_libdir)/${MY_PM}|" \
268 + "${D}usr/$(get_libdir)/${MY_PM}/etc/fontcap" || die
269 +
270 + # set proper python interpreter
271 + sed -e "s:= \"python\":= \"${EPYTHON}\":" -i "${D}usr/bin/${MY_PM}" || die
272 +
273 + if use X; then
274 + local GUI="-gui"
275 + [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
276 + make_desktop_entry "/usr/bin/${MY_PM} ${GUI}" "${PN}" "${PN}-48x48" "Science;Education"
277 + doicon -s 48 gui/icons/${PN}-48x48.png
278 + fi
279 +
280 + # install .pc file so other apps know where to look for grass
281 + insinto /usr/$(get_libdir)/pkgconfig/
282 + doins grass.pc
283 +
284 + # fix weird +x on tcl scripts
285 + find "${D}" -name "*.tcl" -exec chmod +r-x '{}' \;
286 +}
287 +
288 +pkg_postinst() {
289 + if use X; then
290 + fdo-mime_desktop_database_update
291 + gnome2_icon_cache_update
292 + fi
293 +}
294 +
295 +pkg_postrm() {
296 + if use X; then
297 + fdo-mime_desktop_database_update
298 + gnome2_icon_cache_update
299 + fi
300 +}