diff options
-rw-r--r-- | dev-games/cegui/cegui-0.7.1.ebuild | 137 | ||||
-rw-r--r-- | dev-games/cegui/files/cegui-0.7.1-pkgconfig.patch | 20 | ||||
-rw-r--r-- | dev-games/cegui/files/cegui-0.7.1-tinyxml.patch | 16 |
3 files changed, 173 insertions, 0 deletions
diff --git a/dev-games/cegui/cegui-0.7.1.ebuild b/dev-games/cegui/cegui-0.7.1.ebuild new file mode 100644 index 0000000..9224608 --- /dev/null +++ b/dev-games/cegui/cegui-0.7.1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit autotools eutils multilib + +EAPI="2" + +MY_P=CEGUI-${PV} +MY_D=CEGUI-DOCS-${PV} +DESCRIPTION="Crazy Eddie's GUI System is a free library providing windowing and widgets for graphics APIs / engines where such functionality is not natively available, or severely lacking. The library is object orientated, written in C++, and targeted at games developers who should be spending their time creating great games, not building GUI sub-systems!" +HOMEPAGE="http://www.cegui.org.uk/" +SRC_URI="mirror://sourceforge/crayzedsgui/${MY_P}.tar.gz + doc? ( mirror://sourceforge/crayzedsgui/${MY_D}.tar.gz )" + +LICENSE="MIT" +SLOT="0.7" +KEYWORDS="~amd64 ~x86" +IUSE="debug devil doc examples expat freeimage gtk irrlicht libxml lua ogre opengl tinyxml xerces-c" #static + +RDEPEND="dev-libs/libpcre + media-libs/freetype:2 + tinyxml? ( dev-libs/tinyxml ) + devil? ( media-libs/devil ) + doc? ( app-doc/doxygen ) + expat? ( dev-libs/expat ) + freeimage? ( media-libs/freeimage ) + irrlicht? ( dev-games/irrlicht ) + lua? ( + dev-lang/lua + ) + ogre? ( dev-games/ogre ) + opengl? ( + virtual/opengl + virtual/glu + media-libs/glew + ) + xerces-c? ( dev-libs/xerces-c ) + libxml? ( dev-libs/libxml2 )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}/${P}-pkgconfig.patch" + epatch "${FILESDIR}/${P}-tinyxml.patch" + + if use examples ; then + cp -r Samples Samples.clean + rm -f $(find Samples.clean -name 'Makefile*') + fi + + #fix Makefiles for sloting ... some aren't using --includedir= + sed -e "s/prefix)\/include/includedir)/g" \ + -i $(grep -lr "\$(prefix)/include" --include=Makefile.am .) &> /dev/null + + if use freeimage; then + einfo "Patching freeimage dynamic linking" + + sed -e "s:\(FreeImage_LIBS=\).*:\1\"`pkg-config --static --libs freeimage`\":" \ + -e "s:AC_SEARCH_LIBS(FreeImage_GetVersion, freeimage, \[cegui_with_freeimage_lib=yes\], \[cegui_with_freeimage_lib=no\]):cegui_with_freeimage_lib=yes:" \ + acinclude.m4 -i ||\ + die 'freeimage patch failed' + + eend $? + fi + eautomake +} + +src_configure() { + econf \ + --libdir="/usr/$(get_libdir)/${P}" \ + --includedir="/usr/include/${P}" \ + --datarootdir="/usr/share/${P}" \ + --datadir="/usr/share/${P}" \ + $(use_enable debug) \ + $(use_enable devil) \ + $(use_enable expat) \ + $(use_enable freeimage) \ + $(use_enable irrlicht irrlicht-renderer) \ + $(use_enable lua external-toluapp) \ + $(use_enable lua lua-module) \ + $(use_enable lua toluacegui) \ + $(use_enable opengl external-glew) \ + $(use_enable opengl opengl-renderer) \ + $(use_enable xerces-c) \ + $(use_enable libxml) \ + $(use_enable ogre ogre-renderer) \ + $(use_enable tinyxml) \ + $(use_enable tinyxml external-tinyxml) \ + --enable-tga \ + --disable-corona \ + --disable-dependency-tracking \ + --disable-samples \ + --disable-silly \ + $(use_with gtk gtk2) +# $(use_enable static) \ +# $(use_enable !static shared) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + #remove .la files + rm -f $(find ${D}/usr/$(get_libdir)/${P} -name *.la) + + #rename binarys + find ${D}/usr/bin -type f -print0 | xargs -0 -I \{\} mv \{\} \{\}-${PV} + + #move and rename pkgconfig files + mv "${D}/usr/$(get_libdir)/${P}/pkgconfig" "${D}/usr/$(get_libdir)" + cd "${D}/usr/$(get_libdir)/pkgconfig" + find -type f -print0 | xargs -0 -I \{\} basename \{\} .pc | \ + xargs -I \{\} mv \{\}.pc \{\}-${PV}.pc + cd ${S} + + if use doc ; then + emake html || die "emake html failed" + dohtml -r doc/doxygen/html/* || die "dohtml failed" + fi + if use examples ; then + insinto /usr/share/doc/${PF}/Samples + doins -r Samples.clean/* || die "doins failed" + fi + + if use freeimage; then + PKG_FILE="${D}/usr/$(get_libdir)/pkgconfig/CEGUI-${PV}.pc" + awk '$0 ~ /^Requires:/ { if (split($0, req, ":") == 2) old_req=req[2] } \ + $0 !~ /^Requires:/ { print $0 } \ + END { print "Requires: freeimage " old_req }' \ + "${PKG_FILE}" > "${PKG_FILE}.new" + + mv "${PKG_FILE}"{.new,} + fi +} + diff --git a/dev-games/cegui/files/cegui-0.7.1-pkgconfig.patch b/dev-games/cegui/files/cegui-0.7.1-pkgconfig.patch new file mode 100644 index 0000000..b5784f8 --- /dev/null +++ b/dev-games/cegui/files/cegui-0.7.1-pkgconfig.patch @@ -0,0 +1,20 @@ +diff -rupN a/cegui/CEGUI-OGRE.pc.in b/cegui/CEGUI-OGRE.pc.in +--- a/cegui/CEGUI-OGRE.pc.in 2009-10-16 00:46:37.000000000 +1100 ++++ b/cegui/CEGUI-OGRE.pc.in 2009-11-06 14:42:27.000000000 +1100 +@@ -7,5 +7,5 @@ datafiles=@datarootdir@/@PACKAGE@ + Name: CEGUI Ogre Renderer + Description: Ogre based renderer module for CEGUI. + Version: @VERSION@ +-Requires: OGRE >= 1.6.0,CEGUI = @VERSION@ ++Requires: OGRE >= 1.6.0,CEGUI-@VERSION@ = @VERSION@ + Libs: -lCEGUIOgreRenderer@cegui_bsfx@ +diff -rupN a/cegui/CEGUI-OPENGL.pc.in b/cegui/CEGUI-OPENGL.pc.in +--- a/cegui/CEGUI-OPENGL.pc.in 2009-10-16 00:46:37.000000000 +1100 ++++ b/cegui/CEGUI-OPENGL.pc.in 2009-11-06 14:42:45.000000000 +1100 +@@ -7,5 +7,5 @@ datafiles=@datarootdir@/@PACKAGE@ + Name: CEGUI OpenGL Renderer + Description: OpenGL based renderer module for CEGUI. + Version: @VERSION@ +-Requires: CEGUI = @VERSION@ ++Requires: CEGUI-@VERSION@ = @VERSION@ + Libs: -lCEGUIOpenGLRenderer@cegui_bsfx@ diff --git a/dev-games/cegui/files/cegui-0.7.1-tinyxml.patch b/dev-games/cegui/files/cegui-0.7.1-tinyxml.patch new file mode 100644 index 0000000..74afe56 --- /dev/null +++ b/dev-games/cegui/files/cegui-0.7.1-tinyxml.patch @@ -0,0 +1,16 @@ +diff -Naur CEGUI-0.7.1/cegui/src/XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.cpp CEGUI-0.7.1/cegui/src/XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.cpp +--- CEGUI-0.7.1/cegui/src/XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.cpp 2009-03-01 23:08:49.000000000 +0100 ++++ CEGUI-0.7.1/cegui/src/XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.cpp 2010-06-19 09:19:46.000000000 +0200 +@@ -131,10 +131,10 @@ + { + switch(childNode->Type()) + { +- case CEGUI_TINYXML_NAMESPACE::TiXmlNode::ELEMENT: ++ case CEGUI_TINYXML_NAMESPACE::TiXmlNode::TINYXML_ELEMENT: + processElement(childNode->ToElement()); + break; +- case CEGUI_TINYXML_NAMESPACE::TiXmlNode::TEXT: ++ case CEGUI_TINYXML_NAMESPACE::TiXmlNode::TINYXML_TEXT: + if (childNode->ToText()->Value() != '\0') + d_handler->text((utf8*)childNode->ToText()->Value()); + break; |