mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
graphics/apitrace: Updated for version 11.1.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
69f814e3c2
commit
f616687bc3
3 changed files with 84 additions and 7 deletions
61
graphics/apitrace/apitrace-11-thirdparty.patch
Normal file
61
graphics/apitrace/apitrace-11-thirdparty.patch
Normal file
|
@ -0,0 +1,61 @@
|
|||
--- apitrace-11.1/CMakeLists.txt 2022-05-21 00:14:48.000000000 +1000
|
||||
+++ apitrace-11.1-patched/CMakeLists.txt 2023-09-23 08:21:56.858903298 +1000
|
||||
@@ -492,7 +492,9 @@
|
||||
pkg_check_modules (BROTLIENC IMPORTED_TARGET libbrotlienc>=1.0.7)
|
||||
endif ()
|
||||
|
||||
- find_package (GTest)
|
||||
+ if (BUILD_TESTING)
|
||||
+ find_package (GTest)
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
add_subdirectory (thirdparty)
|
||||
@@ -504,12 +506,15 @@
|
||||
include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khronos)
|
||||
|
||||
# Convenience macro for adding unit tests
|
||||
-macro (add_gtest)
|
||||
- add_executable (${ARGV})
|
||||
- target_link_libraries (${ARGV0} GTest::GTest)
|
||||
- add_dependencies (check ${ARGV0})
|
||||
- add_test (NAME ${ARGV0} COMMAND ${ARGV0})
|
||||
-endmacro ()
|
||||
+# Should only be invoked when BUILD_TESTING is enabled
|
||||
+if (BUILD_TESTING)
|
||||
+ macro (add_gtest)
|
||||
+ add_executable (${ARGV})
|
||||
+ target_link_libraries (${ARGV0} GTest::GTest)
|
||||
+ add_dependencies (check ${ARGV0})
|
||||
+ add_test (NAME ${ARGV0} COMMAND ${ARGV0})
|
||||
+ endmacro ()
|
||||
+endif ()
|
||||
|
||||
|
||||
##############################################################################
|
||||
--- apitrace-11.1/thirdparty/CMakeLists.txt 2022-05-21 00:14:48.000000000 +1000
|
||||
+++ apitrace-11.1-patched/thirdparty/CMakeLists.txt 2023-09-23 08:21:56.859903298 +1000
|
||||
@@ -23,12 +23,12 @@
|
||||
zlib/README
|
||||
)
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${path}")
|
||||
- message (SEND_ERROR "error: ${CMAKE_CURRENT_SOURCE_DIR}/${path} does not exist")
|
||||
+ message (STATUS "${CMAKE_CURRENT_SOURCE_DIR}/${path} does not exist, relying on system version")
|
||||
set (SUBMODULES_MISSING TRUE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
if (SUBMODULES_MISSING)
|
||||
- message (FATAL_ERROR "Update Git submodules by running\ngit submodule update --init --depth 1 --recursive")
|
||||
+ message (WARNING "If any dependencies are not found, update Git submodules by running\ngit submodule update --init --depth 1 --recursive")
|
||||
endif ()
|
||||
|
||||
if (ENABLE_STATIC_SNAPPY OR NOT Snappy_FOUND)
|
||||
@@ -56,7 +56,7 @@
|
||||
endif ()
|
||||
|
||||
# We use non-standard C++ flags, so we can't just use GTest's CMakeLists.txt
|
||||
-if (NOT GTEST_FOUND)
|
||||
+if (BUILD_TESTING AND NOT GTEST_FOUND)
|
||||
message (STATUS "Using bundled GTest")
|
||||
include_with_scope (gtest.cmake)
|
||||
endif ()
|
|
@ -28,10 +28,11 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=apitrace
|
||||
VERSION=${VERSION:-9.0}
|
||||
VERSION=${VERSION:-11.1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
LIBBACKTRACE_COMMIT=${LIBBACKTRACE_COMMIT:-9ae4f4ae4481b1e69d38ed810980d33103544613}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
|
@ -84,6 +85,17 @@ find -L . \
|
|||
# directory (because we don't really support debian-style multiarch).
|
||||
sed -i 's,dpkg-architecture,true,' CMakeLists.txt
|
||||
|
||||
# 20230920 bcs: Patch to allow building without googletest, and to
|
||||
# allow use of system packages for most dependencies. libbacktrace
|
||||
# is the only one that doesn't already have a SlackBuild script.
|
||||
patch -p1 < $CWD/apitrace-11-thirdparty.patch
|
||||
(
|
||||
cd thirdparty
|
||||
rm -rf libbacktrace
|
||||
tar -xf $CWD/libbacktrace-$LIBBACKTRACE_COMMIT.tar.gz
|
||||
mv libbacktrace-$LIBBACKTRACE_COMMIT libbacktrace
|
||||
)
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
|
@ -93,6 +105,8 @@ cd build
|
|||
-DDOC_INSTALL_DIR=doc/$PRGNAM-$VERSION \
|
||||
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
|
||||
-DENABLE_STATIC_SNAPPY=OFF \
|
||||
-DBUILD_TESTING=no \
|
||||
-DDEFAULT_APITRACE_VERSION=${VERSION} \
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
make install/strip DESTDIR=$PKG
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
PRGNAM="apitrace"
|
||||
VERSION="9.0"
|
||||
VERSION="11.1"
|
||||
HOMEPAGE="https://apitrace.github.io/"
|
||||
DOWNLOAD="https://github.com/apitrace/apitrace/archive/9.0/apitrace-9.0.tar.gz"
|
||||
MD5SUM="83bacfb35f4f339571702099d283f571"
|
||||
DOWNLOAD="https://github.com/apitrace/apitrace/archive/11.1/apitrace-11.1.tar.gz \
|
||||
https://github.com/ianlancetaylor/libbacktrace/archive/9ae4f4ae4481b1e69d38ed810980d33103544613/libbacktrace-9ae4f4ae4481b1e69d38ed810980d33103544613.tar.gz"
|
||||
MD5SUM="28a1eb4a7b69dd7c419378cd00d73e2b \
|
||||
0a6b1da56e805d627daeb5927e4f7bc4"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="Hunter Sezen"
|
||||
EMAIL="orbea@riseup.net"
|
||||
REQUIRES="snappy"
|
||||
MAINTAINER="Brent Spillner"
|
||||
EMAIL="spillner@acm.org"
|
||||
|
|
Loading…
Reference in a new issue