summaryrefslogtreecommitdiff
blob: e6ab8893aaf7601a57702e582ec80f08c57ffe2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

ESVN_REPO_URI="https://gigi.svn.sourceforge.net/svnroot/gigi/trunk/GG"
EAPI=2
inherit eutils flag-o-matic cmake-utils subversion

DESCRIPTION="GiGi (aka GG) is a GUI library for OpenGL."
HOMEPAGE="http://gigi.sourceforge.net/"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="devil sdl ogre ois doc debug threads eve examples"

DEPEND="
	devil? ( media-libs/devil )
	!devil? (
		media-libs/jpeg
		media-libs/libpng
		media-libs/tiff
		sys-libs/zlib
	)
	sdl? ( media-libs/libsdl )
	ogre? ( dev-games/ogre )
	ois? ( dev-games/ois )
	doc? ( app-doc/doxygen )
	media-libs/freetype
	>=dev-libs/boost-1.36
	media-libs/mesa
	x11-libs/libX11
	x11-libs/libXext
	x11-libs/libSM
	x11-libs/libICE
	sys-libs/glibc"
RDEPEND="${DEPEND}"

get_boost_ver() {
	local link="$(readlink /usr/include/boost)"
	echo "${link%%/*}"
}

pkg_setup() {
	die
}

src_prepare() {
	epatch "${FILESDIR}/${P}_eve-fix.patch"
	append-ldflags -Wl,--no-as-needed
}

src_configure() {
	local mycmakeargs=(
		"-DBOOST_INCLUDEDIR=/usr/include/$(get_boost_ver)"
		$(cmake-utils_use devil USE_DEVIL)
		$(cmake-utils_use_build sdl SDL_DRIVER)
		$(cmake-utils_use_build ogre OGRE_DRIVER)
		$(cmake-utils_use_build ois OGRE_OIS_DRIVER)
		$(cmake-utils_use_build doc DOCUMENTATION)
		$(cmake-utils_use_build threads MULTI_THREADED)
		$(cmake-utils_use_build eve EXPERIMENTAL_EVE_SUPPORT)
		$(cmake-utils_use_build debug)
		$(cmake-utils_use_build examples TUTORIALS)
	)

	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install

	if use doc; then
		dohtml -r -A png "${D}"/usr/doc/GG
		rm -r "${D}"/usr/doc
	fi
}