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/grass/
Date: Sat, 26 Dec 2015 22:31:28
Message-Id: 1451168984.3c68bee97f3bf28065252ed8dde34c62a8bb7ea0.amynka@gentoo
1 commit: 3c68bee97f3bf28065252ed8dde34c62a8bb7ea0
2 Author: Amy Winston <amynka <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 26 22:26:24 2015 +0000
4 Commit: Amy Winston <amynka <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 22:29:44 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c68bee9
7
8 sci-geosciences/grass: version bump 7.0.2 bug #566314.By wraeth
9
10 Package-Manager: portage-2.2.24
11
12 sci-geosciences/grass/Manifest | 1 +
13 sci-geosciences/grass/grass-7.0.2.ebuild | 270 +++++++++++++++++++++++++++++++
14 2 files changed, 271 insertions(+)
15
16 diff --git a/sci-geosciences/grass/Manifest b/sci-geosciences/grass/Manifest
17 index 4fc483a..09a6c76 100644
18 --- a/sci-geosciences/grass/Manifest
19 +++ b/sci-geosciences/grass/Manifest
20 @@ -1 +1,2 @@
21 DIST grass-7.0.1.tar.gz 33733368 SHA256 0987dd1618fde24b05785a502c7db8c09401a522a7a3ee50543068fab4eb405f SHA512 cb1c356eb19f793530e4e313cc5e81b3be27817eea8961c6e5673b955726e7ae26c38942d6a620dc89c60b8051cdb0ed549c70fdfab8c65f5d17c901521ffaff WHIRLPOOL ed97e45873ea39df32e4ad9ed663087e0077d4bfbbbc9f1fc89729c1d411d550e3354fbc937741c465d94929b6da30311e44926db53fe0f1edb3ce7b850b2266
22 +DIST grass-7.0.2.tar.gz 38102415 SHA256 2eabd84c5426c675b7f3046213bbacb0cee9d0225df15e1530b93f43ec6b190b SHA512 5f6432263e4d52c914dfdd2bc8199f32c8f366b0ffae6a178033af7eee7b3c2632668b3d3cd70219969ecfd5ad6abefe6e65f0eaf72f27784fea3b4b9d51acfe WHIRLPOOL e1f5a90e793db74bcdf891b5f5a00c2bafa2842a6415ec433a45d6604d4943aa3d95b6e4d95265753a4ee8fc6819ec1b66ddea2d11802ac1c7a37150f7cea6d1
23
24 diff --git a/sci-geosciences/grass/grass-7.0.2.ebuild b/sci-geosciences/grass/grass-7.0.2.ebuild
25 new file mode 100644
26 index 0000000..c63746b
27 --- /dev/null
28 +++ b/sci-geosciences/grass/grass-7.0.2.ebuild
29 @@ -0,0 +1,270 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=5
35 +
36 +PYTHON_COMPAT=( python2_7 )
37 +PYTHON_REQ_USE="sqlite(-)?"
38 +WANT_AUTOCONF="2.1"
39 +
40 +inherit eutils gnome2 fdo-mime multilib python-single-r1 versionator wxwidgets autotools
41 +
42 +MY_PM=${PN}$(get_version_component_range 1-2 ${PV})
43 +MY_PM=${MY_PM/.}
44 +MY_P=${P/_rc/RC}
45 +
46 +DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization"
47 +HOMEPAGE="http://grass.osgeo.org/"
48 +SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0/7.0.2"
52 +KEYWORDS="~amd64 ~x86"
53 +IUSE="X blas cxx fftw geos lapack liblas mysql netcdf nls odbc opencl opengl openmp png postgres readline sqlite threads tiff truetype"
54 +
55 +RDEPEND="${PYTHON_DEPS}
56 + >=app-admin/eselect-1.2
57 + media-libs/libprojectm
58 + sci-libs/proj
59 + sci-libs/xdrfile
60 + sci-libs/gdal
61 + sys-libs/gdbm
62 + sys-libs/ncurses:0=
63 + sys-libs/zlib
64 + fftw? ( sci-libs/fftw:3.0 )
65 + geos? ( sci-libs/geos )
66 + blas? ( virtual/blas
67 + sci-libs/cblas-reference )
68 + lapack? ( virtual/lapack )
69 + liblas? ( sci-geosciences/liblas )
70 + mysql? ( virtual/mysql )
71 + netcdf? ( sci-libs/netcdf )
72 + odbc? ( dev-db/unixODBC )
73 + opencl? ( virtual/opencl )
74 + opengl? ( virtual/opengl )
75 + png? ( media-libs/libpng:0= )
76 + postgres? ( >=dev-db/postgresql-8.4:= )
77 + readline? ( sys-libs/readline:0= )
78 + sqlite? ( dev-db/sqlite:3 )
79 + tiff? ( media-libs/tiff:0= )
80 + truetype? ( media-libs/freetype:2 )
81 + X? (
82 + >=dev-python/wxpython-2.8.10.1:2.8[cairo,opengl?]
83 + x11-libs/cairo[X,opengl?]
84 + x11-libs/libICE
85 + x11-libs/libSM
86 + x11-libs/libX11
87 + x11-libs/libXaw
88 + x11-libs/libXext
89 + x11-libs/libXmu
90 + x11-libs/libXp
91 + x11-libs/libXpm
92 + x11-libs/libXt
93 + )"
94 +
95 +DEPEND="${RDEPEND}
96 + virtual/pkgconfig
97 + sys-devel/flex
98 + sys-devel/gettext
99 + sys-devel/bison
100 + X? (
101 + dev-lang/swig
102 + x11-proto/xextproto
103 + x11-proto/xproto
104 + )"
105 +
106 +S="${WORKDIR}/${MY_P}"
107 +
108 +REQUIRED_USE="
109 + ${PYTHON_REQUIRED_USE}
110 + opengl? ( X )"
111 +
112 +PATCHES=(
113 + "${FILESDIR}/${PN}"-7.0.1-declare-inespg.patch
114 + "${FILESDIR}/${PN}"-7.0.1-soname.patch
115 +)
116 +
117 +pkg_setup() {
118 + if use lapack; then
119 + local mylapack
120 + mylapack=$(eselect lapack show) || die
121 + if [[ -z "${mylapack/.*reference.*/}" ]] && \
122 + [[ -z "${mylapack/.*atlas.*/}" ]]; then
123 + ewarn "You need to set lapack to atlas or reference. Do:"
124 + ewarn " eselect lapack set <impl>"
125 + ewarn "where <impl> is atlas, threaded-atlas or reference"
126 + die "setup failed"
127 + fi
128 + fi
129 +
130 + if use blas; then
131 + local myblas
132 + myblas=$(eselect blas show) || die
133 + if [[ -z "${myblas/.*reference.*/}" ]] && \
134 + [[ -z "${myblas/.*atlas.*/}" ]]; then
135 + ewarn "You need to set blas to atlas or reference. Do:"
136 + ewarn " eselect blas set <impl>"
137 + ewarn "where <impl> is atlas, threaded-atlas or reference"
138 + die "setup failed"
139 + fi
140 + fi
141 +
142 + python-single-r1_pkg_setup
143 +}
144 +
145 +src_prepare() {
146 + # Fix unversioned python calls
147 + local pyver=${EPYTHON/python/}
148 + sed -e "s:GRASS_PYTHON=.*:&${pyver}:" -i "${S}/lib/init/grass.sh" || die
149 + sed -e "s:= python:&${pyver}:" -i "${S}/include/Make/Platform.make.in" || die
150 +
151 + # fix header being unconditionally included
152 + # see upstream https://trac.osgeo.org/grass/ticket/2779
153 + sed -e 's:\(#include <ogr_api.h>\):#ifdef HAVE_OGR\n\1\n#endif:' \
154 + -i "${S}/vector/v.external/main.c" || die "failed to sed main.c"
155 +
156 + epatch "${PATCHES[@]}"
157 +
158 + epatch_user
159 + eautoconf
160 +
161 + ebegin "Fixing python shebangs"
162 + python_fix_shebang -q "${S}"
163 + eend $?
164 +}
165 +
166 +src_configure() {
167 + if use X; then
168 + WX_BUILD=yes
169 + WX_GTK_VER=2.8
170 + need-wxwidgets unicode
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 + dohtml -r docs/html/*
229 + rm -rf docs/ || die
230 + rm -rf {AUTHORS,CHANGES,COPYING,GPL.TXT,REQUIREMENTS.html} || die
231 +
232 + # manuals
233 + dodir /usr/share/man/man1
234 + rm -rf man/ || die
235 +
236 + # translations
237 + if use nls; then
238 + dodir /usr/share/locale/
239 + mv locale/* "${D}usr/share/locale/" || die
240 + rm -rf locale/ || die
241 + # pt_BR is broken
242 + mv "${D}usr/share/locale/pt_br" "${D}usr/share/locale/pt_BR" || die
243 + fi
244 +
245 + popd &> /dev/null || die
246 +
247 + # place libraries where they belong
248 + mv "${D}usr/${MY_PM}/lib/" "${D}usr/$(get_libdir)/" || die
249 +
250 + # place header files where they belong
251 + mv "${D}usr/${MY_PM}/include/" "${D}usr/include/" || die
252 + # make rules are not required on installed system
253 + rm -rf "${D}usr/include/Make" || die
254 +
255 + # mv remaining gisbase stuff to libdir
256 + mv "${D}usr/${MY_PM}" "${D}usr/$(get_libdir)" || die
257 +
258 + # get proper folder for grass path in script
259 + local gisbase
260 + gisbase="${ROOT}usr/$(get_libdir)/${MY_PM}"
261 + sed -e "s:gisbase = \".*:gisbase = \"${gisbase}\":" \
262 + -i "${D}usr/bin/${MY_PM}" || die
263 +
264 + # get proper fonts path for fontcap
265 + sed -i \
266 + -e "s|${D}usr/${MY_PM}|${EPREFIX}usr/$(get_libdir)/${MY_PM}|" \
267 + "${D}usr/$(get_libdir)/${MY_PM}/etc/fontcap" || die
268 +
269 + # set proper python interpreter
270 + sed -e "s:= \"python\":= \"${EPYTHON}\":" -i "${D}usr/bin/${MY_PM}" || die
271 +
272 + if use X; then
273 + local GUI="-gui"
274 + [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
275 + make_desktop_entry "/usr/bin/${MY_PM} ${GUI}" "${PN}" "${PN}-48x48" "Science;Education"
276 + doicon -s 48 gui/icons/${PN}-48x48.png
277 + fi
278 +
279 + # install .pc file so other apps know where to look for grass
280 + insinto /usr/$(get_libdir)/pkgconfig/
281 + doins grass.pc
282 +
283 + # fix weird +x on tcl scripts
284 + find "${D}" -name "*.tcl" -exec chmod +r-x '{}' \;
285 +}
286 +
287 +pkg_postinst() {
288 + if use X; then
289 + fdo-mime_desktop_database_update
290 + gnome2_icon_cache_update
291 + fi
292 +}
293 +
294 +pkg_postrm() {
295 + if use X; then
296 + fdo-mime_desktop_database_update
297 + gnome2_icon_cache_update
298 + fi
299 +}