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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Jan 29 01:57:03 2007 UTC (13 years, 2 months ago) by nerdboy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
added fix for bug 160809 and workaround for bug 159074
(Portage version: 2.1.2-r4)

1 nerdboy 1.1 # Copyright 1999-2006 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 nerdboy 1.3 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.0.ebuild,v 1.2 2006/12/24 22:01:41 nerdboy Exp $
4 nerdboy 1.1
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/grass62/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 nerdboy 1.2 IUSE="ffmpeg fftw glw gmath jpeg largefile motif mysql nls odbc opengl png
17     postgres python readline sqlite tcl tk tiff truetype"
18 nerdboy 1.1
19     RESTRICT="nostrip"
20    
21     RDEPEND=">=sys-devel/make-3.80
22     >=sys-libs/zlib-1.1.4
23     >=sys-devel/flex-2.5.4a
24     >=sys-devel/bison-1.35
25 nerdboy 1.2 >=sys-libs/ncurses-5.3
26 nerdboy 1.1 >=sys-libs/gdbm-1.8.0
27     >=sys-devel/gcc-3.2.2
28 nerdboy 1.2 || (
29     sys-apps/man
30     sys-apps/man-db )
31 nerdboy 1.1 sci-libs/gdal
32     >=sci-libs/proj-4.4.7
33     ffmpeg? ( media-video/ffmpeg )
34 nerdboy 1.2 fftw? ( sci-libs/fftw )
35 nerdboy 1.1 gmath? ( virtual/blas
36     virtual/lapack )
37     jpeg? ( media-libs/jpeg )
38     motif? ( x11-libs/openmotif )
39 nerdboy 1.2 mysql? ( dev-db/mysql )
40 nerdboy 1.1 odbc? ( >=dev-db/unixODBC-2.0.6 )
41     opengl? ( ( virtual/opengl )
42     glw? ( media-libs/mesa ) )
43     png? ( >=media-libs/libpng-1.2.2 )
44     postgres? ( >=dev-db/postgresql-7.3 )
45 nerdboy 1.2 python? ( dev-lang/python )
46 nerdboy 1.1 readline? ( sys-libs/readline )
47     sqlite? ( dev-db/sqlite )
48 nerdboy 1.2 tcl? ( >=dev-lang/tcl-8.4 )
49     tk? ( >=dev-lang/tk-8.4 )
50 nerdboy 1.1 tiff? ( >=media-libs/tiff-3.5.7 )
51     truetype? ( >=media-libs/freetype-2.0 )
52 nerdboy 1.2 || (
53 nerdboy 1.1 ( x11-libs/libXmu
54     x11-libs/libXext
55     x11-libs/libXp
56     x11-libs/libX11
57     x11-libs/libXt
58     x11-libs/libSM
59     x11-libs/libICE
60     x11-libs/libXpm
61     x11-libs/libXaw )
62 nerdboy 1.2 virtual/x11 )"
63 nerdboy 1.1
64     DEPEND="${RDEPEND}
65 nerdboy 1.2 || (
66 nerdboy 1.1 ( x11-proto/xproto x11-proto/xextproto )
67 nerdboy 1.2 virtual/x11 )"
68 nerdboy 1.1
69     src_unpack() {
70 nerdboy 1.2 if use glw && ! use opengl; then
71     ewarn "You set USE='glw -opengl'. GLw support needs OpenGL."
72     die "Set 'opengl' useflag!"
73     fi
74     if use glw && ! built_with_use media-libs/mesa motif; then
75     ewarn "GRASS OpenGL support needs mesa with motif headers."
76     ewarn "Please rebuild mesa with motif support."
77     die "re-emerge mesa with motif"
78     fi
79    
80     if use tcl && ! use tk; then
81     ewarn "You set USE='tcl -tk'. GRASS needs both tcl and tk."
82     die "Set 'tk' useflag!"
83     fi
84    
85     if use tk && ! use tcl; then
86     ewarn "You set USE='-tcl tk'. GRASS needs both tcl and tk."
87     die "Set 'tcl' useflag!"
88     fi
89    
90     if use tcl && built_with_use dev-lang/tcl threads; then
91 nerdboy 1.1 ewarn "GRASS nviz will not work with Tcl compiled with threads!"
92     ewarn "Please disable either opengl or tcl threads."
93     die "emerge TCL without threads"
94     fi
95 nerdboy 1.2 if use tk && built_with_use dev-lang/tk threads; then
96 nerdboy 1.1 ewarn "GRASS nviz will not work with Tk compiled with threads!"
97     ewarn "Please disable either opengl or tk threads."
98     die "emerge tk without threads"
99     fi
100     unpack ${A}
101     cd ${S}
102    
103     epatch rpm/fedora/grass-readline.patch
104     elibtoolize
105     }
106    
107     src_compile() {
108     local myconf
109     myconf="--prefix=/usr --with-cxx --enable-shared \
110 nerdboy 1.2 --with-gdal=$(which gdal-config) --with-curses --with-proj \
111     --with-proj-includes=/usr/include --with-proj-libs=/usr/lib \
112     --with-proj-share=/usr/share/proj --with-x"
113 nerdboy 1.1
114 nerdboy 1.2 if use tcl || use tk; then
115 nerdboy 1.1 myconf="${myconf} --with-tcltk \
116     --with-tcltk-includes=/usr/include \
117     --with-tcltk-libs=/usr/$(get_libdir)/tcl8.4"
118     else
119     myconf="${myconf} --without-tcltk"
120     fi
121    
122     if use ffmpeg; then
123     myconf="${myconf} --with-ffmpeg --with-ffmpeg-includes=/usr/include/ffmpeg --with-ffmpeg-libs=/usr/lib"
124     else
125     myconf="${myconf} --without-ffmpeg"
126     fi
127    
128     if use truetype; then
129     myconf="${myconf} --with-freetype --with-freetype-includes=/usr/include/freetype2"
130     fi
131    
132     if use mysql; then
133     myconf="${myconf} --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/$(get_libdir)/mysql"
134     else
135     myconf="${myconf} --without-mysql"
136     fi
137    
138     if use opengl; then
139     myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
140     if use glw; then
141     myconf="${myconf} --with-glw"
142     fi
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 nerdboy 1.2 $(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 nerdboy 1.1 # 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/${P} \
178     || die "Error: make install failed!"
179     sed -i "s:^GISBASE=.*$:GISBASE=/usr/${P}:" \
180     ${D}usr/bin/grass62 || die "Error: sed failed!"
181    
182     einfo "Adding env.d entry for Grass6"
183     newenvd ${FILESDIR}/99${P} 99grass
184     }

  ViewVC Help
Powered by ViewVC 1.1.20