From 46b50617a2c16512c2c09e82d6de5202ab80ff4b Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 21 Dec 2014 10:02:21 +0100 Subject: [PATCH 1/2] - new --- GLStats-cmake.patch | 14 ++++++ GLStats-shared.patch | 11 +++++ GLStats.spec | 108 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 GLStats-cmake.patch create mode 100644 GLStats-shared.patch create mode 100644 GLStats.spec diff --git a/GLStats-cmake.patch b/GLStats-cmake.patch new file mode 100644 index 0000000..ae27bf9 --- /dev/null +++ b/GLStats-cmake.patch @@ -0,0 +1,14 @@ +--- GLStats-0.3.1/CMakeLists.txt.orig 2014-10-07 11:54:53.000000000 +0200 ++++ GLStats-0.3.1/CMakeLists.txt 2014-12-20 21:44:32.998326854 +0100 +@@ -19,11 +19,6 @@ + + include(Common) + +-include(Buildyard) +-if(BUILDYARD_STOP) +- return() +-endif() +- + set(FIND_PACKAGES_DEFINES GLSTATS_STATIC) + include(FindPackages) + set(GLSTATS_DEPENDENT_LIBRARIES Lunchbox) diff --git a/GLStats-shared.patch b/GLStats-shared.patch new file mode 100644 index 0000000..e4145bb --- /dev/null +++ b/GLStats-shared.patch @@ -0,0 +1,11 @@ +--- GLStats-0.3.1/GLStats/CMakeLists.txt.orig 2014-12-21 09:02:36.729952851 +0100 ++++ GLStats-0.3.1/GLStats/CMakeLists.txt 2014-12-21 09:02:41.406619323 +0100 +@@ -5,7 +5,7 @@ + + list(APPEND GLSTATS_LINK_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) + +-set(GLSTATS_LIBRARY_TYPE STATIC) ++set(GLSTATS_LINK_LIBRARIES GL) + common_library(GLStats) + + # Grouping files in VisualStudio diff --git a/GLStats.spec b/GLStats.spec new file mode 100644 index 0000000..975ba42 --- /dev/null +++ b/GLStats.spec @@ -0,0 +1,108 @@ +# +# Conditional build: +%bcond_with apidocs # build and package API docs (empty as of 0.3.1) +# +Summary: Generic OpenGL overlay statistics renderer +Summary(pl.UTF-8): Ogólna biblioteka do renderowania statystyk na nakładce OpenGL +Name: GLStats +Version: 0.3.1 +Release: 1 +License: LGPL v2.1 +Group: Libraries +Source0: https://github.com/Eyescale/GLStats/archive/%{version}/%{name}-%{version}.tar.gz +# Source0-md5: ed80f815bdfdb714aa6269d35c6bfcc1 +Patch0: %{name}-cmake.patch +Patch1: %{name}-shared.patch +URL: https://github.com/Eyescale/GLStats/ +BuildRequires: Eyescale-CMake +BuildRequires: Lunchbox-devel >= 1.10 +BuildRequires: OpenGL-devel +BuildRequires: boost-devel >= 1.41.0 +BuildRequires: cmake >= 2.8 +%{?with_apidocs:BuildRequires: doxygen} +BuildRequires: libstdc++-devel +BuildRequires: pkgconfig +Requires: Lunchbox >= 1.10 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Generic OpenGL overlay statistics renderer. + +%description -l pl.UTF-8 +Ogólna biblioteka do renderowania statystyk na nakładce OpenGL. + +%package devel +Summary: Header files for GLStats library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GLStats +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: Lunchbox-devel >= 1.10 +Requires: libstdc++-devel + +%description devel +Header files for GLStats library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki GLStats. + +%package apidocs +Summary: GLStats API documentation +Summary(pl.UTF-8): Dokumentacja API biblioteki GLStats +Group: Documentation + +%description apidocs +API documentation for GLStats library. + +%description apidocs -l pl.UTF-8 +Dokumentacja API biblioteki GLStats. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +ln -s %{_datadir}/Eyescale-CMake CMake/common +%{__rm} .gitexternals + +%build +install -d build +cd build +%cmake .. + +%{__make} + +%if %{with apidocs} +doxygen doc/Doxyfile +%endif + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} -C build install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc LICENSE.txt README.md +%attr(755,root,root) %{_libdir}/libGLStats.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libGLStats.so.1 + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libGLStats.so +%{_includedir}/GLStats +%{_pkgconfigdir}/GLStats.pc +%dir %{_datadir}/GLStats +%{_datadir}/GLStats/CMake + +%if %{with apidocs} +%files apidocs +%defattr(644,root,root,755) +%doc build/doc/html/* +%endif -- 2.43.0 From 1ff0fa014bbb70ceec6d9e493048b79167f9c4fc Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 21 Apr 2024 19:12:35 +0200 Subject: [PATCH 2/2] - updated to 0.3.2 --- GLStats-cmake.patch | 42 +++++++++++++++++++++++--------- GLStats-update.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++ GLStats.spec | 12 ++++++---- 3 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 GLStats-update.patch diff --git a/GLStats-cmake.patch b/GLStats-cmake.patch index ae27bf9..b7ab482 100644 --- a/GLStats-cmake.patch +++ b/GLStats-cmake.patch @@ -1,14 +1,34 @@ ---- GLStats-0.3.1/CMakeLists.txt.orig 2014-10-07 11:54:53.000000000 +0200 -+++ GLStats-0.3.1/CMakeLists.txt 2014-12-20 21:44:32.998326854 +0100 -@@ -19,11 +19,6 @@ +--- GLStats-0.3.2/CMake/FindPackages.cmake.orig 2024-04-21 13:23:23.180915783 +0200 ++++ GLStats-0.3.2/CMake/FindPackages.cmake 2024-04-21 13:23:27.200894005 +0200 +@@ -1,6 +1,5 @@ + # generated by Buildyard, do not edit. + +-include(System) + list(APPEND FIND_PACKAGES_DEFINES ${SYSTEM}) + # Copyright (c) 2014 Stefan.Eilemann@epfl.ch + +@@ -136,7 +135,6 @@ endif() + file(APPEND ${DEFINES_FILE_IN} + "\n#endif\n") + +-include(UpdateFile) + configure_file(${DEFINES_FILE_IN} ${DEFINES_FILE} COPYONLY) + if(Boost_FOUND) # another WAR for broken boost stuff... + set(Boost_VERSION ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}) +--- GLStats-0.3.2/CMakeLists.txt.orig 2015-07-07 12:40:32.000000000 +0200 ++++ GLStats-0.3.2/CMakeLists.txt 2024-04-21 13:27:45.259495982 +0200 +@@ -15,6 +15,14 @@ set(VERSION_PATCH "2") + set(VERSION_ABI 1) + + set(PROJECT_INCLUDE_NAME "GLStats") ++set(PROJECT_VERSION_MAJOR "${VERSION_MAJOR}") ++set(PROJECT_VERSION_MINOR "${VERSION_MINOR}") ++set(PROJECT_VERSION_PATCH "${VERSION_PATCH}") ++set(PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") ++set(GLStats_VERSION "${PROJECT_VERSION}") ++set(GLStats_VERSION_ABI "${VERSION_ABI}") ++set(GLSTATS_INCLUDE_NAME "GLStats") ++set(GLSTATS_LICENSE "LGPL") include(Common) --include(Buildyard) --if(BUILDYARD_STOP) -- return() --endif() -- - set(FIND_PACKAGES_DEFINES GLSTATS_STATIC) - include(FindPackages) - set(GLSTATS_DEPENDENT_LIBRARIES Lunchbox) diff --git a/GLStats-update.patch b/GLStats-update.patch new file mode 100644 index 0000000..bf95fb0 --- /dev/null +++ b/GLStats-update.patch @@ -0,0 +1,57 @@ +--- GLStats-0.3.2/GLStats/data.cpp.orig 2015-07-07 12:40:32.000000000 +0200 ++++ GLStats-0.3.2/GLStats/data.cpp 2024-04-21 18:16:45.032225044 +0200 +@@ -23,14 +23,15 @@ + #include "type.h" + + #include +-#include ++#include + #include ++#include + + namespace GLStats + { +-typedef stde::hash_map< uint32_t, Entity > EntityMap; ++typedef std::unordered_map< uint32_t, Entity > EntityMap; + typedef EntityMap::const_iterator EntityMapCIter; +-typedef stde::hash_map< uint32_t, Thread > ThreadMap; ++typedef std::unordered_map< uint32_t, Thread > ThreadMap; + typedef ThreadMap::const_iterator ThreadMapCIter; + typedef Items::const_iterator ItemsCIter; + typedef Items::iterator ItemsIter; +--- GLStats-0.3.2/GLStats/renderer.cpp.orig 2015-07-07 12:40:32.000000000 +0200 ++++ GLStats-0.3.2/GLStats/renderer.cpp 2024-04-21 18:16:31.875629652 +0200 +@@ -25,10 +25,12 @@ + + #include + #include +-#include ++#include + ++#include + #include + #include ++#include + #ifdef __APPLE__ + # include + #else +@@ -48,7 +50,7 @@ typedef std::set< uint32_t > ThreadSet; + typedef ThreadSet::const_iterator ThreadSetCIter; + typedef std::map< uint32_t, ThreadSet > EntityMap; + typedef EntityMap::const_iterator EntityMapCIter; +-typedef stde::hash_map< uint32_t, float > EntityPos; ++typedef std::unordered_map< uint32_t, float > EntityPos; + + typedef Items::const_iterator ItemsCIter; + +@@ -122,8 +124,8 @@ public: + const Item* last = &items.front(); + typedef std::pair< uint32_t, uint64_t > FrameTime; + typedef std::vector< FrameTime > FrameTimes; +- typedef stde::hash_map< uint64_t, FrameTimes > FrameTimesMap; +- typedef stde::hash_map< uint32_t, uint64_t > FrameEndMap; ++ typedef std::unordered_map< uint64_t, FrameTimes > FrameTimesMap; ++ typedef std::unordered_map< uint32_t, uint64_t > FrameEndMap; + typedef FrameTimes::const_iterator FrameTimesCIter; + typedef FrameTimesMap::const_iterator FrameTimesMapCIter; + typedef FrameEndMap::const_iterator FrameEndMapCIter; diff --git a/GLStats.spec b/GLStats.spec index 975ba42..51cccac 100644 --- a/GLStats.spec +++ b/GLStats.spec @@ -5,19 +5,21 @@ Summary: Generic OpenGL overlay statistics renderer Summary(pl.UTF-8): Ogólna biblioteka do renderowania statystyk na nakładce OpenGL Name: GLStats -Version: 0.3.1 +Version: 0.3.2 Release: 1 License: LGPL v2.1 Group: Libraries +#Source0Download: https://github.com/Eyescale/GLStats/tags Source0: https://github.com/Eyescale/GLStats/archive/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: ed80f815bdfdb714aa6269d35c6bfcc1 +# Source0-md5: 4af2acee59974144ae2cad2930af14aa Patch0: %{name}-cmake.patch Patch1: %{name}-shared.patch +Patch2: %{name}-update.patch URL: https://github.com/Eyescale/GLStats/ -BuildRequires: Eyescale-CMake +BuildRequires: Eyescale-CMake >= 2018.2 BuildRequires: Lunchbox-devel >= 1.10 +BuildRequires: Servus-devel BuildRequires: OpenGL-devel -BuildRequires: boost-devel >= 1.41.0 BuildRequires: cmake >= 2.8 %{?with_apidocs:BuildRequires: doxygen} BuildRequires: libstdc++-devel @@ -60,6 +62,7 @@ Dokumentacja API biblioteki GLStats. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 ln -s %{_datadir}/Eyescale-CMake CMake/common %{__rm} .gitexternals @@ -97,7 +100,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libGLStats.so %{_includedir}/GLStats -%{_pkgconfigdir}/GLStats.pc %dir %{_datadir}/GLStats %{_datadir}/GLStats/CMake -- 2.43.0