renderdoc: fix and rebuild for Python 3.8.

This commit is contained in:
Leah Neukirchen 2019-10-19 16:32:36 +02:00
parent 0089fe641a
commit 5018ce3ba7
3 changed files with 81 additions and 3 deletions

View file

@ -0,0 +1,28 @@
From dbe955dd0300d55a32fd73a4eef730b3e30ed5c4 Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Thu, 11 Jul 2019 20:32:03 +0200
Subject: [PATCH] swig: avoid use of _PyObject_GC_UNTRACK
It is deprecated[1]. Use PyObject_GC_UnTrack instead.
[1] https://docs.python.org/3/c-api/gcsupport.html#c._PyObject_GC_UNTRACK
---
Lib/python/builtin.swg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/python/builtin.swg b/Lib/python/builtin.swg
index 9597653b7..6af45a9d1 100644
--- a/Lib/python/builtin.swg
+++ b/Lib/python/builtin.swg
@@ -120,7 +120,7 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure)
SWIGINTERN void
SwigPyStaticVar_dealloc(PyDescrObject *descr) {
- _PyObject_GC_UNTRACK(descr);
+ PyObject_GC_UnTrack(descr);
Py_XDECREF(PyDescr_TYPE(descr));
Py_XDECREF(PyDescr_NAME(descr));
PyObject_GC_Del(descr);
--
2.21.0

View file

@ -0,0 +1,48 @@
From 56769d3e2cc12670b73a1ddd9dfaab959340c2e2 Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Thu, 11 Jul 2019 21:27:02 +0200
Subject: [PATCH] CMake: py3.8 support, ability to patch swig
Add 3.8 to list of python versions and ability to patch the custom
swig, also needed for 3.8
---
CMakeLists.txt | 2 +-
qrenderdoc/CMakeLists.txt | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13818e5b8..00feda2ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -308,7 +308,7 @@ add_subdirectory(renderdoc)
# are handled in common
if(ENABLE_QRENDERDOC OR ENABLE_PYRENDERDOC)
# Make sure Python 3 is found
- set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7)
+ set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8)
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibs 3 REQUIRED)
# we also need python3-config for swig
diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt
index 9fd65b2d3..1ef284349 100644
--- a/qrenderdoc/CMakeLists.txt
+++ b/qrenderdoc/CMakeLists.txt
@@ -7,6 +7,7 @@ endif()
set(QMAKE_QT5_COMMAND ${QT_QMAKE_EXECUTABLE} CACHE STRING "Command to run to invoke Qt5's qmake. Normally this is qmake, possibly with qtchooser, but might be qmake-qt5")
set(RENDERDOC_SWIG_PACKAGE https://github.com/baldurk/swig/archive/renderdoc-modified-6.zip CACHE STRING "The location where RenderDoc's swig fork source can be found. By default points to the URL on github but can be pointed to a local file.")
+set(RENDERDOC_SWIG_PATCH "" CACHE STRING "The location for the patch to apply to swig.")
set(QMAKE_CONFIG "debug")
set(QMAKE_LDFLAGS "")
@@ -99,6 +100,7 @@ ExternalProject_Add(custom_swig
# using an URL to a zip directly so we don't clone the history etc
URL ${RENDERDOC_SWIG_PACKAGE}
BUILD_IN_SOURCE 1
+ PATCH_COMMAND patch -p1 -i ${RENDERDOC_SWIG_PATCH} > /dev/null
CONFIGURE_COMMAND ./autogen.sh > /dev/null 2>&1
COMMAND CC=${SWIG_CONFIGURE_CC} CXX=${SWIG_CONFIGURE_CXX} CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --with-pcre=yes --prefix=${CMAKE_BINARY_DIR} > /dev/null
BUILD_COMMAND ${GENERATOR_MAKE} > /dev/null 2>&1
--
2.21.0

View file

@ -1,11 +1,13 @@
# Template file for 'renderdoc'
pkgname=renderdoc
version=1.4
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"
-DENABLE_PYRENDERDOC=ON
-DRENDERDOC_SWIG_PATCH=${XBPS_SRCPKGDIR}/${pkgname}/files/swig-py38.patch"
patch_args="-p1"
hostmakedepends="bison autoconf automake pkg-config python3"
makedepends="libX11-devel libxcb-devel xcb-util-keysyms-devel libGL qt5-devel
qt5-svg-devel qt5-x11extras-devel pcre-devel python3-devel"
@ -17,7 +19,7 @@ distfiles="https://github.com/baldurk/${pkgname}/archive/v${version}.tar.gz"
checksum=9a78951f386fb7c3ecf7df6919d300db59719d14f0621438963ae30a75d33677
case "$XBPS_TARGET_MACHINE" in
*-musl) broken="This package uses execnfo.h which is not available on musl"
*-musl) broken="This package uses execinfo.h which is not available on musl"
esac
if [ "$CROSS_BUILD" ]; then