summaryrefslogtreecommitdiff
path: root/dev-games/mygui
diff options
context:
space:
mode:
Diffstat (limited to 'dev-games/mygui')
-rw-r--r--dev-games/mygui/Manifest4
-rw-r--r--dev-games/mygui/files/mygui-3.4.0-build.patch61
-rw-r--r--dev-games/mygui/files/mygui-3.4.0-underlinking.patch21
-rw-r--r--dev-games/mygui/mygui-3.4.0.ebuild159
4 files changed, 245 insertions, 0 deletions
diff --git a/dev-games/mygui/Manifest b/dev-games/mygui/Manifest
index 624c41f96431..ee69eae76801 100644
--- a/dev-games/mygui/Manifest
+++ b/dev-games/mygui/Manifest
@@ -1,6 +1,10 @@
AUX mygui-3.2.2-FHS.patch 1209 BLAKE2B 7bd14cfe0653ac74df4ab5ac6be69a9d95837795820baf5e0e6a11a03448f57cf761f240d3fa62e2f1ef121ac2e9b48b802edf74905fdf68f6744773f612cbe9 SHA512 21aba7d654a7197423bdeaa06fa79219d850c76248546227ece1f4916072289f0ebf68a9ad9a4569a1d5dfc15cf86762db3c0d4d58f4c233c1b4293ffb35e50e
AUX mygui-3.2.2-build.patch 2801 BLAKE2B c414f7249f63c5addd0c616df3a0ac0979fc7c8565b9c12c8f81007f152c129d868ec9359641ce59abca4b9958bc3fa39bb906b221d66fef4e9df53135bf18da SHA512 954f95759967a1a4f4eb6952f6abbabbe3157703d5d0014299a8cd5060cd5fb0c7faa635ad10e5c23e0bc0c8d8089c29c14952058a7bdcc2643f06c226f5524d
AUX mygui-3.2.2-underlinking.patch 398 BLAKE2B 0e4ebdf58228ac6b6368202c40137feadf5f3adeb4f2e20020d2ed8db6db17a1ca0715e1018a5e851cc8a38163e4607e9f705f20f3190fa09de9de0eb7ab3099 SHA512 ad0e5e0e8aacdb65ea9195175f597eb95f265b07d0154482f2380ae6e837672d5d41b6d43b1266abb12dec319625426dd65a892aca7fdca297131bd4db2312b9
+AUX mygui-3.4.0-build.patch 2492 BLAKE2B 2819c235df3d479d42831fcf2a80a9a2e165b98acc87c7cd3105b5285b0bfa0d0e84ae2c8642d91260096cf2404e9a690812008e92cd5a5167e1dffc89f49809 SHA512 9dc685f71d14e369a8a3fff5e10572817a4d1a943471decb94e3d25133d53c5cc7401f8c360f0bcb1cc1188beb6e1a76521d51cdb88cb1f32eda1715c765da2e
+AUX mygui-3.4.0-underlinking.patch 491 BLAKE2B bc7d2facd04637f4d6b4ca2c2a353a66c16ce781050ecf6f59a461acedaa0dcb6293742bd83214c4e32bdbcda18ae461b9f60e90fd6f450832ba5ef002fb468f SHA512 0cdcd0906b52abc7843ae588d7afd8f1450bcf7162d41efb2af6a3744a64bb6e02ffdcdc6cd3346f72be7f5361a25bf35d937fac983814077deb339ed7b7dbfa
DIST MyGUI3.2.2.tar.gz 22081236 BLAKE2B 3a28e0838a8203d20565822d5a19423a733149cca250dc4169de43f22beb7d37fccbf3d282ea9b4f284cb71df2df9a9073bac40124e1d8a90d15c5fda2af798a SHA512 1290ce1d78b9e4bfe72bea3fb1bc6cdd25969b44be2844df62a1f425b3e221a68b61658fdf45271fb50a1957f12b5ada1c9be971e00ecfe41f53ae0a83ae18d4
+DIST mygui-3.4.0.tar.gz 22391483 BLAKE2B 5628cca98625285368b9363acd95e541e1ba7d86fd1d471f687c553d0f0abd9ccb2f47981cf0bb91f44a68489bb7ec3fbcb451734758e2435ab9ef320214465a SHA512 3f560fd9c7e5b514da40e41c7753dc20649f80b763f5ee20afc9627df3be14242ea833eff09eac16b9e88b1c9fbed7c09def0c5068c832e710c247191fb53487
EBUILD mygui-3.2.2.ebuild 3733 BLAKE2B 0b356da39fa55bd4b53befe2ee1fda7505e6daa61a49b9af0aa7b85e168dd247f8a731b81c65be6046de0d315fcb9fc0237f8818dba3be0a56c0f89fb62c3a12 SHA512 32609bf5200de72f267d493d99bf23c0baf97005e2d8c126ba3638bd5d08f2a26c2430d4801fca91f529946f5aff98687b58eaf17e173627a5bdad29c20c3da8
+EBUILD mygui-3.4.0.ebuild 3758 BLAKE2B 1d456f5e82b7357ae624b19ef43103d55a30df7ba2c9df856cbe22f5a118842cf183eb5a0ff2eaf4d40f6eef95faa5c4b021905845a158ef30e1f93ce2373144 SHA512 eecc3f87a738021a43fc3d48e34fdc1492fd3de557a0f520fda9437669436813635136e1ba4535a406e636b0f64d6abd3274fc8d70100017649eecdc5daf47f7
MISC metadata.xml 2012 BLAKE2B 6f3b20aa2f4f557b3499d98b758d4e402903a6f56580062ae9442b38508abe3841584e550bb20cbce31b93a052ef78231c8ba9568dba1d8bb9459a11f32d625a SHA512 05633f451013eff1de94fc2707bf9df21a2b8e6a8466a988f743ec12e04c12e6e81a0fbc4c74c081905ff81ba45f571459d3584a264ae5347e13cc2b4139ff79
diff --git a/dev-games/mygui/files/mygui-3.4.0-build.patch b/dev-games/mygui/files/mygui-3.4.0-build.patch
new file mode 100644
index 000000000000..71ed87d8bcb8
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.4.0-build.patch
@@ -0,0 +1,61 @@
+diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake
+--- a/CMake/ConfigureBuild.cmake
++++ b/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 @@ if (UNIX)
+ 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/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake
+--- a/CMake/Utils/MyGUIConfigTargets.cmake
++++ b/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")
+@@ -32,6 +34,12 @@ endif ()
+
+ # 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 ""
+@@ -183,7 +191,13 @@ function(mygui_app PROJECTNAME SOLUTIONFOLDER)
+ 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)
+
diff --git a/dev-games/mygui/files/mygui-3.4.0-underlinking.patch b/dev-games/mygui/files/mygui-3.4.0-underlinking.patch
new file mode 100644
index 000000000000..1dcf2dbbbfda
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.4.0-underlinking.patch
@@ -0,0 +1,21 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Jun 15 10:42:42 UTC 2012
+Subject: build system
+
+fix underlinking
+
+diff --git a/MyGUIEngine/CMakeLists.txt b/MyGUIEngine/CMakeLists.txt
+--- a/MyGUIEngine/CMakeLists.txt
++++ b/MyGUIEngine/CMakeLists.txt
+@@ -44,7 +44,10 @@ if (MYGUI_USE_FREETYPE)
+ target_link_libraries(${PROJECTNAME}
+ ${FREETYPE_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+- )
++ dl)
++else()
++ target_link_libraries(${PROJECTNAME}
++ dl)
+ endif()
+
+ # platform specific dependencies
diff --git a/dev-games/mygui/mygui-3.4.0.ebuild b/dev-games/mygui/mygui-3.4.0.ebuild
new file mode 100644
index 000000000000..896d211683f2
--- /dev/null
+++ b/dev-games/mygui/mygui-3.4.0.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_REMOVE_MODULES="yes"
+CMAKE_REMOVE_MODULES_LIST="FindFreetype"
+inherit cmake-utils flag-o-matic multilib
+
+MY_PN=MyGUI
+MY_P=${MY_PN}${PV}
+
+DESCRIPTION="A library for creating GUIs for games and 3D applications"
+HOMEPAGE="http://mygui.info"
+SRC_URI="https://github.com/MyGUI/mygui/archive/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +ogre -opengl plugins samples static-libs test tools l10n_ru"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="ogre? ( !opengl )
+ opengl? ( !ogre )"
+
+RDEPEND="media-libs/freetype:2
+ sys-libs/zlib
+ ogre? (
+ dev-games/ogre:0=[freeimage,opengl]
+ samples? ( dev-games/ois )
+ )
+ opengl? (
+ virtual/opengl
+ media-libs/glew:0=
+ )
+ tools? ( dev-games/ois )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/mygui-${MY_P}
+STATIC_BUILD=${WORKDIR}/${P}_build_static
+
+PATCHES=(
+ "${FILESDIR}"/${P}-underlinking.patch
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${PN}-3.2.2-FHS.patch
+)
+
+pkg_setup() {
+ if use samples && use !ogre ; then
+ ewarn "Samples disabled, because they only work with ogre!"
+ ewarn "Enable ogre USE flag if you want to use samples."
+ fi
+}
+
+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=$(usex opengl "4" "$(usex ogre "3" "1")") )
+
+ CMAKE_BUILD_DIR=${STATIC_BUILD} cmake-utils_src_configure
+ unset mycmakeargs
+ fi
+
+ # main configuration
+ mycmakeargs=(
+ -DMYGUI_STATIC=OFF
+ -DMYGUI_BUILD_DOCS=$(usex doc)
+ -DMYGUI_INSTALL_DOCS=$(usex doc)
+ -DMYGUI_USE_FREETYPE=ON
+ -DMYGUI_BUILD_PLUGINS=$(usex plugins)
+ -DMYGUI_BUILD_TOOLS=$(usex tools)
+ -DMYGUI_INSTALL_TOOLS=$(usex tools)
+ -DMYGUI_USE_SYSTEM_GLEW=$(usex opengl)
+ -DMYGUI_BUILD_WRAPPER=OFF
+ -DMYGUI_RENDERSYSTEM=$(usex opengl "4" "$(usex ogre "3" "1")")
+ )
+
+ if use ogre && use samples; then
+ mycmakeargs+=(
+ -DMYGUI_BUILD_DEMOS=ON
+ -DMYGUI_INSTALL_SAMPLES=ON
+ )
+ else
+ mycmakeargs+=(
+ -DMYGUI_BUILD_DEMOS=OFF
+ -DMYGUI_INSTALL_SAMPLES=OFF
+ )
+
+ fi
+
+ if use tools || (use samples && use ogre) ; 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
+ dodoc -r "${CMAKE_BUILD_DIR}"/Docs/html/
+
+ if use l10n_ru ; then
+ docompress -x /usr/share/doc/${PF}/Papers
+ dodoc -r Docs/Papers
+ fi
+ fi
+
+ keepdir /etc/MYGUI
+ fperms o+w /etc/MYGUI
+
+ # test media not needed at runtime
+ rm -rf "${ED}"/usr/share/MYGUI/Media/UnitTests || die
+ # wrapper not available for linux, remove related media
+ rm -rf "${ED}"/usr/share/MYGUI/Media/Wrapper || die
+}
+
+pkg_postinst() {
+ elog
+ elog "ogre.cfg and Ogre.log are created as"
+ elog "${EROOT}/etc/MYGUI/mygui-ogre.cfg and /etc/MYGUI/mygui-Ogre.log"
+ elog
+}