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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (hide annotations) (download)
Tue May 4 10:52:10 2010 UTC (9 years, 9 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +1 -1 lines
FILE REMOVED
Update install approach. Install .pc file. Drop old.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 fmccor 1.6 # Copyright 1999-2008 Gentoo Foundation
2 nerdboy 1.1 # Distributed under the terms of the GNU General Public License v2
3 scarabeus 1.16 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.1.ebuild,v 1.15 2008/12/19 05:57:29 nerdboy Exp $
4 nerdboy 1.1
5 nerdboy 1.12 inherit eutils libtool
6 nerdboy 1.1
7 nerdboy 1.5 DESCRIPTION="An open-source GIS with raster and vector functionality, as well as 3D vizualization."
8 nerdboy 1.1 HOMEPAGE="http://grass.itc.it/"
9     SRC_URI="http://grass.itc.it/grass62/source/${P}.tar.gz"
10    
11     LICENSE="GPL-2"
12 nerdboy 1.14 SLOT="6"
13 nerdboy 1.10 KEYWORDS="amd64 ppc sparc x86"
14 nerdboy 1.1 # To-do: get ppc64 gdal deps fixed up
15    
16 nerdboy 1.15 IUSE="ffmpeg fftw gmath jpeg largefile motif mysql nls odbc opengl png \
17     postgres python readline sqlite tiff truetype X"
18 nerdboy 1.1
19 peper 1.3 RESTRICT="strip"
20 nerdboy 1.1
21 nerdboy 1.12 RDEPEND=">=sys-libs/zlib-1.1.4
22 nerdboy 1.1 >=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 nerdboy 1.15 ffmpeg? ( media-video/ffmpeg )
30 nerdboy 1.1 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 nerdboy 1.15 opengl? ( virtual/opengl )
38 nerdboy 1.1 png? ( >=media-libs/libpng-1.2.2 )
39 nerdboy 1.15 postgres? ( >=virtual/postgresql-base-7.3 )
40 nerdboy 1.1 python? ( dev-lang/python )
41     readline? ( sys-libs/readline )
42     sqlite? ( dev-db/sqlite )
43     tiff? ( >=media-libs/tiff-3.5.7 )
44     truetype? ( >=media-libs/freetype-2.0 )
45 dberkholz 1.4 X? (
46     x11-libs/libXmu
47     x11-libs/libXext
48     x11-libs/libXp
49     x11-libs/libX11
50     x11-libs/libXt
51     x11-libs/libSM
52     x11-libs/libICE
53     x11-libs/libXpm
54     x11-libs/libXaw
55 nerdboy 1.15 >=dev-lang/tcl-8.4
56     >=dev-lang/tk-8.4
57 nerdboy 1.2 )"
58 nerdboy 1.1
59     DEPEND="${RDEPEND}
60 nerdboy 1.12 >=sys-devel/flex-2.5.4a
61     >=sys-devel/bison-1.35
62 dberkholz 1.4 X? (
63     x11-proto/xproto
64     x11-proto/xextproto
65 nerdboy 1.2 )"
66 nerdboy 1.1
67 nerdboy 1.15 pkg_setup() {
68 nerdboy 1.5 local myblas
69     if use gmath; then
70     for d in $(eselect lapack show); do myblas=${d}; done
71     if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
72     ewarn "You need to set lapack to atlas or reference. Do:"
73     ewarn " eselect lapack set <impl>"
74     ewarn "where <impl> is atlas, threaded-atlas or reference"
75     die "setup failed"
76     fi
77     for d in $(eselect blas show); do myblas=${d}; done
78     if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
79     ewarn "You need to set blas to atlas or reference. Do:"
80     ewarn " eselect blas set <impl>"
81     ewarn "where <impl> is atlas, threaded-atlas or reference"
82     die "setup failed"
83     fi
84     fi
85    
86 nerdboy 1.15 if use opengl && ! use X; then
87     ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)."
88     die "Please set the X useflag."
89 nerdboy 1.1 fi
90 nerdboy 1.15 }
91 nerdboy 1.5
92 nerdboy 1.15 src_unpack() {
93 nerdboy 1.1 unpack ${A}
94 nerdboy 1.9 cd "${S}"
95 nerdboy 1.15
96 nerdboy 1.9 use ffmpeg && epatch "${FILESDIR}"/${P}-ffmpeg-fix.patch
97 nerdboy 1.15 epatch "${FILESDIR}"/${P}-gcc43.patch
98 nerdboy 1.1 epatch rpm/fedora/grass-readline.patch
99 nerdboy 1.15
100 nerdboy 1.1 elibtoolize
101 nerdboy 1.15
102     # patch missing math functions (yes, this is still needed)
103     sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make
104     echo "MATHLIB=-lm" >> include/Make/Rules.make
105 nerdboy 1.1 }
106    
107     src_compile() {
108     local myconf
109     myconf="--prefix=/usr --with-cxx --enable-shared \
110     --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
111 nerdboy 1.15 --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \
112     --with-proj-includes=/usr/include \
113     --with-proj-libs=/usr/$(get_libdir) \
114     --with-proj-share=/usr/share/proj \
115     --without-glw --without-wxwidgets"
116     if use X; then
117     if has_version ">=dev-lang/tcl-8.5"; then
118     TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
119     else
120     TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4"
121     fi
122     myconf="${myconf} --with-tcltk --with-x \
123     --with-tcltk-includes=/usr/include \
124     --with-tcltk-libs=${TCL_LIBDIR}"
125 nerdboy 1.1 else
126     myconf="${myconf} --without-tcltk --without-x"
127     fi
128    
129 nerdboy 1.5 if use opengl; then
130 nerdboy 1.9 epatch "${FILESDIR}"/${P}-html-nviz-fix.patch
131 nerdboy 1.5 myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
132     else
133 nerdboy 1.9 epatch "${FILESDIR}"/${P}-html-nonviz.patch
134 nerdboy 1.5 myconf="${myconf} --without-opengl --without-glw"
135     fi
136    
137 nerdboy 1.15 # Should handle either older or latest without intervention;
138     # this won't work forever, but it should be okay for a while...
139 nerdboy 1.1 if use ffmpeg; then
140 nerdboy 1.15 myconf="${myconf} --with-ffmpeg \
141     --with-ffmpeg-libs=/usr/$(get_libdir)"
142     if has_version ">=media-video/ffmpeg-0.4.9_p20080326" ; then
143     # must pass multiple include dirs now; if anyone has a better
144     # way to do this, please speak up and file a bug :)
145     myconf="${myconf} --with-ffmpeg-includes=/usr/include/libav*"
146     else
147     myconf="${myconf} --with-ffmpeg-includes=/usr/include/ffmpeg"
148     fi
149 nerdboy 1.1 else
150 nerdboy 1.15 myconf="${myconf} --without-ffmpeg"
151 nerdboy 1.1 fi
152    
153     if use truetype; then
154 nerdboy 1.15 myconf="${myconf} --with-freetype --with-freetype-includes=/usr/include/freetype2"
155 nerdboy 1.1 fi
156    
157     if use mysql; then
158 nerdboy 1.15 myconf="${myconf} --with-mysql --with-mysql-includes=/usr/include/mysql \
159     --with-mysql-libs=/usr/$(get_libdir)/mysql"
160 nerdboy 1.1 else
161 nerdboy 1.15 myconf="${myconf} --without-mysql"
162 nerdboy 1.1 fi
163    
164     if use sqlite; then
165     myconf="${myconf} --with-sqlite --with-sqlite-includes=/usr/include
166     --with-sqlite-libs=/usr/lib"
167     else
168     myconf="${myconf} --without-sqlite"
169     fi
170    
171 nerdboy 1.15 #export LD_LIBRARY_PATH="/${WORKDIR}/image/usr/${P}/$(get_libdir):${LD_LIBRARY_PATH}"
172 nerdboy 1.2 econf ${myconf} --with-libs=/usr/$(get_libdir) \
173 nerdboy 1.1 $(use_enable amd64 64bit) \
174     $(use_with fftw) \
175     $(use_with jpeg) \
176     $(use_enable largefile) \
177     $(use_with motif) \
178     $(use_with nls) \
179     $(use_with odbc) \
180     $(use_with png) \
181     $(use_with postgres) \
182     $(use_with python) \
183     $(use_with readline) \
184 nerdboy 1.15 $(use_with tiff) || die "configure failed!"
185 nerdboy 1.2
186 nerdboy 1.5 emake -j1 || die "emake failed!"
187 nerdboy 1.1 }
188    
189     src_install() {
190 nerdboy 1.9 make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \
191     PREFIX="${D}"usr INST_DIR="${D}"usr/grass62 \
192 nerdboy 1.5 || die "make install failed!"
193 nerdboy 1.1
194 nerdboy 1.9 sed -i -e "s:^GISBASE=.*$:GISBASE=/usr/grass62:" \
195     "${D}"usr/bin/grass62 || die "sed failed!"
196 nerdboy 1.1
197     # Grass Extension Manager conflicts with ruby gems
198 nerdboy 1.9 mv "${D}"usr/bin/gem "${D}"usr/grass62/bin/
199 nerdboy 1.1
200     einfo "Adding env.d entry for Grass6"
201 nerdboy 1.9 newenvd "${FILESDIR}"/99grass-6.2 99grass-6
202 nerdboy 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20