diff options
author | Julian Ospald <hasufell@gentoo.org> | 2012-10-31 20:37:20 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2012-10-31 20:37:20 +0000 |
commit | e584d2f6fb346edc99fddf84293e3e0a2afe8732 (patch) | |
tree | 30f0c7f913de02406278f9699c7925ffcf7d2743 /dev-games/mygui/mygui-3.2.0-r1.ebuild | |
parent | whitespace (diff) | |
download | gentoo-2-e584d2f6fb346edc99fddf84293e3e0a2afe8732.tar.gz gentoo-2-e584d2f6fb346edc99fddf84293e3e0a2afe8732.tar.bz2 gentoo-2-e584d2f6fb346edc99fddf84293e3e0a2afe8732.zip |
initial import wrt #261895
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'dev-games/mygui/mygui-3.2.0-r1.ebuild')
-rw-r--r-- | dev-games/mygui/mygui-3.2.0-r1.ebuild | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/dev-games/mygui/mygui-3.2.0-r1.ebuild b/dev-games/mygui/mygui-3.2.0-r1.ebuild new file mode 100644 index 000000000000..6f6c0f40ffeb --- /dev/null +++ b/dev-games/mygui/mygui-3.2.0-r1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-games/mygui/mygui-3.2.0-r1.ebuild,v 1.1 2012/10/31 20:37:20 hasufell Exp $ + +EAPI=4 +inherit eutils cmake-utils flag-o-matic multilib + +MY_PN=MyGUI +MY_P=${MY_PN}_${PV} + +DESCRIPTION="A library for creating GUIs for games" +HOMEPAGE="http://mygui.info/" +SRC_URI="mirror://sourceforge/my-gui/${MY_PN}/${MY_P}/${MY_P}.zip" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc plugins samples static-libs test tools linguas_ru" + +RDEPEND="dev-games/ogre[freeimage,opengl] + media-libs/freetype:2 + samples? ( dev-games/ois ) + tools? ( dev-games/ois )" +DEPEND="${RDEPEND} + app-arch/unzip + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +S=${WORKDIR}/${MY_P} +STATIC_BUILD=${WORKDIR}/${P}_build_static + +src_prepare() { + epatch "${FILESDIR}"/${P}-underlinking.patch \ + "${FILESDIR}"/${P}-build.patch \ + "${FILESDIR}"/${P}-FHS.patch +} + +src_configure() { + use debug && append-cppflags -DDEBUG + + local mycmakeargs=() + + # static configuration + if use static-libs ; then + mycmakeargs=( -DMYGUI_STATIC=ON + -DMYGUI_BUILD_DOCS=OFF + -DMYGUI_INSTALL_DOCS=OFF + -DMYGUI_USE_FREETYPE=ON + $(cmake-utils_use plugins MYGUI_BUILD_PLUGINS) + -DMYGUI_BUILD_DEMOS=OFF + -DMYGUI_INSTALL_SAMPLES=OFF + -DMYGUI_BUILD_TOOLS=OFF + -DMYGUI_INSTALL_TOOLS=OFF + -DMYGUI_BUILD_WRAPPER=OFF + -DMYGUI_RENDERSYSTEM=2 ) + + CMAKE_BUILD_DIR=${STATIC_BUILD} cmake-utils_src_configure + unset mycmakeargs + fi + + # main configuration + mycmakeargs=( -DMYGUI_STATIC=OFF + $(cmake-utils_use doc MYGUI_BUILD_DOCS) + $(cmake-utils_use doc MYGUI_INSTALL_DOCS) + -DMYGUI_USE_FREETYPE=ON + $(cmake-utils_use plugins MYGUI_BUILD_PLUGINS) + $(cmake-utils_use samples MYGUI_BUILD_DEMOS) + $(cmake-utils_use samples MYGUI_INSTALL_SAMPLES) + $(cmake-utils_use tools MYGUI_BUILD_TOOLS) + $(cmake-utils_use tools MYGUI_INSTALL_TOOLS) + -DMYGUI_BUILD_WRAPPER=OFF + -DMYGUI_RENDERSYSTEM=2 ) + + if use tools || use samples ; then + mycmakeargs+=( -DMYGUI_INSTALL_MEDIA=ON ) + else + mycmakeargs+=( -DMYGUI_INSTALL_MEDIA=OFF ) + fi + + cmake-utils_src_configure +} + +src_compile() { + # build system does not support building static and shared at once, + # run a double build + if use static-libs ; then + CMAKE_BUILD_DIR=${STATIC_BUILD} cmake-utils_src_compile + fi + + cmake-utils_src_compile + + use doc && emake -C "${CMAKE_BUILD_DIR}"/Docs api-docs +} + +src_install() { + cmake-utils_src_install + + if use static-libs ; then + find "${STATIC_BUILD}" -name "*.a" \! -name "libCommon.a" -exec dolib.a '{}' \; + insinto /usr/$(get_libdir)/pkgconfig + doins "${STATIC_BUILD}"/pkgconfig/MYGUIStatic.pc + fi + + if use doc ; then + dohtml -r "${CMAKE_BUILD_DIR}"/Docs/html/* + + if use linguas_ru ; then + docompress -x /usr/share/doc/${PF}/Papers + dodoc -r Docs/Papers + fi + fi + + # test media not needed at runtime + rm -rf "${D}"/usr/share/MYGUI/Media/UnitTests + # wrapper not available for linux, remove related media + rm -rf "${D}"/usr/share/MYGUI/Media/Wrapper +} + +pkg_postinst() { + einfo + elog "ogre.cfg and Ogre.log are created as" + elog "~/mygui-ogre.cfg and ~/mygui-Ogre.log" + einfo +} |