/[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.6 Revision 1.16
1# Copyright 1999-2009 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.6 2009/03/23 03:51:42 nerdboy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/Attic/grass-6.3.0.ebuild,v 1.16 2010/09/05 04:41:48 dirtyepic 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.osgeo.org//" 12HOMEPAGE="http://grass.osgeo.org//"
13SRC_URI="http://download.osgeo.org/grass/${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 gmath jpeg largefile motif 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 wxwidgets X"
21 21
22RESTRICT="strip" 22RESTRICT="strip"
23 23
24RDEPEND=">=sys-libs/zlib-1.1.4 24RDEPEND=">=sys-libs/zlib-1.1.4
25 >=sys-libs/ncurses-5.3 25 >=sys-libs/ncurses-5.3
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 motif? ( x11-libs/openmotif ) 40 motif? ( x11-libs/openmotif )
41 png? ( >=media-libs/libpng-1.2.2 ) 41 png? ( >=media-libs/libpng-1.2.2 )
42 postgres? ( || (
42 postgres? ( >=dev-db/postgresql-base-8.3 ) 43 >=dev-db/postgresql-base-8.0
44 >=dev-db/postgresql-server-8.0 )
45 )
43 python? ( dev-lang/python ) 46 python? ( dev-lang/python )
44 readline? ( sys-libs/readline ) 47 readline? ( sys-libs/readline )
45 sqlite? ( dev-db/sqlite ) 48 sqlite? ( dev-db/sqlite )
46 tiff? ( >=media-libs/tiff-3.5.7 ) 49 tiff? ( >=media-libs/tiff-3.5.7 )
47 truetype? ( >=media-libs/freetype-2.0 ) 50 truetype? ( >=media-libs/freetype-2.0 )
48 wxwindows? ( 51 wxwidgets? (
49 >=dev-python/wxpython-2.8.1.1 52 >=dev-python/wxpython-2.8.1.1
50 >=dev-lang/python-2.4 53 >=dev-lang/python-2.4
51 ) 54 )
52 X? ( 55 X? (
53 x11-libs/libXmu 56 x11-libs/libXmu
64 )" 67 )"
65 68
66DEPEND="${RDEPEND} 69DEPEND="${RDEPEND}
67 >=sys-devel/flex-2.5.4a 70 >=sys-devel/flex-2.5.4a
68 >=sys-devel/bison-1.35 71 >=sys-devel/bison-1.35
69 wxwindows? ( >=dev-lang/swig-1.3.31 ) 72 wxwidgets? ( >=dev-lang/swig-1.3.31 )
70 X? ( 73 X? (
71 x11-proto/xproto 74 x11-proto/xproto
72 x11-proto/xextproto 75 x11-proto/xextproto
73 )" 76 )"
74 77
75pkg_setup() { 78pkg_setup() {
76 local myblas 79 local myblas
77 elog "" 80 elog ""
78 elog "This version enables the experimental wxpython interface, which" 81 elog "This version enables the experimental wxpython interface, which"
79 elog "you may want to try. If the legacy GUI seems a little wonky in" 82 elog "you may want to try. If the legacy GUI seems a little wonky in"
80 elog "this version, just enable the wxwindows USE flag and rebuild" 83 elog "this version, just enable the wxwidgets USE flag and rebuild"
81 elog "grass to use it." 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
108 cd "${S}" 111 cd "${S}"
109 112
110 epatch rpm/fedora/grass-readline.patch 113 epatch rpm/fedora/grass-readline.patch
111 # fix the fortify_source and buffer issues (see bug #261283) 114 # fix the fortify_source and buffer issues (see bug #261283)
112 epatch "${FILESDIR}"/${P}-o_creat.patch 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
118
113 sed -i -e "s:buff\[12:buff\[16:g" general/g.parser/main.c \ 119 sed -i -e "s:buff\[12:buff\[16:g" general/g.parser/main.c \
114 || die "sed failed" 120 || die "sed failed"
115 121
116 if ! use opengl; then 122 if ! use opengl; then
117 epatch "${FILESDIR}"/${P}-html-nonviz.patch 123 epatch "${FILESDIR}"/${P}-html-nonviz.patch
122 echo "MATHLIB=-lm" >> include/Make/Rules.make 128 echo "MATHLIB=-lm" >> include/Make/Rules.make
123} 129}
124 130
125src_compile() { 131src_compile() {
126 local myconf 132 local myconf
127 # wxwindows needs python (see bug #237495) 133 addpredict /var/cache/fontconfig
128 use wxwindows && distutils_python_version
129 134
130 myconf="--prefix=/usr --with-cxx --enable-shared \ 135 myconf="--prefix=/usr --with-cxx --enable-shared \
131 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \ 136 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
132 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \ 137 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \
133 --with-proj-includes=/usr/include \ 138 --with-proj-includes=/usr/include \
142 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4" 147 TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4"
143 fi 148 fi
144 myconf="${myconf} --with-tcltk --with-x \ 149 myconf="${myconf} --with-tcltk --with-x \
145 --with-tcltk-includes=/usr/include \ 150 --with-tcltk-includes=/usr/include \
146 --with-tcltk-libs=${TCL_LIBDIR}" 151 --with-tcltk-libs=${TCL_LIBDIR}"
147 if use wxwindows; then 152 if use wxwidgets; then
148 WX_GTK_VER=2.8 153 WX_GTK_VER=2.8
149 need-wxwidgets unicode 154 need-wxwidgets unicode
150 # The following lib should be there, based on the above and the 155 # The following lib should be there, based on the above and the
151 # wxpython dependency (in theory). I still need a good way to 156 # wxpython dependency (in theory). I still need a good way to
152 # query for the location... 157 # query for the location...
153 LIBGDI="/usr/$(get_libdir)/python${PYVER}/site-packages/wx-${WX_GTK_VER}-gtk2-unicode/wx/_gdi_.so" 158 LIBGDI="$(python_get_sitedir)/wx-${WX_GTK_VER}-gtk2-unicode/wx/_gdi_.so"
154 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}" 159 myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}"
155 else 160 else
156 # USE=python must be enabled above if wxwindows is enabled 161 # USE=python must be enabled above if wxwidgets is enabled
157 myconf="${myconf} $(use_with python) --without-wxwidgets" 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
214 $(use_with png) \ 219 $(use_with png) \
215 $(use_with postgres) \ 220 $(use_with postgres) \
216 $(use_with readline) \ 221 $(use_with readline) \
217 $(use_with tiff) || die "configure failed!" 222 $(use_with tiff) || die "configure failed!"
218 223
219 if use wxwindows; then 224 if use wxwidgets; then
220 # can't use die here since we need to hack the vdigit build 225 # can't use die here since we need to hack the vdigit build
221 emake -j1 226 emake -j1
222 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \ 227 ln -sf "${LIBGDI}" dist.${CHOST}/lib/libgdi.so \
223 || die "making libgdi link failed" 228 || die "making libgdi link failed"
224 cd gui/wxpython/vdigit 229 cd gui/wxpython/vdigit
233 elog "Grass Home is ${MY_PM}" 238 elog "Grass Home is ${MY_PM}"
234 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \ 239 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \
235 PREFIX="${D}"usr INST_DIR="${D}"usr/${MY_PM} \ 240 PREFIX="${D}"usr INST_DIR="${D}"usr/${MY_PM} \
236 || die "make install failed!" 241 || die "make install failed!"
237 242
238 if use wxwindows; then 243 if use wxwidgets; then
239 ln -sf "${LIBGDI}" "${D}"usr/${MY_PM}/lib/libgdi.so \ 244 ln -sf "${LIBGDI}" "${D}"usr/${MY_PM}/lib/libgdi.so \
240 || die "failed to find wx library" 245 || die "failed to find wx library"
241 fi 246 fi
242 247
243 # get rid of DESTDIR in script path 248 # get rid of DESTDIR in script path
267 use X && fdo-mime_desktop_database_update 272 use X && fdo-mime_desktop_database_update
268} 273}
269 274
270generate_files() { 275generate_files() {
271 local GUI="-gui" 276 local GUI="-gui"
272 use wxwindows && GUI="-wxpython" 277 use wxwidgets && GUI="-wxpython"
273 278
274 cat <<-EOF > 99grass-6 279 cat <<-EOF > 99grass-6
275 GRASS_LD_LIBRARY_PATH="/usr/${MY_PM}/lib" 280 GRASS_LD_LIBRARY_PATH="/usr/${MY_PM}/lib"
276 LDPATH="/usr/${MY_PM}/lib" 281 LDPATH="/usr/${MY_PM}/lib"
277 MANPATH="/usr/${MY_PM}/man" 282 MANPATH="/usr/${MY_PM}/man"
282 [Desktop Entry] 287 [Desktop Entry]
283 Encoding=UTF-8 288 Encoding=UTF-8
284 Version=1.0 289 Version=1.0
285 Name=Grass ${PV} 290 Name=Grass ${PV}
286 Type=Application 291 Type=Application
287 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.
288 Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI} 293 Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
289 Path= 294 Path=
290 Icon=grass_icon.png 295 Icon=grass_icon.png
291 Categories=Science;Education; 296 Categories=Science;Education;
292 Terminal=true 297 Terminal=false
293 EOF 298 EOF
294} 299}

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20