SHA256
1
0
forked from pool/MyGUI
Dominique Leuenberger 2021-11-03 16:26:17 +00:00 committed by Git OBS Bridge
commit 5c6c005750
5 changed files with 103 additions and 76 deletions

View File

@ -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} "")

View File

@ -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)

View File

@ -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)

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Oct 22 17:31:09 UTC 2021 - Adam Mizerski <adam@mizerski.pl>
- 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 <asarai@suse.com> Mon Jun 28 08:34:10 UTC 2021 - Aleksa Sarai <asarai@suse.com>

View File

@ -32,8 +32,10 @@ Source1: %{name}.png
Patch0: %{name}-lib_suffix.patch Patch0: %{name}-lib_suffix.patch
# PATCH-FIX-UPSTREAM MyGUI-gcc47-visibility.patch # PATCH-FIX-UPSTREAM MyGUI-gcc47-visibility.patch
Patch1: %{name}-gcc47-visibility.patch Patch1: %{name}-gcc47-visibility.patch
# PATCH-FIX-UPSTREAM MyGUI-libCommon-fixup.patch -- https://github.com/MyGUI/mygui/issues/157 # PATCH-FEATURE-OPENSUSE MyGUI-libs-versioning.patch -- Add versioning to libs; Upstream seems uninterested: https://github.com/MyGUI/mygui/issues/157
Patch2: MyGUI-libCommon-fixup.patch 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: cmake
BuildRequires: dejavu BuildRequires: dejavu
BuildRequires: dos2unix BuildRequires: dos2unix
@ -90,9 +92,21 @@ for games and 3D applications.
This package contains the shared library for package MyGUI. 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 %package devel
Summary: Development files for MyGUI Summary: Development files for MyGUI
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libMyGUIEngine%{_sover} = %{version} Requires: libMyGUIEngine%{_sover} = %{version}
Requires: libOIS-devel Requires: libOIS-devel
Requires: libOgreMain-devel Requires: libOgreMain-devel
@ -122,11 +136,7 @@ This subpackage contains the development documentation for MyGUI.
%setup -q -n mygui-%{name}%{version} %setup -q -n mygui-%{name}%{version}
%autopatch -p1 %autopatch -p1
dos2unix *.txt COPYING.MIT
chmod 644 *.txt COPYING.MIT
%build %build
install -dm 755 build
# this is probably an error in OGRE packaging... but let's just fix the 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" export OGRE_LIBRARIES="`pkg-config --libs OGRE` -lboost_system"
%cmake \ %cmake \
@ -155,11 +165,7 @@ pushd ../Docs
popd popd
%install %install
pushd build %cmake_install
%make_install
# Install libCommon manually as cmake does not install it
cp -a %{_lib}/libCommon.so* %{buildroot}%{_libdir}/
popd
# rename demos to avoid duplicate names with other packages # rename demos to avoid duplicate names with other packages
pushd %{buildroot}%{_bindir} pushd %{buildroot}%{_bindir}
@ -178,8 +184,8 @@ sed -i -e 's|PluginFolder=%{_prefix}/local/lib/OGRE|%{_libdir}/OGRE|g' %{buildro
# wrapper-script for binaries # wrapper-script for binaries
cat > %{name}.sh <<EOF cat > %{name}.sh <<EOF
#! /bin/bash #!/bin/bash
if [ -z "\$1" ]; then if [[ -z "\$1" ]]; then
echo "missing parameter..." echo "missing parameter..."
echo "" echo ""
echo "usage:" echo "usage:"
@ -188,8 +194,7 @@ if [ -z "\$1" ]; then
echo "\$0 FontViewer" echo "\$0 FontViewer"
echo "" echo ""
echo "or one of the installed demo applications:" echo "or one of the installed demo applications:"
myDemos=\`ls -1 %{_bindir}/%{name}-Demo_*\` ls -1 %{_bindir}/%{name}-Demo_* | sed -e 's|%{_bindir}/||g'
echo \$myDemos | sed -e 's|%{_bindir}/||g'
exit 1 exit 1
fi fi
@ -210,10 +215,9 @@ fi
# call binary from local working-directory # call binary from local working-directory
cd \$HOME/.%{name} cd \$HOME/.%{name}
%{_bindir}/\$1 exec "%{_bindir}/\$1"
EOF EOF
install -m 755 %{name}.sh \ install -m 755 -t %{buildroot}%{_bindir} %{name}.sh
%{buildroot}%{_bindir}
# use system fonts # use system fonts
pushd %{buildroot}%{_datadir}/%{capname}/Media/MyGUI_Media pushd %{buildroot}%{_datadir}/%{capname}/Media/MyGUI_Media
@ -222,12 +226,10 @@ pushd %{buildroot}%{_datadir}/%{capname}/Media/MyGUI_Media
popd popd
# icon # icon
install -dm 755 %{buildroot}%{_datadir}/pixmaps install -D -m 644 -t %{buildroot}%{_datadir}/pixmaps %{SOURCE1}
install -m 644 %{SOURCE1} \
%{buildroot}%{_datadir}/pixmaps
# menu-entries # menu-entries
for i in LayoutEditor ImageSetViewer FontViewer; do for i in FontEditor ImageEditor LayoutEditor SkinEditor; do
cat > $i.desktop << EOF cat > $i.desktop << EOF
[Desktop Entry] [Desktop Entry]
Name=MyGUI $i Name=MyGUI $i
@ -244,9 +246,6 @@ done
# remove unwanted files # remove unwanted files
rm -r %{buildroot}%{_datadir}/%{capname}/Media/UnitTests rm -r %{buildroot}%{_datadir}/%{capname}/Media/UnitTests
rm -r %{buildroot}%{_datadir}/%{capname}/Media/Wrapper/WrapperBaseApp 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} %fdupes -s %{buildroot}
@ -257,49 +256,20 @@ rm Docs/html/installdox || true
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%doc *.txt %doc README.md
%license COPYING.MIT %license COPYING.MIT
%{_bindir}/%{name}.sh %{_bindir}/%{name}.sh
%{_bindir}/FontEditor %{_libdir}/lib*.so.*
%{_bindir}/ImageEditor %exclude %{_libdir}/libMyGUIEngine.so.*
%{_bindir}/LayoutEditor %{_libdir}/Plugin_*.so
%{_bindir}/SkinEditor %{_datadir}/%{capname}/
%{_libdir}/libCommon.so.* %exclude %{_datadir}/%{capname}/Media/Demos/
%dir %{_datadir}/%{capname} %exclude %{_datadir}/%{capname}/Media/Tools/
%{_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
%files devel %files devel
%dir %{_includedir}/%{capname} %{_includedir}/%{capname}/
%{_includedir}/%{capname}/*.h %{_libdir}/lib*.so
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates/BaseLayoutTemplate.cpp
%{_datadir}/%{capname}/Media/Tools/LayoutEditor/CodeTemplates/BaseLayoutTemplate.h
%files devel-doc %files devel-doc
%doc Docs/html/* %doc Docs/html/*
@ -311,4 +281,16 @@ rm Docs/html/installdox || true
%{_bindir}/%{name}-Demo_* %{_bindir}/%{name}-Demo_*
%{_datadir}/%{capname}/Media/Demos/ %{_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 %changelog