# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="SimGear is a set of open-source libraries designed to be used as building blocks for quickly assembling 3d simulations, games, and visualization applications. It is part of the FlightGear project." HOMEPAGE="http://www.simgear.org/" SRC_URI="ftp://ftp.simgear.org/pub/simgear/Source/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0" KEYWORDS="x86" DEPEND="virtual/x11 jpeg? ( >=media-libs/jpeg-6b-r2 ) virtual/opengl >=dev-libs/libdnet-1.4 >=media-libs/glut-3.7-r2 >=media-libs/plib-1.6.0 >=dev-db/metakit-2.4.7 >=sys-libs/zlib-1.1.4" RDEPEND=${DEPEND} S=${WORKDIR}/${P} src_compile() { # Workaround for bug described in #5574: # New cpp0 warning of gcc >= 3.1 breaks the configure script. e.g. if a /usr/local/include # directory exists, it gets included in the extra include and lib directories search path # and the warning 'cpp0: warning: changing search order for system directory "/usr/local/include"' # is issued which makes configure mistakenly assume it has not found plib/pu.h. # As a workaround we simply skip any EXTRA_DIRS checks. #cp -a configure configure.original || "could not backup ./configure" #sed -e "s/checking for extra include/skipping check for extra include/" \ # -e "s/^exdirs=.*/exdirs=\"\"/" configure.original > configure || die "patching ./configure failed" local myconf="" # Use the X Window System? use X \ && myconf="$myconf --with-x" \ || myconf="$myconf --without-x" # Include Norman's jpeg image factory support code? use jpeg \ && myconf="$myconf --with-jpeg-factory" \ || myconf="$myconf --without-jpeg-factory" # disable logging (simgear default: --with-logging): myconf="$myconf --without-logging" ./configure \ --build=${CHOST} \ --prefix=/usr \ --infodir=/usr/share/info \ --libdir=/usr/lib \ --mandir=/usr/share/man \ --includedir=/usr/include \ $myconf || die "./configure of SimGear failed" make || die "make of SimGear failed" } src_install () { make DESTDIR=${D} install || die "make install of SimGear failed" dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README* || die "make install of SimGear failed: dodoc failed" }