# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="An open-source GIS with raster and vector functionality" HOMEPAGE="http://grass.itc.it/" SRC_URI="http://grass.itc.it/grass54/source/${P}.tar.gz http://grass.meteo.uni.wroc.pl/grass54/source/${P}.tar.gz http://grass.ibiblio.org/grass54/source/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="tcltk png jpeg tiff postgres odbc motif gdal mysql blas lapack X fftw truetype opengl" # Readline currently brakes build. #IUSE="${IUSE} readline" DEPEND=">=sys-devel/make-3.80 >=sys-libs/zlib-1.1.4 >=sys-devel/flex-2.5.4a >=sys-devel/bison-1.35 >=sys-libs/ncurses-5.3 >=sys-libs/gdbm-1.8.0 >=sys-devel/gcc-3.2.2 sys-apps/man >=sci-libs/proj-4.4.7 blas? ( >=sci-libs/blas-atlas ) fftw? ( =sci-libs/fftw-2* ) gdal? ( >=sci-libs/gdal-1.1.9 ) jpeg? ( media-libs/jpeg ) lapack? ( >=sci-libs/lapack ) motif? ( x11-libs/openmotif ) mysql? ( dev-db/mysql ) odbc? ( >=dev-db/unixODBC-2.0.6 ) png? ( >=media-libs/libpng-1.2.2 ) postgres? ( >=dev-db/postgresql-7.3 ) tcltk? ( >=dev-lang/tcl-8.3.4 >=dev-lang/tk-8.3.4 ) tiff? ( >=media-libs/tiff-3.5.7 ) truetype? ( >=media-libs/freetype-2.0.0 ) X? ( virtual/x11 )" src_compile() { # enable gmake and disable readline are hacks MYCONF=" --prefix=/usr --without-readline --enable-gmake" # Grass expects freetype to be in freetype dir, but it is in freetype2/freetype if use truetype; then MYCONF="${MYCONF} --with-freetype-includes=/usr/include/freetype2/ " fi use mysql \ && MYCONF="${MYCONF} --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql" \ || MYCONF="${MYCONF} --without-mysql" ./configure \ `use_with X x` \ `use_with gdal gdal` \ `use_with tcltk tcltk` \ `use_with postgres postgres` \ `use_with motif motif` \ `use_with blas blas` \ `use_with lapack lapack` \ `use_with fftw fftw` \ `use_with truetype freetype` \ `use_with jpeg jpeg` \ `use_with png png` \ `use_with tiff tiff` \ `use_with odbc odbc` \ `use_enable amd64 64bit` \ `use_with opengl opengl` \ ${MYCONF} || die "Error: configure failed!" emake -j1 || die "Error: emake failed!" } src_install() { make install \ prefix=${D}/usr UNIX_BIN=${D}/usr/bin BINDIR=${D}/usr/bin PREFIX=${D}/usr \ || die "Error: make install failed!" sed -i "s:^GISBASE=.*$:GISBASE=/usr/grass54:" \ ${D}/usr/bin/grass54 # Install grass always in one directory mv ${D}/usr/${P} ${D}/usr/grass54 }