diff options
author | Brent Spillner <spillner@acm.org> | 2023-09-23 09:41:18 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-09-23 11:33:31 +0700 |
commit | f616687bc379799667d1615b49bd676e80b2e8f3 (patch) | |
tree | e336a8d667d25d422814a5911661f137f32c9df8 /graphics | |
parent | 69f814e3c2ef44792938ffbf95fad943f7329845 (diff) |
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>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/apitrace/apitrace-11-thirdparty.patch | 61 | ||||
-rw-r--r-- | graphics/apitrace/apitrace.SlackBuild | 16 | ||||
-rw-r--r-- | graphics/apitrace/apitrace.info | 14 |
3 files changed, 84 insertions, 7 deletions
diff --git a/graphics/apitrace/apitrace-11-thirdparty.patch b/graphics/apitrace/apitrace-11-thirdparty.patch new file mode 100644 index 0000000000000..23b8a1aeca90e --- /dev/null +++ b/graphics/apitrace/apitrace-11-thirdparty.patch @@ -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 () diff --git a/graphics/apitrace/apitrace.SlackBuild b/graphics/apitrace/apitrace.SlackBuild index f44b48fc4633e..6b9d6d9234416 100644 --- a/graphics/apitrace/apitrace.SlackBuild +++ b/graphics/apitrace/apitrace.SlackBuild @@ -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 diff --git a/graphics/apitrace/apitrace.info b/graphics/apitrace/apitrace.info index 33b4734337ec6..70d45a22201f5 100644 --- a/graphics/apitrace/apitrace.info +++ b/graphics/apitrace/apitrace.info @@ -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" |