From b1cbec3c78bc8de919943497e672e7a7e3c4fb11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 19 Mar 2021 23:07:05 +0700 Subject: [PATCH] renderdoc: devendor zstd, lz4 --- .../patches/build-type-none-is-release.patch | 12 ++++ .../renderdoc/patches/qmake-no-rpath.patch | 13 ++++ .../renderdoc/patches/unvendor-zstd-lz4.patch | 68 +++++++++++++++++++ srcpkgs/renderdoc/template | 15 ++-- 4 files changed, 99 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/renderdoc/patches/build-type-none-is-release.patch create mode 100644 srcpkgs/renderdoc/patches/qmake-no-rpath.patch create mode 100644 srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch diff --git a/srcpkgs/renderdoc/patches/build-type-none-is-release.patch b/srcpkgs/renderdoc/patches/build-type-none-is-release.patch new file mode 100644 index 00000000000..f16b944bc12 --- /dev/null +++ b/srcpkgs/renderdoc/patches/build-type-none-is-release.patch @@ -0,0 +1,12 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -315,6 +315,7 @@ set(RELEASE_MODE 0) + + if(cmake_build_type_lower STREQUAL "release" OR + cmake_build_type_lower STREQUAL "relwithdebinfo" OR ++ cmake_build_type_lower STREQUAL "none" OR + cmake_build_type_lower STREQUAL "minsizerel") + add_definitions(-D_RELEASE) + message(STATUS "Building RenderDoc in Release mode: ${CMAKE_BUILD_TYPE}") diff --git a/srcpkgs/renderdoc/patches/qmake-no-rpath.patch b/srcpkgs/renderdoc/patches/qmake-no-rpath.patch new file mode 100644 index 00000000000..6e6325c5355 --- /dev/null +++ b/srcpkgs/renderdoc/patches/qmake-no-rpath.patch @@ -0,0 +1,13 @@ +Index: qrenderdoc/CMakeLists.txt +=================================================================== +--- qrenderdoc/CMakeLists.txt.orig ++++ qrenderdoc/CMakeLists.txt +@@ -144,7 +144,7 @@ endif() + # and finding dependencies from the cmake build + file(WRITE + ${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri +- "CONFIG+=${QMAKE_CONFIG}\n" ++ "CONFIG+=${QMAKE_CONFIG} no_qt_rpath\n" + "\n" + "QMAKE_CC=${CMAKE_C_COMPILER}\n" + "QMAKE_CXX=${CMAKE_CXX_COMPILER}\n" diff --git a/srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch b/srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch new file mode 100644 index 00000000000..d4003ded916 --- /dev/null +++ b/srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch @@ -0,0 +1,68 @@ +Index: renderdoc/CMakeLists.txt +=================================================================== +--- renderdoc/CMakeLists.txt.orig ++++ renderdoc/CMakeLists.txt +@@ -213,54 +213,10 @@ set(sources + 3rdparty/pugixml/pugixml.cpp + 3rdparty/pugixml/pugixml.hpp + 3rdparty/pugixml/pugiconfig.hpp +- 3rdparty/lz4/lz4.c +- 3rdparty/lz4/lz4.h + 3rdparty/miniz/miniz.c + 3rdparty/miniz/miniz.h + 3rdparty/superluminal/superluminal.cpp + 3rdparty/superluminal/superluminal.h +- 3rdparty/zstd/bitstream.h +- 3rdparty/zstd/compiler.h +- 3rdparty/zstd/cpu.h +- 3rdparty/zstd/debug.c +- 3rdparty/zstd/debug.h +- 3rdparty/zstd/entropy_common.c +- 3rdparty/zstd/error_private.c +- 3rdparty/zstd/error_private.h +- 3rdparty/zstd/fse.h +- 3rdparty/zstd/fse_compress.c +- 3rdparty/zstd/fse_decompress.c +- 3rdparty/zstd/hist.c +- 3rdparty/zstd/hist.h +- 3rdparty/zstd/huf.h +- 3rdparty/zstd/huf_compress.c +- 3rdparty/zstd/huf_decompress.c +- 3rdparty/zstd/mem.h +- 3rdparty/zstd/pool.c +- 3rdparty/zstd/pool.h +- 3rdparty/zstd/threading.c +- 3rdparty/zstd/threading.h +- 3rdparty/zstd/xxhash.c +- 3rdparty/zstd/xxhash.h +- 3rdparty/zstd/zstd.h +- 3rdparty/zstd/zstd_common.c +- 3rdparty/zstd/zstd_compress.c +- 3rdparty/zstd/zstd_compress_internal.h +- 3rdparty/zstd/zstd_decompress.c +- 3rdparty/zstd/zstd_double_fast.c +- 3rdparty/zstd/zstd_double_fast.h +- 3rdparty/zstd/zstd_errors.h +- 3rdparty/zstd/zstd_fast.c +- 3rdparty/zstd/zstd_fast.h +- 3rdparty/zstd/zstd_internal.h +- 3rdparty/zstd/zstd_lazy.c +- 3rdparty/zstd/zstd_lazy.h +- 3rdparty/zstd/zstd_ldm.c +- 3rdparty/zstd/zstd_ldm.h +- 3rdparty/zstd/zstd_opt.c +- 3rdparty/zstd/zstd_opt.h +- 3rdparty/zstd/zstdmt_compress.c +- 3rdparty/zstd/zstdmt_compress.h + 3rdparty/stb/stb_image.h + 3rdparty/stb/stb_image_write.h + 3rdparty/stb/stb_image_resize.h +@@ -271,6 +227,8 @@ set(sources + 3rdparty/tinyfiledialogs/tinyfiledialogs.c + 3rdparty/tinyfiledialogs/tinyfiledialogs.h) + ++list(APPEND RDOC_LIBRARIES -llz4 -lzstd) ++ + if(ANDROID) + list(APPEND sources + data/embedded_files.h diff --git a/srcpkgs/renderdoc/template b/srcpkgs/renderdoc/template index 7240e9ebc30..4615d45c52c 100644 --- a/srcpkgs/renderdoc/template +++ b/srcpkgs/renderdoc/template @@ -1,13 +1,14 @@ # Template file for 'renderdoc' pkgname=renderdoc version=1.12 -revision=1 +revision=2 build_style=cmake configure_args="-DENABLE_GL=ON -DENABLE_GLES=ON -DENABLE_QRENDERDOC=ON -DENABLE_RENDERDOCCMD=ON -DENABLE_VULKAN=ON -DENABLE_XCB=ON -DENABLE_XLIB=ON -DENABLE_PYRENDERDOC=ON" -hostmakedepends="bison autoconf automake pkg-config python3" +hostmakedepends="bison autoconf automake pkg-config python3 swig" makedepends="libX11-devel libxcb-devel xcb-util-keysyms-devel qt5-devel + libzstd-devel liblz4-devel qt5-svg-devel qt5-x11extras-devel pcre-devel python3-devel" short_desc="Stand-alone graphics debugging tool for Vulkan and OpenGL" maintainer="Urs Schulz " @@ -19,19 +20,14 @@ checksum=4dece1b4cb859a76533b28fcd50e17321acfaa81c3435500a006c4a5ba15fddb if [ "$XBPS_TARGET_LIBC" = musl ]; then makedepends+=" libexecinfo-devel" LDLIBS="-lexecinfo" + broken="uses RTLD_DL_LINKMAP, RTLD_DEEPBIND, _r_debug" fi if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" fi -case "$XBPS_TARGET_MACHINE" in - *-musl) broken="uses RTLD_DL_LINKMAP, RTLD_DEEPBIND, _r_debug" ;; -esac - -if [ "$CROSS_BUILD" ]; then - broken="Cross-compilation can't find python3 interpreter" -fi +nocross="Cross-compilation can't find python3 interpreter" post_patch() { [ -z "$XBPS_TARGET_NO_ATOMIC8" ] && return 0 @@ -40,4 +36,5 @@ post_patch() { post_install() { vlicense LICENSE.md + vlicense docs/credits_acknowledgements.rst }