summaryrefslogtreecommitdiff
blob: 4673a68e8426f3ca3d3c9d21e43a01ab27105d85 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

# TODO: multiple ABI?
PYTHON_COMPAT=( python2_7 )
inherit eutils flag-o-matic cmake-utils python-single-r1

DESCRIPTION="Crazy Eddie's GUI System"
HOMEPAGE="http://www.cegui.org.uk/"
SRC_URI="mirror://sourceforge/crayzedsgui/${P}.tar.bz2"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 -ppc x86"
IUSE="bidi debug devil doc freeimage expat irrlicht lua ogre opengl pcre python static-libs tinyxml truetype xerces-c +xml zip"
REQUIRED_USE="|| ( expat tinyxml xerces-c xml )
	${PYTHON_REQUIRED_USE}" # bug 362223

# gles broken
#	gles? ( media-libs/mesa[gles1] )
# directfb broken
#	directfb? ( dev-libs/DirectFB )
RDEPEND="
	dev-libs/boost:=
	virtual/libiconv
	bidi? ( dev-libs/fribidi )
	devil? ( media-libs/devil )
	expat? ( dev-libs/expat )
	freeimage? ( media-libs/freeimage )
	irrlicht? ( dev-games/irrlicht )
	lua? (
		dev-lang/lua:0
		dev-lua/toluapp
	)
	ogre? ( >=dev-games/ogre-1.7 )
	opengl? (
		virtual/opengl
		virtual/glu
		media-libs/glew:=
	)
	pcre? ( dev-libs/libpcre )
	python? (
		${PYTHON_DEPS}
		dev-libs/boost:=[python,${PYTHON_USEDEP}]
	)
	tinyxml? ( dev-libs/tinyxml )
	truetype? ( media-libs/freetype:2 )
	xerces-c? ( dev-libs/xerces-c )
	xml? ( dev-libs/libxml2 )
	zip? ( sys-libs/zlib[minizip] )"
DEPEND="${RDEPEND}
	${PYTHON_DEPS}
	virtual/pkgconfig
	doc? ( app-doc/doxygen )
	opengl? ( media-libs/glm )"

src_configure() {
	# http://www.cegui.org.uk/mantis/view.php?id=991
	append-ldflags $(no-as-needed)

	local mycmakeargs=(
		-DCEGUI_BUILD_IMAGECODEC_CORONA=OFF
		$(cmake-utils_use devil CEGUI_BUILD_IMAGECODEC_DEVIL)
		$(cmake-utils_use freeimage CEGUI_BUILD_IMAGECODEC_FREEIMAGE)
		-DCEGUI_BUILD_IMAGECODEC_PVR=OFF
		-DCEGUI_BUILD_IMAGECODEC_SILLY=OFF
		-DCEGUI_BUILD_IMAGECODEC_STB=ON
		-DCEGUI_BUILD_IMAGECODEC_TGA=ON
		$(cmake-utils_use lua CEGUI_BUILD_LUA_GENERATOR)
		$(cmake-utils_use lua CEGUI_BUILD_LUA_MODULE)
		$(cmake-utils_use python CEGUI_BUILD_PYTHON_MODULES)
		-DCEGUI_BUILD_RENDERER_DIRECTFB=OFF
		$(cmake-utils_use irrlicht CEGUI_BUILD_RENDERER_IRRLICHT)
		-DCEGUI_BUILD_RENDERER_NULL=ON
		$(cmake-utils_use ogre CEGUI_BUILD_RENDERER_OGRE)
		$(cmake-utils_use opengl CEGUI_BUILD_RENDERER_OPENGL)
		$(cmake-utils_use opengl CEGUI_BUILD_RENDERER_OPENGL3)
		-DCEGUI_BUILD_RENDERER_OPENGLES=OFF
		$(cmake-utils_use static-libs CEGUI_BUILD_STATIC_CONFIGURATION)
		-DCEGUI_BUILD_TESTS=OFF
		$(cmake-utils_use expat CEGUI_BUILD_XMLPARSER_EXPAT)
		$(cmake-utils_use xml CEGUI_BUILD_XMLPARSER_LIBXML2)
		-DCEGUI_BUILD_XMLPARSER_RAPIDXML=OFF
		$(cmake-utils_use tinyxml CEGUI_BUILD_XMLPARSER_TINYXML)
		$(cmake-utils_use xerces-c CEGUI_BUILD_XMLPARSER_XERCES)
		$(cmake-utils_use truetype CEGUI_HAS_FREETYPE)
		$(cmake-utils_use zip CEGUI_HAS_MINIZIP_RESOURCE_PROVIDER)
		$(cmake-utils_use pcre CEGUI_HAS_PCRE_REGEX)
		-DCEGUI_SAMPLES_ENABLED=OFF
		$(cmake-utils_use bidi CEGUI_USE_FRIBIDI)
		-DCEGUI_USE_MINIBIDI=OFF
	)

	cmake-utils_src_configure
}

src_compile() {
	cmake-utils_src_compile
	use doc && emake -C "${BUILD_DIR}" html
}

src_install() {
	cmake-utils_src_install
	use doc && dohtml "${BUILD_DIR}"/doc/doxygen/html/*
}