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

Contents of /sci-geosciences/grass/grass-6.2.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Sat Oct 4 15:33:26 2008 UTC (11 years, 3 months ago) by betelgeuse
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Delete old version. Fixes bug #204785.
(Portage version: 2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 i686)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.0-r1.ebuild,v 1.13 2008/08/14 07:07:57 nerdboy Exp $
4
5 inherit eutils libtool
6
7 DESCRIPTION="An open-source GIS with raster and vector functionality"
8 HOMEPAGE="http://grass.itc.it/"
9 SRC_URI="http://grass.itc.it/grass62/source/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="6"
13 KEYWORDS="amd64 ppc sparc x86"
14 # To-do: get ppc64 gdal deps fixed up
15
16 IUSE="ffmpeg fftw glw gmath jpeg largefile motif mysql nls odbc opengl png
17 postgres python readline sqlite tcl tk tiff truetype"
18
19 RESTRICT="strip"
20
21 RDEPEND=">=sys-libs/zlib-1.1.4
22 >=sys-libs/ncurses-5.3
23 >=sys-libs/gdbm-1.8.0
24 || (
25 sys-apps/man
26 sys-apps/man-db )
27 sci-libs/gdal
28 >=sci-libs/proj-4.4.7
29 ffmpeg? ( media-video/ffmpeg )
30 fftw? ( sci-libs/fftw )
31 gmath? ( virtual/blas
32 virtual/lapack )
33 jpeg? ( media-libs/jpeg )
34 motif? ( x11-libs/openmotif )
35 mysql? ( dev-db/mysql )
36 odbc? ( >=dev-db/unixODBC-2.0.6 )
37 opengl? ( ( virtual/opengl )
38 glw? ( media-libs/mesa ) )
39 png? ( >=media-libs/libpng-1.2.2 )
40 postgres? ( >=virtual/postgresql-server-7.3 )
41 python? ( dev-lang/python )
42 readline? ( sys-libs/readline )
43 sqlite? ( dev-db/sqlite )
44 tcl? ( >=dev-lang/tcl-8.4 )
45 tk? ( >=dev-lang/tk-8.4 )
46 tiff? ( >=media-libs/tiff-3.5.7 )
47 truetype? ( >=media-libs/freetype-2.0 )
48 x11-libs/libXmu
49 x11-libs/libXext
50 x11-libs/libXp
51 x11-libs/libX11
52 x11-libs/libXt
53 x11-libs/libSM
54 x11-libs/libICE
55 x11-libs/libXpm
56 x11-libs/libXaw"
57
58 DEPEND="${RDEPEND}
59 >=sys-devel/make-3.80
60 >=sys-devel/flex-2.5.4a
61 >=sys-devel/bison-1.35
62 >=sys-devel/gcc-3.2.2
63 x11-proto/xproto
64 x11-proto/xextproto"
65
66 src_unpack() {
67 if use glw && ! use opengl; then
68 ewarn "You set USE='glw -opengl'. GLw support needs OpenGL."
69 ewarn "OpenGL support also requires Tcl and Tk support."
70 die "Set opengl, tcl, and tk useflags!"
71 fi
72 if use glw && ! built_with_use media-libs/mesa motif; then
73 ewarn "GRASS OpenGL support needs mesa with motif headers."
74 ewarn "Please rebuild mesa with motif support."
75 die "re-emerge mesa with motif"
76 fi
77
78 if use tcl && ! use tk; then
79 ewarn "You set USE='tcl -tk'. GRASS needs both tcl and tk."
80 die "Set 'tk' useflag!"
81 fi
82
83 if use tk && ! use tcl; then
84 ewarn "You set USE='-tcl tk'. GRASS needs both tcl and tk."
85 die "Set 'tcl' useflag!"
86 fi
87
88 if use tcl && built_with_use dev-lang/tcl threads; then
89 ewarn "GRASS nviz will not work with Tcl compiled with threads!"
90 ewarn "Please disable either opengl or tcl threads."
91 die "emerge TCL without threads"
92 fi
93 if use tk && built_with_use dev-lang/tk threads; then
94 ewarn "GRASS nviz will not work with Tk compiled with threads!"
95 ewarn "Please disable either opengl or tk threads."
96 die "emerge tk without threads"
97 fi
98 unpack ${A}
99 cd "${S}"
100
101 epatch rpm/fedora/grass-readline.patch
102 elibtoolize
103 }
104
105 src_compile() {
106 local myconf
107 myconf="--prefix=/usr --with-cxx --enable-shared \
108 --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
109 --with-proj-includes=/usr/include --with-proj-libs=/usr/lib \
110 --with-proj-share=/usr/share/proj"
111
112 if use tcl || use tk; then
113 myconf="${myconf} --with-tcltk \
114 --with-tcltk-includes=/usr/include \
115 --with-tcltk-libs=/usr/$(get_libdir)/tcl8.4 --with-x"
116 else
117 myconf="${myconf} --without-tcltk --without-x"
118 fi
119
120 if use ffmpeg; then
121 myconf="${myconf} --with-ffmpeg --with-ffmpeg-includes=/usr/include/ffmpeg --with-ffmpeg-libs=/usr/lib"
122 else
123 myconf="${myconf} --without-ffmpeg"
124 fi
125
126 if use truetype; then
127 myconf="${myconf} --with-freetype --with-freetype-includes=/usr/include/freetype2"
128 fi
129
130 if use mysql; then
131 myconf="${myconf} --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/$(get_libdir)/mysql"
132 else
133 myconf="${myconf} --without-mysql"
134 fi
135
136 if use opengl; then
137 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
138 if use glw; then
139 myconf="${myconf} --with-glw"
140 fi
141 else
142 epatch "${FILESDIR}"/${P}-html-nonviz.patch
143 fi
144
145 if use sqlite; then
146 myconf="${myconf} --with-sqlite --with-sqlite-includes=/usr/include
147 --with-sqlite-libs=/usr/lib"
148 else
149 myconf="${myconf} --without-sqlite"
150 fi
151
152 export LD_LIBRARY_PATH="/${WORKDIR}/image/usr/${P}/$(get_libdir):${LD_LIBRARY_PATH}"
153 econf ${myconf} \
154 $(use_enable amd64 64bit) \
155 $(use_with fftw) \
156 $(use_with gmath blas) \
157 $(use_with gmath lapack) \
158 $(use_with jpeg) \
159 $(use_enable largefile) \
160 $(use_with motif) \
161 $(use_with nls) \
162 $(use_with odbc) \
163 $(use_with png) \
164 $(use_with postgres) \
165 $(use_with python) \
166 $(use_with readline) \
167 $(use_with tiff) \
168 $(use_with tcl tcltk) || die "Error: configure failed!"
169 # patch missing math functions
170 sed -i 's:EXTRA_LIBS=:EXTRA_LIBS=-lm :g' "${S}"/lib/gmath/Makefile
171 sed -i 's:EXTRA_LIBS = :EXTRA_LIBS = -lm :g' "${S}"/lib/gis/Makefile
172 emake -j1 || die "Error: emake failed!"
173 }
174
175 src_install() {
176 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \
177 PREFIX="${D}"usr INST_DIR="${D}"usr/grass62 \
178 || die "Error: make install failed!"
179
180 sed -i "s:^GISBASE=.*$:GISBASE=/usr/grass62:" \
181 "${D}"usr/bin/grass62 || die "Error: sed failed!"
182
183 # Grass Extension Manager conflicts with ruby gems
184 mv "${D}"usr/bin/gem "${D}"usr/grass62/bin/
185
186 einfo "Adding env.d entry for Grass6"
187 newenvd "${FILESDIR}"/99grass-6.2 99grass-6
188 }

  ViewVC Help
Powered by ViewVC 1.1.20