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