Source

pyside_aur / python-shibokengenerator / py3build.patch

Full commit
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0a014c..f54c08f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,7 @@ if (USE_PYTHON3)
     set(PYTHON_DEBUG_LIBRARIES ${PYTHON3_DEBUG_LIBRARIES})
     set(PYTHONINTERP_FOUND ${PYTHON3INTERP_FOUND})
     set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE})
+    set(shiboken_SUFFIX "-py3")
 else()
     find_package(PythonLibs 2.6)
     find_package(PythonInterpWithDebug)
diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in
index 7d8bc86..7155469 100644
--- a/data/ShibokenConfig.cmake.in
+++ b/data/ShibokenConfig.cmake.in
@@ -2,4 +2,4 @@ if (NOT PYTHON_SUFFIX)
     message(STATUS "Using default python: @PYTHON_SUFFIX@")
     SET(PYTHON_SUFFIX @PYTHON_SUFFIX@)
 endif()
-include(@LIB_INSTALL_DIR@/cmake/Shiboken-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
+include(@LIB_INSTALL_DIR@/cmake/Shiboken@shiboken_SUFFIX@-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt
index f3cbe08..03a00fd 100644
--- a/generator/CMakeLists.txt
+++ b/generator/CMakeLists.txt
@@ -17,7 +17,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
                     ${QT_QTCORE_INCLUDE_DIR})
 
 add_library(shiboken_generator SHARED ${shiboken_SRC})
-set_property(TARGET shiboken_generator PROPERTY PREFIX "")
+set_property(TARGET shiboken_generator PROPERTY PREFIX "py3-")
 
 target_link_libraries(shiboken_generator
                       ${APIEXTRACTOR_LIBRARY}
diff --git a/generator/main.cpp b/generator/main.cpp
index 8545bcc..98dcb50 100644
--- a/generator/main.cpp
+++ b/generator/main.cpp
@@ -28,7 +28,7 @@
 int main(int argc, char* argv[])
 {
     QStringList args;
-    args.append("--generator-set=shiboken");
+    args.append("--generator-set=py3-shiboken");
     for (int i = 1; i < argc; i++) {
         if (QString("--version") == argv[i]) {
             std::cout << "shiboken v" SHIBOKEN_VERSION << std::endl;