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_rc5.ebuild
Date: Mon, 28 Dec 2009 07:22:30
Message-Id: E1NP9vu-0006y5-Db@stork.gentoo.org
1 nerdboy 09/12/28 07:22:26
2
3 Modified: ChangeLog
4 Added: grass-6.4.0_rc5.ebuild
5 Log:
6 Updated to latest upstream "stable" release; tested with more data.
7 (Portage version: 2.2_rc60/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.71 sci-geosciences/grass/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/ChangeLog?rev=1.71&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/ChangeLog?rev=1.71&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/ChangeLog?r1=1.70&r2=1.71
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v
19 retrieving revision 1.70
20 retrieving revision 1.71
21 diff -u -r1.70 -r1.71
22 --- ChangeLog 5 Sep 2009 02:09:59 -0000 1.70
23 +++ ChangeLog 28 Dec 2009 07:22:26 -0000 1.71
24 @@ -1,13 +1,19 @@
25 # ChangeLog for sci-geosciences/grass
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v 1.70 2009/09/05 02:09:59 nerdboy Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v 1.71 2009/12/28 07:22:26 nerdboy Exp $
29 +
30 +*grass-6.4.0_rc5 (28 Dec 2009)
31 +
32 + 28 Dec 2009; Steve Arnold <nerdboy@g.o> +grass-6.4.0_rc5.ebuild:
33 + Updated to latest upstream "stable" release; tested with additional real
34 + data sets (fixes import issues with certain shape files).
35
36 04 Sep 2009; Steve Arnold <nerdboy@g.o> grass-6.3.0.ebuild:
37 - Updated to use postgresql virtual and verified it bvilds correctly from
38 + Updated to use postgresql virtual and verified it builds correctly from
39 libpq-8.0 all the way through postgres-8.3.7 (which means it can go
40 stable now). Yee-haw! Also tested importing a bunch of old vector data
41 using both postgres and sqlite with no issues (since it now defaults to
42 - requiring a dull SQL backend).
43 + requiring a full SQL backend).
44
45 02 Aug 2009; Steve Arnold <nerdboy@g.o> grass-6.3.0.ebuild:
46 Updated desktop file and description (set terminal=false).
47
48
49
50 1.1 sci-geosciences/grass/grass-6.4.0_rc5.ebuild
51
52 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/grass-6.4.0_rc5.ebuild?rev=1.1&view=markup
53 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/grass-6.4.0_rc5.ebuild?rev=1.1&content-type=text/plain
54
55 Index: grass-6.4.0_rc5.ebuild
56 ===================================================================
57 # Copyright 1999-2009 Gentoo Foundation
58 # Distributed under the terms of the GNU General Public License v2
59 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.4.0_rc5.ebuild,v 1.1 2009/12/28 07:22:26 nerdboy Exp $
60
61 EAPI="2"
62
63 inherit eutils distutils fdo-mime versionator wxwidgets
64
65 MY_PV=$(get_version_component_range 1-2 ${PV})
66 MY_PVM=$(delete_all_version_separators ${MY_PV})
67 MY_PM=${PN}${MY_PVM}
68 MY_P=${PN}-$(get_version_component_range 1-3 ${PV})RC5
69
70 DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization."
71 HOMEPAGE="http://grass.osgeo.org//"
72 SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
73
74 LICENSE="GPL-2"
75 SLOT="6"
76 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
77
78 IUSE="ffmpeg fftw gmath jpeg largefile motif mysql nls odbc opengl png \
79 postgres python readline sqlite tiff truetype wxwindows X"
80
81 RESTRICT="strip"
82
83 RDEPEND=">=sys-libs/zlib-1.1.4
84 >=sys-libs/ncurses-5.3
85 >=sys-libs/gdbm-1.8.0
86 || (
87 sys-apps/man
88 sys-apps/man-db )
89 sci-libs/gdal
90 >=sci-libs/proj-4.4.7
91 ffmpeg? ( media-video/ffmpeg )
92 fftw? ( sci-libs/fftw )
93 gmath? ( virtual/blas
94 virtual/lapack )
95 jpeg? ( media-libs/jpeg )
96 mysql? ( dev-db/mysql )
97 odbc? ( >=dev-db/unixODBC-2.0.6 )
98 opengl? ( virtual/opengl )
99 motif? ( x11-libs/openmotif )
100 png? ( >=media-libs/libpng-1.2.2 )
101 postgres? ( || (
102 >=virtual/postgresql-base-8.0
103 >=virtual/postgresql-server-8.0 )
104 )
105 python? ( dev-lang/python )
106 readline? ( sys-libs/readline )
107 sqlite? ( dev-db/sqlite )
108 tiff? ( >=media-libs/tiff-3.5.7 )
109 truetype? ( >=media-libs/freetype-2.0 )
110 wxwindows? (
111 >=dev-python/wxpython-2.8.1.1
112 >=dev-lang/python-2.4
113 )
114 X? (
115 x11-libs/libXmu
116 x11-libs/libXext
117 x11-libs/libXp
118 x11-libs/libX11
119 x11-libs/libXt
120 x11-libs/libSM
121 x11-libs/libICE
122 x11-libs/libXpm
123 x11-libs/libXaw
124 >=dev-lang/tcl-8.4
125 >=dev-lang/tk-8.4
126 )"
127
128 DEPEND="${RDEPEND}
129 >=sys-devel/flex-2.5.4a
130 >=sys-devel/bison-1.35
131 wxwindows? ( >=dev-lang/swig-1.3.31 )
132 X? (
133 x11-proto/xproto
134 x11-proto/xextproto
135 )"
136
137 S=${WORKDIR}/${MY_P}
138
139 pkg_setup() {
140 local myblas
141 elog ""
142 elog "This version enables the experimental wxpython interface, which"
143 elog "you may want to try. If the legacy GUI seems a little wonky in"
144 elog "this version, just enable the wxwindows USE flag and rebuild"
145 elog "grass to use it."
146 elog ""
147 if use gmath; then
148 for d in $(eselect lapack show); do myblas=${d}; done
149 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
150 ewarn "You need to set lapack to atlas or reference. Do:"
151 ewarn " eselect lapack set <impl>"
152 ewarn "where <impl> is atlas, threaded-atlas or reference"
153 die "setup failed"
154 fi
155 for d in $(eselect blas show); do myblas=${d}; done
156 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
157 ewarn "You need to set blas to atlas or reference. Do:"
158 ewarn " eselect blas set <impl>"
159 ewarn "where <impl> is atlas, threaded-atlas or reference"
160 die "setup failed"
161 fi
162 fi
163
164 if use opengl && ! use X; then
165 ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)."
166 die "Please set the X useflag."
167 fi
168 }
169
170 src_prepare() {
171 epatch rpm/fedora/grass-readline.patch
172
173 sed -i -e "s:buff\[12:buff\[16:g" general/g.parser/main.c \
174 || die "sed failed"
175
176 if ! use opengl; then
177 epatch "${FILESDIR}"/${P}-html-nonviz.patch
178 fi
179
180 # patch missing math functions (yes, this is still needed)
181 sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make
182 echo "MATHLIB=-lm" >> include/Make/Rules.make
183 }
184
185 src_configure() {
186 local myconf
187 addpredict /var/cache/fontconfig
188 # wxwindows needs python (see bug #237495)
189 use wxwindows && distutils_python_version
190
191 myconf="--prefix=/usr --with-cxx --enable-shared \
192 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
193 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \
194 --with-proj-includes=/usr/include \
195 --with-proj-libs=/usr/$(get_libdir) \
196 --with-proj-share=/usr/share/proj \
197 --without-glw"
198
199 if use X; then
200 if has_version ">=dev-lang/tcl-8.5"; then
201 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
202 else
203 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4"
204 fi
205 myconf="${myconf} --with-tcltk --with-x \
206 --with-tcltk-includes=/usr/include \
207 --with-tcltk-libs=${TCL_LIBDIR}"
208 if use wxwindows; then
209 WX_GTK_VER=2.8
210 need-wxwidgets unicode
211 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}"
212 else
213 # USE=python must be enabled above if wxwindows is enabled
214 myconf="${myconf} $(use_with python) --without-wxwidgets"
215 fi
216 else
217 myconf="${myconf} --without-tcltk --without-x"
218 fi
219
220 if use opengl; then
221 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
222 else
223 myconf="${myconf} --without-opengl"
224 fi
225
226 if use truetype; then
227 myconf="${myconf} --with-freetype \
228 --with-freetype-includes=/usr/include/freetype2"
229 fi
230
231 if use mysql; then
232 myconf="${myconf} --with-mysql --with-mysql-includes=/usr/include/mysql \
233 --with-mysql-libs=/usr/$(get_libdir)/mysql"
234 else
235 myconf="${myconf} --without-mysql"
236 fi
237
238 if use sqlite; then
239 myconf="${myconf} --with-sqlite --with-sqlite-includes=/usr/include \
240 --with-sqlite-libs=/usr/$(get_libdir)"
241 else
242 myconf="${myconf} --without-sqlite"
243 fi
244
245 # Old ffmpeg is gone, but new is a pita with all those include dirs,
246 # thus, a rather funky configure...
247 if use ffmpeg; then
248 ffmlib_conf="--with-ffmpeg --with-ffmpeg-libs=/usr/$(get_libdir)"
249 else
250 myconf="${myconf} --without-ffmpeg"
251 fi
252
253 myconf="${myconf} --with-libs=/usr/$(get_libdir) \
254 $(use_enable amd64 64bit) \
255 $(use_with fftw) \
256 $(use_with gmath blas) \
257 $(use_with gmath lapack) \
258 $(use_with jpeg) \
259 $(use_enable largefile) \
260 $(use_with motif) \
261 $(use_with nls) \
262 $(use_with odbc) \
263 $(use_with png) \
264 $(use_with postgres) \
265 $(use_with readline) \
266 $(use_with tiff)"
267
268 if use ffmpeg; then
269 "${S}"/configure ${myconf} ${ffmlib_conf} \
270 --with-ffmpeg-includes="/usr/include/libavcodec \
271 /usr/include/libavdevice /usr/include/libavfilter \
272 /usr/include/libavformat /usr/include/libavutil \
273 /usr/include/libpostproc /usr/include/libswscale" \
274 || die "ffmpeg configure failed!"
275 else
276 "${S}"/configure ${myconf} || die "configure failed!"
277 fi
278 }
279
280 src_compile() {
281 # looks like we no longer need the vdigit symlink build hack
282 emake -j1 || die "make failed!"
283 }
284
285 src_install() {
286 elog "Grass Home is ${MY_PM}"
287 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \
288 PREFIX="${D}"usr INST_DIR="${D}"usr/${MY_PM} \
289 || die "make install failed!"
290
291 # get rid of DESTDIR in script path
292 sed -i -e "s@${D}@/@" "${D}"usr/bin/${MY_PM}
293
294 # Grass Extension Manager conflicts with ruby gems
295 mv "${D}"usr/bin/gem "${D}"usr/${MY_PM}/bin/
296
297 ebegin "Adding env.d and desktop entry for Grass6..."
298 generate_files
299 doenvd 99grass-6
300 if use X; then
301 doicon "${FILESDIR}"/grass_icon.png
302 domenu ${MY_PM}-grass.desktop
303 fi
304 eend ${?}
305 }
306
307 pkg_postinst() {
308 use X && fdo-mime_desktop_database_update
309
310 elog "Note this version re-enables support for threads in Tcl and Tk."
311 elog "Enable the threads USE flag and rebuild to try it."
312 }
313
314 pkg_postrm() {
315 use X && fdo-mime_desktop_database_update
316 }
317
318 generate_files() {
319 local GUI="-gui"
320 use wxwindows && GUI="-wxpython"
321
322 cat <<-EOF > 99grass-6
323 GRASS_LD_LIBRARY_PATH="/usr/${MY_PM}/lib"
324 LDPATH="/usr/${MY_PM}/lib"
325 MANPATH="/usr/${MY_PM}/man"
326 GRASS_HOME="/usr/${MY_PM}"
327 EOF
328
329 cat <<-EOF > ${MY_PM}-grass.desktop
330 [Desktop Entry]
331 Encoding=UTF-8
332 Version=1.0
333 Name=Grass ${PV}
334 Type=Application
335 Comment=GRASS (Geographic Resources Analysis Support System), the original GIS.
336 Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
337 Path=
338 Icon=grass_icon.png
339 Categories=Science;Education;
340 Terminal=false
341 EOF
342 }