Created
August 24, 2012 16:23
-
-
Save hasufell/3452506 to your computer and use it in GitHub Desktop.
simgear-2.8.0.ebuild
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 1999-2012 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Header: /var/cvsroot/gentoo-x86/dev-games/simgear/simgear-2.4.0.ebuild,v 1.5 2012/07/10 04:52:20 xmw Exp $ | |
EAPI=4 | |
inherit eutils cmake-utils | |
DESCRIPTION="Development library for simulation games" | |
HOMEPAGE="http://www.simgear.org/" | |
SRC_URI="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/${P}.tar.bz2" | |
LICENSE="GPL-2" | |
SLOT="0" | |
KEYWORDS="~amd64 ~ppc ~x86" | |
IUSE="debug jpeg static-libs svn test" | |
RDEPEND=">=dev-games/openscenegraph-3.0.1 | |
>=dev-libs/boost-1.37 | |
media-libs/freealut | |
media-libs/openal | |
>=media-libs/plib-1.8.5 | |
sys-libs/zlib | |
virtual/opengl | |
jpeg? ( virtual/jpeg ) | |
svn? ( dev-libs/apr | |
dev-vcs/subversion )" | |
DEPEND="${RDEPEND}" | |
DOCS=( AUTHORS ChangeLog NEWS README Thanks ) | |
S_STATIC=${WORKDIR}/${P}_static_build | |
src_prepare() { | |
epatch "${FILESDIR}"/${P}-underlinking.patch | |
} | |
src_configure() { | |
local mycmakeargs_common mycmakeargs | |
mycmakeargs_common=( | |
$(cmake-utils_use jpeg JPEG_FACTORY) | |
$(cmake-utils_use_enable svn LIBSVN) | |
$(cmake-utils_use_enable test TESTS) | |
) | |
mycmakeargs=( | |
${mycmakeargs_common[@]} | |
-DSIMGEAR_SHARED=ON | |
) | |
cmake-utils_src_configure | |
# build system does not allow to compile shared and static in one blow | |
# running two builds here | |
if use static-libs ; then | |
mycmakeargs=( | |
${mycmakeargs_common[@]} | |
-DSIMGEAR_SHARED=OFF | |
) | |
CMAKE_BUILD_DIR="${S_STATIC}" cmake-utils_src_configure | |
fi | |
} | |
src_compile() { | |
cmake-utils_src_compile | |
if use static-libs ; then | |
CMAKE_BUILD_DIR="${S_STATIC}" cmake-utils_src_compile | |
fi | |
} | |
src_install() { | |
cmake-utils_src_install | |
if use static-libs ; then | |
find "${S_STATIC}" -name "lib*.a" -exec dolib.a '{}' \; \ | |
|| die "installing static libs failed" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment