1 |
commit: c915c033c0b750a50801e194f84282a0ff1b6e99 |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 31 20:34:58 2016 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 31 20:35:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c915c033 |
7 |
|
8 |
kde-base/pykde4: Remove 4.14.3 (r0) |
9 |
|
10 |
Package-Manager: portage-2.3.0_rc1 |
11 |
|
12 |
.../pykde4/files/kpythonpluginfactorywrapper.c-r1 | 60 -------- |
13 |
kde-base/pykde4/pykde4-4.14.3.ebuild | 165 --------------------- |
14 |
2 files changed, 225 deletions(-) |
15 |
|
16 |
diff --git a/kde-base/pykde4/files/kpythonpluginfactorywrapper.c-r1 b/kde-base/pykde4/files/kpythonpluginfactorywrapper.c-r1 |
17 |
deleted file mode 100644 |
18 |
index b5d152f..0000000 |
19 |
--- a/kde-base/pykde4/files/kpythonpluginfactorywrapper.c-r1 |
20 |
+++ /dev/null |
21 |
@@ -1,60 +0,0 @@ |
22 |
-#include <dlfcn.h> |
23 |
-#include <stdio.h> |
24 |
-#include <stdlib.h> |
25 |
-#include <string.h> |
26 |
-#include <unistd.h> |
27 |
- |
28 |
-#define VERSION_LEN 10 |
29 |
- |
30 |
-#define FORMAT EPREFIX PLUGIN_DIR "/kpython%spluginfactory.so" |
31 |
- |
32 |
-static void *handle; |
33 |
-static void *(*wrapped_qt_plugin_instance)(); |
34 |
- |
35 |
-static void get_python_version(char* out) { |
36 |
- int pipefd[2]; |
37 |
- pipe(pipefd); |
38 |
- pid_t cpid = fork(); |
39 |
- if (cpid == 0) { |
40 |
- close(pipefd[1]); |
41 |
- read(pipefd[0], out, VERSION_LEN); |
42 |
- } else { |
43 |
- close(pipefd[0]); |
44 |
- close(1); |
45 |
- dup2(pipefd[1], 1); |
46 |
- close(pipefd[1]); |
47 |
- close(0); |
48 |
- char *args[] = { "eselect", "python", "show", "--ABI", "--python2", 0 }; |
49 |
- execv(EPREFIX "/usr/bin/eselect", args); |
50 |
- } |
51 |
-} |
52 |
- |
53 |
-__attribute__((constructor)) |
54 |
-static void init() { |
55 |
- char buf[VERSION_LEN + 1]; |
56 |
- memset(buf, 0, VERSION_LEN + 1); |
57 |
- get_python_version(buf); |
58 |
- char *s = buf; |
59 |
- while(*s != '\0') { |
60 |
- if(*s == '\n') { |
61 |
- *s = '\0'; |
62 |
- break; |
63 |
- } |
64 |
- ++s; |
65 |
- } |
66 |
- int length = strlen(FORMAT) + strlen(buf) + 1; |
67 |
- char *name = malloc(length + 1); |
68 |
- snprintf(name, length, FORMAT, buf); |
69 |
- handle = dlopen(name, RTLD_NOW); |
70 |
- free(name); |
71 |
- wrapped_qt_plugin_instance = dlsym(handle, "qt_plugin_instance"); |
72 |
-} |
73 |
- |
74 |
-__attribute__((destructor)) |
75 |
-static void fini() { |
76 |
- dlclose(handle); |
77 |
-} |
78 |
- |
79 |
-void *qt_plugin_instance() { |
80 |
- return wrapped_qt_plugin_instance(); |
81 |
-} |
82 |
|
83 |
diff --git a/kde-base/pykde4/pykde4-4.14.3.ebuild b/kde-base/pykde4/pykde4-4.14.3.ebuild |
84 |
deleted file mode 100644 |
85 |
index 4df93e7..0000000 |
86 |
--- a/kde-base/pykde4/pykde4-4.14.3.ebuild |
87 |
+++ /dev/null |
88 |
@@ -1,165 +0,0 @@ |
89 |
-# Copyright 1999-2016 Gentoo Foundation |
90 |
-# Distributed under the terms of the GNU General Public License v2 |
91 |
-# $Id$ |
92 |
- |
93 |
-EAPI=5 |
94 |
- |
95 |
-PYTHON_COMPAT=( python{2_7,3_3,3_4} ) |
96 |
-PYTHON_REQ_USE="threads" |
97 |
-OPENGL_REQUIRED="always" |
98 |
-CMAKE_MAKEFILE_GENERATOR="emake" |
99 |
-inherit python-r1 portability kde4-base multilib eutils |
100 |
- |
101 |
-DESCRIPTION="Python bindings for KDE4" |
102 |
-KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux" |
103 |
-IUSE="akonadi debug doc examples test" |
104 |
-HOMEPAGE="https://techbase.kde.org/Development/Languages/Python" |
105 |
- |
106 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
107 |
- |
108 |
-RDEPEND=" |
109 |
- ${PYTHON_DEPS} |
110 |
- >=dev-python/PyQt4-4.11.1[${PYTHON_USEDEP},dbus,declarative,script,sql,svg,webkit,X] |
111 |
- >=dev-python/sip-4.16.2:=[${PYTHON_USEDEP}] |
112 |
- $(add_kdebase_dep kdelibs 'opengl') |
113 |
- akonadi? ( $(add_kdeapps_dep kdepimlibs) ) |
114 |
-" |
115 |
-DEPEND="${RDEPEND} |
116 |
- dev-lang/python-exec:2[${PYTHON_USEDEP}] |
117 |
- sys-devel/libtool |
118 |
-" |
119 |
- |
120 |
-PATCHES=( "${FILESDIR}/${P}-gcc-5.patch" ) |
121 |
- |
122 |
-pkg_setup() { |
123 |
- kde4-base_pkg_setup |
124 |
- |
125 |
- have_python2=false |
126 |
- |
127 |
- scan_python_versions() { |
128 |
- if [[ ${EPYTHON} == python2.* ]]; then |
129 |
- have_python2=true |
130 |
- fi |
131 |
- } |
132 |
- python_foreach_impl scan_python_versions |
133 |
- |
134 |
- if ! ${have_python2}; then |
135 |
- ewarn "You do not have a Python 2 version selected." |
136 |
- ewarn "kpythonpluginfactory will not be built" |
137 |
- fi |
138 |
-} |
139 |
- |
140 |
-src_prepare() { |
141 |
- kde4-base_src_prepare |
142 |
- |
143 |
- if ! use examples; then |
144 |
- sed -e '/^ADD_SUBDIRECTORY(examples)/s/^/# DISABLED /' -i CMakeLists.txt \ |
145 |
- || die "Failed to disable examples" |
146 |
- fi |
147 |
- |
148 |
- # See bug 322351 |
149 |
- use arm && epatch "${FILESDIR}/${PN}-4.14.0-arm-sip.patch" |
150 |
- |
151 |
- sed -e 's/kpythonpluginfactory /kpython${PYTHON_SHORT_VERSION}pluginfactory /g' \ |
152 |
- -i kpythonpluginfactory/CMakeLists.txt || die |
153 |
- |
154 |
- if ${have_python2}; then |
155 |
- mkdir -p "${WORKDIR}/wrapper" || die "failed to copy wrapper" |
156 |
- cp "${FILESDIR}/kpythonpluginfactorywrapper.c-r1" "${WORKDIR}/wrapper/kpythonpluginfactorywrapper.c" || die "failed to copy wrapper" |
157 |
- fi |
158 |
- python_copy_sources |
159 |
- |
160 |
-} |
161 |
- |
162 |
-src_configure() { |
163 |
- configuration() { |
164 |
- local mycmakeargs=( |
165 |
- -DWITH_PolkitQt=OFF |
166 |
- -DWITH_QScintilla=OFF |
167 |
- -DPYKDEUIC4_ALTINSTALL=TRUE |
168 |
- -DWITH_Nepomuk=OFF |
169 |
- -DWITH_Soprano=OFF |
170 |
- $(cmake-utils_use_with akonadi KdepimLibs) |
171 |
- -DPYTHON_EXECUTABLE=${PYTHON} |
172 |
- ) |
173 |
- local CMAKE_BUILD_DIR=${S}_build-${PYTHON_ABI} |
174 |
- kde4-base_src_configure |
175 |
- } |
176 |
- |
177 |
- python_foreach_impl run_in_build_dir configuration |
178 |
-} |
179 |
- |
180 |
-echo_and_run() { |
181 |
- echo "$@" |
182 |
- "$@" |
183 |
-} |
184 |
- |
185 |
-src_compile() { |
186 |
- compilation() { |
187 |
- local CMAKE_BUILD_DIR=${S}_build-${PYTHON_ABI} |
188 |
- kde4-base_src_compile |
189 |
- } |
190 |
- python_foreach_impl run_in_build_dir compilation |
191 |
- |
192 |
- if ${have_python2}; then |
193 |
- pushd "${WORKDIR}/wrapper" > /dev/null |
194 |
- echo_and_run libtool --tag=CC --mode=compile $(tc-getCC) \ |
195 |
- -shared \ |
196 |
- ${CFLAGS} ${CPPFLAGS} \ |
197 |
- -DEPREFIX="\"${EPREFIX}\"" \ |
198 |
- -DPLUGIN_DIR="\"/usr/$(get_libdir)/kde4\"" -c \ |
199 |
- -o kpythonpluginfactorywrapper.lo \ |
200 |
- kpythonpluginfactorywrapper.c |
201 |
- echo_and_run libtool --tag=CC --mode=link $(tc-getCC) \ |
202 |
- -shared -module -avoid-version \ |
203 |
- ${CFLAGS} ${LDFLAGS} \ |
204 |
- -o kpythonpluginfactory.la \ |
205 |
- -rpath "${EPREFIX}/usr/$(get_libdir)/kde4" \ |
206 |
- kpythonpluginfactorywrapper.lo \ |
207 |
- $(dlopen_lib) |
208 |
- popd > /dev/null |
209 |
- fi |
210 |
-} |
211 |
- |
212 |
-src_test() { |
213 |
- python_foreach_impl run_in_build_dir kde4-base_src_test |
214 |
-} |
215 |
- |
216 |
-src_install() { |
217 |
- installation() { |
218 |
- emake DESTDIR="${D}" install |
219 |
- |
220 |
- mkdir -p "${D%/}$(python_get_scriptdir)" || die |
221 |
- mv "${ED%/}/usr/bin/pykdeuic4-${EPYTHON/python/}" \ |
222 |
- "${D%/}$(python_get_scriptdir)"/pykdeuic4 || die |
223 |
- |
224 |
- python_fix_shebang "${D%/}$(python_get_scriptdir)"/pykdeuic4 |
225 |
- python_optimize |
226 |
- } |
227 |
- python_foreach_impl run_in_build_dir installation |
228 |
- |
229 |
- dosym ../lib/python-exec/python-exec2 /usr/bin/pykdeuic4 |
230 |
- |
231 |
- # As we don't call the eclass's src_install, we have to install the docs manually |
232 |
- DOCS=("${S}"/{AUTHORS,NEWS,README}) |
233 |
- use doc && HTML_DOCS=("${S}/docs/html/") |
234 |
- einstalldocs |
235 |
- |
236 |
- if ${have_python2}; then |
237 |
- pushd "${WORKDIR}/wrapper" > /dev/null |
238 |
- echo_and_run libtool --mode=install install kpythonpluginfactory.la "${ED}/usr/$(get_libdir)/kde4/kpythonpluginfactory.la" |
239 |
- rm "${ED}/usr/$(get_libdir)/kde4/kpythonpluginfactory.la" |
240 |
- popd > /dev/null |
241 |
- fi |
242 |
-} |
243 |
- |
244 |
-pkg_postinst() { |
245 |
- kde4-base_pkg_postinst |
246 |
- |
247 |
- if use examples; then |
248 |
- echo |
249 |
- elog "PyKDE4 examples have been installed to" |
250 |
- elog "${EPREFIX}/usr/share/apps/${PN}/examples" |
251 |
- echo |
252 |
- fi |
253 |
-} |