Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/grass/
Date: Wed, 20 Oct 2021 02:42:40
Message-Id: 1634696616.935ba7e0506b1709b0a47869bc54de1503766139.sam@gentoo
1 commit: 935ba7e0506b1709b0a47869bc54de1503766139
2 Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
3 AuthorDate: Sun Oct 10 16:40:41 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 20 02:23:36 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=935ba7e0
7
8 sci-geosciences/grass: version bump 7.8.6
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
12 Closes: https://github.com/gentoo/gentoo/pull/22553
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 sci-geosciences/grass/Manifest | 1 +
16 sci-geosciences/grass/grass-7.8.6.ebuild | 270 +++++++++++++++++++++++++++++++
17 2 files changed, 271 insertions(+)
18
19 diff --git a/sci-geosciences/grass/Manifest b/sci-geosciences/grass/Manifest
20 index 70795544ec0..a899a616598 100644
21 --- a/sci-geosciences/grass/Manifest
22 +++ b/sci-geosciences/grass/Manifest
23 @@ -1 +1,2 @@
24 DIST grass-7.8.5.tar.gz 61801712 BLAKE2B d7a929e28ea050285f47dd84093c6db85e00aeab6c397fbb63ac0e6ccac391d2dcad0d3fad18924ecae74b57638b7e3ccf1c8ef4a3a44e63b32f5651bf3f6c71 SHA512 054923e31c163b50537e89636da97cdb705f3a77e566ef869b8aa77303b1c6fa3040f198a2cdc639b773843fe38e50c40149ef683beb0cd2dcf1ca2f77d3dd65
25 +DIST grass-7.8.6.tar.gz 66331264 BLAKE2B bb5a3387f74bc30b7ce3230765cecdc7e61ded8693d888e6cefc2d491022496409d053e170293fcef392a9c9178a41b070767e1ce90b57b448b189c9e16a2761 SHA512 6db10a20e5b70f0ce9a8fc4d6966c6f078453a88fa8f0577c1c62303f9787fa3bf3369e281f7ca864280c865e3ef022c51d8805d1258ea04da45e63cd34c27df
26
27 diff --git a/sci-geosciences/grass/grass-7.8.6.ebuild b/sci-geosciences/grass/grass-7.8.6.ebuild
28 new file mode 100644
29 index 00000000000..3cb671b723e
30 --- /dev/null
31 +++ b/sci-geosciences/grass/grass-7.8.6.ebuild
32 @@ -0,0 +1,270 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{8,9} )
39 +PYTHON_REQ_USE="sqlite" # bug 572440
40 +WANT_AUTOCONF="2.5"
41 +WX_GTK_VER="3.0-gtk3"
42 +
43 +inherit autotools desktop python-single-r1 toolchain-funcs wxwidgets xdg
44 +
45 +MY_PM=${PN}$(ver_cut 1-2 ${PV})
46 +MY_PM=${MY_PM/.}
47 +MY_P=${P/_rc/RC}
48 +
49 +DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization"
50 +HOMEPAGE="https://grass.osgeo.org/"
51 +SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0/7.8.0"
55 +KEYWORDS="~amd64 ~ppc ~x86"
56 +IUSE="blas cxx fftw geos lapack liblas mysql netcdf nls odbc opencl opengl openmp png postgres readline sqlite threads tiff truetype X zstd"
57 +REQUIRED_USE="
58 + ${PYTHON_REQUIRED_USE}
59 + opengl? ( X )"
60 +
61 +RDEPEND="
62 + ${PYTHON_DEPS}
63 + >=app-admin/eselect-1.2
64 + $(python_gen_cond_dep '
65 + dev-python/numpy[${PYTHON_USEDEP}]
66 + dev-python/six[${PYTHON_USEDEP}]
67 + ')
68 + sci-libs/gdal
69 + sys-libs/gdbm
70 + sys-libs/ncurses:0=
71 + sci-libs/proj
72 + sci-libs/xdrfile
73 + sys-libs/zlib
74 + blas? (
75 + virtual/cblas[eselect-ldso(+)]
76 + virtual/blas[eselect-ldso(+)]
77 + )
78 + fftw? ( sci-libs/fftw:3.0= )
79 + geos? ( sci-libs/geos )
80 + lapack? ( virtual/lapack[eselect-ldso(+)] )
81 + liblas? ( sci-geosciences/liblas )
82 + mysql? ( dev-db/mysql-connector-c:= )
83 + netcdf? ( sci-libs/netcdf )
84 + odbc? ( dev-db/unixODBC )
85 + opencl? ( virtual/opencl )
86 + opengl? ( virtual/opengl )
87 + png? ( media-libs/libpng:0= )
88 + postgres? ( >=dev-db/postgresql-8.4:= )
89 + readline? ( sys-libs/readline:0= )
90 + sqlite? ( dev-db/sqlite:3 )
91 + tiff? ( media-libs/tiff:0= )
92 + truetype? ( media-libs/freetype:2 )
93 + X? (
94 + dev-python/wxpython:4.0
95 + x11-libs/cairo[X,opengl?]
96 + x11-libs/libICE
97 + x11-libs/libSM
98 + x11-libs/libX11
99 + x11-libs/libXext
100 + x11-libs/libXt
101 + )
102 + zstd? ( app-arch/zstd )"
103 +DEPEND="${RDEPEND}
104 + X? ( x11-base/xorg-proto )"
105 +BDEPEND="
106 + sys-devel/bison
107 + sys-devel/flex
108 + sys-devel/gettext
109 + virtual/pkgconfig
110 + X? ( dev-lang/swig )"
111 +
112 +S="${WORKDIR}/${MY_P}"
113 +
114 +PATCHES=(
115 + # bug 746590
116 + "${FILESDIR}/${PN}-7.8-flock.patch"
117 +)
118 +
119 +pkg_setup() {
120 + if use lapack; then
121 + local mylapack=$(eselect lapack show)
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=$(eselect blas show)
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 + sed -e "s:=python3:=${EPYTHON}:" -i "${S}/lib/init/grass.sh" || die
148 + sed -e "s:= python3:= ${EPYTHON}:" -i "${S}/include/Make/Platform.make.in" || die
149 +
150 + default
151 + eautoreconf
152 +
153 + ebegin "Fixing python shebangs"
154 + python_fix_shebang -q "${S}"
155 + eend $?
156 +
157 + # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3
158 + shopt -s nullglob
159 + local mesa_cards=$(echo -n /dev/dri/card* /dev/dri/render* | sed 's/ /:/g')
160 + if test -n "${mesa_cards}"; then
161 + addpredict "${mesa_cards}"
162 + fi
163 + local ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
164 + if test -n "${ati_cards}"; then
165 + addpredict "${ati_cards}"
166 + fi
167 + shopt -u nullglob
168 + addpredict /dev/nvidiactl
169 +}
170 +
171 +src_configure() {
172 + if use X; then
173 + local WX_BUILD=yes
174 + setup-wxwidgets
175 + fi
176 +
177 + addwrite /dev/dri/renderD128
178 +
179 + local myeconfargs=(
180 + --enable-shared
181 + --disable-w11
182 + --without-opendwg
183 + --with-regex
184 + --with-gdal="${EPREFIX}"/usr/bin/gdal-config
185 + --with-proj-includes="${EPREFIX}"/usr/include/proj
186 + --with-proj-libs="${EPREFIX}"/usr/$(get_libdir)
187 + --with-proj-share="${EPREFIX}"/usr/share/proj/
188 + $(use_with cxx)
189 + $(use_with tiff)
190 + $(use_with png)
191 + $(use_with postgres)
192 + $(use_with mysql)
193 + $(use_with mysql mysql-includes "${EPREFIX}"/usr/include/mysql)
194 + $(use_with sqlite)
195 + $(use_with opengl)
196 + $(use_with odbc)
197 + $(use_with fftw)
198 + $(use_with blas)
199 + $(use_with lapack)
200 + $(use_with X cairo)
201 + $(use_with truetype freetype)
202 + $(use_with truetype freetype-includes "${EPREFIX}"/usr/include/freetype2)
203 + $(use_with nls)
204 + $(use_with readline)
205 + $(use_with threads pthread)
206 + $(use_with openmp)
207 + $(use_with opencl)
208 + $(use_with liblas liblas "${EPREFIX}"/usr/bin/liblas-config)
209 + $(use_with X wxwidgets "${WX_CONFIG}")
210 + $(use_with netcdf netcdf "${EPREFIX}"/usr/bin/nc-config)
211 + $(use_with geos geos "${EPREFIX}"/usr/bin/geos-config)
212 + $(use_with X x)
213 + $(use_with zstd)
214 + )
215 + econf "${myeconfargs[@]}"
216 +}
217 +
218 +src_compile() {
219 + # we don't want to link against embedded mysql lib
220 + emake CC="$(tc-getCC)" MYSQLDLIB=""
221 +}
222 +
223 +src_install() {
224 + emake DESTDIR="${ED}" \
225 + INST_DIR=/usr/$(get_libdir)/${MY_PM} \
226 + prefix=/usr/ BINDIR=/usr/bin \
227 + install
228 +
229 + pushd "${ED}"/usr/$(get_libdir)/${MY_PM} >/dev/null || die
230 +
231 + local HTML_DOCS=( docs/html/. )
232 + einstalldocs
233 +
234 + # translations
235 + if use nls; then
236 + insinto /usr/share/locale
237 + doins -r locale/.
238 + fi
239 +
240 + popd >/dev/null || die
241 +
242 + # link libraries in the ~standard~ place
243 + local f file
244 + for f in "${ED}"/usr/$(get_libdir)/${MY_PM}/lib/*; do
245 + file="${f##*/}"
246 + dosym ${MY_PM}/lib/${file} /usr/$(get_libdir)/${file}
247 + done
248 +
249 + # link headers in the ~standard~ place
250 + dodir /usr/include/
251 + dosym ../$(get_libdir)/${MY_PM}/include/grass /usr/include/grass
252 +
253 + # fix paths in addons makefile includes
254 + local scriptMakeDir="${ED}"/usr/$(get_libdir)/${MY_PM}/include/Make/
255 + for f in "${scriptMakeDir}"/*; do
256 + file="${f##*/}"
257 + echo sed -i "s|${ED}|/|g" "${scriptMakeDir}/${file}" || die
258 + sed -i "s|${ED}|/|g" "${scriptMakeDir}/${file}" || die
259 + done
260 +
261 + # get proper folder for grass path in script
262 + local gisbase=/usr/$(get_libdir)/${MY_PM}
263 + sed -e "s:GISBASE = os.path.normpath(\"${D}/usr/$(get_libdir)/${MY_PM}\"):\
264 +GISBASE = os.path.normpath(\"${gisbase}\"):" \
265 + -i "${ED}"/usr/bin/${MY_PM} || die
266 +
267 + # get proper fonts path for fontcap
268 + sed -i \
269 + -e "s|${ED}/usr/${MY_PM}|${EPREFIX}/usr/$(get_libdir)/${MY_PM}|" \
270 + "${ED}"${gisbase}/etc/fontcap || die
271 +
272 + # set proper python interpreter
273 + sed -e "s:os.environ\[\"GRASS_PYTHON\"\] = \"python3\":\
274 +os.environ\[\"GRASS_PYTHON\"\] = \"${EPYTHON}\":" \
275 + -i "${ED}"/usr/bin/${MY_PM} || die
276 +
277 + # set proper GISDBASE directory path in the demolocation .grassrc78 file
278 + sed -e "s:GISDBASE\:.*$:GISDBASE\: ${gisbase}:" \
279 + -i "${ED}"${gisbase}/demolocation/.grassrc78 || die
280 +
281 + if use X; then
282 + local GUI="-gui"
283 + [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
284 + make_desktop_entry "/usr/bin/${MY_PM} ${GUI}" "${PN}" "${PN}-48x48" "Science;Education"
285 + doicon -s 48 gui/icons/${PN}-48x48.png
286 + fi
287 +
288 + # install .pc file so other apps know where to look for grass
289 + insinto /usr/$(get_libdir)/pkgconfig/
290 + doins grass.pc
291 +
292 + # fix weird +x on tcl scripts
293 + find "${ED}" -name "*.tcl" -exec chmod +r-x '{}' \; || die
294 +}
295 +
296 +pkg_postinst() {
297 + use X && xdg_pkg_postinst
298 +}
299 +
300 +pkg_postrm() {
301 + use X && xdg_pkg_postrm
302 +}