summaryrefslogtreecommitdiff
path: root/x11/kde4-baseapps/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11/kde4-baseapps/files')
-rw-r--r--x11/kde4-baseapps/files/extra-patch-libusb20193
-rw-r--r--x11/kde4-baseapps/files/patch-apps-konsole-src-ProcessInfo.cpp147
-rw-r--r--x11/kde4-baseapps/files/patch-apps__kinfocenter__base__CMakeLists.txt11
-rw-r--r--x11/kde4-baseapps/files/patch-apps__kinfocenter__base__info_fbsd.cpp57
-rw-r--r--x11/kde4-baseapps/files/patch-apps__kinfocenter__info__CMakeLists.txt11
-rw-r--r--x11/kde4-baseapps/files/patch-apps_cmake_modules_FindPCIUTILS.cmake15
-rw-r--r--x11/kde4-baseapps/files/patch-apps_kinfocenter_usbview_usbdevices.h15
7 files changed, 0 insertions, 449 deletions
diff --git a/x11/kde4-baseapps/files/extra-patch-libusb20 b/x11/kde4-baseapps/files/extra-patch-libusb20
deleted file mode 100644
index 18f4782c4506..000000000000
--- a/x11/kde4-baseapps/files/extra-patch-libusb20
+++ /dev/null
@@ -1,193 +0,0 @@
-diff -u -r ./apps/kinfocenter/usbview/CMakeLists.txt ./apps/kinfocenter/usbview/CMakeLists.txt
---- ./apps/kinfocenter/usbview/CMakeLists.txt 2009-06-07 10:54:55.000000000 +0200
-+++ ./apps/kinfocenter/usbview/CMakeLists.txt 2009-06-07 10:55:58.000000000 +0200
-@@ -9,7 +9,7 @@
- kde4_add_plugin(kcm_usb ${kcm_usb_PART_SRCS})
-
-
--target_link_libraries(kcm_usb ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY})
-+target_link_libraries(kcm_usb ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} -lusb)
-
- install(TARGETS kcm_usb DESTINATION ${PLUGIN_INSTALL_DIR} )
-
-diff -u -r ./apps/kinfocenter/usbview/usbdevices.cpp ./apps/kinfocenter/usbview/usbdevices.cpp
---- ./apps/kinfocenter/usbview/usbdevices.cpp 2009-06-07 10:54:55.000000000 +0200
-+++ ./apps/kinfocenter/usbview/usbdevices.cpp 2009-06-07 10:55:58.000000000 +0200
-@@ -294,17 +294,25 @@
-
- /*
- * FreeBSD support by Markus Brueffer <markus@brueffer.de>
-+ * libusb20 support by Hans Petter Selasky <hselasky@freebsd.org>
- *
- * Basic idea and some code fragments were taken from FreeBSD's usbdevs(8),
- * originally developed for NetBSD, so this code should work with no or
- * only little modification on NetBSD.
- */
-
--void USBDevice::collectData( int fd, int level, usb_device_info &di, int parent)
-+void USBDevice::collectData(struct libusb20_backend *pbe,
-+ struct libusb20_device *pdev)
- {
-+ char tempbuf[32];
-+ struct usb_device_info di;
-+
-+ if (libusb20_dev_get_info(pdev, &di))
-+ memset(&di, 0, sizeof(di));
-+
- // determine data for this device
-- _level = level;
-- _parent = parent;
-+ _level = 0;
-+ _parent = 0;
-
- _bus = di.udi_bus;
- _device = di.udi_addr;
-@@ -320,88 +328,47 @@
- _power = di.udi_power;
- _channels = di.udi_nports;
-
-- // determine the speed
--#if defined(__DragonFly__) || (defined(Q_OS_FREEBSD) && __FreeBSD_version > 490102) || defined(Q_OS_NETBSD)
- switch (di.udi_speed) {
- case USB_SPEED_LOW: _speed = 1.5; break;
- case USB_SPEED_FULL: _speed = 12.0; break;
- case USB_SPEED_HIGH: _speed = 480.0; break;
-+ case USB_SPEED_VARIABLE: _speed = 480.0; break;
-+ case USB_SPEED_SUPER: _speed = 4800.0; break;
-+ default: _speed = 480.0; break;
- }
--#else
-- _speed = di.udi_lowspeed ? 1.5 : 12.0;
--#endif
-
- // Get all attached devicenodes
-- for ( int i = 0; i < USB_MAX_DEVNAMES; ++i )
-- if ( di.udi_devnames[i][0] )
-- _devnodes << di.udi_devnames[i];
-+ for ( int i = 0; i < 32; ++i ) {
-+ if (libusb20_dev_get_iface_desc(
-+ pdev, i, tempbuf, sizeof(tempbuf)) == 0) {
-+ _devnodes << tempbuf;
-+ } else {
-+ break;
-+ }
-+ }
-
- // For compatibility, split the revision number
- sscanf( di.udi_release, "%x.%x", &_revMajor, &_revMinor );
--
-- // Cycle through the attached devices if there are any
-- for ( int p = 0; p < di.udi_nports; ++p ) {
-- // Get data for device
-- struct usb_device_info di2;
--
-- di2.udi_addr = di.udi_ports[p];
--
-- if ( di2.udi_addr >= USB_MAX_DEVICES )
-- continue;
--
-- if ( ioctl(fd, USB_DEVICEINFO, &di2) == -1 )
-- continue;
--
-- // Only add the device if we didn't detect it, yet
-- if (!find( di2.udi_bus, di2.udi_addr ) )
-- {
-- USBDevice *device = new USBDevice();
-- device->collectData( fd, level + 1, di2, di.udi_addr );
-- }
-- }
- }
-
- bool USBDevice::parse(const QString &fname)
- {
- static bool showErrorMessage = true;
-- bool error = false;
-+ struct libusb20_backend *pbe;
-+ struct libusb20_device *pdev;
- _devices.clear();
-
-- QFile controller("/dev/usb0");
-- int i = 1;
-- while ( controller.exists() )
-- {
-- // If the devicenode exists, continue with further inspection
-- if ( controller.open(QIODevice::ReadOnly) )
-- {
-- for ( int addr = 1; addr < USB_MAX_DEVICES; ++addr )
-- {
-- struct usb_device_info di;
--
-- di.udi_addr = addr;
-- if ( ioctl(controller.handle(), USB_DEVICEINFO, &di) != -1 )
-- {
-- if (!find( di.udi_bus, di.udi_addr ) )
-- {
-- USBDevice *device = new USBDevice();
-- device->collectData( controller.handle(), 0, di, 0);
-- }
-- }
-- }
-- controller.close();
--#ifndef Q_OS_NETBSD
-- } else {
-- error = true;
--#endif
-- }
-- controller.setFileName( QString::fromLocal8Bit("/dev/usb%1").arg(i++) );
-+ pbe = libusb20_be_alloc_default();
-+ if (pbe == NULL)
-+ return (false);
-+
-+ pdev = NULL;
-+
-+ while ((pdev = libusb20_be_device_foreach(pbe, pdev))) {
-+ USBDevice *device = new USBDevice();
-+ device->collectData(pbe, pdev);
- }
--
-- if ( showErrorMessage && error ) {
-- showErrorMessage = false;
-- KMessageBox::error( 0, i18n("Could not open one or more USB controller. Make sure, you have read access to all USB controllers that should be listed here."));
-- }
--
-+ libusb20_be_free(pbe);
- return true;
- }
- #endif
-diff -u -r ./apps/kinfocenter/usbview/usbdevices.h ./apps/kinfocenter/usbview/usbdevices.h
---- ./apps/kinfocenter/usbview/usbdevices.h 2009-06-07 10:54:55.000000000 +0200
-+++ ./apps/kinfocenter/usbview/usbdevices.h 2009-06-07 10:59:11.000000000 +0200
-@@ -14,18 +14,11 @@
- #include <QList>
- #include <QString>
-
--#if defined(__DragonFly__)
--#include <bus/usb/usb.h>
--#include <QStringList>
--#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
- #include <sys/param.h>
--#if __FreeBSD_version >= 800061
--#include <legacy/dev/usb/usb.h>
--#else
--#include <dev/usb/usb.h>
--#endif
-+#include <libusb20.h>
-+#include <dev/usb/usb_ioctl.h>
-+#include <dev/usb/usb_revision.h>
- #include <QStringList>
--#endif
-
- class USBDB;
-
-@@ -81,10 +74,8 @@
-
- unsigned int _vendorID, _prodID, _revMajor, _revMinor;
-
--#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
-- void collectData( int fd, int level, usb_device_info &di, int parent );
-+ void collectData(struct libusb20_backend *, struct libusb20_device *);
- QStringList _devnodes;
--#endif
- };
-
- #endif
diff --git a/x11/kde4-baseapps/files/patch-apps-konsole-src-ProcessInfo.cpp b/x11/kde4-baseapps/files/patch-apps-konsole-src-ProcessInfo.cpp
deleted file mode 100644
index 34dd2af1bd30..000000000000
--- a/x11/kde4-baseapps/files/patch-apps-konsole-src-ProcessInfo.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
---- apps/konsole/src/ProcessInfo.cpp.orig 2009-04-15 12:25:25.000000000 +0200
-+++ apps/konsole/src/ProcessInfo.cpp 2009-08-14 03:00:37.000000000 +0200
-@@ -27,6 +27,14 @@
- #include <unistd.h>
- #include <pwd.h>
-
-+// FreeBSD
-+#ifdef Q_OS_FREEBSD
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/user.h>
-+#include <libutil.h>
-+#endif
-+
- // Qt
- #include <KDebug>
- #include <QtCore/QDir>
-@@ -657,6 +665,120 @@
- }
- } ;
-
-+#ifdef Q_OS_FREEBSD
-+class FreeBSDProcessInfo : public UnixProcessInfo
-+{
-+public:
-+ FreeBSDProcessInfo(int pid, bool readEnvironment)
-+ : UnixProcessInfo(pid,readEnvironment)
-+ {
-+ }
-+private:
-+ virtual bool readProcInfo(int pid)
-+ {
-+ struct kinfo_proc *kip;
-+ int name[4];
-+ size_t len;
-+
-+ name[0] = CTL_KERN;
-+ name[1] = KERN_PROC;
-+ name[2] = KERN_PROC_PID;
-+ name[3] = pid;
-+
-+ len = 0;
-+ if (sysctl(name, 4, NULL, &len, NULL, 0) < 0)
-+ return false;
-+
-+ kip = static_cast<struct kinfo_proc*>(malloc(len));
-+ if (kip == NULL)
-+ return false;
-+
-+ if (sysctl(name, 4, kip, &len, NULL, 0) < 0) {
-+ free(kip);
-+ return false;
-+ }
-+
-+ if (len != sizeof(*kip) || (kip->ki_structsize != sizeof(*kip)) || (kip->ki_pid != pid)) {
-+ free(kip);
-+ return false;
-+ }
-+
-+ setParentPid(kip->ki_ppid);
-+ setForegroundPid(kip->ki_pgid);
-+ setName(kip->ki_comm);
-+ setPid(pid);
-+
-+ setUserId(kip->ki_uid);
-+ readUserName();
-+
-+ free(kip);
-+
-+ return true;
-+ }
-+
-+ virtual bool readArguments(int pid)
-+ {
-+ char args[ARG_MAX];
-+ int name[4];
-+ size_t len;
-+
-+ name[0] = CTL_KERN;
-+ name[1] = KERN_PROC;
-+ name[2] = KERN_PROC_ARGS;
-+ name[3] = pid;
-+
-+ len = sizeof(args);
-+ if (sysctl(name, 4, args, &len, NULL, 0) < 0);
-+ return false;
-+
-+ for (char *cp = args; cp < args + len; cp += strlen(cp) + 1)
-+ addArgument(QString(cp));
-+
-+ return true;
-+ }
-+
-+ virtual bool readEnvironment(int /*pid*/)
-+ {
-+ // Not supported in FreeBSD
-+ return true;
-+ }
-+
-+ virtual bool readCurrentDir(int pid)
-+ {
-+ struct kinfo_file *kif;
-+ int count;
-+
-+ kif = kinfo_getfile(pid, &count);
-+ if (kif == NULL)
-+ return false;
-+
-+ for (int i = 0; i < count; i++) {
-+ if (kif[i].kf_fd == KF_FD_TYPE_CWD) {
-+ QFileInfo info(QString(kif[i].kf_path));
-+ free(kif);
-+
-+ const bool readable = info.isReadable();
-+
-+ if (readable) {
-+ if(info.isSymLink())
-+ setCurrentDir(info.symLinkTarget());
-+ else
-+ setCurrentDir(info.filePath());
-+ return true;
-+ } else {
-+ if (!readable)
-+ setError(PermissionsError);
-+ else
-+ setError(UnknownError);
-+
-+ return false;
-+ }
-+ }
-+ }
-+ }
-+};
-+#endif
-+
- SSHProcessInfo::SSHProcessInfo(const ProcessInfo& process)
- : _process(process)
- {
-@@ -802,6 +924,8 @@
- return new LinuxProcessInfo(pid,enableEnvironmentRead);
- #elif defined(Q_OS_SOLARIS)
- return new SolarisProcessInfo(pid,enableEnvironmentRead);
-+#elif defined(Q_OS_FREEBSD)
-+ return new FreeBSDProcessInfo(pid,enableEnvironmentRead);
- #else
- return new NullProcessInfo(pid,enableEnvironmentRead);
- #endif
diff --git a/x11/kde4-baseapps/files/patch-apps__kinfocenter__base__CMakeLists.txt b/x11/kde4-baseapps/files/patch-apps__kinfocenter__base__CMakeLists.txt
deleted file mode 100644
index 72b28620dcec..000000000000
--- a/x11/kde4-baseapps/files/patch-apps__kinfocenter__base__CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./apps/kinfocenter/base/CMakeLists.txt.orig 2008-04-18 11:21:39.000000000 +0400
-+++ ./apps/kinfocenter/base/CMakeLists.txt 2009-09-04 00:32:17.000000000 +0400
-@@ -2,7 +2,7 @@
- # TODO: HAVE_LIBDEVINFO_H (for Solaris 7 and later)
- # to be set if both -ldevinfo and libdevinfo.h exist
-
--check_include_files(devinfo.h HAVE_DEVINFO_H) # info_fbsd.cpp
-+check_include_files("sys/types.h;devinfo.h" HAVE_DEVINFO_H) # info_fbsd.cpp
- check_include_files(fstab.h HAVE_FSTAB_H) # info_linux.cpp
- check_include_files(linux/raw.h HAVE_LINUX_RAW_H) # info_linux.cpp
- check_include_files(mntent.h HAVE_MNTENT_H) # info_linux.cpp
diff --git a/x11/kde4-baseapps/files/patch-apps__kinfocenter__base__info_fbsd.cpp b/x11/kde4-baseapps/files/patch-apps__kinfocenter__base__info_fbsd.cpp
deleted file mode 100644
index 026806449c4e..000000000000
--- a/x11/kde4-baseapps/files/patch-apps__kinfocenter__base__info_fbsd.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
---- ./apps/kinfocenter/base/info_fbsd.cpp.orig 2009-04-15 14:25:24.000000000 +0400
-+++ ./apps/kinfocenter/base/info_fbsd.cpp 2009-09-22 21:33:38.000000000 +0400
-@@ -211,28 +211,17 @@
- FILE *pipe;
- QFile *pcicontrol;
- QString s, cmd;
-+ QTextStream *t;
- QTreeWidgetItem *olditem= NULL;
-
- pcicontrol = new QFile("/usr/sbin/pciconf");
-
- if (!pcicontrol->exists()) {
-+ QStringList list;
-+ list << i18n("Could not find any programs with which to query your system's PCI information");
-+ new QTreeWidgetItem(tree, list);
- delete pcicontrol;
-- pcicontrol = new QFile("/usr/X11R6/bin/scanpci");
-- if (!pcicontrol->exists()) {
-- delete pcicontrol;
-- pcicontrol = new QFile("/usr/X11R6/bin/pcitweak");
-- if (!pcicontrol->exists()) {
-- QStringList list;
-- list << i18n("Could not find any programs with which to query your system's PCI information");
-- new QTreeWidgetItem(tree, list);
-- delete pcicontrol;
-- return true;
-- } else {
-- cmd = "/usr/X11R6/bin/pcitweak -l 2>&1";
-- }
-- } else {
-- cmd = "/usr/X11R6/bin/scanpci";
-- }
-+ return true;
- } else {
- cmd = "/usr/sbin/pciconf -l -v 2>&1";
- }
-@@ -247,8 +236,19 @@
- /* This prints out a list of all the pci devies, perhaps eventually we could
- parse it as opposed to schlepping it into a listbox */
-
-+ t = new QTextStream(pipe, QIODevice::ReadOnly);
-+
-+ while (true) {
-+ s = t->readLine();
-+ if (s.isEmpty() )
-+ break;
-+ QStringList list;
-+ list << s;
-+ new QTreeWidgetItem(tree, list);
-+ }
-+
-+ delete t;
- pclose(pipe);
-- GetInfo_ReadfromPipe(tree, cmd.toLatin1(), true);
- }
-
- if (!tree->topLevelItemCount()) {
diff --git a/x11/kde4-baseapps/files/patch-apps__kinfocenter__info__CMakeLists.txt b/x11/kde4-baseapps/files/patch-apps__kinfocenter__info__CMakeLists.txt
deleted file mode 100644
index c3b3c28f59fe..000000000000
--- a/x11/kde4-baseapps/files/patch-apps__kinfocenter__info__CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./apps/kinfocenter/info/CMakeLists.txt.orig 2008-04-23 19:51:22.000000000 +0400
-+++ ./apps/kinfocenter/info/CMakeLists.txt 2009-09-04 00:42:28.000000000 +0400
-@@ -12,7 +12,7 @@
-
- kde4_add_plugin(kcm_info ${kcm_info_PART_SRCS})
-
--target_link_libraries(kcm_info ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB})
-+target_link_libraries(kcm_info ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB} devinfo)
-
-
- install(TARGETS kcm_info DESTINATION ${PLUGIN_INSTALL_DIR} )
diff --git a/x11/kde4-baseapps/files/patch-apps_cmake_modules_FindPCIUTILS.cmake b/x11/kde4-baseapps/files/patch-apps_cmake_modules_FindPCIUTILS.cmake
deleted file mode 100644
index 1cd6d43a3e33..000000000000
--- a/x11/kde4-baseapps/files/patch-apps_cmake_modules_FindPCIUTILS.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./apps/cmake/modules/FindPCIUTILS.cmake.orig 2008-08-07 15:20:57.000000000 +0000
-+++ ./apps/cmake/modules/FindPCIUTILS.cmake 2008-12-27 11:49:04.000000000 +0000
-@@ -14,7 +14,11 @@
- FIND_LIBRARY(PCIUTILS_LIBRARY NAMES pci)
- if(PCIUTILS_LIBRARY)
- FIND_LIBRARY(RESOLV_LIBRARY NAMES resolv)
-- set(PCIUTILS_LIBRARIES ${PCIUTILS_LIBRARY} ${RESOLV_LIBRARY})
-+ if(RESOLV_LIBRARY)
-+ set(PCIUTILS_LIBRARIES ${PCIUTILS_LIBRARY} ${RESOLV_LIBRARY})
-+ else(RESOLV_LIBRARY)
-+ set(PCIUTILS_LIBRARIES ${PCIUTILS_LIBRARY})
-+ endif(RESOLV_LIBRARY)
- endif(PCIUTILS_LIBRARY)
-
-
diff --git a/x11/kde4-baseapps/files/patch-apps_kinfocenter_usbview_usbdevices.h b/x11/kde4-baseapps/files/patch-apps_kinfocenter_usbview_usbdevices.h
deleted file mode 100644
index 57c5437c6ff9..000000000000
--- a/x11/kde4-baseapps/files/patch-apps_kinfocenter_usbview_usbdevices.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./apps/kinfocenter/usbview/usbdevices.h.orig 2008-10-17 03:00:14.000000000 -0800
-+++ ./apps/kinfocenter/usbview/usbdevices.h 2009-03-01 21:01:18.000000000 -0900
-@@ -18,7 +18,12 @@
- #include <bus/usb/usb.h>
- #include <QStringList>
- #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
-+#include <sys/param.h>
-+#if __FreeBSD_version >= 800061
-+#include <legacy/dev/usb/usb.h>
-+#else
- #include <dev/usb/usb.h>
-+#endif
- #include <QStringList>
- #endif
-