From badc2a30b43d9e19ef2a337967b497de3a785ea18ad0ced0f8a131c7616db142 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Wed, 3 Nov 2021 07:20:53 +0000 Subject: [PATCH] Accepting request 927606 from home:etamPL:branches:games - Renamed patches: - MyGUI-libCommon-fixup.patch -> MyGUI-libs-versioning.patch - Added patches: - MyGUI-install-libCommon.patch - Extracted "tools" to a subpackage; fixed generated desktop files. - Moved devel "*.so" files to "devel" subpackage. MyGUI contains only libs with versions. Installing dependent applications doesn't pull MyGUI-devel. OBS-URL: https://build.opensuse.org/request/show/927606 OBS-URL: https://build.opensuse.org/package/show/games/MyGUI?expand=0&rev=26 --- MyGUI-install-libCommon.patch | 10 ++++ MyGUI-libCommon-fixup.patch | 12 ---- MyGUI-libs-versioning.patch | 36 +++++++++++ MyGUI.changes | 11 ++++ MyGUI.spec | 110 ++++++++++++++-------------------- 5 files changed, 103 insertions(+), 76 deletions(-) create mode 100644 MyGUI-install-libCommon.patch delete mode 100644 MyGUI-libCommon-fixup.patch create mode 100644 MyGUI-libs-versioning.patch diff --git a/MyGUI-install-libCommon.patch b/MyGUI-install-libCommon.patch new file mode 100644 index 0000000..4a8451f --- /dev/null +++ b/MyGUI-install-libCommon.patch @@ -0,0 +1,10 @@ +Index: mygui-MyGUI3.4.0/Common/CMakeLists.txt +=================================================================== +--- mygui-MyGUI3.4.0.orig/Common/CMakeLists.txt ++++ mygui-MyGUI3.4.0/Common/CMakeLists.txt +@@ -173,3 +173,5 @@ if(NOT WIN32) + include_directories(${X11_INCLUDE_DIR}) + endif(UNIX AND NOT APPLE) + endif() ++ ++mygui_install_target(${PROJECTNAME} "") diff --git a/MyGUI-libCommon-fixup.patch b/MyGUI-libCommon-fixup.patch deleted file mode 100644 index 783bea2..0000000 --- a/MyGUI-libCommon-fixup.patch +++ /dev/null @@ -1,12 +0,0 @@ -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}) -+set_target_properties(${PROJECTNAME} PROPERTIES VERSION ${MYGUI_VERSION} SOVERSION ${MYGUI_VERSION_MAJOR}) - - if(MYGUI_RENDERSYSTEM EQUAL 1) - add_dependencies(${PROJECTNAME} MyGUI.DummyPlatform) diff --git a/MyGUI-libs-versioning.patch b/MyGUI-libs-versioning.patch new file mode 100644 index 0000000..c9ef63c --- /dev/null +++ b/MyGUI-libs-versioning.patch @@ -0,0 +1,36 @@ +Index: mygui-MyGUI3.4.0/Common/CMakeLists.txt +=================================================================== +--- mygui-MyGUI3.4.0.orig/Common/CMakeLists.txt ++++ mygui-MyGUI3.4.0/Common/CMakeLists.txt +@@ -121,6 +121,7 @@ elseif(MYGUI_SAMPLES_INPUT EQUAL 4) + endif() + + add_library(${PROJECTNAME} ${HEADER_FILES} ${SOURCE_FILES}) ++set_target_properties(${PROJECTNAME} PROPERTIES VERSION ${MYGUI_VERSION} SOVERSION ${MYGUI_VERSION_MAJOR}) + + if(MYGUI_RENDERSYSTEM EQUAL 1) + add_dependencies(${PROJECTNAME} MyGUI.DummyPlatform) +Index: mygui-MyGUI3.4.0/CMake/Utils/MyGUIConfigTargets.cmake +=================================================================== +--- mygui-MyGUI3.4.0.orig/CMake/Utils/MyGUIConfigTargets.cmake ++++ mygui-MyGUI3.4.0/CMake/Utils/MyGUIConfigTargets.cmake +@@ -316,6 +316,7 @@ function(mygui_dll PROJECTNAME SOLUTIONF + add_definitions("-D_USRDLL -DMYGUI_BUILD_DLL") + add_library(${PROJECTNAME} ${MYGUI_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES}) + set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER}) ++ set_target_properties(${PROJECTNAME} PROPERTIES VERSION ${MYGUI_VERSION} SOVERSION "${MYGUI_VERSION_MAJOR}.${MYGUI_VERSION_MINOR}.${MYGUI_VERSION_PATCH}") + add_dependencies(${PROJECTNAME} MyGUIEngine) + target_link_libraries(${PROJECTNAME} MyGUIEngine) + +Index: mygui-MyGUI3.4.0/Platforms/Ogre/OgrePlatform/CMakeLists.txt +=================================================================== +--- mygui-MyGUI3.4.0.orig/Platforms/Ogre/OgrePlatform/CMakeLists.txt ++++ mygui-MyGUI3.4.0/Platforms/Ogre/OgrePlatform/CMakeLists.txt +@@ -9,6 +9,7 @@ include_directories( + include(${PROJECTNAME}.list) + + add_library(${PROJECTNAME} ${HEADER_FILES} ${SOURCE_FILES}) ++set_target_properties(${PROJECTNAME} PROPERTIES VERSION ${MYGUI_VERSION} SOVERSION "${MYGUI_VERSION_MAJOR}.${MYGUI_VERSION_MINOR}.${MYGUI_VERSION_PATCH}") + + add_dependencies(${PROJECTNAME} MyGUIEngine) + diff --git a/MyGUI.changes b/MyGUI.changes index 83a2a9f..de9389a 100644 --- a/MyGUI.changes +++ b/MyGUI.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Oct 22 17:31:09 UTC 2021 - Adam Mizerski + +- Renamed patches: + - MyGUI-libCommon-fixup.patch -> MyGUI-libs-versioning.patch +- Added patches: + - MyGUI-install-libCommon.patch +- Extracted "tools" to a subpackage; fixed generated desktop files. +- Moved devel "*.so" files to "devel" subpackage. MyGUI contains only libs with + versions. Installing dependent applications doesn't pull MyGUI-devel. + ------------------------------------------------------------------- Mon Jun 28 08:34:10 UTC 2021 - Aleksa Sarai diff --git a/MyGUI.spec b/MyGUI.spec index 1e2be82..631ba5c 100644 --- a/MyGUI.spec +++ b/MyGUI.spec @@ -32,8 +32,10 @@ Source1: %{name}.png Patch0: %{name}-lib_suffix.patch # PATCH-FIX-UPSTREAM MyGUI-gcc47-visibility.patch Patch1: %{name}-gcc47-visibility.patch -# PATCH-FIX-UPSTREAM MyGUI-libCommon-fixup.patch -- https://github.com/MyGUI/mygui/issues/157 -Patch2: MyGUI-libCommon-fixup.patch +# PATCH-FEATURE-OPENSUSE MyGUI-libs-versioning.patch -- Add versioning to libs; Upstream seems uninterested: https://github.com/MyGUI/mygui/issues/157 +Patch2: MyGUI-libs-versioning.patch +# PATCH-FEATURE-OPENSUSE MyGUI-install-libCommon.patch -- Use cmake to install libCommon +Patch3: MyGUI-install-libCommon.patch BuildRequires: cmake BuildRequires: dejavu BuildRequires: dos2unix @@ -90,9 +92,21 @@ for games and 3D applications. This package contains the shared library for package MyGUI. +%package tools +Summary: Tools applications for MyGUI +Group: Development/Tools/GUI Builders +Requires: %{name} = %{version} + +%description tools +MyGUI is a library for creating Graphical User Interfaces (GUIs) +for games and 3D applications. + +This package contains tools applications for package MyGUI. + %package devel Summary: Development files for MyGUI Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} Requires: libMyGUIEngine%{_sover} = %{version} Requires: libOIS-devel Requires: libOgreMain-devel @@ -122,11 +136,7 @@ This subpackage contains the development documentation for MyGUI. %setup -q -n mygui-%{name}%{version} %autopatch -p1 -dos2unix *.txt COPYING.MIT -chmod 644 *.txt COPYING.MIT - %build -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 \ @@ -155,11 +165,7 @@ pushd ../Docs popd %install -pushd build -%make_install -# Install libCommon manually as cmake does not install it -cp -a %{_lib}/libCommon.so* %{buildroot}%{_libdir}/ -popd +%cmake_install # rename demos to avoid duplicate names with other packages pushd %{buildroot}%{_bindir} @@ -178,8 +184,8 @@ sed -i -e 's|PluginFolder=%{_prefix}/local/lib/OGRE|%{_libdir}/OGRE|g' %{buildro # wrapper-script for binaries cat > %{name}.sh < $i.desktop << EOF [Desktop Entry] Name=MyGUI $i @@ -238,15 +240,12 @@ Icon=%{name} Terminal=false Type=Application EOF - %suse_update_desktop_file -i $i Development GUIDesigner + %suse_update_desktop_file -i $i Development GUIDesigner done # remove unwanted files rm -r %{buildroot}%{_datadir}/%{capname}/Media/UnitTests rm -r %{buildroot}%{_datadir}/%{capname}/Media/Wrapper/WrapperBaseApp -# don't ask me where this file went, it vanished with 12.1... -# for now simply ignore the error... :-) -rm Docs/html/installdox || true %fdupes -s %{buildroot} @@ -257,49 +256,20 @@ rm Docs/html/installdox || true %postun -p /sbin/ldconfig %files -%doc *.txt +%doc README.md %license COPYING.MIT %{_bindir}/%{name}.sh -%{_bindir}/FontEditor -%{_bindir}/ImageEditor -%{_bindir}/LayoutEditor -%{_bindir}/SkinEditor -%{_libdir}/libCommon.so.* -%dir %{_datadir}/%{capname} -%{_datadir}/%{capname}/*.cfg -%{_datadir}/%{capname}/*.xml -%dir %{_datadir}/%{capname}/Media -%{_datadir}/%{capname}/Media/Common/ -%{_datadir}/%{capname}/Media/MyGUI_Media/ -%dir %{_datadir}/%{capname}/Media/Tools -%dir %{_datadir}/%{capname}/Media/Tools/LayoutEditor -%dir %{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates -%{_datadir}/%{capname}/Media/Tools/FontEditor -%{_datadir}/%{capname}/Media/Tools/ImageEditor -%{_datadir}/%{capname}/Media/Tools/EditorFramework -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/B* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeGeneratorWindow.layout -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates/BaseLayoutCPP.xml -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/E* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/I* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/M* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/P* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/S* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/T* -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/W* -%{_datadir}/%{capname}/Media/Tools/SkinEditor -%{_datadir}/applications/FontViewer.desktop -%{_datadir}/applications/ImageSetViewer.desktop -%{_datadir}/applications/LayoutEditor.desktop -%{_datadir}/pixmaps/*.png +%{_libdir}/lib*.so.* +%exclude %{_libdir}/libMyGUIEngine.so.* +%{_libdir}/Plugin_*.so +%{_datadir}/%{capname}/ +%exclude %{_datadir}/%{capname}/Media/Demos/ +%exclude %{_datadir}/%{capname}/Media/Tools/ %files devel -%dir %{_includedir}/%{capname} -%{_includedir}/%{capname}/*.h -%{_libdir}/*.so +%{_includedir}/%{capname}/ +%{_libdir}/lib*.so %{_libdir}/pkgconfig/*.pc -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates/BaseLayoutTemplate.cpp -%{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates/BaseLayoutTemplate.h %files devel-doc %doc Docs/html/* @@ -311,4 +281,16 @@ rm Docs/html/installdox || true %{_bindir}/%{name}-Demo_* %{_datadir}/%{capname}/Media/Demos/ +%files tools +%{_bindir}/FontEditor +%{_bindir}/ImageEditor +%{_bindir}/LayoutEditor +%{_bindir}/SkinEditor +%{_datadir}/%{capname}/Media/Tools/ +%{_datadir}/applications/FontEditor.desktop +%{_datadir}/applications/ImageEditor.desktop +%{_datadir}/applications/LayoutEditor.desktop +%{_datadir}/applications/SkinEditor.desktop +%{_datadir}/pixmaps/*.png + %changelog