diff options
Diffstat (limited to 'dev-debug/apitrace')
-rw-r--r-- | dev-debug/apitrace/Manifest | 7 | ||||
-rw-r--r-- | dev-debug/apitrace/apitrace-9.0-r4.ebuild | 88 | ||||
-rw-r--r-- | dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch | 158 | ||||
-rw-r--r-- | dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch | 53 | ||||
-rw-r--r-- | dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch | 29 | ||||
-rw-r--r-- | dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch | 14 | ||||
-rw-r--r-- | dev-debug/apitrace/metadata.xml | 8 |
7 files changed, 357 insertions, 0 deletions
diff --git a/dev-debug/apitrace/Manifest b/dev-debug/apitrace/Manifest new file mode 100644 index 000000000000..5b837b652d00 --- /dev/null +++ b/dev-debug/apitrace/Manifest @@ -0,0 +1,7 @@ +AUX apitrace-9.0-brotli-unbundle.patch 4728 BLAKE2B 66ff205968db551cdd8ebc7ba33dfcd39fd36356691722f593f7ce0fa615279c0e440077b3e29c5a643bf5be8a2406a656bfa91fb9f128c2afa922b3ad832a35 SHA512 0690f8d178fd7a5ca11b26d1e23c9c26e984214cef2e3619a22fc6cf58a7ee96fe0b046dd038c202cd6f60b9175dbdd346813c53ca85932f9a4d9dd40e9bdba1 +AUX apitrace-9.0-disable-multiarch.patch 1796 BLAKE2B c687c87b23f3711bd9ac70a345e7e2fbe7dab36f48cbf5a949d7fbeab41ac670054bcee203bf4db8df24cdabc418b7a04980fd1436962a15a8c6371e7d8d0f05 SHA512 5bb89dc98e5bbd92b707988d301ec50ea57f1562bd9a54fc2dada9b5ddafde5da66dd02d03efc377cbcf2bdc7d430f0b1353ed7a7f2d8703aabfeb9b563c1278 +AUX apitrace-9.0-libc-dlopen-glibc-2.34.patch 785 BLAKE2B 0339c808f83ecb18e42fe643a0de01b3f8566251e805bc5eace16f7d77571cde85d9cd2eef24e408202591a7b7ad0f1ec2c090b4ce8525b54057dd55cf08009c SHA512 54a7cf81370de87b28e18840b7644aa764d67096268d49324cc25b2f0cf256eb44e4da10cd63fc5fae8b8fcfac4d9eccb840b24778accb3e76c992eda06e2af7 +AUX apitrace-9.0-pkgconfig-waffle.patch 542 BLAKE2B a547dc8e71d6e6e781c685fad942bda6799d3d98c0e29a83ad65b0659c50d5ae81f35fee3e6abf1fb36f970db426785b0bcd15f30308ed3bad8b6ff5f4f152cd SHA512 1f3ef8e15a17f7684d6768e16656aef5ce32b173c8420ed2ccb29dd831f18bcee23189a6738ed0e89a990ca04303f1c16d024f429fba90836d967f1fc8486834 +DIST apitrace-9.0.tar.gz 3623693 BLAKE2B 885cfd22d1cc82e36f7f0d65b816784986a8a693d04b483c059d3cffb0328c2cbbfd043793b964cea84d7b09a0dc8dda5f464099e91df26fd5eecef4bbeb28cc SHA512 4234bc2d14378b1bd9554752d83f8ce0703b4e08c3edc85769dc988a2b3a44b8e55d2f5856954658155a11d69802849bae6350ed5031a5916c7ac7bc7287918c +EBUILD apitrace-9.0-r4.ebuild 2379 BLAKE2B d611dad9ada8fb9bb0c28bfe98f2a95507e77854b56476cda448ae2ed848080118251a2b8bfcfc9381b45477977cf9669885bf5e24aa192fb6123bdf52e4e2bc SHA512 604e210c2f72a20bef7af04d2747b64337acca15d906af053c38377483ceb164edf06d922e87f671d17c406c33e46230492e259d8066d1b2bd201f881e796d73 +MISC metadata.xml 250 BLAKE2B a9437881337420620edfaa0a3f4e7660a47100479c9d360dfb3b8304eaa085d5f2bb97ea8d823fc6be282fd4f2964cf12d189ec0e6d18a09ea513809e5bd5cde SHA512 284c9edd2a7f91f48402414ec05379f5a9a40ca67f02ddc4dbf3bbc45f83cfe01aa54442af0016dcf8495bb6291423def988f0bba616c5a5024011c4e97fde57 diff --git a/dev-debug/apitrace/apitrace-9.0-r4.ebuild b/dev-debug/apitrace/apitrace-9.0-r4.ebuild new file mode 100644 index 000000000000..b78a91aa9c82 --- /dev/null +++ b/dev-debug/apitrace/apitrace-9.0-r4.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit cmake-multilib multilib python-single-r1 + +DESCRIPTION="Tool for tracing, analyzing, and debugging graphics APIs" +HOMEPAGE="https://github.com/apitrace/apitrace" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="qt5 X" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="${PYTHON_DEPS} + app-arch/brotli:=[${MULTILIB_USEDEP}] + >=app-arch/snappy-1.1.1[${MULTILIB_USEDEP}] + media-libs/libpng:0= + media-libs/mesa[egl(+),gles1,gles2,X?,${MULTILIB_USEDEP}] + >=media-libs/waffle-1.6.0-r1[egl(+),${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + sys-process/procps:=[${MULTILIB_USEDEP}] + X? ( x11-libs/libX11 ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5[-gles2-only] + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5[-gles2-only] + ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + # TODO: upstream + "${FILESDIR}"/${P}-disable-multiarch.patch + "${FILESDIR}"/${P}-brotli-unbundle.patch + "${FILESDIR}"/${P}-libc-dlopen-glibc-2.34.patch + "${FILESDIR}"/${P}-pkgconfig-waffle.patch +) + +src_prepare() { + cmake_src_prepare + + # The apitrace code grubs around in the internal zlib structures. + # We have to extract this header and clean it up to keep that working. + # Do not be surprised if a zlib upgrade breaks things ... + rm -rf thirdparty/{brotli,snappy,getopt,less,libpng,zlib,dxerr,directxtex,devcon} || die +} + +src_configure() { + my_configure() { + local mycmakeargs=( + -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF} + -DENABLE_X11=$(usex X) + -DENABLE_EGL=ON + -DENABLE_CLI=ON + -DENABLE_GUI=$(multilib_native_usex qt5) + -DENABLE_STATIC_SNAPPY=OFF + -DENABLE_WAFFLE=ON + -DPython3_EXECUTABLE="${PYTHON}" + ) + cmake_src_configure + } + + multilib_foreach_abi my_configure +} + +src_install() { + MULTILIB_CHOST_TOOLS=( + /usr/bin/apitrace$(get_exeext) + /usr/bin/eglretrace$(get_exeext) + ) + use X && MULTILIB_CHOST_TOOLS+=( /usr/bin/glretrace$(get_exeext) ) + + cmake-multilib_src_install + + make_libgl_symlinks() { + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1 + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1.2 + } + use X && multilib_foreach_abi make_libgl_symlinks +} diff --git a/dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch b/dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch new file mode 100644 index 000000000000..5715edaec3f0 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch @@ -0,0 +1,158 @@ +From 3a07d551949ff488d1d669600a07d9c73ff4cc55 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Mon, 29 Apr 2019 21:08:02 +0200 +Subject: [PATCH 1/2] Import FindBrotliDec.cmake and FindBrotliEnc.cmake from + Igalia S.L. + +MIT License, which fits well. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + cmake/FindBrotliDec.cmake | 35 +++++++++++++++++++++++++++++++++++ + cmake/FindBrotliEnc.cmake | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 70 insertions(+) + create mode 100644 cmake/FindBrotliDec.cmake + create mode 100644 cmake/FindBrotliEnc.cmake + +diff --git a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake +new file mode 100644 +index 00000000..abb06f44 +--- /dev/null ++++ b/cmake/FindBrotliDec.cmake +@@ -0,0 +1,35 @@ ++# Copyright 2017 Igalia S.L. All Rights Reserved. ++# ++# Distributed under MIT license. ++# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT ++ ++# Try to find BrotliDec. Once done, this will define ++# ++# BROTLIDEC_FOUND - system has BrotliDec. ++# BROTLIDEC_INCLUDE_DIRS - the BrotliDec include directories ++# BROTLIDEC_LIBRARIES - link these to use BrotliDec. ++ ++find_package(PkgConfig) ++ ++pkg_check_modules(PC_BROTLIDEC libbrotlidec) ++ ++find_path(BROTLIDEC_INCLUDE_DIRS ++ NAMES brotli/decode.h ++ HINTS ${PC_BROTLIDEC_INCLUDEDIR} ++) ++ ++find_library(BROTLIDEC_LIBRARIES ++ NAMES brotlidec ++ HINTS ${PC_BROTLIDEC_LIBDIR} ++) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(BrotliDec ++ REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES ++ FOUND_VAR BROTLIDEC_FOUND ++ VERSION_VAR PC_BROTLIDEC_VERSION) ++ ++mark_as_advanced( ++ BROTLIDEC_INCLUDE_DIRS ++ BROTLIDEC_LIBRARIES ++) +diff --git a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake +new file mode 100644 +index 00000000..4be347db +--- /dev/null ++++ b/cmake/FindBrotliEnc.cmake +@@ -0,0 +1,35 @@ ++# Copyright 2017 Igalia S.L. All Rights Reserved. ++# ++# Distributed under MIT license. ++# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT ++ ++# Try to find BrotliEnc. Once done, this will define ++# ++# BROTLIENC_FOUND - system has BrotliEnc. ++# BROTLIENC_INCLUDE_DIRS - the BrotliEnc include directories ++# BROTLIENC_LIBRARIES - link these to use BrotliEnc. ++ ++find_package(PkgConfig) ++ ++pkg_check_modules(PC_BROTLIENC libbrotlienc) ++ ++find_path(BROTLIENC_INCLUDE_DIRS ++ NAMES brotli/encode.h ++ HINTS ${PC_BROTLIENC_INCLUDEDIR} ++) ++ ++find_library(BROTLIENC_LIBRARIES ++ NAMES brotlienc ++ HINTS ${PC_BROTLIENC_LIBDIR} ++) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(BrotliEnc ++ REQUIRED_VARS BROTLIENC_INCLUDE_DIRS BROTLIENC_LIBRARIES ++ FOUND_VAR BROTLIENC_FOUND ++ VERSION_VAR PC_BROTLIENC_VERSION) ++ ++mark_as_advanced( ++ BROTLIENC_INCLUDE_DIRS ++ BROTLIENC_LIBRARIES ++) +-- +2.24.1 + +From 08a410f238aaf6488759e023b66d16cbbd7f6d66 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Mon, 29 Apr 2019 21:11:57 +0200 +Subject: [PATCH 2/2] Find system brotli instead of bundled + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 5 +++-- + cli/CMakeLists.txt | 2 +- + lib/trace/CMakeLists.txt | 2 +- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c71d24e6..88e6b156 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -491,8 +491,9 @@ if (ENABLE_STATIC_SNAPPY OR NOT SNAPPY_FOUND) + endif () + include_directories (${SNAPPY_INCLUDE_DIRS}) + +-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/c/include) +-add_subdirectory (thirdparty/brotli) ++find_package(BrotliDec REQUIRED) ++find_package(BrotliEnc REQUIRED) ++include_directories (${BROTLIDEC_INCLUDE_DIRS} ${BROTLIENC_INCLUDE_DIRS}) + + if (NOT WIN32 AND NOT ENABLE_STATIC_EXE) + # zlib 1.2.4-1.2.5 made it impossible to read the last block of incomplete +diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt +index 3a3c127e..0b33ddb5 100644 +--- a/cli/CMakeLists.txt ++++ b/cli/CMakeLists.txt +@@ -39,7 +39,7 @@ add_executable (apitrace + + target_link_libraries (apitrace + common +- brotli_dec brotli_enc brotli_common ++ ${BROTLIDEC_LIBRARIES} ${BROTLIENC_LIBRARIES} + ${ZLIB_LIBRARIES} + ${SNAPPY_LIBRARIES} + ${GETOPT_LIBRARIES} +diff --git a/lib/trace/CMakeLists.txt b/lib/trace/CMakeLists.txt +index c68bd00f..ce2e469e 100644 +--- a/lib/trace/CMakeLists.txt ++++ b/lib/trace/CMakeLists.txt +@@ -31,7 +31,7 @@ target_link_libraries (common + guids + highlight + os +- brotli_dec brotli_common ++ ${BROTLIDEC_LIBRARIES} ${BROTLIENC_LIBRARIES} + ) + + add_gtest (trace_parser_flags_test trace_parser_flags_test.cpp) +-- +2.24.1 + diff --git a/dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch b/dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch new file mode 100644 index 000000000000..37085b1ae299 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch @@ -0,0 +1,53 @@ +From 556397e399994b005524b88171c9c103b8cc1b25 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 29 Apr 2019 20:32:04 +0200 +Subject: [PATCH] Use CMAKE_INSTALL_LIBDIR for LIB_INSTALL_DIR + +Respect the libdir cmake already set up for us instead of using +debian-specific multiarch paths. + +Patch was rebased multiple times from 4.0 to 9.0 now. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 17 ++--------------- + 1 file changed, 2 insertions(+), 15 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 19316e60..6c3c4b85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -438,15 +438,6 @@ endif () + ############################################################################## + # Installation directories + +-if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +- # Debian multiarch support +- execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH +- OUTPUT_VARIABLE ARCH_SUBDIR +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) +-endif() +- + if (WIN32 OR APPLE) + # On Windows/MacOSX, applications are usually installed on a directory of + # their own +@@ -455,12 +446,8 @@ if (WIN32 OR APPLE) + set (LIB_ARCH_INSTALL_DIR lib) + else () + set (DOC_DEFAULT_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME}) +- set (LIB_INSTALL_DIR lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}) +- if (ARCH_SUBDIR) +- set (LIB_ARCH_INSTALL_DIR lib/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME}) +- else () +- set (LIB_ARCH_INSTALL_DIR lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}) +- endif () ++ set (LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}) ++ set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR}) + endif () + + # Allow customization of the doc installation dir (Slackware uses different +-- +2.24.1 + diff --git a/dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch b/dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch new file mode 100644 index 000000000000..6c1aff4bcb31 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch @@ -0,0 +1,29 @@ +https://github.com/apitrace/apitrace/commit/d28a980802ad48568c87da02d630c8babfe163bb.patch +https://bugs.gentoo.org/812155 + +(rebased by sam) + +From: Jose Fonseca <jfonseca@vmware.com> +Date: Wed, 1 Sep 2021 16:34:54 +0100 +Subject: [PATCH] gltrace: Avoid __libc_dlsym and __libc_dlopen_mode on GLIBC + 2.34. + +These GLIBC_PRIVATE symbols are gone from GLIBC 2.34 due to the merge of +libdl.so onto libc.so. + +This means apitrace can't defend against infinite recursion when +used with Steam Overlay, but at least it should work otherwise. + +Fixes https://github.com/apitrace/apitrace/issues/756 +--- a/wrappers/dlsym.cpp ++++ b/wrappers/dlsym.cpp +@@ -34,7 +34,7 @@ + #include "os.hpp" + + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 34 + + + #include <dlfcn.h> + diff --git a/dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch b/dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch new file mode 100644 index 000000000000..6d0450886672 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch @@ -0,0 +1,14 @@ +waffle's upstream intentionally does not ship cmake files anymore +(just a quick fix that works for us, there may be more to consider) + +https://bugs.gentoo.org/901365 +https://gitlab.freedesktop.org/mesa/waffle/-/issues/74 +https://gitlab.freedesktop.org/mesa/waffle/-/commit/a16983fea590491727c8119256c7b938fe1f9d10 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,3 +195,4 @@ + # Use Waffle for eglretrace +- find_package (Waffle REQUIRED) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(Waffle REQUIRED waffle-1) + endif () diff --git a/dev-debug/apitrace/metadata.xml b/dev-debug/apitrace/metadata.xml new file mode 100644 index 000000000000..8fb6e53d307d --- /dev/null +++ b/dev-debug/apitrace/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">apitrace/apitrace</remote-id> + </upstream> +</pkgmetadata> |