Gentoo Archives: gentoo-commits

From: "Steve Arnold (nerdboy)" <nerdboy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/grass: ChangeLog grass-6.4.0.ebuild grass-6.4.0_rc6.ebuild grass-6.4.0_rc5.ebuild
Date: Sat, 04 Sep 2010 02:29:16
Message-Id: 20100904022912.1631A20054@flycatcher.gentoo.org
1 nerdboy 10/09/04 02:29:11
2
3 Modified: ChangeLog
4 Added: grass-6.4.0.ebuild
5 Removed: grass-6.4.0_rc6.ebuild grass-6.4.0_rc5.ebuild
6 Log:
7 Updated to official 6.4.0 release and removed old rc releases/patches.
8 (Portage version: 2.2_rc67/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.89 sci-geosciences/grass/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/grass/ChangeLog?rev=1.89&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/grass/ChangeLog?rev=1.89&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/grass/ChangeLog?r1=1.88&r2=1.89
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v
20 retrieving revision 1.88
21 retrieving revision 1.89
22 diff -u -r1.88 -r1.89
23 --- ChangeLog 17 Jun 2010 21:03:51 -0000 1.88
24 +++ ChangeLog 4 Sep 2010 02:29:11 -0000 1.89
25 @@ -1,6 +1,15 @@
26 # ChangeLog for sci-geosciences/grass
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v 1.88 2010/06/17 21:03:51 patrick Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v 1.89 2010/09/04 02:29:11 nerdboy Exp $
30 +
31 +*grass-6.4.0 (04 Sep 2010)
32 +
33 + 04 Sep 2010; Steve Arnold <nerdboy@g.o> -grass-6.4.0_rc5.ebuild,
34 + -grass-6.4.0_rc6.ebuild, +grass-6.4.0.ebuild,
35 + files/grass-6.4.0-html-nonviz.patch,
36 + -files/grass-6.4.0_rc6-html-nonviz.patch:
37 + Updated to official 6.4.0 release and removed old rc releases/patches.
38 + Both GUIs tested (with actual data) on amd64.
39
40 17 Jun 2010; Patrick Lauer <patrick@g.o> grass-6.3.0.ebuild,
41 grass-6.4.0_rc5.ebuild, grass-6.4.0_rc6.ebuild:
42
43
44
45 1.1 sci-geosciences/grass/grass-6.4.0.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/grass/grass-6.4.0.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/grass/grass-6.4.0.ebuild?rev=1.1&content-type=text/plain
49
50 Index: grass-6.4.0.ebuild
51 ===================================================================
52 # Copyright 1999-2010 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.4.0.ebuild,v 1.1 2010/09/04 02:29:11 nerdboy Exp $
55
56 EAPI="3"
57
58 PYTHON_DEPEND="python? 2"
59 inherit eutils gnome2 multilib python versionator wxwidgets base
60
61 MY_PM=${PN}$(get_version_component_range 1-2 ${PV})
62 MY_PM=${MY_PM/.}
63 MY_P=${P/_rc/RC}
64
65 DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization."
66 HOMEPAGE="http://grass.osgeo.org//"
67 SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
68
69 LICENSE="GPL-2"
70 SLOT="6"
71 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
72
73 IUSE="X cairo cxx ffmpeg fftw gmath jpeg largefile motif mysql nls odbc opengl png postgres python readline sqlite tiff truetype wxwidgets"
74
75 TCL_DEPS="
76 >=dev-lang/tcl-8.5
77 >=dev-lang/tk-8.5"
78
79 RDEPEND="
80 >=app-admin/eselect-1.2
81 sci-libs/gdal
82 sci-libs/proj
83 sys-libs/gdbm
84 sys-libs/ncurses
85 sys-libs/zlib
86 cairo? ( x11-libs/cairo[X?,opengl?] )
87 ffmpeg? ( media-video/ffmpeg )
88 fftw? ( sci-libs/fftw:3.0 )
89 gmath? (
90 virtual/blas
91 virtual/lapack
92 )
93 jpeg? ( media-libs/jpeg )
94 mysql? ( dev-db/mysql )
95 odbc? ( dev-db/unixODBC )
96 png? ( media-libs/libpng )
97 postgres? (
98 || (
99 >=dev-db/postgresql-base-8.4
100 >=dev-db/postgresql-server-8.4
101 )
102 )
103 readline? ( sys-libs/readline )
104 sqlite? ( dev-db/sqlite:3 )
105 tiff? ( media-libs/tiff
106 largefile? ( >=media-libs/tiff-4 )
107 )
108 truetype? ( media-libs/freetype:2 )
109 X? (
110 x11-libs/libICE
111 x11-libs/libSM
112 x11-libs/libX11
113 x11-libs/libXaw
114 x11-libs/libXext
115 x11-libs/libXmu
116 x11-libs/libXp
117 x11-libs/libXpm
118 x11-libs/libXt
119 motif? (
120 x11-libs/openmotif
121 opengl? ( media-libs/mesa[motif] )
122 )
123 opengl? (
124 virtual/opengl
125 ${TCL_DEPS}
126 )
127 python? ( wxwidgets? ( >=dev-python/wxpython-2.8.10.1[cairo,opengl?] ) )
128 !python? ( ${TCL_DEPS} )
129 !wxwidgets? ( ${TCL_DEPS} )
130 )"
131
132 DEPEND="${RDEPEND}
133 dev-util/pkgconfig
134 sys-devel/flex
135 sys-devel/gettext
136 sys-devel/bison
137 X? (
138 x11-proto/xextproto
139 x11-proto/xproto
140 python? ( wxwidgets? ( dev-lang/swig ) )
141 )"
142
143 S="${WORKDIR}/${MY_P}"
144
145 PATCHES=(
146 "${FILESDIR}/${PN}-pkgconf.patch"
147 )
148
149 pkg_setup() {
150 local myblas
151
152 # check correct gmath profiles (this must sadly die)
153 if use gmath; then
154 for d in $(eselect lapack show); do myblas=${d}; done
155 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
156 ewarn "You need to set lapack to atlas or reference. Do:"
157 ewarn " eselect lapack set <impl>"
158 ewarn "where <impl> is atlas, threaded-atlas or reference"
159 die "setup failed"
160 fi
161 for d in $(eselect blas show); do myblas=${d}; done
162 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
163 ewarn "You need to set blas to atlas or reference. Do:"
164 ewarn " eselect blas set <impl>"
165 ewarn "where <impl> is atlas, threaded-atlas or reference"
166 die "setup failed"
167 fi
168 fi
169
170 # check useflag nesting.
171 use motif && ! use X && ewarn "For motif support X useflag must be enabled"
172 use opengl && ! use X && ewarn "For opengl support X useflag must be enabled"
173 use wxwidgets && ! use X && ewarn "For wxwidgets support X useflag must be enabled"
174 use wxwidgets && ! use python && ewarn "For wxwidgets support python useflag must be enabled"
175
176 if use python; then
177 # only py2 is supported
178 python_set_active_version 2
179 fi
180
181 if use wxwidgets; then
182 # only 2.8 is supported or the wx-gui barfs at runtime...
183 local success=0
184 ewarn "Attempting to select a compatible wxwidgets"
185 eselect wxwidgets set gtk2-unicode-release-2.8
186 success=1
187 fi
188 if [ $success != 1 ]; then
189 eerror "Unable to select a compatible wxwidgets!"
190 die "Please set wxwidgets to at least 2.8 (see \`eselect wxwidgets --help\`)."
191 fi
192 }
193
194 src_prepare() {
195 if ! use opengl; then
196 epatch "${FILESDIR}"/${P}-html-nonviz.patch
197 fi
198
199 base_src_prepare
200 }
201
202 src_configure() {
203 local myconf TCL_LIBDIR
204
205 if use X; then
206 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
207 myconf+="
208 --with-tcltk-libs=${TCL_LIBDIR}
209 $(use_with motif)
210 $(use_with opengl)
211 --with-x
212 "
213
214 if use python && use wxwidgets; then
215 WX_BUILD=yes
216 WX_GTK_VER=2.8
217 need-wxwidgets base
218 myconf+="
219 --without-tcltk
220 --with-wxwidgets=${WX_CONFIG}
221 "
222 else
223 WX_BUILD=no
224 # use tcl gui if wxwidgets are disabled
225 myconf+="
226 --with-tcltk
227 --without-wxwidgets
228 "
229 fi
230
231 use opengl && myconf+=" --with-tcltk"
232 use motif && use opengl && myconf+=" --with-glw"
233 use motif || myconf+=" --without-glw"
234 else
235 myconf+="
236 --without-opengl
237 --without-glw
238 --without-tcltk
239 --without-wxwidgets
240 --without-x
241 "
242 fi
243
244 econf \
245 --with-gdal=$(type -P gdal-config) \
246 --with-curses \
247 --with-proj \
248 --with-proj-share="/usr/share/proj/" \
249 --without-glw \
250 --enable-shared \
251 $(use_enable amd64 64bit) \
252 $(use_enable ppc64 64bit) \
253 $(use_with cairo) \
254 $(use_with cxx) \
255 $(use_with fftw) \
256 $(use_with ffmpeg) \
257 --with-ffmpeg-includes="/usr/include/libavcodec \
258 /usr/include/libavdevice /usr/include/libavfilter \
259 /usr/include/libavformat /usr/include/libavutil \
260 /usr/include/libpostproc /usr/include/libswscale" \
261 $(use_with gmath blas) \
262 $(use_with gmath lapack) \
263 $(use_with jpeg) \
264 $(use_enable largefile) \
265 $(use_with mysql) \
266 --with-mysql-includes=/usr/include/mysql \
267 --with-mysql-libs=/usr/$(get_libdir)/mysql \
268 $(use_with nls) \
269 $(use_with odbc) \
270 $(use_with png) \
271 $(use_with postgres) \
272 $(use_with python) \
273 $(use_with readline) \
274 $(use_with sqlite) \
275 $(use_with tiff) \
276 $(use_with truetype freetype) \
277 --with-freetype-includes="/usr/include/freetype2/" \
278 ${myconf}
279 }
280
281 src_compile() {
282 # we don't want to link against embeded mysql lib
283 base_src_compile MYSQLDLIB=""
284 }
285
286 src_install() {
287 emake DESTDIR="${D}" \
288 INST_DIR="${D}"/usr/${MY_PM} \
289 prefix="${D}"/usr BINDIR="${D}"/usr/bin \
290 PREFIX="${D}"/usr/ \
291 install || die
292
293 pushd "${D}"/usr/${MY_PM} &> /dev/null
294
295 # fix docs
296 dodoc AUTHORS CHANGES || die
297 dohtml -r docs/html/* || die
298 rm -rf docs/ || die
299 rm -rf {AUTHORS,CHANGES,COPYING,GPL.TXT,REQUIREMENTS.html} || die
300
301 # manuals
302 dodir /usr/share/man/man1 || die
303 mv man/man1/* "${D}"/usr/share/man/man1/ || die
304 rm -rf man/ || die
305
306 # translations
307 if use nls; then
308 dodir /usr/share/locale/ || die
309 mv locale/* "${D}"/usr/share/locale/ || die
310 rm -rf locale/ || die
311 # pt_BR is broken
312 mv "${D}"/usr/share/locale/pt_br "${D}"/usr/share/locale/pt_BR || die
313 fi
314
315 popd &> /dev/null
316
317 # place libraries where they belong
318 mv "${D}"/usr/${MY_PM}/lib/ "${D}"/usr/$(get_libdir)/ || die
319
320 # place header files where they belong
321 mv "${D}"/usr/${MY_PM}/include/ "${D}"/usr/include/ || die
322 # make rules are not required on installed system
323 rm -rf "${D}"/usr/include/Make || die
324
325 # mv remaining gisbase stuff to libdir
326 mv "${D}"/usr/${MY_PM} "${D}"/usr/$(get_libdir) || die
327
328 # set proper default window renderer
329 if [[ ${WX_BUILD} == yes ]]; then
330 sed -i \
331 -e "1,\$s:^DEFAULT_GUI.*:DEFAULT_GUI=\"wxpython\":" \
332 "${D}"/usr/$(get_libdir)/${MY_PM}/etc/Init.sh || die
333 fi
334
335 # get proper folder for grass path in script
336 sed -i \
337 -e "1,\$s:^GISBASE.*:GISBASE=/usr/$(get_libdir)/${MY_PM}:" \
338 "${D}"usr/bin/${MY_PM} || die
339
340 # get proper fonts path for fontcap
341 sed -i \
342 -e "s|${D}/usr/${MY_PM}|/usr/$(get_libdir)/${MY_PM}|" \
343 "${D}"/usr/$(get_libdir)/${MY_PM}/etc/fontcap || die
344
345 if use X; then
346 generate_files
347 doicon gui/icons/${PN}-48x48.png || die
348 domenu ${MY_PM}-grass.desktop || die
349 fi
350
351 # install .pc file so other apps know where to look for grass
352 insinto /usr/$(get_libdir)/pkgconfig/
353 doins grass.pc || die
354
355 # fix weird +x on tcl scripts
356 find "${D}" -name "*.tcl" -exec chmod +r-x '{}' \;
357 }
358
359 pkg_postinst() {
360 if use X; then
361 fdo-mime_desktop_database_update
362 gnome2_icon_cache_update
363 fi
364 }
365
366 pkg_postrm() {
367 if use X; then
368 fdo-mime_desktop_database_update
369 gnome2_icon_cache_update
370 fi
371 }
372
373 generate_files() {
374 local GUI="-gui"
375 [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
376
377 cat <<-EOF > ${MY_PM}-grass.desktop
378 [Desktop Entry]
379 Encoding=UTF-8
380 Version=1.0
381 Name=Grass ${PV}
382 Type=Application
383 Comment=GRASS (Geographic Resources Analysis Support System), the original GIS.
384 Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
385 Path=
386 Icon=${PN}-48x48.png
387 Categories=Science;Education;
388 Terminal=false
389 EOF
390 }