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

Contents of /sci-geosciences/grass/grass-6.1.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Jan 8 00:55:22 2007 UTC (13 years, 1 month ago) by kugelfang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
QA: Removed unused versions.
(Portage version: 2.1.2_pre2-r1)
 (Signed Manifest commit)

1 # Copyright 1999-2006 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.1.0.ebuild,v 1.6 2006/11/23 16:49:13 vivo Exp $
4
5 inherit eutils autotools
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/grass61/source/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
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 ncurses nls odbc opengl png postgres proj readline sqlite tcl tk tiff truetype X"
17
18 RESTRICT="nostrip"
19
20 RDEPEND=">=sys-devel/make-3.80
21 >=sys-libs/zlib-1.1.4
22 >=sys-devel/flex-2.5.4a
23 >=sys-devel/bison-1.35
24 >=sys-libs/gdbm-1.8.0
25 >=sys-devel/gcc-3.2.2
26 sys-apps/man
27 sci-libs/gdal
28 >=sci-libs/proj-4.4.7
29 ffmpeg? ( media-video/ffmpeg )
30 fftw? ( =sci-libs/fftw-2* )
31 gmath? ( virtual/blas
32 virtual/lapack )
33 jpeg? ( media-libs/jpeg )
34 motif? ( x11-libs/openmotif )
35 mysql? ( virtual/mysql )
36 ncurses? ( >=sys-libs/ncurses-5.3 )
37 nls? ( x11-terms/mlterm )
38 odbc? ( >=dev-db/unixODBC-2.0.6 )
39 opengl? ( ( virtual/opengl )
40 glw? ( media-libs/mesa ) )
41 png? ( >=media-libs/libpng-1.2.2 )
42 postgres? ( >=dev-db/postgresql-7.3 )
43 proj? ( sci-libs/proj )
44 readline? ( sys-libs/readline )
45 sqlite? ( dev-db/sqlite )
46 tcl? ( >=dev-lang/tcl-8.3 )
47 tk? ( >=dev-lang/tk-8.3 )
48 tiff? ( >=media-libs/tiff-3.5.7 )
49 truetype? ( >=media-libs/freetype-2.0 )
50 X? ( || (
51 ( x11-libs/libXmu
52 x11-libs/libXext
53 x11-libs/libXp
54 x11-libs/libX11
55 x11-libs/libXt
56 x11-libs/libSM
57 x11-libs/libICE
58 x11-libs/libXpm
59 x11-libs/libXaw )
60 virtual/x11 )
61 )"
62
63 DEPEND="${RDEPEND}
64 X? ( || (
65 ( x11-proto/xproto x11-proto/xextproto )
66 virtual/x11 )
67 )"
68
69 src_unpack() {
70 if use opengl && built_with_use dev-lang/tcl threads; then
71 ewarn "GRASS nviz will not work with Tcl compiled with threads!"
72 ewarn "Please disable either opengl or tcl threads."
73 die "emerge TCL without threads"
74 fi
75 if use opengl && built_with_use dev-lang/tk threads; then
76 ewarn "GRASS nviz will not work with Tk compiled with threads!"
77 ewarn "Please disable either opengl or tk threads."
78 die "emerge tk without threads"
79 fi
80 unpack ${A}
81 cd ${S}
82
83 epatch rpm/fedora/grass-readline.patch
84
85 eautoconf
86 }
87
88 src_compile() {
89 local myconf
90 myconf="--prefix=/usr --with-cxx --enable-shared \
91 --with-gdal=$(which gdal-config)"
92
93 if use tcl || use tk ; then
94 myconf="${myconf} --with-tcltk \
95 --with-tcltk-includes=/usr/include \
96 --with-tcltk-libs=/usr/$(get_libdir)/tcl8.4"
97 else
98 myconf="${myconf} --without-tcltk"
99 fi
100
101 if use ffmpeg; then
102 myconf="${myconf} --with-ffmpeg --with-ffmpeg-includes=/usr/include/ffmpeg --with-ffmpeg-libs=/usr/lib"
103 else
104 myconf="${myconf} --without-ffmpeg"
105 fi
106
107 if use truetype; then
108 myconf="${myconf} --with-freetype --with-freetype-includes=/usr/include/freetype2"
109 fi
110
111 if use mysql; then
112 myconf="${myconf} --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/$(get_libdir)/mysql"
113 else
114 myconf="${myconf} --without-mysql"
115 fi
116
117 if use proj; then
118 myconf="${myconf} --with-proj --with-proj-includes=/usr/include --with-proj-libs=/usr/lib --with-proj-share=/usr/share/proj"
119 else
120 myconf="${myconf} --without-proj"
121 fi
122
123 if use opengl; then
124 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
125 if use glw; then
126 myconf="${myconf} --with-glw"
127 fi
128 fi
129
130 if use sqlite; then
131 myconf="${myconf} --with-sqlite --with-sqlite-includes=/usr/include
132 --with-sqlite-libs=/usr/lib"
133 else
134 myconf="${myconf} --without-sqlite"
135 fi
136
137 export LD_LIBRARY_PATH="/${WORKDIR}/image/usr/${P}/$(get_libdir):${LD_LIBRARY_PATH}"
138 econf ${myconf} \
139 `use_enable amd64 64bit` \
140 `use_with ncurses curses` \
141 `use_with fftw` \
142 `use_with gmath blas` \
143 `use_with gmath lapack` \
144 `use_with jpeg` \
145 `use_enable largefile` \
146 `use_with motif` \
147 `use_with nls` \
148 `use_with odbc` \
149 `use_with png` \
150 `use_with postgres` \
151 `use_with readline` \
152 `use_with tiff` \
153 `use_with tcl tcltk` \
154 `use_with tk tcltk` \
155 `use_with X x` || die "Error: configure failed!"
156 # patch missing math functions
157 sed -i 's:EXTRA_LIBS=:EXTRA_LIBS=-lm :g' ${S}/lib/gmath/Makefile
158 sed -i 's:EXTRA_LIBS = :EXTRA_LIBS = -lm :g' ${S}/lib/gis/Makefile
159 emake -j1 || die "Error: emake failed!"
160 }
161
162 src_install() {
163 make install UNIX_BIN=${D}usr/bin BINDIR=${D}usr/bin \
164 PREFIX=${D}usr INST_DIR=${D}usr/${P} \
165 || die "Error: make install failed!"
166 sed -i "s:^GISBASE=.*$:GISBASE=/usr/${P}:" \
167 ${D}usr/bin/grass61
168
169 einfo "Adding env.d entry for Grass6"
170 newenvd ${FILESDIR}/99grass-6.1.0 99grass
171 }

  ViewVC Help
Powered by ViewVC 1.1.20