[packages/apitrace] new
atler
atler at pld-linux.org
Sat May 24 21:35:30 CEST 2025
commit 137f6602830d923e42112b9f398024e4dd0853bd
Author: Jan Palus <atler at pld-linux.org>
Date: Sat May 24 21:27:40 2025 +0200
new
apitrace.spec | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
system-libs.patch | 39 +++++++++++++++++++++
2 files changed, 139 insertions(+)
---
diff --git a/apitrace.spec b/apitrace.spec
new file mode 100644
index 0000000..7e34675
--- /dev/null
+++ b/apitrace.spec
@@ -0,0 +1,100 @@
+#
+# Conditional build:
+%bcond_without qt # Qt GUI
+%bcond_without sse42 # SSE 4.2 instructions
+
+%define qtver 5.15
+
+Summary: Tools for tracing OpenGL, Direct3D and other graphics APIs
+Name: apitrace
+Version: 12.0
+Release: 1
+License: MIT
+Group: Development/Tools
+Source0: https://github.com/apitrace/apitrace/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 822b50a96c10911f474cba51d05ff568
+Patch0: system-libs.patch
+URL: https://apitrace.github.io/
+%if %{with qt}
+BuildRequires: Qt5Core-devel >= %{qtver}
+BuildRequires: Qt5Network-devel >= %{qtver}
+BuildRequires: Qt5Widgets-devel >= %{qtver}
+%endif
+BuildRequires: cmake >= 3.15.0
+BuildRequires: gtest-devel
+BuildRequires: libbacktrace-devel
+BuildRequires: libbrotli-devel >= 1.0.7
+BuildRequires: libpng-devel
+BuildRequires: libstdc++-devel >= 6:8
+BuildRequires: pkgconfig
+BuildRequires: python3
+BuildRequires: rpmbuild(macros) >= 1.742
+BuildRequires: snappy-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: zlib-devel >= 1.2.6
+Requires: libbrotli >= 1.0.7
+Requires: zlib >= 1.2.6
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+apitrace consists of a set of tools to:
+- trace OpenGL, Direct3D, and DirectDraw APIs calls to a file
+- replay OpenGL and Direct3D calls from a file
+- inspect OpenGL and Direct3D state at any call while retracing
+- visualize and edit trace files
+
+%package gui
+Summary: Qt based GUI for apitrace
+Group: Development/Tools
+Requires: Qt5Core >= %{qtver}
+Requires: Qt5Network >= %{qtver}
+Requires: Qt5Widgets >= %{qtver}
+
+%description gui
+Qt based GUI for apitrace.
+
+%prep
+%setup -q
+%patch -P0 -p1
+
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' scripts/*.py
+
+%build
+%cmake -B build \
+ -DENABLE_STATIC_SNAPPY:BOOL=OFF \
+ %{cmake_on_off qt ENABLE_GUI} \
+ %{cmake_on_off sse42 ENABLE_SSE42}
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# Windows only
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/apitrace/scripts/{apitrace.PIXExp,convert.py}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.markdown docs/{BUGS,HACKING,NEWS,USAGE}.markdown
+%attr(755,root,root) %{_bindir}/apitrace
+%attr(755,root,root) %{_bindir}/eglretrace
+%attr(755,root,root) %{_bindir}/glretrace
+%attr(755,root,root) %{_bindir}/gltrim
+%dir %{_libdir}/apitrace
+%dir %{_libdir}/apitrace/scripts
+%{_libdir}/apitrace/scripts/*.py
+%dir %{_libdir}/apitrace/wrappers
+%attr(755,root,root) %{_libdir}/apitrace/wrappers/egltrace.so
+%attr(755,root,root) %{_libdir}/apitrace/wrappers/glxtrace.so
+
+%if %{with qt}
+%files gui
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/qapitrace
+%endif
diff --git a/system-libs.patch b/system-libs.patch
new file mode 100644
index 0000000..f3a0bd5
--- /dev/null
+++ b/system-libs.patch
@@ -0,0 +1,39 @@
+--- apitrace-12.0/thirdparty/CMakeLists.txt.orig 2024-05-30 20:10:10.000000000 +0200
++++ apitrace-12.0/thirdparty/CMakeLists.txt 2025-05-24 15:27:36.270634240 +0200
+@@ -16,25 +16,6 @@
+ include (${ARGV})
+ endfunction ()
+
+-set (SUBMODULES_MISSING FALSE)
+-foreach (path IN ITEMS
+- brotli/LICENSE
+- gtest/LICENSE
+- libbacktrace/LICENSE
+- libpng/LICENSE
+- snappy/COPYING
+- zlib/README
+- directxmath/LICENSE
+-)
+- if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${path}")
+- message (SEND_ERROR "error: ${CMAKE_CURRENT_SOURCE_DIR}/${path} does not exist")
+- set (SUBMODULES_MISSING TRUE)
+- endif ()
+-endforeach ()
+-if (SUBMODULES_MISSING)
+- message (FATAL_ERROR "Update Git submodules by running\ngit submodule update --init --depth 1 --recursive")
+-endif ()
+-
+ if (ENABLE_STATIC_SNAPPY OR NOT Snappy_FOUND)
+ message (STATUS "Using bundled Snappy")
+ include_with_scope (snappy.cmake)
+@@ -55,10 +36,6 @@
+ include_with_scope (brotli.cmake)
+ endif ()
+
+-if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
+- include_with_scope (libbacktrace.cmake)
+-endif ()
+-
+ # We use non-standard C++ flags, so we can't just use GTest's CMakeLists.txt
+ if (NOT GTEST_FOUND)
+ message (STATUS "Using bundled GTest")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apitrace.git/commitdiff/137f6602830d923e42112b9f398024e4dd0853bd
More information about the pld-cvs-commit
mailing list