From 52260378f4fd05c7ddb253a6eebc5168b836daf5 Mon Sep 17 00:00:00 2001 From: hasufell Date: Tue, 16 Feb 2016 00:55:13 +0100 Subject: [PATCH] dev-games/mygui: initial import of version 3.2.2 --- metadata/categories.conf | 2 +- .../mygui/files/mygui-3.2.2-FHS.patch | 44 +++++++++++++ .../mygui/files/mygui-3.2.2-build.patch | 61 ++++++++++++++++++ .../files/mygui-3.2.2-underlinking.patch | 20 ++++++ .../dev-games/mygui/mygui-3.2.2.exheres-0 | 64 +++++++++++++++++++ 5 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 packages/dev-games/mygui/files/mygui-3.2.2-FHS.patch create mode 100644 packages/dev-games/mygui/files/mygui-3.2.2-build.patch create mode 100644 packages/dev-games/mygui/files/mygui-3.2.2-underlinking.patch create mode 100644 packages/dev-games/mygui/mygui-3.2.2.exheres-0 diff --git a/metadata/categories.conf b/metadata/categories.conf index e6bd04f..66ef855 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -1,6 +1,6 @@ app-virtualization +dev-games dev-lang -dev-libs dev-util games-board games-rpg diff --git a/packages/dev-games/mygui/files/mygui-3.2.2-FHS.patch b/packages/dev-games/mygui/files/mygui-3.2.2-FHS.patch new file mode 100644 index 0000000..14d2162 --- /dev/null +++ b/packages/dev-games/mygui/files/mygui-3.2.2-FHS.patch @@ -0,0 +1,44 @@ +From: Julian Ospald +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 () +--- mygui-MyGUI3.2.2.orig/Common/Base/Ogre/BaseManager.cpp ++++ mygui-MyGUI3.2.2/Common/Base/Ogre/BaseManager.cpp +@@ -49,13 +49,13 @@ + mWindow(nullptr), + mExit(false), + mPluginCfgName("plugins.cfg"), +- mResourceXMLName("resources.xml"), ++ mResourceXMLName("/etc/MYGUI/resources.xml"), + mResourceFileName("MyGUI_Core.xml") + { + #if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE + mResourcePath = macBundlePath() + "/Contents/Resources/"; + #else +- mResourcePath = ""; ++ mResourcePath = "/etc/MYGUI/"; + #endif + } + diff --git a/packages/dev-games/mygui/files/mygui-3.2.2-build.patch b/packages/dev-games/mygui/files/mygui-3.2.2-build.patch new file mode 100644 index 0000000..a16b27c --- /dev/null +++ b/packages/dev-games/mygui/files/mygui-3.2.2-build.patch @@ -0,0 +1,61 @@ +diff -ru mygui-MyGUI3.2.2.orig/CMake/ConfigureBuild.cmake mygui-MyGUI3.2.2/CMake/ConfigureBuild.cmake +--- mygui-MyGUI3.2.2.orig/CMake/ConfigureBuild.cmake 2015-01-26 10:32:35.000000000 -0500 ++++ mygui-MyGUI3.2.2/CMake/ConfigureBuild.cmake 2015-03-14 01:09:40.743621643 -0400 +@@ -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 -ru mygui-MyGUI3.2.2.orig/CMake/Utils/MyGUIConfigTargets.cmake mygui-MyGUI3.2.2/CMake/Utils/MyGUIConfigTargets.cmake +--- mygui-MyGUI3.2.2.orig/CMake/Utils/MyGUIConfigTargets.cmake 2015-01-26 10:32:35.000000000 -0500 ++++ mygui-MyGUI3.2.2/CMake/Utils/MyGUIConfigTargets.cmake 2015-03-14 01:08:44.905791784 -0400 +@@ -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") +@@ -60,6 +62,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 "" +@@ -171,7 +179,13 @@ + endif () + add_executable(${PROJECTNAME} ${MYGUI_EXEC_TYPE} ${HEADER_FILES} ${SOURCE_FILES}) + endif () +- set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER}) ++ ++ # rename demo target^M ++ 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/packages/dev-games/mygui/files/mygui-3.2.2-underlinking.patch b/packages/dev-games/mygui/files/mygui-3.2.2-underlinking.patch new file mode 100644 index 0000000..2d10268 --- /dev/null +++ b/packages/dev-games/mygui/files/mygui-3.2.2-underlinking.patch @@ -0,0 +1,20 @@ +From: Julian Ospald +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/packages/dev-games/mygui/mygui-3.2.2.exheres-0 b/packages/dev-games/mygui/mygui-3.2.2.exheres-0 new file mode 100644 index 0000000..9237eff --- /dev/null +++ b/packages/dev-games/mygui/mygui-3.2.2.exheres-0 @@ -0,0 +1,64 @@ +# Copyright 2014 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + + +MY_PN=MyGUI +MY_P=${MY_PN}${PV} +WORK="${WORKBASE}/${PN}-${MY_P}" + + +require cmake [ api=2 ] + + +SUMMARY="A library for creating GUIs for games" +HOMEPAGE="http://mygui.info/" +DOWNLOADS="https://github.com/MyGUI/mygui/archive/${MY_P}.tar.gz" + +LICENCES="MIT" +SLOT="0" +PLATFORMS="~amd64 ~x86" + + +DEPENDENCIES=" + build+run: + media-libs/freetype:2 + media-libs/glew + x11-dri/mesa + build: + virtual/pkg-config + +" + +DEFAULT_SRC_PREPARE_PATCHES=( + -p0 "${FILES}"/${PNV}-underlinking.patch + -p1 "${FILES}"/${PNV}-build.patch + -p1 "${FILES}"/${PNV}-FHS.patch +) + +CMAKE_SRC_CONFIGURE_PARAMS=( + -DMYGUI_BUILD_DEMOS=OFF + -DMYGUI_BUILD_DOCS=OFF + -DMYGUI_BUILD_PLUGINS=ON + -DMYGUI_BUILD_TOOLS=OFF + -DCMAKE_BUILD_TYPE=Release + -DMYGUI_BUILD_WRAPPER=OFF + -DMYGUI_INSTALL_DOCS=OFF + -DMYGUI_INSTALL_MEDIA=ON + -DMYGUI_INSTALL_SAMPLES=OFF + -DMYGUI_INSTALL_TOOLS=OFF + -DMYGUI_RENDERSYSTEM=4 + -DMYGUI_STATIC=OFF + -DMYGUI_USE_FREETYPE=ON + -DMYGUI_USE_SYSTEM_GLEW=ON +) + +src_install() { + cmake_src_install + + keepdir /etc/MYGUI + + # test media not needed at runtime + edo rm -rf "${IMAGE}"/usr/share/MYGUI/Media/UnitTests + # wrapper not available for linux, remove related media + edo rm -rf "${IMAGE}"/usr/share/MYGUI/Media/Wrapper +}