summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2012-09-05 08:12:33 +0000
committerJohannes Huber <johu@gentoo.org>2012-09-05 08:12:33 +0000
commitd96501a7f9f8c5c443e7148425a32f802021940a (patch)
tree05aa9d2420ce63a6f6a74b639caf19c8aafcecc9 /kde-base
parentUse domenu instead insinto + doins to install .desktop files (diff)
downloadgentoo-2-d96501a7f9f8c5c443e7148425a32f802021940a.tar.gz
gentoo-2-d96501a7f9f8c5c443e7148425a32f802021940a.tar.bz2
gentoo-2-d96501a7f9f8c5c443e7148425a32f802021940a.zip
Remove unused wrapper by Arfrever.
(Portage version: 2.2.0_alpha124/cvs/Linux i686)
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/pykde4/ChangeLog6
-rw-r--r--kde-base/pykde4/files/kpythonpluginfactorywrapper.c52
2 files changed, 5 insertions, 53 deletions
diff --git a/kde-base/pykde4/ChangeLog b/kde-base/pykde4/ChangeLog
index ded1f3f4d69c..0ee9b6c04c8c 100644
--- a/kde-base/pykde4/ChangeLog
+++ b/kde-base/pykde4/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for kde-base/pykde4
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/pykde4/ChangeLog,v 1.175 2012/09/04 18:45:26 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/pykde4/ChangeLog,v 1.176 2012/09/05 08:12:33 johu Exp $
+
+ 05 Sep 2012; Johannes Huber <johu@gentoo.org>
+ -files/kpythonpluginfactorywrapper.c:
+ Remove unused wrapper by Arfrever.
*pykde4-4.9.1 (04 Sep 2012)
diff --git a/kde-base/pykde4/files/kpythonpluginfactorywrapper.c b/kde-base/pykde4/files/kpythonpluginfactorywrapper.c
deleted file mode 100644
index 3915a0d122be..000000000000
--- a/kde-base/pykde4/files/kpythonpluginfactorywrapper.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define VERSION_LEN 10
-
-#define FORMAT EPREFIX PLUGIN_DIR "/kpython%spluginfactory.so"
-
-static void *handle;
-static void *(*wrapped_qt_plugin_instance)();
-
-static void get_python_version(char* out) {
- int pipefd[2];
- pipe(pipefd);
- pid_t cpid = fork();
- if (cpid == 0) {
- close(pipefd[1]);
- read(pipefd[0], out, VERSION_LEN);
- } else {
- close(pipefd[0]);
- close(1);
- dup2(pipefd[1], 1);
- close(pipefd[1]);
- close(0);
- char *args[] = { "eselect", "python", "show", "--ABI", "--python2", 0 };
- execv(EPREFIX "/usr/bin/eselect", args);
- }
-}
-
-__attribute__((constructor))
-static void init() {
- char buf[VERSION_LEN + 1];
- memset(buf, 0, VERSION_LEN + 1);
- get_python_version(buf);
- int length = strlen(FORMAT) + strlen(buf) + 1;
- char *name = malloc(length + 1);
- snprintf(name, length, FORMAT, buf);
- void *handle = dlopen(name, RTLD_NOW);
- free(name);
- wrapped_qt_plugin_instance = dlsym(handle, "qt_plugin_instance");
-}
-
-__attribute__((destructor))
-static void fini() {
- dlclose(handle);
-}
-
-void *qt_plugin_instance() {
- return wrapped_qt_plugin_instance();
-}