commit:     d1bf9c3ea3f709ace61dbe1857b0474e929ac837
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 26 14:28:03 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 14:34:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1bf9c3e

dev-python/pyside2-tools: also install pyside_tool.py

This mirrors the recent changes to pyside6-tools

Bug: https://bugs.gentoo.org/916213
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../files/pyside2-tools-5.15.11-no-copy-uic.patch  | 43 ++++++++++++++++++++++
 ...5.11.ebuild => pyside2-tools-5.15.11-r1.ebuild} | 23 +++++-------
 2 files changed, 52 insertions(+), 14 deletions(-)

diff --git 
a/dev-python/pyside2-tools/files/pyside2-tools-5.15.11-no-copy-uic.patch 
b/dev-python/pyside2-tools/files/pyside2-tools-5.15.11-no-copy-uic.patch
new file mode 100644
index 000000000000..90bc53c90d89
--- /dev/null
+++ b/dev-python/pyside2-tools/files/pyside2-tools-5.15.11-no-copy-uic.patch
@@ -0,0 +1,43 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 20a5e19..575c1df 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -55,38 +55,6 @@ else()
+     set(DESIGNER_PATH "${TOOLS_PATH}/designer${EXE_EXT}")
+ endif()
+ 
+-install(FILES "${UIC_PATH}"
+-        DESTINATION bin
+-        PERMISSIONS
+-        OWNER_EXECUTE OWNER_WRITE OWNER_READ
+-        GROUP_EXECUTE GROUP_READ
+-        WORLD_EXECUTE WORLD_READ)
+-
+-install(FILES "${RCC_PATH}"
+-        DESTINATION bin
+-        PERMISSIONS
+-        OWNER_EXECUTE OWNER_WRITE OWNER_READ
+-        GROUP_EXECUTE GROUP_READ
+-        WORLD_EXECUTE WORLD_READ)
+-
+-if (EXISTS ${DESIGNER_PATH})
+-    if (APPLE)
+-        install(DIRECTORY "${DESIGNER_PATH}"
+-                DESTINATION bin
+-                FILE_PERMISSIONS
+-                OWNER_EXECUTE OWNER_WRITE OWNER_READ
+-                GROUP_EXECUTE GROUP_READ
+-                WORLD_EXECUTE WORLD_READ)
+-    else()
+-        install(FILES "${DESIGNER_PATH}"
+-                DESTINATION bin
+-                PERMISSIONS
+-                OWNER_EXECUTE OWNER_WRITE OWNER_READ
+-                GROUP_EXECUTE GROUP_READ
+-                WORLD_EXECUTE WORLD_READ)
+-    endif()
+-endif()
+-
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
+                "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+                IMMEDIATE @ONLY)

diff --git a/dev-python/pyside2-tools/pyside2-tools-5.15.11.ebuild 
b/dev-python/pyside2-tools/pyside2-tools-5.15.11-r1.ebuild
similarity index 74%
rename from dev-python/pyside2-tools/pyside2-tools-5.15.11.ebuild
rename to dev-python/pyside2-tools/pyside2-tools-5.15.11-r1.ebuild
index 5d7bb774f990..b95967aad0ea 100644
--- a/dev-python/pyside2-tools/pyside2-tools-5.15.11.ebuild
+++ b/dev-python/pyside2-tools/pyside2-tools-5.15.11-r1.ebuild
@@ -6,7 +6,6 @@ EAPI=8
 # TODO: Add PyPy once officially supported. See also:
 #     https://bugreports.qt.io/browse/PYSIDE-535
 PYTHON_COMPAT=( python3_{10..11} )
-CMAKE_IN_SOURCE_BUILD=1
 
 inherit cmake python-r1
 
@@ -27,11 +26,9 @@ RDEPEND="${PYTHON_DEPS}
 "
 DEPEND="${RDEPEND}"
 
-DOCS=( README.md )
-
 # the tools conflict with tools from QT
 PATCHES=(
-       "${FILESDIR}/${PN}-5.15.1-dont-install-tools.patch"
+       "${FILESDIR}/${PN}-5.15.11-no-copy-uic.patch"
 )
 
 src_prepare() {
@@ -41,17 +38,12 @@ src_prepare() {
 }
 
 src_configure() {
-       # The tests are only related to the tools that we don't install
-       local mycmakeargs=(
-               -DBUILD_TESTS=OFF
-       )
-
        pyside-tools_configure() {
                local mycmakeargs=(
-                       "${mycmakeargs[@]}"
+                       -DBUILD_TESTS=OFF
                        -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}"
                )
-               CMAKE_USE_DIR="${BUILD_DIR}" cmake_src_configure
+               cmake_src_configure
        }
 
        python_foreach_impl pyside-tools_configure
@@ -59,7 +51,7 @@ src_configure() {
 
 src_compile() {
        pyside-tools_compile() {
-               CMAKE_USE_DIR="${BUILD_DIR}" cmake_src_compile
+               cmake_src_compile
        }
 
        python_foreach_impl pyside-tools_compile
@@ -67,11 +59,14 @@ src_compile() {
 
 src_install() {
        pyside-tools_install() {
-               python_doexe "${BUILD_DIR}/pylupdate/pyside2-lupdate"
+               # This replicates the contents of the PySide6 pypi wheel
+               DESTDIR="${BUILD_DIR}" cmake_build install
+               dobin "${BUILD_DIR}/usr/bin/pyside2-lupdate"
+               python_moduleinto PySide2/scripts
+               python_domodule "${BUILD_DIR}/usr/bin/pyside_tool.py"
        }
 
        python_foreach_impl pyside-tools_install
 
-       doman pylupdate/pyside2-lupdate.1
        einstalldocs
 }

Reply via email to