summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <steils@gentoo.org>2021-11-16 09:20:34 +0200
committerStefan Strogin <steils@gentoo.org>2021-11-16 08:06:59 +0000
commit9def8a59b19109ab55dbe0ea7486235e8fb71d0b (patch)
tree5d15617d4d0fc4e3bd98723e8207556db9a84cef
parentwww-servers/apache: x86 stable wrt bug #823898 (diff)
downloadgentoo-9def8a59b19109ab55dbe0ea7486235e8fb71d0b.tar.gz
gentoo-9def8a59b19109ab55dbe0ea7486235e8fb71d0b.tar.bz2
gentoo-9def8a59b19109ab55dbe0ea7486235e8fb71d0b.zip
dev-games/mygui: upgrade to 3.4.1
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Stefan Strogin <steils@gentoo.org>
-rw-r--r--dev-games/mygui/Manifest1
-rw-r--r--dev-games/mygui/files/mygui-3.4.1-FHS.patch27
-rw-r--r--dev-games/mygui/files/mygui-3.4.1-build.patch52
-rw-r--r--dev-games/mygui/mygui-3.4.1.ebuild157
4 files changed, 237 insertions, 0 deletions
diff --git a/dev-games/mygui/Manifest b/dev-games/mygui/Manifest
index 0a6549d14952..6d4d6c2c981b 100644
--- a/dev-games/mygui/Manifest
+++ b/dev-games/mygui/Manifest
@@ -1,2 +1,3 @@
DIST MyGUI3.2.2.tar.gz 22081236 BLAKE2B 3a28e0838a8203d20565822d5a19423a733149cca250dc4169de43f22beb7d37fccbf3d282ea9b4f284cb71df2df9a9073bac40124e1d8a90d15c5fda2af798a SHA512 1290ce1d78b9e4bfe72bea3fb1bc6cdd25969b44be2844df62a1f425b3e221a68b61658fdf45271fb50a1957f12b5ada1c9be971e00ecfe41f53ae0a83ae18d4
DIST mygui-3.4.0.tar.gz 22391483 BLAKE2B 5628cca98625285368b9363acd95e541e1ba7d86fd1d471f687c553d0f0abd9ccb2f47981cf0bb91f44a68489bb7ec3fbcb451734758e2435ab9ef320214465a SHA512 3f560fd9c7e5b514da40e41c7753dc20649f80b763f5ee20afc9627df3be14242ea833eff09eac16b9e88b1c9fbed7c09def0c5068c832e710c247191fb53487
+DIST mygui-3.4.1.tar.gz 22433198 BLAKE2B 400f88a63df1bff5554236a0aeb58218fdb6100aa84f9eb1ac111adabfa45ae7eb1c3124bb04f3ef57587566e716d3242daa9cb5866d7ccc43a56c9605952411 SHA512 9d36272345b1a755db88848c8a0919feb6f8ae09d048efa3b8ed833bb5ddb9c65e1e7e0d26ad39eecd2a4de53fb654f4099c555e9ebd21ce9541a1a74580ef05
diff --git a/dev-games/mygui/files/mygui-3.4.1-FHS.patch b/dev-games/mygui/files/mygui-3.4.1-FHS.patch
new file mode 100644
index 000000000000..b6d7bbe8e327
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.4.1-FHS.patch
@@ -0,0 +1,27 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Oct 27 22:39:31 UTC 2012
+Subject: FHS
+
+paths hardcoded until upstream fixed the logic
+
+--- mygui-MyGUI3.2.2.orig/CMake/InstallResources.cmake
++++ mygui-MyGUI3.2.2/CMake/InstallResources.cmake
+@@ -24,7 +24,7 @@
+ else ()
+ install(FILES
+ ${MYGUI_BINARY_DIR}/bin/${FILENAME}
+- DESTINATION "bin"
++ DESTINATION "/etc/MYGUI"
+ )
+ endif ()
+ endfunction(install_file)
+@@ -53,7 +53,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.4.1-build.patch b/dev-games/mygui/files/mygui-3.4.1-build.patch
new file mode 100644
index 000000000000..5729be5d4380
--- /dev/null
+++ b/dev-games/mygui/files/mygui-3.4.1-build.patch
@@ -0,0 +1,52 @@
+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)
+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/mygui-3.4.1.ebuild b/dev-games/mygui/mygui-3.4.1.ebuild
new file mode 100644
index 000000000000..4c022f900304
--- /dev/null
+++ b/dev-games/mygui/mygui-3.4.1.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_REMOVE_MODULES_LIST="FindFreetype"
+inherit cmake 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}-build.patch
+ "${FILESDIR}"/${P}-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
+ -DMYGUI_BUILD_PLUGINS=$(usex plugins)
+ -DMYGUI_BUILD_DEMOS=OFF
+ -DMYGUI_INSTALL_DEMOS=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_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_DEMOS=ON
+ )
+ else
+ mycmakeargs+=(
+ -DMYGUI_BUILD_DEMOS=OFF
+ -DMYGUI_INSTALL_DEMOS=OFF
+ )
+
+ fi
+
+ if use tools || (use samples && use ogre) ; then
+ mycmakeargs+=( -DMYGUI_INSTALL_MEDIA=ON )
+ else
+ mycmakeargs+=( -DMYGUI_INSTALL_MEDIA=OFF )
+ fi
+
+ cmake_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_src_compile
+ fi
+
+ cmake_src_compile
+
+ use doc && emake -C "${CMAKE_BUILD_DIR}"/Docs api-docs
+}
+
+src_install() {
+ cmake_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
+}