diff options
Diffstat (limited to 'x11/kde4-workspace/files/patch-kinfocenter')
-rw-r--r-- | x11/kde4-workspace/files/patch-kinfocenter | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/x11/kde4-workspace/files/patch-kinfocenter b/x11/kde4-workspace/files/patch-kinfocenter index 0c88b1f18648..effd580055ab 100644 --- a/x11/kde4-workspace/files/patch-kinfocenter +++ b/x11/kde4-workspace/files/patch-kinfocenter @@ -5,7 +5,7 @@ Improve GetInfo_ReadfromPipe function to use Qt types, pass program name and its parameters as separate arguments. ---- /dev/null +--- cmake/modules/FindBSDDevinfo.cmake.orig 2016-12-13 11:26:31 UTC +++ cmake/modules/FindBSDDevinfo.cmake @@ -0,0 +1,15 @@ +# Find FreeBSD devinfo library @@ -23,7 +23,7 @@ +find_package_handle_standard_args(BSDDEVINFO DEFAULT_MSG BSDDEVINFO_LIBRARY BSDDEVINFO_INCLUDE_DIR) + +mark_as_advanced(BSDDEVINFO_INCLUDE_DIR BSDDEVINFO_LIBRARY) ---- kinfocenter/Modules/base/CMakeLists.txt +--- kinfocenter/Modules/base/CMakeLists.txt.orig 2015-06-26 03:17:21 UTC +++ kinfocenter/Modules/base/CMakeLists.txt @@ -1,6 +1,7 @@ # TODO: HAVE_LIBDEVINFO_H (for Solaris 7 and later) @@ -34,8 +34,8 @@ +macro_bool_to_01(BSDDEVINFO_FOUND HAVE_DEVINFO_H) configure_file (../base/config-infocenter.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-infocenter.h ) ---- kinfocenter/Modules/base/info_fbsd.cpp.orig 2014-11-06 22:36:58.000000000 +0000 -+++ kinfocenter/Modules/base/info_fbsd.cpp 2015-02-20 22:40:53.380666149 +0000 +--- kinfocenter/Modules/base/info_fbsd.cpp.orig 2015-06-26 03:17:21 UTC ++++ kinfocenter/Modules/base/info_fbsd.cpp @@ -15,8 +15,6 @@ */ @@ -45,7 +45,7 @@ #ifdef HAVE_DEVINFO_H extern "C" { -@@ -24,13 +22,16 @@ +@@ -24,13 +22,16 @@ extern "C" { } #endif @@ -65,7 +65,7 @@ void ProcessChildren(QString name); #ifdef HAVE_DEVINFO_H -@@ -44,13 +45,12 @@ +@@ -44,13 +45,12 @@ extern "C" { bool GetInfo_IRQ(QTreeWidget* tree) { #ifdef HAVE_DEVINFO_H @@ -84,7 +84,7 @@ devinfo_foreach_rman(print_irq, tree); return true; #else -@@ -60,9 +60,13 @@ +@@ -60,9 +60,13 @@ bool GetInfo_IRQ(QTreeWidget* tree) { bool GetInfo_DMA(QTreeWidget* tree) { #ifdef HAVE_DEVINFO_H @@ -100,7 +100,7 @@ devinfo_foreach_rman(print_dma, tree); return true; #else -@@ -72,9 +76,12 @@ +@@ -72,9 +76,12 @@ bool GetInfo_DMA(QTreeWidget* tree) { bool GetInfo_IO_Ports(QTreeWidget* tree) { #ifdef HAVE_DEVINFO_H @@ -115,7 +115,7 @@ devinfo_foreach_rman(print_ioports, tree); return true; #else -@@ -83,50 +90,28 @@ +@@ -83,50 +90,28 @@ bool GetInfo_IO_Ports(QTreeWidget* tree) } bool GetInfo_SCSI(QTreeWidget* tree) { @@ -125,15 +125,15 @@ - if (!QFileInfo(QLatin1String("/sbin/camcontrol")).exists()) { - s = i18n("SCSI subsystem could not be queried: /sbin/camcontrol could not be found"); - QStringList list; +- QStringList list; - list << s; -+ list << i18n("SCSI subsystem could not be queried: /sbin/camcontrol could not be found"); - new QTreeWidgetItem(tree, list); +- new QTreeWidgetItem(tree, list); - } else if ((pipe = popen("/sbin/camcontrol devlist 2>&1", "r")) == NULL) { - s = i18n("SCSI subsystem could not be queried: /sbin/camcontrol could not be executed"); -- QStringList list; + QStringList list; - list << s; -- new QTreeWidgetItem(tree, list); ++ list << i18n("SCSI subsystem could not be queried: /sbin/camcontrol could not be found"); + new QTreeWidgetItem(tree, list); - } else { - - /* This prints out a list of all the scsi devies, perhaps eventually we could @@ -180,13 +180,13 @@ const QStringList headers(i18nc("@title:column Column name for PCI information", "Information")); tree->setHeaderLabels(headers); -@@ -136,40 +121,11 @@ +@@ -136,40 +121,11 @@ bool GetInfo_PCI(QTreeWidget* tree) { list << i18n("Could not find any programs with which to query your system's PCI information"); new QTreeWidgetItem(tree, list); return true; - } else { - cmd = "/usr/sbin/pciconf -l -v 2>&1"; -- } + } - - // TODO: GetInfo_ReadfromPipe should be improved so that we could pass the program name and its - // arguments to it and remove most of the code below. @@ -208,7 +208,7 @@ - } - - pclose(pipe); - } +- } - - if (!tree->topLevelItemCount()) { - QString str = i18n("The PCI subsystem could not be queried, this may need root privileges."); @@ -223,7 +223,7 @@ } bool GetInfo_XServer_and_Video(QTreeWidget* tree) { -@@ -179,12 +135,7 @@ +@@ -179,12 +135,7 @@ bool GetInfo_XServer_and_Video(QTreeWidg #ifdef HAVE_DEVINFO_H int print_irq(struct devinfo_rman *rman, void *arg) { @@ -236,7 +236,7 @@ devinfo_foreach_rman_resource(rman, print_resource, arg); } return 0; -@@ -192,11 +143,7 @@ +@@ -192,11 +143,7 @@ int print_irq(struct devinfo_rman *rman, int print_dma(struct devinfo_rman *rman, void *arg) { @@ -248,7 +248,7 @@ devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); -@@ -230,29 +177,25 @@ +@@ -230,29 +177,25 @@ int print_resource(struct devinfo_res *r int hexmode; QTreeWidget* tree = (QTreeWidget*) arg; @@ -290,21 +290,9 @@ new QTreeWidgetItem(tree, list); return 0; ---- kinfocenter/Modules/info/CMakeLists.txt -+++ kinfocenter/Modules/info/CMakeLists.txt -@@ -13,6 +13,9 @@ set(kcm_info_PART_SRCS main.cpp info.cpp ../base/os_current.cpp ) - kde4_add_plugin(kcm_info ${kcm_info_PART_SRCS}) - - target_link_libraries(kcm_info ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB}) -+if(BSDDEVINFO_FOUND) -+ target_link_libraries(kcm_info ${BSDDEVINFO_LIBRARY}) -+endif(BSDDEVINFO_FOUND) - - install(TARGETS kcm_info DESTINATION ${PLUGIN_INSTALL_DIR} ) - ---- kinfocenter/Modules/base/info_hpux.cpp +--- kinfocenter/Modules/base/info_hpux.cpp.orig 2015-06-26 03:17:21 UTC +++ kinfocenter/Modules/base/info_hpux.cpp -@@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. +@@ -30,6 +30,7 @@ along with this program. If not, see <h #include <stdlib.h> #include <QFile> #include <QFontMetrics> @@ -330,9 +318,9 @@ } /* Parts taken from fsusage.c from the Midnight Commander (mc) ---- kinfocenter/Modules/base/info_linux.cpp +--- kinfocenter/Modules/base/info_linux.cpp.orig 2015-06-26 03:17:21 UTC +++ kinfocenter/Modules/base/info_linux.cpp -@@ -33,6 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. +@@ -33,6 +33,7 @@ along with this program. If not, see <h #include <QRegExp> #include <QFile> #include <QHeaderView> @@ -356,9 +344,9 @@ /* if lspci failed, read the contents of /proc/pci */ return GetInfo_ReadfromFile(tree, INFO_PCI, 0); ---- kinfocenter/Modules/base/os_base.h +--- kinfocenter/Modules/base/os_base.h.orig 2015-06-26 03:17:21 UTC +++ kinfocenter/Modules/base/os_base.h -@@ -320,12 +320,12 @@ static bool GetInfo_XServer_Generic(QTreeWidget *lBox) { +@@ -330,12 +330,12 @@ static bool GetInfo_XServer_Generic(QTre } /* Helper-function to read output from an external program */ @@ -373,3 +361,15 @@ if (!proc.waitForFinished()) { // Process hanged or did not start return 0; +--- kinfocenter/Modules/info/CMakeLists.txt.orig 2015-06-26 03:17:21 UTC ++++ kinfocenter/Modules/info/CMakeLists.txt +@@ -13,6 +13,9 @@ set(kcm_info_PART_SRCS main.cpp info.cpp + kde4_add_plugin(kcm_info ${kcm_info_PART_SRCS}) + + target_link_libraries(kcm_info ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB}) ++if(BSDDEVINFO_FOUND) ++ target_link_libraries(kcm_info ${BSDDEVINFO_LIBRARY}) ++endif(BSDDEVINFO_FOUND) + + install(TARGETS kcm_info DESTINATION ${PLUGIN_INSTALL_DIR} ) + |