/[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.1 Revision 1.15
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2010 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.1 2008/06/24 07:45:51 nerdboy Exp $ 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 $
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="A free 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="0" 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? ( || (
43 >=dev-db/postgresql-base-8.0
44 >=dev-db/postgresql-server-8.0 )
45 )
44 python? ( dev-lang/python ) 46 python? ( dev-lang/python )
45 readline? ( sys-libs/readline ) 47 readline? ( sys-libs/readline )
46 sqlite? ( dev-db/sqlite ) 48 sqlite? ( dev-db/sqlite )
47 tiff? ( >=media-libs/tiff-3.5.7 ) 49 tiff? ( >=media-libs/tiff-3.5.7 )
48 truetype? ( >=media-libs/freetype-2.0 ) 50 truetype? ( >=media-libs/freetype-2.0 )
75 77
76pkg_setup() { 78pkg_setup() {
77 local myblas 79 local myblas
78 elog "" 80 elog ""
79 elog "This version enables the experimental wxpython interface, which" 81 elog "This version enables the experimental wxpython interface, which"
80 elog "you may want to try, since the legacy GUI seems a little wonky" 82 elog "you may want to try. If the legacy GUI seems a little wonky in"
81 elog "in this version; just enable the wxwindows USE flag and build." 83 elog "this version, just enable the wxwindows USE flag and rebuild"
84 elog "grass to use it."
82 elog "" 85 elog ""
83 if use gmath; then 86 if use gmath; then
84 for d in $(eselect lapack show); do myblas=${d}; done 87 for d in $(eselect lapack show); do myblas=${d}; done
85 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then 88 if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
86 ewarn "You need to set lapack to atlas or reference. Do:" 89 ewarn "You need to set lapack to atlas or reference. Do:"
95 ewarn "where <impl> is atlas, threaded-atlas or reference" 98 ewarn "where <impl> is atlas, threaded-atlas or reference"
96 die "setup failed" 99 die "setup failed"
97 fi 100 fi
98 fi 101 fi
99 102
100 if use glw && ! use opengl; then
101 ewarn "You set USE='glw -opengl'. GLw support needs OpenGL."
102 ewarn "OpenGL support also requires X."
103 die "Set opengl and X useflags."
104 fi
105
106 if use glw && ! built_with_use media-libs/mesa motif; then
107 ewarn "GRASS GLw/OpenGL support needs mesa with motif headers."
108 ewarn "Please rebuild mesa with motif support."
109 die "Re-emerge mesa with motif."
110 fi
111
112 if use opengl && ! use X; then 103 if use opengl && ! use X; then
113 ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)." 104 ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)."
114 die "Please set the X useflag." 105 die "Please set the X useflag."
115 fi 106 fi
116} 107}
118src_unpack() { 109src_unpack() {
119 unpack ${A} 110 unpack ${A}
120 cd "${S}" 111 cd "${S}"
121 112
122 epatch rpm/fedora/grass-readline.patch 113 epatch rpm/fedora/grass-readline.patch
114 # fix the fortify_source and buffer issues (see bug #261283)
115 epatch "${FILESDIR}"/${P}-o_creat.patch
116 # and update for gcc 4.4 C++ changes (see bug #270916)
117 epatch "${FILESDIR}"/${P}-gcc44.patch
123 118
119 sed -i -e "s:buff\[12:buff\[16:g" general/g.parser/main.c \
120 || die "sed failed"
121
124 if use opengl; then 122 if ! use opengl; then
125 epatch "${FILESDIR}"/${P}-html-nonviz.patch 123 epatch "${FILESDIR}"/${P}-html-nonviz.patch
126 fi 124 fi
127 125
128 # patch missing math functions (yes, this is still needed) 126 # patch missing math functions (yes, this is still needed)
129 sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make 127 sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make
130 echo "MATHLIB=-lm" >> include/Make/Rules.make 128 echo "MATHLIB=-lm" >> include/Make/Rules.make
131} 129}
132 130
133src_compile() { 131src_compile() {
134 local myconf 132 local myconf
135 use python || use wxindows && distutils_python_version 133 addpredict /var/cache/fontconfig
136 134
137 myconf="--prefix=/usr --with-cxx --enable-shared \ 135 myconf="--prefix=/usr --with-cxx --enable-shared \
138 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \ 136 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
139 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \ 137 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \
140 --with-proj-includes=/usr/include \ 138 --with-proj-includes=/usr/include \
141 --with-proj-libs=/usr/$(get_libdir) \ 139 --with-proj-libs=/usr/$(get_libdir) \
142 --with-proj-share=/usr/share/proj" 140 --with-proj-share=/usr/share/proj \
141 --without-glw"
143 142
144 if use X; then 143 if use X; then
145 if has_version ">=dev-lang/tcl-8.5"; then 144 if has_version ">=dev-lang/tcl-8.5"; then
146 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5" 145 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
147 else 146 else
150 myconf="${myconf} --with-tcltk --with-x \ 149 myconf="${myconf} --with-tcltk --with-x \
151 --with-tcltk-includes=/usr/include \ 150 --with-tcltk-includes=/usr/include \
152 --with-tcltk-libs=${TCL_LIBDIR}" 151 --with-tcltk-libs=${TCL_LIBDIR}"
153 if use wxwindows; then 152 if use wxwindows; then
154 WX_GTK_VER=2.8 153 WX_GTK_VER=2.8
155 need-wxwidgets gtk2 154 need-wxwidgets unicode
156 LIBGDI="/usr/$(get_libdir)/python${PYVER}/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so" 155 # The following lib should be there, based on the above and the
156 # wxpython dependency (in theory). I still need a good way to
157 # query for the location...
158 LIBGDI="$(python_get_sitedir)/wx-${WX_GTK_VER}-gtk2-unicode/wx/_gdi_.so"
157 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}" 159 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}"
160 else
161 # USE=python must be enabled above if wxwindows is enabled
162 myconf="${myconf} $(use_with python) --without-wxwidgets"
158 fi 163 fi
159 else 164 else
160 myconf="${myconf} --without-tcltk --without-x" 165 myconf="${myconf} --without-tcltk --without-x"
161 fi 166 fi
162 167
163 if use opengl; then 168 if use opengl; then
164 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib" 169 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
165 if use glw; then
166 myconf="${myconf} --with-glw"
167 fi
168 else 170 else
169 myconf="${myconf} --without-opengl --without-glw" 171 myconf="${myconf} --without-opengl"
170 fi 172 fi
171 173
172 # Should handle either older or latest without intervention; 174 # Should handle either older or latest without intervention;
173 # this won't work forever, but it should be okay for a while... 175 # this won't work forever, but it should be okay for a while...
174 if use ffmpeg; then 176 if use ffmpeg; then
209 $(use_with fftw) \ 211 $(use_with fftw) \
210 $(use_with gmath blas) \ 212 $(use_with gmath blas) \
211 $(use_with gmath lapack) \ 213 $(use_with gmath lapack) \
212 $(use_with jpeg) \ 214 $(use_with jpeg) \
213 $(use_enable largefile) \ 215 $(use_enable largefile) \
214 $(use_with opengl motif) \ 216 $(use_with motif) \
215 $(use_with nls) \ 217 $(use_with nls) \
216 $(use_with odbc) \ 218 $(use_with odbc) \
217 $(use_with png) \ 219 $(use_with png) \
218 $(use_with postgres) \ 220 $(use_with postgres) \
219 $(use_with python) \
220 $(use_with readline) \ 221 $(use_with readline) \
221 $(use_with tiff) || die "configure failed!" 222 $(use_with tiff) || die "configure failed!"
222 223
223 if use wxwindows; then 224 if use wxwindows; then
225 # can't use die here since we need to hack the vdigit build
224 emake -j1 226 emake -j1
225 ln -sf "${LIBGDI}" dist.x86_64-pc-linux-gnu/lib/libgdi.so \ 227 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \
226 || die "making libgdi link failed" 228 || die "making libgdi link failed"
227 cd gui/wxpython/vdigit 229 cd gui/wxpython/vdigit
230 # now we're OK
228 make default -j1 || die "make vdigit failed!" 231 make default -j1 || die "make vdigit failed!"
229 else 232 else
230 emake -j1 || die "make failed!" 233 emake -j1 || die "make failed!"
231 fi 234 fi
232} 235}
284 [Desktop Entry] 287 [Desktop Entry]
285 Encoding=UTF-8 288 Encoding=UTF-8
286 Version=1.0 289 Version=1.0
287 Name=Grass ${PV} 290 Name=Grass ${PV}
288 Type=Application 291 Type=Application
289 Comment=GRASS Open Source GIS, derived from the original US Army Corps of Engineers project. 292 Comment=GRASS (Geographic Resources Analysis Support System), the original GIS.
290 Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI} 293 Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
291 Path= 294 Path=
292 Icon=grass_icon.png 295 Icon=grass_icon.png
293 Categories=Science;Education; 296 Categories=Science;Education;
294 Terminal=true 297 Terminal=false
295 EOF 298 EOF
296} 299}

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

  ViewVC Help
Powered by ViewVC 1.1.20