1 |
commit: 066fb2cd1b4cf9f2d90342a048a01d9a3e686bc5 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 4 15:17:56 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 4 15:19:42 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=066fb2cd |
7 |
|
8 |
kde-apps/pykde4: Drop USE=akonadi and Qt4WebKit dependency |
9 |
|
10 |
Gentoo-bug: 610650 |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
kde-apps/pykde4/files/pykde4-4.14.3-nokio.patch | 46 ++++++ |
15 |
kde-apps/pykde4/files/pykde4-4.14.3-noplasma.patch | 27 ++++ |
16 |
kde-apps/pykde4/pykde4-4.14.3-r3.ebuild | 170 +++++++++++++++++++++ |
17 |
3 files changed, 243 insertions(+) |
18 |
|
19 |
diff --git a/kde-apps/pykde4/files/pykde4-4.14.3-nokio.patch b/kde-apps/pykde4/files/pykde4-4.14.3-nokio.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..795bb5ebc37 |
22 |
--- /dev/null |
23 |
+++ b/kde-apps/pykde4/files/pykde4-4.14.3-nokio.patch |
24 |
@@ -0,0 +1,46 @@ |
25 |
+--- a/CMakeLists.txt 2017-03-04 13:39:59.460248598 +0100 |
26 |
++++ b/CMakeLists.txt 2017-03-04 13:56:47.391748964 +0100 |
27 |
+@@ -89,7 +89,6 @@ |
28 |
+ ${QT_QTSVG_INCLUDE_DIR} |
29 |
+ ${KDE4_INCLUDE_DIR} |
30 |
+ ${KDE4_INCLUDE_DIR}/solid |
31 |
+- ${KDE4_INCLUDE_DIR}/kio |
32 |
+ ${KDE4_INCLUDE_DIR}/dom |
33 |
+ ${KDE4_INCLUDE_DIR}/ksettings |
34 |
+ ${KDE4_INCLUDE_DIR}/knewstuff2 |
35 |
+@@ -163,26 +162,10 @@ |
36 |
+ set(SIP_EXTRA_FILES_DEPEND ${kdeui_files_sip}) |
37 |
+ add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY}) |
38 |
+ |
39 |
+-file(GLOB kio_files_sip sip/kio/*.sip) |
40 |
+-set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip}) |
41 |
+-add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_SOLID_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS}) |
42 |
+- |
43 |
+ file(GLOB kutils_files_sip sip/kutils/*.sip) |
44 |
+ set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip}) |
45 |
+ add_sip_python_module(PyKDE4.kutils sip/kutils/kutilsmod.sip ${KDE4_KUTILS_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS}) |
46 |
+ |
47 |
+-file(GLOB kparts_files_sip sip/kparts/*.sip) |
48 |
+-set(SIP_EXTRA_FILES_DEPEND ${kparts_files_sip}) |
49 |
+-add_sip_python_module(PyKDE4.kparts sip/kparts/kpartsmod.sip ${KDE4_KPARTS_LIBS}) |
50 |
+- |
51 |
+-file(GLOB ktexteditor_files_sip sip/ktexteditor/*.sip) |
52 |
+-set(SIP_EXTRA_FILES_DEPEND ${ktexteditor_files_sip}) |
53 |
+-add_sip_python_module(PyKDE4.ktexteditor sip/ktexteditor/ktexteditormod.sip ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) |
54 |
+- |
55 |
+-file(GLOB khtml_files_sip sip/khtml/*.sip) |
56 |
+-set(SIP_EXTRA_FILES_DEPEND ${khtml_files_sip}) |
57 |
+-add_sip_python_module(PyKDE4.khtml sip/khtml/khtmlmod.sip ${KDE4_KHTML_LIBS}) |
58 |
+- |
59 |
+ file(GLOB knewstuff_files_sip sip/knewstuff/*.sip) |
60 |
+ set(SIP_EXTRA_FILES_DEPEND ${knewstuff_files_sip}) |
61 |
+ add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KNEWSTUFF3_LIBS} ${QT_QTCORE_LIBRARY}) |
62 |
+@@ -199,7 +182,7 @@ |
63 |
+ set(SIP_EXTRA_FILES_DEPEND ${kterminal_files_sip}) |
64 |
+ add_sip_python_module(PyKDE4.kterminal sip/kterminal/kterminalmod.sip ${KDE4_TERMINAL_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) |
65 |
+ |
66 |
+-set(PYKDE_MODULES "kdecore solid kdeui kio kutils kparts ktexteditor dnssd phonon kterminal") |
67 |
++set(PYKDE_MODULES "kdecore solid kdeui kutils dnssd phonon kterminal") |
68 |
+ |
69 |
+ if(Soprano_FOUND) |
70 |
+ include_directories(${SOPRANO_INCLUDE_DIR}) |
71 |
|
72 |
diff --git a/kde-apps/pykde4/files/pykde4-4.14.3-noplasma.patch b/kde-apps/pykde4/files/pykde4-4.14.3-noplasma.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..30c29340914 |
75 |
--- /dev/null |
76 |
+++ b/kde-apps/pykde4/files/pykde4-4.14.3-noplasma.patch |
77 |
@@ -0,0 +1,27 @@ |
78 |
+--- a/CMakeLists.txt 2017-03-04 13:20:17.605591238 +0100 |
79 |
++++ b/CMakeLists.txt 2017-03-04 13:39:59.460248598 +0100 |
80 |
+@@ -87,7 +87,6 @@ |
81 |
+ ${QT_QTSQL_INCLUDE_DIR} |
82 |
+ ${QT_QTXML_INCLUDE_DIR} |
83 |
+ ${QT_QTSVG_INCLUDE_DIR} |
84 |
+- ${QT_QTWEBKIT_INCLUDE_DIR} |
85 |
+ ${KDE4_INCLUDE_DIR} |
86 |
+ ${KDE4_INCLUDE_DIR}/solid |
87 |
+ ${KDE4_INCLUDE_DIR}/kio |
88 |
+@@ -196,15 +195,11 @@ |
89 |
+ set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip}) |
90 |
+ add_sip_python_module(PyKDE4.phonon sip/phonon/phononmod.sip ${PHONON_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) |
91 |
+ |
92 |
+-file(GLOB plasma_files_sip sip/plasma/*.sip) |
93 |
+-set(SIP_EXTRA_FILES_DEPEND ${plasma_files_sip}) |
94 |
+-add_sip_python_module(PyKDE4.plasma sip/plasma/plasmamod.sip ${KDE4_PLASMA_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTUITOOLS_LIBRARY} ${KDE4_KIO_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${KDE4_KDEUI_LIBRARY}) |
95 |
+- |
96 |
+ file(GLOB kterminal_files_sip sip/kterminal/*.sip) |
97 |
+ set(SIP_EXTRA_FILES_DEPEND ${kterminal_files_sip}) |
98 |
+ add_sip_python_module(PyKDE4.kterminal sip/kterminal/kterminalmod.sip ${KDE4_TERMINAL_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) |
99 |
+ |
100 |
+-set(PYKDE_MODULES "kdecore solid kdeui kio kutils kparts ktexteditor dnssd phonon plasma kterminal") |
101 |
++set(PYKDE_MODULES "kdecore solid kdeui kio kutils kparts ktexteditor dnssd phonon kterminal") |
102 |
+ |
103 |
+ if(Soprano_FOUND) |
104 |
+ include_directories(${SOPRANO_INCLUDE_DIR}) |
105 |
|
106 |
diff --git a/kde-apps/pykde4/pykde4-4.14.3-r3.ebuild b/kde-apps/pykde4/pykde4-4.14.3-r3.ebuild |
107 |
new file mode 100644 |
108 |
index 00000000000..a45d84c6ea9 |
109 |
--- /dev/null |
110 |
+++ b/kde-apps/pykde4/pykde4-4.14.3-r3.ebuild |
111 |
@@ -0,0 +1,170 @@ |
112 |
+# Copyright 1999-2017 Gentoo Foundation |
113 |
+# Distributed under the terms of the GNU General Public License v2 |
114 |
+ |
115 |
+EAPI=5 |
116 |
+ |
117 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5} ) |
118 |
+PYTHON_REQ_USE="threads" |
119 |
+OPENGL_REQUIRED="always" |
120 |
+CMAKE_MAKEFILE_GENERATOR="emake" |
121 |
+WEBKIT_REQUIRED="never" |
122 |
+inherit python-r1 portability kde4-base multilib eutils |
123 |
+ |
124 |
+DESCRIPTION="Python bindings for kdelibs-4" |
125 |
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" |
126 |
+IUSE="debug doc examples test" |
127 |
+HOMEPAGE="https://techbase.kde.org/Development/Languages/Python" |
128 |
+ |
129 |
+SRC_URI+=" https://dev.gentoo.org/~johu/distfiles/${P}-sip419.patch.bz2" |
130 |
+ |
131 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
132 |
+ |
133 |
+RDEPEND="${PYTHON_DEPS} |
134 |
+ >=dev-python/PyQt4-4.12[${PYTHON_USEDEP},dbus,declarative,script,sql,svg,X] |
135 |
+ >=dev-python/sip-4.19:=[${PYTHON_USEDEP}] |
136 |
+ kde-frameworks/kdelibs:4[opengl] |
137 |
+" |
138 |
+DEPEND="${RDEPEND} |
139 |
+ dev-lang/python-exec:2[${PYTHON_USEDEP}] |
140 |
+ sys-devel/libtool |
141 |
+" |
142 |
+ |
143 |
+PATCHES=( |
144 |
+ "${FILESDIR}/${P}-gcc-5.patch" |
145 |
+ "${FILESDIR}/${P}-noplasma.patch" |
146 |
+ "${FILESDIR}/${P}-nokio.patch" |
147 |
+ "${DISTDIR}/${P}-sip419.patch.bz2" |
148 |
+) |
149 |
+ |
150 |
+pkg_setup() { |
151 |
+ kde4-base_pkg_setup |
152 |
+ |
153 |
+ have_python2=false |
154 |
+ |
155 |
+ scan_python_versions() { |
156 |
+ if [[ ${EPYTHON} == python2.* ]]; then |
157 |
+ have_python2=true |
158 |
+ fi |
159 |
+ } |
160 |
+ python_foreach_impl scan_python_versions |
161 |
+ |
162 |
+ if ! ${have_python2}; then |
163 |
+ ewarn "You do not have a Python 2 version selected." |
164 |
+ ewarn "kpythonpluginfactory will not be built" |
165 |
+ fi |
166 |
+} |
167 |
+ |
168 |
+src_prepare() { |
169 |
+ kde4-base_src_prepare |
170 |
+ |
171 |
+ if ! use examples; then |
172 |
+ sed -e '/^ADD_SUBDIRECTORY(examples)/s/^/# DISABLED /' -i CMakeLists.txt \ |
173 |
+ || die "Failed to disable examples" |
174 |
+ fi |
175 |
+ |
176 |
+ # See bug 322351 |
177 |
+ use arm && epatch "${FILESDIR}/${PN}-4.14.0-arm-sip.patch" |
178 |
+ |
179 |
+ sed -e 's/kpythonpluginfactory /kpython${PYTHON_SHORT_VERSION}pluginfactory /g' \ |
180 |
+ -i kpythonpluginfactory/CMakeLists.txt || die |
181 |
+ |
182 |
+ if ${have_python2}; then |
183 |
+ mkdir -p "${WORKDIR}/wrapper" || die "failed to copy wrapper" |
184 |
+ cp "${FILESDIR}/kpythonpluginfactorywrapper.c-r2" "${WORKDIR}/wrapper/kpythonpluginfactorywrapper.c" || die "failed to copy wrapper" |
185 |
+ fi |
186 |
+ python_copy_sources |
187 |
+ |
188 |
+} |
189 |
+ |
190 |
+src_configure() { |
191 |
+ configuration() { |
192 |
+ local mycmakeargs=( |
193 |
+ -DWITH_PolkitQt=OFF |
194 |
+ -DWITH_QScintilla=OFF |
195 |
+ -DPYKDEUIC4_ALTINSTALL=TRUE |
196 |
+ -DWITH_Nepomuk=OFF |
197 |
+ -DWITH_Soprano=OFF |
198 |
+ -DWITH_KdepimLibs=OFF |
199 |
+ -DPYTHON_EXECUTABLE=${PYTHON} |
200 |
+ ) |
201 |
+ local CMAKE_BUILD_DIR=${S}_build-${PYTHON_ABI} |
202 |
+ kde4-base_src_configure |
203 |
+ } |
204 |
+ |
205 |
+ python_foreach_impl run_in_build_dir configuration |
206 |
+} |
207 |
+ |
208 |
+echo_and_run() { |
209 |
+ echo "$@" |
210 |
+ "$@" |
211 |
+} |
212 |
+ |
213 |
+src_compile() { |
214 |
+ compilation() { |
215 |
+ local CMAKE_BUILD_DIR=${S}_build-${PYTHON_ABI} |
216 |
+ kde4-base_src_compile |
217 |
+ } |
218 |
+ python_foreach_impl run_in_build_dir compilation |
219 |
+ |
220 |
+ if ${have_python2}; then |
221 |
+ pushd "${WORKDIR}/wrapper" > /dev/null |
222 |
+ echo_and_run libtool --tag=CC --mode=compile $(tc-getCC) \ |
223 |
+ -shared \ |
224 |
+ ${CFLAGS} ${CPPFLAGS} \ |
225 |
+ -DEPREFIX="\"${EPREFIX}\"" \ |
226 |
+ -DPLUGIN_DIR="\"/usr/$(get_libdir)/kde4\"" -c \ |
227 |
+ -o kpythonpluginfactorywrapper.lo \ |
228 |
+ kpythonpluginfactorywrapper.c |
229 |
+ echo_and_run libtool --tag=CC --mode=link $(tc-getCC) \ |
230 |
+ -shared -module -avoid-version \ |
231 |
+ ${CFLAGS} ${LDFLAGS} \ |
232 |
+ -o kpythonpluginfactory.la \ |
233 |
+ -rpath "${EPREFIX}/usr/$(get_libdir)/kde4" \ |
234 |
+ kpythonpluginfactorywrapper.lo \ |
235 |
+ $(dlopen_lib) |
236 |
+ popd > /dev/null |
237 |
+ fi |
238 |
+} |
239 |
+ |
240 |
+src_test() { |
241 |
+ python_foreach_impl run_in_build_dir kde4-base_src_test |
242 |
+} |
243 |
+ |
244 |
+src_install() { |
245 |
+ installation() { |
246 |
+ emake DESTDIR="${D}" install |
247 |
+ |
248 |
+ mkdir -p "${D%/}$(python_get_scriptdir)" || die |
249 |
+ mv "${ED%/}/usr/bin/pykdeuic4-${EPYTHON/python/}" \ |
250 |
+ "${D%/}$(python_get_scriptdir)"/pykdeuic4 || die |
251 |
+ |
252 |
+ python_fix_shebang "${D%/}$(python_get_scriptdir)"/pykdeuic4 |
253 |
+ python_optimize |
254 |
+ } |
255 |
+ python_foreach_impl run_in_build_dir installation |
256 |
+ |
257 |
+ dosym ../lib/python-exec/python-exec2 /usr/bin/pykdeuic4 |
258 |
+ |
259 |
+ # As we don't call the eclass's src_install, we have to install the docs manually |
260 |
+ DOCS=("${S}"/{AUTHORS,NEWS,README}) |
261 |
+ use doc && HTML_DOCS=("${S}/docs/html/") |
262 |
+ einstalldocs |
263 |
+ |
264 |
+ if ${have_python2}; then |
265 |
+ pushd "${WORKDIR}/wrapper" > /dev/null |
266 |
+ echo_and_run libtool --mode=install install kpythonpluginfactory.la "${ED}/usr/$(get_libdir)/kde4/kpythonpluginfactory.la" |
267 |
+ rm "${ED}/usr/$(get_libdir)/kde4/kpythonpluginfactory.la" |
268 |
+ popd > /dev/null |
269 |
+ fi |
270 |
+} |
271 |
+ |
272 |
+pkg_postinst() { |
273 |
+ kde4-base_pkg_postinst |
274 |
+ |
275 |
+ if use examples; then |
276 |
+ echo |
277 |
+ elog "PyKDE4 examples have been installed to" |
278 |
+ elog "${EPREFIX}/usr/share/apps/${PN}/examples" |
279 |
+ echo |
280 |
+ fi |
281 |
+} |