summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-10-31 20:37:20 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-10-31 20:37:20 +0000
commite584d2f6fb346edc99fddf84293e3e0a2afe8732 (patch)
tree30f0c7f913de02406278f9699c7925ffcf7d2743 /dev-games/mygui
parentwhitespace (diff)
downloadgentoo-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')
-rw-r--r--dev-games/mygui/ChangeLog11
-rw-r--r--dev-games/mygui/Manifest7
-rw-r--r--dev-games/mygui/files/mygui-3.2.0-FHS.patch63
-rw-r--r--dev-games/mygui/files/mygui-3.2.0-build.patch72
-rw-r--r--dev-games/mygui/files/mygui-3.2.0-underlinking.patch20
-rw-r--r--dev-games/mygui/metadata.xml16
-rw-r--r--dev-games/mygui/mygui-3.2.0-r1.ebuild124
7 files changed, 313 insertions, 0 deletions
diff --git a/dev-games/mygui/ChangeLog b/dev-games/mygui/ChangeLog
new file mode 100644
index 000000000000..d018a35304dd
--- /dev/null
+++ b/dev-games/mygui/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for dev-games/mygui
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-games/mygui/ChangeLog,v 1.1 2012/10/31 20:37:20 hasufell Exp $
+
+*mygui-3.2.0-r1 (31 Oct 2012)
+
+ 31 Oct 2012; Julian Ospald <hasufell@gentoo.org> +mygui-3.2.0-r1.ebuild,
+ +files/mygui-3.2.0-FHS.patch, +files/mygui-3.2.0-build.patch,
+ +files/mygui-3.2.0-underlinking.patch, +metadata.xml:
+ initial import wrt #261895
+
diff --git a/dev-games/mygui/Manifest b/dev-games/mygui/Manifest
new file mode 100644
index 000000000000..184f95fe23a8
--- /dev/null
+++ b/dev-games/mygui/Manifest
@@ -0,0 +1,7 @@
+AUX mygui-3.2.0-FHS.patch 1672 SHA256 098414560499f620b42a46832d4a3ff002582399224c2fdf53adf440d47bb3e5 SHA512 76e78fdf0fcf79765997279d4eb7594255cb3a42c5042ea3d849210a34b16dc86f0e32f829b45ab4045f7e9fee32953ec868915f1d591f0fd4dde94675e0075c WHIRLPOOL a58b552331854da185ce3b2518e40823d2545b7f731936cba3f389c5890cf014acd75b56e320856e9004518d65842c001a2e2d4067431af2aa633c76318490c3
+AUX mygui-3.2.0-build.patch 2816 SHA256 3ca747abd0eafbb4bd67076cdb8a739cec2192bc33467adfd13ab6228b3aa8ae SHA512 cdee522192db35213530c195c525e0bfd6bbb2d6cf041d0e4fec923bf2665d6c5c813933725167d5106097ee06040e790d9d2fa5a31a6e421215387159125020 WHIRLPOOL c6534d64de21ca2f7e2b00b6162287b0ced253b698006112d2d736b49c41c3db8a20c4a2fbc5ee6729374c362697c3c4a76b4b785d3124497a3be55c55587278
+AUX mygui-3.2.0-underlinking.patch 398 SHA256 7ae82493e90b9543bf592060348adff59b64c5469ea3b3d08a44f416ac27a614 SHA512 ad0e5e0e8aacdb65ea9195175f597eb95f265b07d0154482f2380ae6e837672d5d41b6d43b1266abb12dec319625426dd65a892aca7fdca297131bd4db2312b9 WHIRLPOOL 195a7786c561b9844e8385dd562e336ef88feeff13d1703e246a34bf28a9f6919c9ba9899bbe50b5f2f0b25efc7b5916046bec083f8ddd20168da8b4d3caf890
+DIST MyGUI_3.2.0.zip 14383788 SHA256 1704006f364b733b2d2cc6807c6dc10833cf695542b797aee50b8fd061eea19a SHA512 8ff8de065a6f355a03e45bfeac6d8db706ee7a122346f41ef26664dc8280d4d1cba8ac943afbaae27c5a1b7fb8bfa8729a1758cc87e8764370284aec943f9278 WHIRLPOOL 982c8fd9e714d7ebc5583a884953ef41fd6a2b2c1f62ec56bc81768ee607135116c14973e3eb4f528e636cf3ca1df6dd155931ea93b26fe537a66cb09a44aba4
+EBUILD mygui-3.2.0-r1.ebuild 3070 SHA256 4ba1f7b48baa4b0797e52cefd768925971eda25d7b1090cb110119be41fe15e8 SHA512 afd22a3729fe6a40f8596ce61fb9c3c7f23426b88f01b4a02f0292aaaab3c17d54b16ecf5c1cba15814616d0e4f7839c47dc7ee6b0f4c2569a3a6c3cb5a09434 WHIRLPOOL 88db86953ae4fe2cefc21811d808b3b966e2442f553f693ac48b9910db5e417a3c3da26e333ebb3218715fd6b9974acc31b7f2f9e373d6affa5623a3248410d7
+MISC ChangeLog 372 SHA256 18f858c2aa0510cf1374b3baf6a86abed4840e7343d05dc7e16968e8b3127167 SHA512 6329d6b1aa254dd55bfc1dcba96c617ed461a4f2bb1e04c23e96bbdb8a154bc3802ce0a99dad66b801d992c4016a362cc3789dc8f9f2ba4f62c99902f8fa731d WHIRLPOOL 2778a53ca2de454a9f0e50dfdbffc7259ad52894ad675d02b50603229d2853371d6deaa136444e561b6a0d550e8a07137c616554e9353b84ab2f02fefd07870c
+MISC metadata.xml 525 SHA256 4612f10cdff359390cde9af1071583f9bd474a36c6754fe48d01e1b66406ad4c SHA512 482be5695587a0fdad82e6b7983f4335f265bef0c1adeb90e8054d3f10df64f8b5ca40989130f077ca9ae967f4b2e34e671516a84a00262c423f7e7fb1b73c0c WHIRLPOOL fb24cc9da2fb1e883c4d595c72c65ef5aa0ae2339688a6c6bde2e2e6e4f5648f7087b2496e0c6874a05a2d7fbaf2a54fbb048e3184dd6b184b8c561f27bee7a8
diff --git a/dev-games/mygui/files/mygui-3.2.0-FHS.patch b/dev-games/mygui/files/mygui-3.2.0-FHS.patch
new file mode 100644
index 000000000000..7c0c88a2caa7
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.2.0-FHS.patch
@@ -0,0 +1,63 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Oct 27 22:39:31 UTC 2012
+Subject: FHS
+
+paths hardcoded until upstream fixed the logic
+
+--- Common/Base/Ogre/BaseManager.cpp
++++ Common/Base/Ogre/BaseManager.cpp
+@@ -47,14 +47,14 @@
+ mWindow(nullptr),
+ mExit(false),
+ mPluginCfgName("plugins.cfg"),
+- mResourceXMLName("resources.xml"),
++ mResourceXMLName("/etc/MYGUI/resources.xml"),
+ mResourceFileName("MyGUI_Core.xml"),
+ mNode(nullptr)
+ {
+ #if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
+ mResourcePath = macBundlePath() + "/Contents/Resources/";
+ #else
+- mResourcePath = "";
++ mResourcePath = "/etc/MYGUI/";
+ #endif
+ }
+
+@@ -65,12 +65,16 @@
+ bool BaseManager::create()
+ {
+ Ogre::String pluginsPath;
++ char *homedir;
++ homedir = getenv("HOME");
++ std::string homePath;
++ homePath = homedir;
+
+ #ifndef OGRE_STATIC_LIB
+ pluginsPath = mResourcePath + mPluginCfgName;
+ #endif
+
+- mRoot = new Ogre::Root(pluginsPath, mResourcePath + "ogre.cfg", mResourcePath + "Ogre.log");
++ mRoot = new Ogre::Root(pluginsPath, homePath + "/mygui-ogre.cfg", homePath + "/mygui-Ogre.log");
+
+ setupResources();
+
+--- CMake/InstallResources.cmake
++++ CMake/InstallResources.cmake
+@@ -24,7 +24,7 @@
+ else ()
+ install(FILES
+ ${MYGUI_BINARY_DIR}/bin/${FILENAME}
+- DESTINATION "bin"
++ DESTINATION "/etc/MYGUI"
+ )
+ endif ()
+ endfunction(install_file)
+@@ -51,7 +51,7 @@
+ if (WIN32)
+ set(MYGUI_MEDIA_DIR "../../Media")
+ elseif (UNIX)
+- set(MYGUI_MEDIA_DIR "../share/MYGUI/Media")
++ set(MYGUI_MEDIA_DIR "${CMAKE_INSTALL_PREFIX}/share/MYGUI/Media")
+ else ()
+ set(MYGUI_MEDIA_DIR "../../Media")
+ endif ()
diff --git a/dev-games/mygui/files/mygui-3.2.0-build.patch b/dev-games/mygui/files/mygui-3.2.0-build.patch
new file mode 100644
index 000000000000..f1f0f1cc94e3
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.2.0-build.patch
@@ -0,0 +1,72 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Jun 15 21:58:45 UTC 2012
+
+use proper destinations and allow Gentoo build type
+rename demo targets to avoid confusion
+
+--- CMake/Utils/MyGUIConfigTargets.cmake
++++ CMake/Utils/MyGUIConfigTargets.cmake
+@@ -1,6 +1,8 @@
+ # Configure settings and install targets
+ # FIXME: Copypasted from Ogre and need lots of changes
+
++include(GNUInstallDirs)
++
+ if (WIN32)
+ set(MYGUI_RELEASE_PATH "/Release")
+ set(MYGUI_RELWDBG_PATH "/RelWithDebInfo")
+@@ -56,6 +58,12 @@
+ # install targets according to current build type
+ function(mygui_install_target TARGETNAME SUFFIX)
+ install(TARGETS ${TARGETNAME}
++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" CONFIGURATIONS Gentoo ""
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" CONFIGURATIONS Gentoo ""
++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" CONFIGURATIONS Gentoo ""
++ FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Gentoo ""
++ )
++ install(TARGETS ${TARGETNAME}
+ RUNTIME DESTINATION "bin${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None ""
+ LIBRARY DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
+ ARCHIVE DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
+@@ -170,7 +178,13 @@
+ endif ()
+ add_executable(${PROJECTNAME} ${MYGUI_EXEC_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
+ endif ()
+- set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER})
++
++ # rename demo target
++ if (${SOLUTIONFOLDER} STREQUAL "Demos")
++ set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER} OUTPUT_NAME MYGUI-${PROJECTNAME})
++ else()
++ set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER})
++ endif()
+
+ add_dependencies(${PROJECTNAME} MyGUIEngine Common)
+
+@@ -326,4 +340,4 @@
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ set_property(TARGET ${PROJECTNAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
+ endif ()
+-endfunction(mygui_config_sample)
+\ No newline at end of file
++endfunction(mygui_config_sample)
+--- CMake/ConfigureBuild.cmake
++++ CMake/ConfigureBuild.cmake
+@@ -4,6 +4,8 @@
+ # also prepare package files for pkg-config and CMake.
+ #######################################################################
+
++include(GNUInstallDirs)
++
+ # should we build static libs?
+ if (MYGUI_STATIC)
+ set(MYGUI_LIB_TYPE STATIC)
+@@ -47,7 +49,7 @@
+ else ()
+ configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
+ endif ()
+- install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION lib/pkgconfig)
++ install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+ # configure additional packages
+
diff --git a/dev-games/mygui/files/mygui-3.2.0-underlinking.patch b/dev-games/mygui/files/mygui-3.2.0-underlinking.patch
new file mode 100644
index 000000000000..2d1026856f03
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.2.0-underlinking.patch
@@ -0,0 +1,20 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Jun 15 10:42:42 UTC 2012
+Subject: build system
+
+fix underlinking
+
+--- MyGUIEngine/CMakeLists.txt
++++ MyGUIEngine/CMakeLists.txt
+@@ -48,7 +48,10 @@
+ if (MYGUI_USE_FREETYPE)
+ target_link_libraries(${PROJECTNAME}
+ ${FREETYPE_LIBRARIES}
+- )
++ dl)
++else()
++ target_link_libraries(${PROJECTNAME}
++ dl)
+ endif()
+
+ # platform specific dependencies
diff --git a/dev-games/mygui/metadata.xml b/dev-games/mygui/metadata.xml
new file mode 100644
index 000000000000..5dac17a44512
--- /dev/null
+++ b/dev-games/mygui/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <use>
+ <flag name="linguas_ru">Install some additional russian docs if 'doc' useflag enabled</flag>
+ <flag name="plugins">Build MyGUI plugins</flag>
+ <flag name="samples">Install MyGUI demos</flag>
+ <flag name="tools">Build the tools for development</flag>
+ </use>
+</pkgmetadata>
+
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
+}