1 |
commit: 0c7c8a88983eb3cf2fa4b2100b1ceab51108b193 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 4 08:30:31 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 4 08:30:31 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c7c8a88 |
7 |
|
8 |
dev-python/shiboken2: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/shiboken2/Manifest | 1 - |
13 |
dev-python/shiboken2/shiboken2-5.15.5.ebuild | 172 --------------------------- |
14 |
2 files changed, 173 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/shiboken2/Manifest b/dev-python/shiboken2/Manifest |
17 |
index a69f8b0496e6..f25edabff17a 100644 |
18 |
--- a/dev-python/shiboken2/Manifest |
19 |
+++ b/dev-python/shiboken2/Manifest |
20 |
@@ -1,2 +1 @@ |
21 |
-DIST pyside-setup-opensource-src-5.15.5.tar.xz 3577972 BLAKE2B ee16ce18ec4103add41ad89b658012cb2e8695bda51269d3cd1614c2b6d029c0eaba5e592d5e58b6267e1ddc020a938d3ccd2fbc9461cc5bf202f3bdbf6b5d62 SHA512 61b987ec823e9a89f2a07a1991d47f36eb45e3ce416aa6e0032a58ba3d623ac26224cb0f43a2db76850bce7290d12fae610de06405350362caac7860ba99f0c3 |
22 |
DIST pyside-setup-opensource-src-5.15.6.tar.xz 3580388 BLAKE2B 8a3b15d073bcbb0c6734f500ca906e56387cb8fc4bfcfd996304d71b54edd5f4568976049519ed26aa718bee9e43f59a0c4ef53837d5a341219b991a8527a800 SHA512 99a0c1a05e722cbf33128cf25742e61b92e151fdc05b79db9bafe778e024a0c6fc2886ee3d0b923ff681c55916f5c0eea4197f174432587fd662fba4390b26f4 |
23 |
|
24 |
diff --git a/dev-python/shiboken2/shiboken2-5.15.5.ebuild b/dev-python/shiboken2/shiboken2-5.15.5.ebuild |
25 |
deleted file mode 100644 |
26 |
index da9a5ff38955..000000000000 |
27 |
--- a/dev-python/shiboken2/shiboken2-5.15.5.ebuild |
28 |
+++ /dev/null |
29 |
@@ -1,172 +0,0 @@ |
30 |
-# Copyright 1999-2022 Gentoo Authors |
31 |
-# Distributed under the terms of the GNU General Public License v2 |
32 |
- |
33 |
-EAPI=8 |
34 |
- |
35 |
-# TODO: Split the "/usr/bin/shiboken2" binding generator from the |
36 |
-# "/usr/lib64/libshiboken2-*.so" family of shared libraries. The former |
37 |
-# requires everything (including Clang) at runtime; the latter only requires |
38 |
-# Qt and Python at runtime. Note that "pip" separates these two as well. See: |
39 |
-# https://doc.qt.io/qtforpython/shiboken2/faq.html#is-there-any-runtime-dependency-on-the-generated-binding |
40 |
-# Once split, the PySide2 ebuild should be revised to require |
41 |
-# "/usr/bin/shiboken2" at build time and "libshiboken2-*.so" at runtime. |
42 |
-# TODO: Add PyPy once officially supported. See also: |
43 |
-# https://bugreports.qt.io/browse/PYSIDE-535 |
44 |
-PYTHON_COMPAT=( python3_{8..11} ) |
45 |
- |
46 |
-inherit cmake llvm python-r1 toolchain-funcs |
47 |
- |
48 |
-MY_P=pyside-setup-opensource-src-${PV} |
49 |
- |
50 |
-DESCRIPTION="Python binding generator for C++ libraries" |
51 |
-HOMEPAGE="https://wiki.qt.io/PySide2" |
52 |
-SRC_URI="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${PV}-src/${MY_P}.tar.xz" |
53 |
-S="${WORKDIR}/${MY_P}/sources/shiboken2" |
54 |
- |
55 |
-# The "sources/shiboken2/libshiboken" directory is triple-licensed under the |
56 |
-# GPL v2, v3+, and LGPL v3. All remaining files are licensed under the GPL v3 |
57 |
-# with version 1.0 of a Qt-specific exception enabling shiboken2 output to be |
58 |
-# arbitrarily relicensed. (TODO) |
59 |
-LICENSE="|| ( GPL-2 GPL-3+ LGPL-3 ) GPL-3" |
60 |
-SLOT="0" |
61 |
-KEYWORDS="amd64 ~arm arm64 x86" |
62 |
-IUSE="+docstrings numpy test vulkan" |
63 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
64 |
- |
65 |
-# Tests fail pretty bad and I'm not fixing them right now |
66 |
-RESTRICT="test" |
67 |
- |
68 |
-# Minimal supported version of Qt. |
69 |
-QT_PV="$(ver_cut 1-2):5" |
70 |
- |
71 |
-# Since Clang is required at both build- and runtime, BDEPEND is omitted here. |
72 |
-RDEPEND="${PYTHON_DEPS} |
73 |
- >=dev-qt/qtcore-${QT_PV} |
74 |
- sys-devel/clang:= |
75 |
- sys-devel/clang-runtime:= |
76 |
- docstrings? ( |
77 |
- >=dev-libs/libxml2-2.6.32 |
78 |
- >=dev-libs/libxslt-1.1.19 |
79 |
- >=dev-qt/qtxml-${QT_PV} |
80 |
- >=dev-qt/qtxmlpatterns-${QT_PV} |
81 |
- ) |
82 |
- numpy? ( dev-python/numpy[${PYTHON_USEDEP}] ) |
83 |
- vulkan? ( dev-util/vulkan-headers ) |
84 |
-" |
85 |
-DEPEND="${RDEPEND} |
86 |
- test? ( >=dev-qt/qttest-${QT_PV} ) |
87 |
-" |
88 |
- |
89 |
-DOCS=( AUTHORS ) |
90 |
- |
91 |
-PATCHES=( |
92 |
- "${FILESDIR}"/${P}-python311-1.patch |
93 |
- "${FILESDIR}"/${P}-python311-2.patch |
94 |
- "${FILESDIR}"/${P}-python311-3.patch |
95 |
- "${FILESDIR}"/${P}-add-numpy-1.23-compatibility.patch |
96 |
-) |
97 |
- |
98 |
-# Ensure the path returned by get_llvm_prefix() contains clang as well. |
99 |
-llvm_check_deps() { |
100 |
- has_version "sys-devel/clang:${LLVM_SLOT}" |
101 |
-} |
102 |
- |
103 |
-src_prepare() { |
104 |
- # TODO: File upstream issue requesting a sane way to disable NumPy support. |
105 |
- if ! use numpy; then |
106 |
- sed -i -e '/\bprint(os\.path\.realpath(numpy))/d' \ |
107 |
- libshiboken/CMakeLists.txt || die |
108 |
- fi |
109 |
- |
110 |
- # Shiboken2 assumes Vulkan headers live under either "$VULKAN_SDK/include" |
111 |
- # or "$VK_SDK_PATH/include" rather than "${EPREFIX}/usr/include/vulkan". |
112 |
- if use vulkan; then |
113 |
- sed -i -e "s~\bdetectVulkan(&headerPaths);~headerPaths.append(HeaderPath{QByteArrayLiteral(\"${EPREFIX}/usr/include/vulkan\"), HeaderType::System});~" \ |
114 |
- ApiExtractor/clangparser/compilersupport.cpp || die |
115 |
- fi |
116 |
- |
117 |
- # Shiboken2 assumes the "/usr/lib/clang/${CLANG_NEWEST_VERSION}/include/" |
118 |
- # subdirectory provides Clang builtin includes (e.g., "stddef.h") for the |
119 |
- # currently installed version of Clang, where ${CLANG_NEWEST_VERSION} is |
120 |
- # the largest version specifier that exists under the "/usr/lib/clang/" |
121 |
- # subdirectory. This assumption is false in edge cases, including when |
122 |
- # users downgrade from newer Clang versions but fail to remove those |
123 |
- # versions with "emerge --depclean". See also: |
124 |
- # https://github.com/leycec/raiagent/issues/85 |
125 |
- # |
126 |
- # Sadly, the clang-* family of functions exported by the "toolchain-funcs" |
127 |
- # eclass are defective, returning nonsensical placeholder strings if the |
128 |
- # end user has *NOT* explicitly configured their C++ compiler to be Clang. |
129 |
- # PySide2 does *NOT* care whether the end user has done so or not, as |
130 |
- # PySide2 unconditionally requires Clang in either case. See also: |
131 |
- # https://bugs.gentoo.org/619490 |
132 |
- sed -i -e 's~(findClangBuiltInIncludesDir())~(QStringLiteral("'"${EPREFIX}"'/usr/lib/clang/'$(CPP=clang clang-fullversion)'/include"))~' \ |
133 |
- ApiExtractor/clangparser/compilersupport.cpp || die |
134 |
- |
135 |
- cmake_src_prepare |
136 |
-} |
137 |
- |
138 |
-src_configure() { |
139 |
- # Minimal tests for now, 2 failing with the extended version |
140 |
- # FIXME Subscripted generics cannot be used with class and instance checks |
141 |
- local mycmakeargs=( |
142 |
- -DBUILD_TESTS=$(usex test) |
143 |
- -DDISABLE_DOCSTRINGS=$(usex !docstrings) |
144 |
- ) |
145 |
- |
146 |
- shiboken2_configure() { |
147 |
- local mycmakeargs=( |
148 |
- "${mycmakeargs[@]}" |
149 |
- -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" |
150 |
- -DPYTHON_EXECUTABLE="${PYTHON}" |
151 |
- -DUSE_PYTHON_VERSION="${EPYTHON#python}" |
152 |
- ) |
153 |
- # CMakeLists.txt expects LLVM_INSTALL_DIR as an environment variable. |
154 |
- local -x LLVM_INSTALL_DIR="$(get_llvm_prefix)" |
155 |
- cmake_src_configure |
156 |
- } |
157 |
- python_foreach_impl shiboken2_configure |
158 |
-} |
159 |
- |
160 |
-src_compile() { |
161 |
- python_foreach_impl cmake_src_compile |
162 |
-} |
163 |
- |
164 |
-src_test() { |
165 |
- python_foreach_impl cmake_src_test |
166 |
-} |
167 |
- |
168 |
-src_install() { |
169 |
- shiboken2_install() { |
170 |
- cmake_src_install |
171 |
- python_optimize |
172 |
- |
173 |
- # Uniquify the "shiboken2" executable for the current Python target, |
174 |
- # preserving an unversioned "shiboken2" file arbitrarily associated |
175 |
- # with the last Python target. |
176 |
- cp "${ED}"/usr/bin/${PN}{,-${EPYTHON}} || die |
177 |
- |
178 |
- # Uniquify the Shiboken2 pkgconfig file for the current Python target, |
179 |
- # preserving an unversioned "shiboken2.pc" file arbitrarily associated |
180 |
- # with the last Python target. See also: |
181 |
- # https://github.com/leycec/raiagent/issues/73 |
182 |
- cp "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}{,-${EPYTHON}}.pc || die |
183 |
- } |
184 |
- python_foreach_impl shiboken2_install |
185 |
- |
186 |
- # CMakeLists.txt installs a "Shiboken2Targets-gentoo.cmake" file forcing |
187 |
- # downstream consumers (e.g., PySide2) to target one "libshiboken2-*.so" |
188 |
- # library and one "shiboken2" executable linked to one Python interpreter. |
189 |
- # See also: |
190 |
- # https://bugreports.qt.io/browse/PYSIDE-1053 |
191 |
- # https://github.com/leycec/raiagent/issues/74 |
192 |
- sed -i \ |
193 |
- -e 's~shiboken2-python[[:digit:]]\+\.[[:digit:]]\+~shiboken2${PYTHON_CONFIG_SUFFIX}~g' \ |
194 |
- -e 's~/bin/shiboken2~/bin/shiboken2${PYTHON_CONFIG_SUFFIX}~g' \ |
195 |
- "${ED}/usr/$(get_libdir)"/cmake/Shiboken2-${PV}/Shiboken2Targets-${CMAKE_BUILD_TYPE,,}.cmake || die |
196 |
- |
197 |
- # Remove the broken "shiboken_tool.py" script. By inspection, this script |
198 |
- # reduces to a noop. Moreover, this script raises the following exception: |
199 |
- # FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/../shiboken_tool.py': '/usr/bin/../shiboken_tool.py' |
200 |
- rm "${ED}"/usr/bin/shiboken_tool.py || die |
201 |
-} |