/[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.4 Revision 1.5
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.4 2008/09/21 21:23:39 nerdboy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/Attic/grass-6.3.0.ebuild,v 1.5 2008/11/08 22:19:39 nerdboy Exp $
4 4
5inherit eutils distutils fdo-mime versionator wxwidgets 5inherit eutils distutils fdo-mime versionator wxwidgets
6 6
7MY_PV=$(get_version_component_range 1-2 ${PV}) 7MY_PV=$(get_version_component_range 1-2 ${PV})
8MY_PVM=$(delete_all_version_separators ${MY_PV}) 8MY_PVM=$(delete_all_version_separators ${MY_PV})
9MY_PM=${PN}${MY_PVM} 9MY_PM=${PN}${MY_PVM}
10 10
11DESCRIPTION="An open-source GIS with raster and vector functionality, as well as 3D vizualization." 11DESCRIPTION="An open-source GIS with raster and vector functionality, as well as 3D vizualization."
12HOMEPAGE="http://grass.itc.it/" 12HOMEPAGE="http://grass.osgeo.org//"
13SRC_URI="http://grass.itc.it/${MY_PM}/source/${P}.tar.gz" 13SRC_URI="http://download.osgeo.org/grass/${MY_PM}/source/${P}.tar.gz"
14 14
15LICENSE="GPL-2" 15LICENSE="GPL-2"
16SLOT="6" 16SLOT="6"
17KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" 17KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
18 18
19IUSE="ffmpeg fftw glw gmath jpeg largefile mysql nls odbc opengl png \ 19IUSE="ffmpeg fftw gmath jpeg largefile motif mysql nls odbc opengl png \
20postgres python readline sqlite tiff truetype wxwindows X" 20postgres python readline sqlite tiff truetype wxwindows X"
21 21
22RESTRICT="strip" 22RESTRICT="strip"
23 23
24RDEPEND=">=sys-libs/zlib-1.1.4 24RDEPEND=">=sys-libs/zlib-1.1.4
34 gmath? ( virtual/blas 34 gmath? ( virtual/blas
35 virtual/lapack ) 35 virtual/lapack )
36 jpeg? ( media-libs/jpeg ) 36 jpeg? ( media-libs/jpeg )
37 mysql? ( dev-db/mysql ) 37 mysql? ( dev-db/mysql )
38 odbc? ( >=dev-db/unixODBC-2.0.6 ) 38 odbc? ( >=dev-db/unixODBC-2.0.6 )
39 opengl? ( ( virtual/opengl ) 39 opengl? ( virtual/opengl )
40 ( x11-libs/openmotif ) 40 motif? ( x11-libs/openmotif )
41 glw? ( media-libs/mesa ) )
42 png? ( >=media-libs/libpng-1.2.2 ) 41 png? ( >=media-libs/libpng-1.2.2 )
43 postgres? ( >=dev-db/postgresql-7.3 ) 42 postgres? ( >=dev-db/postgresql-base-8.3 )
44 python? ( dev-lang/python ) 43 python? ( dev-lang/python )
45 readline? ( sys-libs/readline ) 44 readline? ( sys-libs/readline )
46 sqlite? ( dev-db/sqlite ) 45 sqlite? ( dev-db/sqlite )
47 tiff? ( >=media-libs/tiff-3.5.7 ) 46 tiff? ( >=media-libs/tiff-3.5.7 )
48 truetype? ( >=media-libs/freetype-2.0 ) 47 truetype? ( >=media-libs/freetype-2.0 )
96 ewarn "where <impl> is atlas, threaded-atlas or reference" 95 ewarn "where <impl> is atlas, threaded-atlas or reference"
97 die "setup failed" 96 die "setup failed"
98 fi 97 fi
99 fi 98 fi
100 99
101 if use glw && ! use opengl; then
102 ewarn "You set USE='glw -opengl'. GLw support needs OpenGL."
103 ewarn "OpenGL support also requires X."
104 die "Set opengl and X useflags."
105 fi
106
107 if use glw && ! built_with_use media-libs/mesa motif; then
108 ewarn "GRASS GLw/OpenGL support needs mesa with motif headers."
109 ewarn "Please rebuild mesa with motif support."
110 die "Re-emerge mesa with motif."
111 fi
112
113 if use opengl && ! use X; then 100 if use opengl && ! use X; then
114 ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)." 101 ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)."
115 die "Please set the X useflag." 102 die "Please set the X useflag."
116 fi 103 fi
117} 104}
120 unpack ${A} 107 unpack ${A}
121 cd "${S}" 108 cd "${S}"
122 109
123 epatch rpm/fedora/grass-readline.patch 110 epatch rpm/fedora/grass-readline.patch
124 111
125 if use opengl; then 112 if ! use opengl; then
126 epatch "${FILESDIR}"/${P}-html-nonviz.patch 113 epatch "${FILESDIR}"/${P}-html-nonviz.patch
127 fi 114 fi
128 115
129 # patch missing math functions (yes, this is still needed) 116 # patch missing math functions (yes, this is still needed)
130 sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make 117 sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make
139 myconf="--prefix=/usr --with-cxx --enable-shared \ 126 myconf="--prefix=/usr --with-cxx --enable-shared \
140 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \ 127 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
141 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \ 128 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \
142 --with-proj-includes=/usr/include \ 129 --with-proj-includes=/usr/include \
143 --with-proj-libs=/usr/$(get_libdir) \ 130 --with-proj-libs=/usr/$(get_libdir) \
144 --with-proj-share=/usr/share/proj" 131 --with-proj-share=/usr/share/proj \
132 --without-glw"
145 133
146 if use X; then 134 if use X; then
147 if has_version ">=dev-lang/tcl-8.5"; then 135 if has_version ">=dev-lang/tcl-8.5"; then
148 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5" 136 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
149 else 137 else
168 myconf="${myconf} --without-tcltk --without-x" 156 myconf="${myconf} --without-tcltk --without-x"
169 fi 157 fi
170 158
171 if use opengl; then 159 if use opengl; then
172 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib" 160 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
173 if use glw; then
174 myconf="${myconf} --with-glw"
175 fi
176 else 161 else
177 myconf="${myconf} --without-opengl --without-glw" 162 myconf="${myconf} --without-opengl"
178 fi 163 fi
179 164
180 # Should handle either older or latest without intervention; 165 # Should handle either older or latest without intervention;
181 # this won't work forever, but it should be okay for a while... 166 # this won't work forever, but it should be okay for a while...
182 if use ffmpeg; then 167 if use ffmpeg; then
217 $(use_with fftw) \ 202 $(use_with fftw) \
218 $(use_with gmath blas) \ 203 $(use_with gmath blas) \
219 $(use_with gmath lapack) \ 204 $(use_with gmath lapack) \
220 $(use_with jpeg) \ 205 $(use_with jpeg) \
221 $(use_enable largefile) \ 206 $(use_enable largefile) \
222 $(use_with opengl motif) \ 207 $(use_with motif) \
223 $(use_with nls) \ 208 $(use_with nls) \
224 $(use_with odbc) \ 209 $(use_with odbc) \
225 $(use_with png) \ 210 $(use_with png) \
226 $(use_with postgres) \ 211 $(use_with postgres) \
227 $(use_with readline) \ 212 $(use_with readline) \
228 $(use_with tiff) || die "configure failed!" 213 $(use_with tiff) || die "configure failed!"
229 214
230 if use wxwindows; then 215 if use wxwindows; then
216 # can't use die here since we need to hack the vdigit build
231 emake -j1 217 emake
232 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \ 218 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \
233 || die "making libgdi link failed" 219 || die "making libgdi link failed"
234 cd gui/wxpython/vdigit 220 cd gui/wxpython/vdigit
221 # now we're OK
235 make default -j1 || die "make vdigit failed!" 222 make default -j1 || die "make vdigit failed!"
236 else 223 else
237 emake -j1 || die "make failed!" 224 emake || die "make failed!"
238 fi 225 fi
239} 226}
240 227
241src_install() { 228src_install() {
242 elog "Grass Home is ${MY_PM}" 229 elog "Grass Home is ${MY_PM}"

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20