# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Flight Gear is a free flight simulator project." HOMEPAGE="http://www.flightgear.org/" SRC_URI="ftp://ftp.flightgear.org/pub/fgfs/Source/${P}.tar.gz ftp://ftp.flightgear.org/pub/fgfs/Shared/fgfs-base-${PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" DEPEND="virtual/x11 virtual/opengl >=media-libs/glut-3.7-r2 >=media-libs/SimGear-0.0.18" 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 Oliver's multi-pilot networking support (default: --without-network-olk) myconf="$myconf --with-network-olk" # Include new experimental environment subsystem (default: --without-new-environment) # myconf="$myconf --with-new-environment" # Disable new mouse input support (default: --without-old-mouse) # myconf="$myconf --with-old-mouse" # Include tile loading threads (default: --without-threads) # myconf="$myconf --with-threads" # Disable logging (flightgear default: --with-logging): myconf="$myconf --without-logging" # Compilation seems to hang with -O3, thus set the optimization level to -O2. Adjust this if you experience compilation problems. CXXFLAGS="${CXXFLAGS/-O?/-O2}" # Currently, the directory to extract the base package into is /usr/share. Set with --libdir. ./configure \ --host=${CHOST} \ --prefix=/usr \ --infodir=/usr/share/info \ --mandir=/usr/share/man \ --libdir=/usr/share \ $myconf || die "./configure of FlightGear failed" make || die "make of FlightGear failed" } src_install () { make DESTDIR=${D} install || die "make install of FlightGear failed" dodoc AUTHORS COPYING ChangeLog Docs/* NEWS README Thanks || die "make install of FlightGear failed: dodoc failed" # Install the base package into /usr/share. cp -a ../FlightGear ${D}/usr/share || die "make install of FlightGear failed: Copying the base package failed" }