/[gentoo-x86]/sci-geosciences/grass/grass-6.3.0.ebuild
Gentoo

Diff of /sci-geosciences/grass/grass-6.3.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.22
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/Attic/grass-6.3.0.ebuild,v 1.15 2010/06/17 21:03:51 patrick Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/Attic/grass-6.3.0.ebuild,v 1.22 2011/03/26 15:27:44 scarabeus Exp $
4
5EAPI=1
4 6
5inherit eutils distutils fdo-mime versionator wxwidgets 7inherit eutils distutils fdo-mime versionator wxwidgets
6 8
7MY_PV=$(get_version_component_range 1-2 ${PV}) 9MY_PV=$(get_version_component_range 1-2 ${PV})
8MY_PVM=$(delete_all_version_separators ${MY_PV}) 10MY_PVM=$(delete_all_version_separators ${MY_PV})
12HOMEPAGE="http://grass.osgeo.org//" 14HOMEPAGE="http://grass.osgeo.org//"
13SRC_URI="http://download.osgeo.org/grass/${MY_PM}/source/${P}.tar.gz" 15SRC_URI="http://download.osgeo.org/grass/${MY_PM}/source/${P}.tar.gz"
14 16
15LICENSE="GPL-2" 17LICENSE="GPL-2"
16SLOT="6" 18SLOT="6"
17KEYWORDS="amd64 ppc ~ppc64 sparc x86" 19KEYWORDS="amd64 ppc ~ppc64 x86"
18 20
19IUSE="ffmpeg fftw gmath jpeg largefile motif mysql nls odbc opengl png \ 21IUSE="ffmpeg fftw gmath jpeg motif mysql nls odbc opengl png \
20postgres python readline sqlite tiff truetype wxwindows X" 22postgres python readline sqlite tiff truetype wxwidgets X"
21 23
22RESTRICT="strip" 24RESTRICT="strip"
23 25
24RDEPEND=">=sys-libs/zlib-1.1.4 26RDEPEND=">=sys-libs/zlib-1.1.4
25 >=sys-libs/ncurses-5.3 27 >=sys-libs/ncurses-5.3
27 || ( 29 || (
28 sys-apps/man 30 sys-apps/man
29 sys-apps/man-db ) 31 sys-apps/man-db )
30 sci-libs/gdal 32 sci-libs/gdal
31 >=sci-libs/proj-4.4.7 33 >=sci-libs/proj-4.4.7
32 ffmpeg? ( media-video/ffmpeg ) 34 ffmpeg? ( virtual/ffmpeg )
33 fftw? ( sci-libs/fftw ) 35 fftw? ( sci-libs/fftw )
34 gmath? ( virtual/blas 36 gmath? ( virtual/blas
35 virtual/lapack ) 37 virtual/lapack )
36 jpeg? ( media-libs/jpeg ) 38 jpeg? ( virtual/jpeg )
37 mysql? ( dev-db/mysql ) 39 mysql? ( dev-db/mysql )
38 odbc? ( >=dev-db/unixODBC-2.0.6 ) 40 odbc? ( >=dev-db/unixODBC-2.0.6 )
39 opengl? ( virtual/opengl ) 41 opengl? ( virtual/opengl )
40 motif? ( x11-libs/openmotif ) 42 motif? ( >=x11-libs/openmotif-2.3:0 )
41 png? ( >=media-libs/libpng-1.2.2 ) 43 png? ( >=media-libs/libpng-1.2.2 )
42 postgres? ( || ( 44 postgres? ( || (
43 >=dev-db/postgresql-base-8.0 45 >=dev-db/postgresql-base-8.0
44 >=dev-db/postgresql-server-8.0 ) 46 >=dev-db/postgresql-server-8.0 )
45 ) 47 )
46 python? ( dev-lang/python ) 48 python? ( dev-lang/python )
47 readline? ( sys-libs/readline ) 49 readline? ( sys-libs/readline )
48 sqlite? ( dev-db/sqlite ) 50 sqlite? ( dev-db/sqlite )
49 tiff? ( >=media-libs/tiff-3.5.7 ) 51 tiff? ( >=media-libs/tiff-3.5.7 )
50 truetype? ( >=media-libs/freetype-2.0 ) 52 truetype? ( >=media-libs/freetype-2.0 )
51 wxwindows? ( 53 wxwidgets? (
52 >=dev-python/wxpython-2.8.1.1 54 >=dev-python/wxpython-2.8.1.1
53 >=dev-lang/python-2.4 55 >=dev-lang/python-2.4
54 ) 56 )
55 X? ( 57 X? (
56 x11-libs/libXmu 58 x11-libs/libXmu
67 )" 69 )"
68 70
69DEPEND="${RDEPEND} 71DEPEND="${RDEPEND}
70 >=sys-devel/flex-2.5.4a 72 >=sys-devel/flex-2.5.4a
71 >=sys-devel/bison-1.35 73 >=sys-devel/bison-1.35
72 wxwindows? ( >=dev-lang/swig-1.3.31 ) 74 wxwidgets? ( >=dev-lang/swig-1.3.31 )
73 X? ( 75 X? (
74 x11-proto/xproto 76 x11-proto/xproto
75 x11-proto/xextproto 77 x11-proto/xextproto
76 )" 78 )"
77 79
78pkg_setup() { 80pkg_setup() {
79 local myblas 81 local myblas
80 elog "" 82 elog ""
81 elog "This version enables the experimental wxpython interface, which" 83 elog "This version enables the experimental wxpython interface, which"
82 elog "you may want to try. If the legacy GUI seems a little wonky in" 84 elog "you may want to try. If the legacy GUI seems a little wonky in"
83 elog "this version, just enable the wxwindows USE flag and rebuild" 85 elog "this version, just enable the wxwidgets USE flag and rebuild"
84 elog "grass to use it." 86 elog "grass to use it."
85 elog "" 87 elog ""
86 if use gmath; then 88 if use gmath; then
87 for d in $(eselect lapack show); do myblas=${d}; done 89 for d in $(eselect lapack show); do myblas=${d}; done
88 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then 90 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
147 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4" 149 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4"
148 fi 150 fi
149 myconf="${myconf} --with-tcltk --with-x \ 151 myconf="${myconf} --with-tcltk --with-x \
150 --with-tcltk-includes=/usr/include \ 152 --with-tcltk-includes=/usr/include \
151 --with-tcltk-libs=${TCL_LIBDIR}" 153 --with-tcltk-libs=${TCL_LIBDIR}"
152 if use wxwindows; then 154 if use wxwidgets; then
153 WX_GTK_VER=2.8 155 WX_GTK_VER=2.8
154 need-wxwidgets unicode 156 need-wxwidgets unicode
155 # The following lib should be there, based on the above and the 157 # The following lib should be there, based on the above and the
156 # wxpython dependency (in theory). I still need a good way to 158 # wxpython dependency (in theory). I still need a good way to
157 # query for the location... 159 # query for the location...
158 LIBGDI="$(python_get_sitedir)/wx-${WX_GTK_VER}-gtk2-unicode/wx/_gdi_.so" 160 LIBGDI="$(python_get_sitedir)/wx-${WX_GTK_VER}-gtk2-unicode/wx/_gdi_.so"
159 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}" 161 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}"
160 else 162 else
161 # USE=python must be enabled above if wxwindows is enabled 163 # USE=python must be enabled above if wxwidgets is enabled
162 myconf="${myconf} $(use_with python) --without-wxwidgets" 164 myconf="${myconf} $(use_with python) --without-wxwidgets"
163 fi 165 fi
164 else 166 else
165 myconf="${myconf} --without-tcltk --without-x" 167 myconf="${myconf} --without-tcltk --without-x"
166 fi 168 fi
174 # Should handle either older or latest without intervention; 176 # Should handle either older or latest without intervention;
175 # this won't work forever, but it should be okay for a while... 177 # this won't work forever, but it should be okay for a while...
176 if use ffmpeg; then 178 if use ffmpeg; then
177 myconf="${myconf} --with-ffmpeg \ 179 myconf="${myconf} --with-ffmpeg \
178 --with-ffmpeg-libs=/usr/$(get_libdir)" 180 --with-ffmpeg-libs=/usr/$(get_libdir)"
179 if has_version ">=media-video/ffmpeg-0.4.9_p20080326" ; then
180 # must pass multiple include dirs now; if you have a better
181 # way to do this, please speak up and file a bug :)
182 myconf="${myconf} --with-ffmpeg-includes=/usr/include/libav*" 181 myconf="${myconf} --with-ffmpeg-includes=/usr/include/libav*"
183 else
184 myconf="${myconf} --with-ffmpeg-includes=/usr/include/ffmpeg"
185 fi
186 else 182 else
187 myconf="${myconf} --without-ffmpeg" 183 myconf="${myconf} --without-ffmpeg"
188 fi 184 fi
189 185
190 if use truetype; then 186 if use truetype; then
210 $(use_enable amd64 64bit) \ 206 $(use_enable amd64 64bit) \
211 $(use_with fftw) \ 207 $(use_with fftw) \
212 $(use_with gmath blas) \ 208 $(use_with gmath blas) \
213 $(use_with gmath lapack) \ 209 $(use_with gmath lapack) \
214 $(use_with jpeg) \ 210 $(use_with jpeg) \
215 $(use_enable largefile) \
216 $(use_with motif) \ 211 $(use_with motif) \
217 $(use_with nls) \ 212 $(use_with nls) \
218 $(use_with odbc) \ 213 $(use_with odbc) \
219 $(use_with png) \ 214 $(use_with png) \
220 $(use_with postgres) \ 215 $(use_with postgres) \
221 $(use_with readline) \ 216 $(use_with readline) \
222 $(use_with tiff) || die "configure failed!" 217 $(use_with tiff) \
218 --enable-largefile \
223 219
224 if use wxwindows; then 220 if use wxwidgets; then
225 # can't use die here since we need to hack the vdigit build 221 # can't use die here since we need to hack the vdigit build
226 emake -j1 222 emake -j1
227 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \ 223 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \
228 || die "making libgdi link failed" 224 || die "making libgdi link failed"
229 cd gui/wxpython/vdigit 225 cd gui/wxpython/vdigit
238 elog "Grass Home is ${MY_PM}" 234 elog "Grass Home is ${MY_PM}"
239 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \ 235 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \
240 PREFIX="${D}"usr INST_DIR="${D}"usr/${MY_PM} \ 236 PREFIX="${D}"usr INST_DIR="${D}"usr/${MY_PM} \
241 || die "make install failed!" 237 || die "make install failed!"
242 238
243 if use wxwindows; then 239 if use wxwidgets; then
244 ln -sf "${LIBGDI}" "${D}"usr/${MY_PM}/lib/libgdi.so \ 240 ln -sf "${LIBGDI}" "${D}"usr/${MY_PM}/lib/libgdi.so \
245 || die "failed to find wx library" 241 || die "failed to find wx library"
246 fi 242 fi
247 243
248 # get rid of DESTDIR in script path 244 # get rid of DESTDIR in script path
272 use X && fdo-mime_desktop_database_update 268 use X && fdo-mime_desktop_database_update
273} 269}
274 270
275generate_files() { 271generate_files() {
276 local GUI="-gui" 272 local GUI="-gui"
277 use wxwindows && GUI="-wxpython" 273 use wxwidgets && GUI="-wxpython"
278 274
279 cat <<-EOF > 99grass-6 275 cat <<-EOF > 99grass-6
280 GRASS_LD_LIBRARY_PATH="/usr/${MY_PM}/lib" 276 GRASS_LD_LIBRARY_PATH="/usr/${MY_PM}/lib"
281 LDPATH="/usr/${MY_PM}/lib" 277 LDPATH="/usr/${MY_PM}/lib"
282 MANPATH="/usr/${MY_PM}/man" 278 MANPATH="/usr/${MY_PM}/man"

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20