summaryrefslogtreecommitdiff
path: root/net/libarcus/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/libarcus/files')
-rw-r--r--net/libarcus/files/patch-CMakeLists.txt11
-rw-r--r--net/libarcus/files/patch-cmake_FindSIP.cmake32
2 files changed, 43 insertions, 0 deletions
diff --git a/net/libarcus/files/patch-CMakeLists.txt b/net/libarcus/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..811f9f88ee3a
--- /dev/null
+++ b/net/libarcus/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2020-10-11 05:33:17 UTC
++++ CMakeLists.txt
+@@ -94,7 +94,7 @@ endif()
+ if(BUILD_PYTHON)
+ set(SIP_EXTRA_FILES_DEPEND python/SocketListener.sip python/Types.sip python/PythonMessage.sip python/Error.sip)
+ set(SIP_EXTRA_SOURCE_FILES python/PythonMessage.cpp)
+- set(SIP_EXTRA_OPTIONS -g) # -g means always release the GIL before calling C++ methods.
++ set(SIP_EXTRA_OPTIONS -g -n PyQt5.sip) # -g means always release the GIL before calling C++ methods.
+ add_sip_python_module(Arcus python/Socket.sip Arcus)
+ endif()
+
diff --git a/net/libarcus/files/patch-cmake_FindSIP.cmake b/net/libarcus/files/patch-cmake_FindSIP.cmake
new file mode 100644
index 000000000000..afebfef4de87
--- /dev/null
+++ b/net/libarcus/files/patch-cmake_FindSIP.cmake
@@ -0,0 +1,32 @@
+--- cmake/FindSIP.cmake.orig 2020-10-11 05:01:30 UTC
++++ cmake/FindSIP.cmake
+@@ -68,16 +68,26 @@ endif()
+
+ get_filename_component(_python_binary_path ${Python3_EXECUTABLE} DIRECTORY)
+
+-find_program(SIP_EXECUTABLE sip
++find_program(SIP_EXECUTABLE sip5
+ HINTS ${CMAKE_PREFIX_PATH}/bin ${CMAKE_INSTALL_PATH}/bin ${_python_binary_path} ${Python3_SITELIB}/PyQt5
+ )
+
++execute_process(
++ COMMAND sip-module --sip-h --target-dir ${CMAKE_BINARY_DIR} PyQt5.sip
++ RESULT_VARIABLE _process_status
++ OUTPUT_VARIABLE _process_output
++ OUTPUT_STRIP_TRAILING_WHITESPACE
++ )
++if(NOT ${_process_status} EQUAL 0)
++ message(FATAL_ERROR "Failed to get sip.h. Error: ${_process_output}")
++endif()
++
+ find_path(SIP_INCLUDE_DIRS sip.h
+- HINTS ${CMAKE_PREFIX_PATH}/include ${CMAKE_INSTALL_PATH}/include ${Python3_INCLUDE_DIRS} ${Python3_SITELIB}/PyQt5
++ HINTS ${CMAKE_BINARY_DIR} ${CMAKE_PREFIX_PATH}/include ${CMAKE_INSTALL_PATH}/include ${Python3_INCLUDE_DIRS} ${Python3_SITELIB}/PyQt5
+ )
+
+ execute_process(
+- COMMAND ${Python3_EXECUTABLE} -c "import sip; print(sip.SIP_VERSION_STR)"
++ COMMAND ${Python3_EXECUTABLE} -c "import PyQt5.sip; print(PyQt5.sip.SIP_VERSION_STR)"
+ RESULT_VARIABLE _process_status
+ OUTPUT_VARIABLE _process_output
+ OUTPUT_STRIP_TRAILING_WHITESPACE