From 4e9b710014bab61a29a01d12b56eb967c2c2a8f129de0ae22e5da908d518711d Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 29 Mar 2020 14:14:26 +0000 Subject: [PATCH 1/2] Accepting request 789453 from home:cgiboudeaux:branches:games - Run spec-cleaner - Update to 3.4: * Added LanguageManager::getLanguages * Fix lost key focus event not being triggered sometimes * Fix inconsistency: _riseMouseButtonMove was using Layer coordinates (most of the time). _riseMouseButtonReleased/Pressed were using absolute coordinates. * Other InputManager events fixes. * Minor MacOS build fixes. * Cleaner and much faster logic for adding and removing render items (it was the performance bottleneck when working with many items on screen). * ScrollBar: Fixed wrong tracking area bug. * Button: make Button with key focus (can be set only manually through code) have highlighted state. * ItemBox: add possibility to not update ItemBox content when working with items (huge speed boost, when adding/removing many in single frame) * EditText: add support for alpha in text and text shadow colours (multiplied with widget's alpha). * ItemBox: add options to hide ItemBox scroll bars (same as for ScrollView and EditBox). * MultiListBox: slightly advanced and more flexible custom compare function. * EditBox: add Ctrl+Left/Right hotkey support (moves cursor to next word). * MultiListBox: add eventNotifyItem. * OpenGL3Platform: Added new rendering platform. * OpenGLESPlatform: Added new rendering platform. * Emscripten support (works for Ogre and all OpenGL OBS-URL: https://build.opensuse.org/request/show/789453 OBS-URL: https://build.opensuse.org/package/show/games/MyGUI?expand=0&rev=22 --- MyGUI-freetype2-include.patch | 15 ----- MyGUI-gcc47-visibility.patch | 9 +-- MyGUI-libCommon-fixup.patch | 8 ++- MyGUI-lib_suffix.patch | 31 +++++---- MyGUI.changes | 59 +++++++++++++++++ MyGUI.spec | 117 ++++++++++++++++------------------ MyGUI3.2.2.tar.gz | 3 - MyGUI3.4.0.tar.gz | 3 + 8 files changed, 144 insertions(+), 101 deletions(-) delete mode 100644 MyGUI-freetype2-include.patch delete mode 100644 MyGUI3.2.2.tar.gz create mode 100644 MyGUI3.4.0.tar.gz diff --git a/MyGUI-freetype2-include.patch b/MyGUI-freetype2-include.patch deleted file mode 100644 index 563eb7c..0000000 --- a/MyGUI-freetype2-include.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: b/CMake/Packages/FindFreetype.cmake -=================================================================== ---- a/CMake/Packages/FindFreetype.cmake -+++ b/CMake/Packages/FindFreetype.cmake -@@ -39,6 +39,10 @@ find_library(FREETYPE_LIBRARY_REL NAMES - find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) - make_library_set(FREETYPE_LIBRARY) - -+# openSUSE +13.1 has both in one directory and there is no freetype/freetype.h inside include/freetype2 -+if (NOT FREETYPE_INCLUDE_DIR) -+ set(FREETYPE_INCLUDE_DIR ${FREETYPE_FT2BUILD_INCLUDE_DIR}) -+endif () - findpkg_finish(FREETYPE) - mark_as_advanced(FREETYPE_FT2BUILD_INCLUDE_DIR) - if (NOT FREETYPE_FT2BUILD_INCLUDE_DIR STREQUAL FREETYPE_INCLUDE_DIR) diff --git a/MyGUI-gcc47-visibility.patch b/MyGUI-gcc47-visibility.patch index 16dceab..7f4496d 100644 --- a/MyGUI-gcc47-visibility.patch +++ b/MyGUI-gcc47-visibility.patch @@ -1,7 +1,8 @@ -diff -Naur MyGUI_3.2.2.orig/MyGUIEngine/include/MyGUI_Singleton.h MyGUI_3.2.2/MyGUIEngine/include/MyGUI_Singleton.h ---- MyGUI_3.2.2.orig/MyGUIEngine/include/MyGUI_Singleton.h -+++ MyGUI_3.2.2/MyGUIEngine/include/MyGUI_Singleton.h -@@ -52,8 +52,14 @@ +diff --git a/MyGUIEngine/include/MyGUI_Singleton.h b/MyGUIEngine/include/MyGUI_Singleton.h +index 5067da9..e12287d 100644 +--- a/MyGUIEngine/include/MyGUI_Singleton.h ++++ b/MyGUIEngine/include/MyGUI_Singleton.h +@@ -58,8 +58,14 @@ namespace MyGUI } private: diff --git a/MyGUI-libCommon-fixup.patch b/MyGUI-libCommon-fixup.patch index e612d67..783bea2 100644 --- a/MyGUI-libCommon-fixup.patch +++ b/MyGUI-libCommon-fixup.patch @@ -1,6 +1,8 @@ ---- Common/CMakeLists.txt.orig 2016-03-05 07:17:23.175753455 -0600 -+++ Common/CMakeLists.txt 2016-03-05 07:18:03.880751014 -0600 -@@ -89,6 +89,7 @@ +diff --git a/Common/CMakeLists.txt b/Common/CMakeLists.txt +index 785dded..a232443 100644 +--- a/Common/CMakeLists.txt ++++ b/Common/CMakeLists.txt +@@ -121,6 +121,7 @@ elseif(MYGUI_SAMPLES_INPUT EQUAL 4) endif() add_library(${PROJECTNAME} ${HEADER_FILES} ${SOURCE_FILES}) diff --git a/MyGUI-lib_suffix.patch b/MyGUI-lib_suffix.patch index 0bcecdd..aaded27 100644 --- a/MyGUI-lib_suffix.patch +++ b/MyGUI-lib_suffix.patch @@ -1,7 +1,8 @@ -diff -Naur MyGUI_3.2.2.orig/CMake/ConfigureBuild.cmake MyGUI_3.2.2/CMake/ConfigureBuild.cmake ---- MyGUI_3.2.2.orig/CMake/ConfigureBuild.cmake -+++ MyGUI_3.2.2/CMake/ConfigureBuild.cmake -@@ -47,7 +47,7 @@ +diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake +index 9c6aad9..74fe84f 100644 +--- a/CMake/ConfigureBuild.cmake ++++ b/CMake/ConfigureBuild.cmake +@@ -47,7 +47,7 @@ if (UNIX) else () configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY) endif () @@ -10,10 +11,11 @@ diff -Naur MyGUI_3.2.2.orig/CMake/ConfigureBuild.cmake MyGUI_3.2.2/CMake/Configu # configure additional packages -diff -Naur MyGUI_3.2.2.orig/CMake/Utils/MyGUIConfigTargets.cmake MyGUI_3.2.2/CMake/Utils/MyGUIConfigTargets.cmake ---- MyGUI_3.2.2.orig/CMake/Utils/MyGUIConfigTargets.cmake -+++ MyGUI_3.2.2/CMake/Utils/MyGUIConfigTargets.cmake -@@ -61,8 +61,8 @@ +diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake +index bba3f91..0f6d842 100644 +--- a/CMake/Utils/MyGUIConfigTargets.cmake ++++ b/CMake/Utils/MyGUIConfigTargets.cmake +@@ -34,8 +34,8 @@ endif () function(mygui_install_target TARGETNAME SUFFIX) install(TARGETS ${TARGETNAME} RUNTIME DESTINATION "bin${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None "" @@ -24,7 +26,7 @@ diff -Naur MyGUI_3.2.2.orig/CMake/Utils/MyGUIConfigTargets.cmake MyGUI_3.2.2/CMa FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Release None "" ) install(TARGETS ${TARGETNAME} -@@ -88,8 +88,8 @@ +@@ -61,8 +61,8 @@ endfunction(mygui_install_target) # setup common target settings function(mygui_config_common TARGETNAME) set_target_properties(${TARGETNAME} PROPERTIES @@ -34,11 +36,12 @@ diff -Naur MyGUI_3.2.2.orig/CMake/Utils/MyGUIConfigTargets.cmake MyGUI_3.2.2/CMa + LIBRARY_OUTPUT_DIRECTORY ${MYGUI_BINARY_DIR}/lib${LIB_SUFFIX} RUNTIME_OUTPUT_DIRECTORY ${MYGUI_BINARY_DIR}/bin ) - mygui_create_vcproj_userfile(${TARGETNAME}) -diff -Naur MyGUI_3.2.2.orig/CMakeLists.txt MyGUI_3.2.2/CMakeLists.txt ---- MyGUI_3.2.2.orig/CMakeLists.txt -+++ MyGUI_3.2.2/CMakeLists.txt -@@ -85,8 +85,8 @@ + endfunction(mygui_config_common) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 35658d9..f94482f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,8 +81,8 @@ endif () set(MYGUI_LIBRARIES MyGUIEngine) # Specify build paths diff --git a/MyGUI.changes b/MyGUI.changes index 8df6d6a..6a0d858 100644 --- a/MyGUI.changes +++ b/MyGUI.changes @@ -1,3 +1,62 @@ +------------------------------------------------------------------- +Fri Mar 27 11:55:54 UTC 2020 - Christophe Giboudeaux + +- Run spec-cleaner +- Update to 3.4: + * Added LanguageManager::getLanguages + * Fix lost key focus event not being triggered sometimes + * Fix inconsistency: _riseMouseButtonMove was using Layer + coordinates (most of the time). + _riseMouseButtonReleased/Pressed were using absolute coordinates. + * Other InputManager events fixes. + * Minor MacOS build fixes. + * Cleaner and much faster logic for adding and removing + render items (it was the performance bottleneck when + working with many items on screen). + * ScrollBar: Fixed wrong tracking area bug. + * Button: make Button with key focus (can be set only + manually through code) have highlighted state. + * ItemBox: add possibility to not update ItemBox content + when working with items (huge speed boost, when + adding/removing many in single frame) + * EditText: add support for alpha in text and text + shadow colours (multiplied with widget's alpha). + * ItemBox: add options to hide ItemBox scroll bars + (same as for ScrollView and EditBox). + * MultiListBox: slightly advanced and more flexible + custom compare function. + * EditBox: add Ctrl+Left/Right hotkey support (moves + cursor to next word). + * MultiListBox: add eventNotifyItem. + * OpenGL3Platform: Added new rendering platform. + * OpenGLESPlatform: Added new rendering platform. + * Emscripten support (works for Ogre and all OpenGL + platforms). + * OgrePlatform: Many minor build-related fixes and imrovements, + including newer Ogre support and better CMake scripts. + * DirectX 11 and OpenGL3: Fixed application window resizing + in editors and demos. + * All platforms: Fix possible stack overflow in + ***DataManager::getDataPath. + * All platforms: better VertexBuffer reallocation strategy + for all platforms (in ::lock call, not in ::setVertexCount). + * All platforms: Various minor fixes and code cleanup. + * ResourceManualFont: Added setTexture. + * ResourceTrueTypeFont: Optimize TrueTupeFont render speed + (half getGlyphInfo search time). + * ResourceTrueTypeFont: Remove no longer needed freetype + bytecode bug fix. + * LayoutEditor: Fixed "[DEFAULT]" value not being handles properly + (was colored white in ComboBox, was saved in layout). + * LayoutEditor: Other minor fixes and improvements. + * Added SDL2 support. + * Switched to C++11: various related code improvements and cleanups. +- Rebase patches: + * MyGUI-lib_suffix.patch + * MyGUI-gcc47-visibility.patch + * MyGUI-libCommon-fixup.patch +- Drop obsolete patch: MyGUI-freetype2-include.patch + ------------------------------------------------------------------- Fri Jan 25 09:40:32 UTC 2019 - Guillaume GARDET diff --git a/MyGUI.spec b/MyGUI.spec index fd9e9d2..beb0d27 100644 --- a/MyGUI.spec +++ b/MyGUI.spec @@ -1,7 +1,7 @@ # # spec file for package MyGUI # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2014 B1 Systems GmbH, Vohburg, Germany. # # All modifications and additions to the file contributed by third parties @@ -17,27 +17,23 @@ # -%define capname MYGUI -%define _major 3.2 -%define _minor 2 -%define _sover 3 +%define capname MYGUI +%define _sover 3_4_0 Name: MyGUI -Version: %{_major}.%{_minor} +Version: 3.4.0 Release: 0 Summary: A GUI library for Ogre Rendering Engine License: MIT Group: Development/Tools/GUI Builders -Url: http://mygui.info/ +URL: http://mygui.info/ Source: https://github.com/MyGUI/mygui/archive/MyGUI%{version}.tar.gz Source1: %{name}.png # PATCH-FIX-UPSTREAM MyGUI-lib_suffix.patch Patch0: %{name}-lib_suffix.patch # PATCH-FIX-UPSTREAM MyGUI-gcc47-visibility.patch Patch1: %{name}-gcc47-visibility.patch -# PATCH-FIX-OPENSUSE MyGUI-freetype2-include.patch -Patch2: MyGUI-freetype2-include.patch # PATCH-FIX-UPSTREAM MyGUI-libCommon-fixup.patch -- https://github.com/MyGUI/mygui/issues/157 -Patch3: MyGUI-libCommon-fixup.patch +Patch2: MyGUI-libCommon-fixup.patch BuildRequires: cmake BuildRequires: dejavu BuildRequires: dos2unix @@ -48,14 +44,14 @@ BuildRequires: graphviz BuildRequires: libOIS-devel BuildRequires: libOgreMain-devel BuildRequires: libX11-devel +# MyGUI wants to copy plugins.cfg installed by ogre-demos +BuildRequires: ogre-demos BuildRequires: pkgconfig BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(uuid) -BuildRoot: %{_tmppath}/%{name}-%{version}-build - %description MyGUI is a library for creating Graphical User Interfaces (GUIs) for games and 3D applications. @@ -123,10 +119,7 @@ This subpackage contains the development documentation for MyGUI. %prep %setup -q -n mygui-%{name}%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p0 +%autopatch -p1 dos2unix *.txt COPYING.MIT chmod 644 *.txt COPYING.MIT @@ -136,26 +129,28 @@ install -dm 755 build # this is probably an error in OGRE packaging... but let's just fix the build. export OGRE_LIBRARIES="`pkg-config --libs OGRE` -lboost_system" %cmake \ - -DCMAKE_BUILD_TYPE=release \ - -DOGRE_LIBRARIES="$OGRE_LIBRARIES" \ - -DMYGUI_STATIC=FALSE \ - -DMYGUI_USE_FREETYPE=TRUE \ - -DMYGUI_BUILD_SAMPLES=TRUE \ - -DMYGUI_BUILD_PLUGINS=TRUE \ - -DMYGUI_BUILD_TOOLS=TRUE \ - -DMYGUI_BUILD_WRAPPER=FALSE \ - -DMYGUI_INSTALL_SAMPLES=TRUE \ - -DMYGUI_INSTALL_TOOLS=TRUE \ - -DMYGUI_INSTALL_DOCS=TRUE \ - -DMYGUI_INSTALL_MEDIA=TRUE \ - -DMYGUI_INSTALL_SAMPLES_SOURCE=TRUE \ - -DMYGUI_FULL_RPATH=FALSE + -DCMAKE_BUILD_TYPE=release \ + -DOGRE_LIBRARIES="$OGRE_LIBRARIES" \ + -DMYGUI_STATIC=FALSE \ + -DMYGUI_USE_FREETYPE=TRUE \ + -DMYGUI_BUILD_SAMPLES=TRUE \ + -DMYGUI_BUILD_PLUGINS=TRUE \ + -DMYGUI_BUILD_TOOLS=TRUE \ + -DMYGUI_BUILD_WRAPPER=FALSE \ + -DMYGUI_INSTALL_SAMPLES=TRUE \ + -DMYGUI_INSTALL_TOOLS=TRUE \ + -DMYGUI_INSTALL_DOCS=TRUE \ + -DMYGUI_INSTALL_MEDIA=TRUE \ + -DMYGUI_INSTALL_SAMPLES_SOURCE=TRUE \ + -DMYGUI_FULL_RPATH=FALSE \ + -DCMAKE_SKIP_RPATH=TRUE \ + -DOGRE_CONFIG_DIR=%{_datadir}/OGRE -make %{?_smp_mflags} V=1 +%cmake_build pushd ../Docs - doxygen -s -g Doxyfile 2> /dev/null - doxygen Doxyfile + doxygen -s -g Doxyfile 2> /dev/null + doxygen Doxyfile popd %install @@ -167,10 +162,10 @@ popd # rename demos to avoid duplicate names with other packages pushd %{buildroot}%{_bindir} - demos=`ls -1 Demo_*` - for i in $demos; do - mv $i %{name}-$i - done + demos=`ls -1 Demo_*` + for i in $demos; do + mv $i %{name}-$i + done popd # move those files to /usr/share/MYGUI @@ -178,23 +173,23 @@ mv %{buildroot}%{_bindir}/plugins.cfg %{buildroot}%{_datadir}/%{capname} mv %{buildroot}%{_bindir}/resources.xml %{buildroot}%{_datadir}/%{capname} # adjust OGRE path -sed -i -e 's|PluginFolder=/usr/local/lib/OGRE|%{_libdir}/OGRE|g' %{buildroot}%{_datadir}/%{capname}/plugins.cfg +sed -i -e 's|PluginFolder=%{_prefix}/local/lib/OGRE|%{_libdir}/OGRE|g' %{buildroot}%{_datadir}/%{capname}/plugins.cfg # wrapper-script for binaries cat > %{name}.sh < $i.desktop << EOF + cat > $i.desktop << EOF [Desktop Entry] Name=MyGUI $i GenericName=MyGUI $i @@ -257,9 +252,11 @@ rm Docs/html/installdox || true %post -n libMyGUIEngine%{_sover} -p /sbin/ldconfig %postun -n libMyGUIEngine%{_sover} -p /sbin/ldconfig +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + %files -%defattr(-,root,root) -%doc *.txt +%doc *.txt %license COPYING.MIT %{_bindir}/%{name}.sh %{_bindir}/FontEditor @@ -296,7 +293,6 @@ rm Docs/html/installdox || true %{_datadir}/pixmaps/*.png %files devel -%defattr(-,root,root) %dir %{_includedir}/%{capname} %{_includedir}/%{capname}/*.h %{_libdir}/*.so @@ -305,15 +301,12 @@ rm Docs/html/installdox || true %{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates/BaseLayoutTemplate.h %files devel-doc -%defattr(-,root,root) %doc Docs/html/* %files -n libMyGUIEngine%{_sover} -%defattr(-,root,root) %{_libdir}/libMyGUIEngine.so.* %files demo -%defattr(-,root,root) %{_bindir}/%{name}-Demo_* %{_datadir}/%{capname}/Media/Demos/ diff --git a/MyGUI3.2.2.tar.gz b/MyGUI3.2.2.tar.gz deleted file mode 100644 index e2f6090..0000000 --- a/MyGUI3.2.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a28d7ec8a47993cb68deb48b36331e28f12dd92580b709eaef21d599b67a78f -size 22081236 diff --git a/MyGUI3.4.0.tar.gz b/MyGUI3.4.0.tar.gz new file mode 100644 index 0000000..29adf46 --- /dev/null +++ b/MyGUI3.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1d5f294670ae71f7200ed4b30859018281d8cfd45d6a38d18b97a4aba604c42 +size 22391483 From 2406f280d3276654e2658cc6a47c3f60db25e9eea9e8a8eece50c4c225bd0a72 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 29 Mar 2020 14:15:39 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/games/MyGUI?expand=0&rev=23 --- MyGUI.changes | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MyGUI.changes b/MyGUI.changes index 6a0d858..3f41415 100644 --- a/MyGUI.changes +++ b/MyGUI.changes @@ -9,7 +9,6 @@ Fri Mar 27 11:55:54 UTC 2020 - Christophe Giboudeaux coordinates (most of the time). _riseMouseButtonReleased/Pressed were using absolute coordinates. * Other InputManager events fixes. - * Minor MacOS build fixes. * Cleaner and much faster logic for adding and removing render items (it was the performance bottleneck when working with many items on screen). @@ -34,7 +33,7 @@ Fri Mar 27 11:55:54 UTC 2020 - Christophe Giboudeaux platforms). * OgrePlatform: Many minor build-related fixes and imrovements, including newer Ogre support and better CMake scripts. - * DirectX 11 and OpenGL3: Fixed application window resizing + * OpenGL3: Fixed application window resizing in editors and demos. * All platforms: Fix possible stack overflow in ***DataManager::getDataPath.