summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild')
-rw-r--r--media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild30
1 files changed, 24 insertions, 6 deletions
diff --git a/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild b/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild
index ba323bf9c629..bdd6ea47372a 100644
--- a/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild
+++ b/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild,v 1.1 2009/12/22 13:22:35 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild,v 1.2 2010/07/29 22:11:16 ssuominen Exp $
EAPI=2
-inherit cmake-utils flag-o-matic eutils
+inherit cmake-utils flag-o-matic eutils toolchain-funcs
MY_P=${P/m/M}-Source ; MY_P=${MY_P/lib}
@@ -14,23 +14,41 @@ SRC_URI="mirror://sourceforge/projectm/${MY_P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug"
+IUSE="debug openmp video_cards_nvidia"
RDEPEND=">=media-libs/ftgl-2.1.3_rc5
media-libs/freetype:2
media-libs/mesa
media-libs/glew
- sys-libs/zlib"
+ sys-libs/zlib
+ video_cards_nvidia? ( media-gfx/nvidia-cg-toolkit )"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
S=${WORKDIR}/${MY_P}
src_prepare() {
- epatch "${FILESDIR}/${P}-pcfix.patch"
+ epatch "${FILESDIR}"/${P}-pcfix.patch
}
src_configure() {
append-ldflags $(no-as-needed)
+
+ if use video_cards_nvidia; then
+ append-ldflags -L/opt/nvidia-cg-toolkit/lib
+ append-flags -I/opt/nvidia-cg-toolkit/include
+ fi
+
+ mycmakeargs=(
+ $(cmake-utils_use_use video_cards_nvidia CG)
+ "-DUSE_OPENMP=OFF"
+ )
+
+ if use openmp && tc-has-openmp; then
+ mycmakeargs+=(
+ $(cmake-utils_use_use openmp)
+ )
+ fi
+
cmake-utils_src_configure
}