diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,18 +65,14 @@ ) add_feature_info("KF5Wayland" KF5Wayland_FOUND "Required for Wayland Compositor Information Module") -if(NOT APPLE) - find_package(X11) - set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" - URL "https://www.x.org" - TYPE OPTIONAL - PURPOSE "Required for building the X11 based workspace" - ) - if(X11_FOUND) - set(HAVE_X11 TRUE) - endif() -else() - set(X11_FOUND False) +find_package(X11) +set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" + URL "https://www.x.org" + TYPE OPTIONAL + PURPOSE "Required for building the X11 based workspace" +) +if(X11_FOUND) + set(HAVE_X11 TRUE) endif() ecm_find_qmlmodule(org.kde.kirigami 2.5) diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt --- a/Modules/CMakeLists.txt +++ b/Modules/CMakeLists.txt @@ -5,7 +5,6 @@ add_subdirectory( devinfo ) add_subdirectory( info ) -if(NOT WIN32) add_subdirectory( samba ) add_subdirectory( nics ) @@ -29,13 +28,11 @@ add_feature_info("OpenGL/ES support" KCM_ENABLE_OPENGLES "View OpenGL ES2.0 details in kinfocenter." ) endif() - if(NOT APPLE) - if(KCM_ENABLE_OPENGL OR KCM_ENABLE_OPENGLES) - add_subdirectory( opengl ) - else() - message(STATUS "OpenGL/ES2.0 information module has been disabled.") - endif() - endif() +if(KCM_ENABLE_OPENGL OR KCM_ENABLE_OPENGLES) + add_subdirectory( opengl ) +else() + message(STATUS "OpenGL/ES2.0 information module has been disabled.") +endif() find_package(PCIUTILS MODULE) set_package_properties(PCIUTILS PROPERTIES DESCRIPTION "PciUtils is a library for direct access to PCI slots" @@ -47,9 +44,7 @@ # PCI module doesn't work on Linux arm64, nor on MacOS, but does on # FreeBSD arm64, so this is a bit of a tangle of what-is-supported. set(_want_pci ON) -if(APPLE) - set(_want_pci OFF) -elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") +if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") if (${CMAKE_SYSTEM} MATCHES "FreeBSD") message(STATUS "FreeBSD arm64 pci support enabled.") else() @@ -60,7 +55,6 @@ if(_want_pci) add_subdirectory( pci ) endif() -endif() find_package(RAW1394 MODULE) set_package_properties(RAW1394 PROPERTIES DESCRIPTION "library for direct access to IEEE 1394 bus" diff --git a/Modules/base/CMakeLists.txt b/Modules/base/CMakeLists.txt --- a/Modules/base/CMakeLists.txt +++ b/Modules/base/CMakeLists.txt @@ -1,6 +1,3 @@ -# TODO: HAVE_LIBDEVINFO_H (for Solaris 7 and later) -# to be set if both -ldevinfo and libdevinfo.h exist - include(CheckIncludeFiles) check_include_files(devinfo.h HAVE_DEVINFO_H) # info_fbsd.cpp diff --git a/Modules/base/info_aix.cpp b/Modules/base/info_aix.cpp deleted file mode 100644 --- a/Modules/base/info_aix.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* -Copyright 2010 Reza Arbab - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#define class _class -#include -#include -#include -#undef class -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -char * device_description(struct CuDv *cudv) { - char *desc= NULL; - struct PdDv *pddv = cudv->PdDvLn; /* link to Predefined Devices database */ - nl_catd cat; - - cat = catopen("/usr/lib/methods/devices.cat", NL_CAT_LOCALE); - if ((int)cat == -1) - return NULL; - - desc = strdup(catgets(cat, pddv->setno, pddv->msgno, "N/A") ); - catclose(cat); - - return desc; -} - -bool list_devices(QListView *lBox, char *criteria) { - struct CuDv *cudv; /* Customized Devices */ - struct listinfo info; - int i; - char *cudv_desc; - QString cudv_status; - QListViewItem *lastitem= NULL; - - lBox->addColumn(i18n("Name")); - lBox->addColumn(i18n("Status")); - lBox->addColumn(i18n("Location")); - lBox->addColumn(i18n("Description")); - - if (odm_initialize() == -1) { - kError(0) << "odm_initialize() failed: odmerrno = " << odmerrno << endl; - return (false); - } - - cudv = (struct CuDv *) odm_get_list(CuDv_CLASS, criteria, &info, 100, 2); - - if ((int)cudv == -1) { - odm_terminate(); - kError(0) << "odm_get_list() failed: odmerrno = " << odmerrno << endl; - return (false); - } else if (!cudv) /* empty list */ - { - odm_terminate(); - return (true); - } - - for (i=0; i tosize) /* E.g., from 2048 to 512. */ - return blocks * (fromsize / tosize); - else - /* E.g., from 256 to 512. */ - return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize); -} - -/* Fill in the fields of FSP with information about space usage for - the filesystem on which PATH resides. - Return 0 if successful, -1 if not. */ - -#define CONVERT_BLOCKS(b) fs_adjust_blocks ((b), fsd.f_bsize, 512) - -static int get_fs_usage(char *path, long *l_total, long *l_avail) { - struct statfs fsd; /* 4.3BSD, SunOS 4, HP-UX, AIX. */ - unsigned long fsu_blocks, fsu_bfree, fsu_bavail; - - *l_total = *l_avail = 0; - if (statfs(path, &fsd) < 0) - return -1; - - fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks); - fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree); - fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail); - - *l_avail = getuid() ? fsu_bavail/2 : fsu_bfree/2; - *l_total = fsu_blocks/2; - - return 0; -} diff --git a/Modules/base/info_hpux.cpp b/Modules/base/info_hpux.cpp deleted file mode 100644 --- a/Modules/base/info_hpux.cpp +++ /dev/null @@ -1,235 +0,0 @@ - -/* -Copyright 1998 Helge Deller deller@gmx.de - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of -the License or (at your option) version 3 or any later version -accepted by the membership of KDE e.V. (or its successor approved -by the membership of KDE e.V.), which shall act as a proxy -defined in Section 14 of version 3 of the license. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -# define INFO_PCI "" // Please, who know it ???? -# define INFO_PCI_EISA "/etc/eisa/system.sci" // File ! -# define INFO_IOPORTS_1 "/etc/dmesg" // as pipe ! -# define INFO_IOPORTS_2 "/usr/sbin/dmesg" // as pipe ! -# define INFO_DEVICES "/etc/ioscan" // as pipe !! - -/* The following table is from an HP-UX 10.20 System - build out of the files - "/usr/lib/sched.models" - or - "/opt/langtools/lib/sched.models" - If you have more entries, then please add them or send them to me! - */ - -// entries for PA_REVISION[] -enum V_ENTRIES -{ V_1x0, - V_1x1, V_1x1a, V_1x1b, V_1x1c, V_1x1d, V_1x1e, - V_2x0, - V_LAST}; - -static const char PA_REVISION[V_LAST][7] = { "1.0", "1.1", "1.1a", "1.1b", "1.1c", "1.1d", "1.1e", "2.0" }; - -// entries for PA_NAME[] -enum PA_ENTRIES -{ PA7000, - PA7100, PA7100LC, PA7200, PA7300, - PA8000, PA8200, PA8500, - PARISC_PA_LAST}; - -static const char PA_NAME[PARISC_PA_LAST][11] = { "PA7000", "PA7100", "PA7100LC", "PA7200", "PA7300", "PA8000", "PA8200", "PA8500" }; - -struct _type_LOOKUPTABLE { - char Name[8]; - unsigned short parisc_rev; // = enum V_ENTRIES - unsigned short parisc_name; // = enum PA_ENTRIES -}; - -static const struct _type_LOOKUPTABLE PA_LOOKUPTABLE[] = { -/* VERSION A.00.07 - (there seems to exist several different files with same version-number !)*/ -{ "600", V_1x0, PA7000 }, { "635", V_1x0, PA7000 }, { "645", V_1x0, PA7000 }, { "700", V_1x1, PA7000 }, { "705", V_1x1a, PA7000 }, { "710", V_1x1a, PA7000 }, { "712", V_1x1c, PA7100LC }, { "715", V_1x1c, PA7100LC }, { "720", V_1x1a, PA7000 }, { "722", V_1x1c, PA7100LC }, - { "725", V_1x1c, PA7100LC }, { "728", V_1x1d, PA7200 }, { "730", V_1x1a, PA7000 }, { "735", V_1x1b, PA7100 }, - { "742", V_1x1b, PA7100 }, - { "743", V_1x1b, PA7100 }, // or a 1.1c,PA7100LC !! - { "744", V_1x1e, PA7300 }, { "745", V_1x1b, PA7100 }, { "747", V_1x1b, PA7100 }, { "750", V_1x1a, PA7000 }, { "755", V_1x1b, PA7100 }, { "770", V_1x1d, PA7200 }, { "777", V_1x1d, PA7200 }, { "778", V_1x1e, PA7300 }, { "779", V_1x1e, PA7300 }, { "780", V_2x0, PA8000 }, - { "781", V_2x0, PA8000 }, { "782", V_2x0, PA8200 }, { "783", V_2x0, PA8500 }, { "785", V_2x0, PA8500 }, - { "800", V_1x0, PA7000 }, // and one with: 2.0 / PA8000 - { "801", V_1x1c, PA7100LC }, { "802", V_2x0, PA8000 }, { "803", V_1x1e, PA7300 }, { "804", V_2x0, PA8000 }, { "806", V_1x1c, PA7100LC }, { "807", V_1x1a, PA7000 }, { "808", V_1x0, PA7000 }, { "809", V_1x1d, PA7200 }, { "810", V_2x0, PA8000 }, { "811", V_1x1c, PA7100LC }, { "813", V_1x1e, - PA7300 }, { "815", V_1x0, PA7000 }, { "816", V_1x1c, PA7100LC }, { "817", V_1x1a, PA7000 }, { "819", V_1x1d, PA7200 }, { "820", V_2x0, PA8000 }, { "821", V_1x1d, PA7200 }, { "822", V_1x0, PA7000 }, { "825", V_1x0, PA7000 }, { "826", V_1x1c, PA7100LC }, { "827", V_1x1a, PA7000 }, { - "829", V_1x1d, PA7200 }, { "831", V_1x1d, PA7200 }, { "832", V_1x0, PA7000 }, { "834", V_1x0, PA7000 }, { "835", V_1x0, PA7000 }, { "837", V_1x1a, PA7000 }, { "839", V_1x1d, PA7200 }, { "840", V_1x0, PA7000 }, { "841", V_1x1d, PA7200 }, { "842", V_1x0, PA7000 }, { "845", V_1x0, - PA7000 }, { "847", V_1x1a, PA7000 }, { "849", V_1x1d, PA7200 }, { "850", V_1x0, PA7000 }, { "851", V_1x1d, PA7200 }, { "852", V_1x0, PA7000 }, { "855", V_1x0, PA7000 }, { "856", V_1x1c, PA7100LC }, { "857", V_1x1a, PA7000 }, { "859", V_1x1d, PA7200 }, { "860", V_1x0, PA7000 }, { - "861", V_2x0, PA8000 }, { "865", V_1x0, PA7000 }, { "869", V_1x1d, PA7200 }, { "870", V_1x0, PA7000 }, { "871", V_2x0, PA8000 }, { "877", V_1x1a, PA7000 }, { "879", V_2x0, PA8000 }, { "887", V_1x1b, PA7100 }, { "889", V_2x0, PA8000 }, { "890", V_1x0, PA7000 }, { "891", V_1x1b, - PA7100 }, { "892", V_1x1b, PA7100 }, { "893", V_2x0, PA8000 }, { "895", V_2x0, PA8000 }, { "896", V_2x0, PA8000 }, { "897", V_1x1b, PA7100 }, { "898", V_2x0, PA8200 }, { "899", V_2x0, PA8200 }, { "900", V_1x0, PA7000 }, { "B115", V_1x1e, PA7300 }, { "B120", V_1x1e, PA7300 }, { - "B132L", V_1x1e, PA7300 }, { "B160L", V_1x1e, PA7300 }, { "B180L", V_1x1e, PA7300 }, { "C100", V_1x1d, PA7200 }, { "C110", V_1x1d, PA7200 }, { "C115", V_1x1e, PA7300 }, { "C120", V_1x1e, PA7300 }, { "C130", V_2x0, PA8000 }, { "C140", V_2x0, PA8000 }, { "C160L", V_1x1e, PA7300 }, { - "C160", V_2x0, PA8000 }, { "C180L", V_1x1e, PA7300 }, { "C180-XP", V_2x0, PA8000 }, { "C180", V_2x0, PA8000 }, { "C200+", V_2x0, PA8200 }, { "C230+", V_2x0, PA8200 }, { "C240+", V_2x0, PA8200 }, { "CB260", V_2x0, PA8200 }, - { "D200", V_1x1d, PA7200 }, // or: 1.1c, PA7100LC - { "D210", V_1x1d, PA7200 }, // or: 1.1c, PA7100LC - { "D220", V_1x1e, PA7300 }, { "D230", V_1x1e, PA7300 }, { "D250", V_1x1d, PA7200 }, { "D260", V_1x1d, PA7200 }, { "D270", V_2x0, PA8000 }, { "D280", V_2x0, PA8000 }, { "D310", V_1x1c, PA7100LC }, { "D320", V_1x1e, PA7300 }, { "D330", V_1x1e, PA7300 }, { "D350", V_1x1d, PA7200 }, { "D360", - V_1x1d, PA7200 }, { "D370", V_2x0, PA8000 }, { "D380", V_2x0, PA8000 }, { "D400", V_1x1d, PA7200 }, { "D410", V_1x1d, PA7200 }, { "D650", V_2x0, PA8000 }, { "DX0", V_1x1c, PA7100LC }, { "DX5", V_1x1c, PA7100LC }, { "DXO", V_1x1c, PA7100LC }, { "E25", V_1x1c, PA7100LC }, { "E35", - V_1x1c, PA7100LC }, { "E45", V_1x1c, PA7100LC }, { "E55", V_1x1c, PA7100LC }, { "F10", V_1x1a, PA7000 }, { "F20", V_1x1a, PA7000 }, { "F30", V_1x1a, PA7000 }, { "G30", V_1x1a, PA7000 }, { "G40", V_1x1a, PA7000 }, { "G50", V_1x1b, PA7100 }, { "G60", V_1x1b, PA7100 }, { "G70", V_1x1b, - PA7100 }, { "H20", V_1x1a, PA7000 }, { "H30", V_1x1a, PA7000 }, { "H40", V_1x1a, PA7000 }, { "H50", V_1x1b, PA7100 }, { "H60", V_1x1b, PA7100 }, { "H70", V_1x1b, PA7100 }, { "I30", V_1x1a, PA7000 }, { "I40", V_1x1a, PA7000 }, { "I50", V_1x1b, PA7100 }, { "I60", V_1x1b, PA7100 }, { - "I70", V_1x1b, PA7100 }, { "J200", V_1x1d, PA7200 }, { "J210XC", V_1x1d, PA7200 }, { "J210", V_1x1d, PA7200 }, { "J220", V_2x0, PA8000 }, { "J2240", V_2x0, PA8200 }, { "J280", V_2x0, PA8000 }, { "J282", V_2x0, PA8000 }, { "J400", V_2x0, PA8000 }, { "J410", V_2x0, PA8000 }, { "K100", - V_1x1d, PA7200 }, { "K200", V_1x1d, PA7200 }, { "K210", V_1x1d, PA7200 }, { "K230", V_1x1d, PA7200 }, { "K250", V_2x0, PA8000 }, { "K260", V_2x0, PA8000 }, { "K370", V_2x0, PA8200 }, { "K380", V_2x0, PA8200 }, { "K400", V_1x1d, PA7200 }, { "K410", V_1x1d, PA7200 }, { "K420", V_1x1d, - PA7200 }, { "K430", V_1x1d, PA7200 }, { "K450", V_2x0, PA8000 }, { "K460", V_2x0, PA8000 }, { "K470", V_2x0, PA8200 }, { "K570", V_2x0, PA8200 }, { "K580", V_2x0, PA8200 }, { "S700i", V_1x1e, PA7300 }, { "S715", V_1x1e, PA7300 }, { "S744", V_1x1e, PA7300 }, - { "S760", V_1x1e, PA7300 }, { "T500", V_1x1c, PA7100LC }, // or: 1.1b, PA7100 - { "T520", V_1x1b, PA7100 }, { "T540", V_2x0, PA8000 }, { "T600", V_2x0, PA8000 }, { "V2000", V_2x0, PA8000 }, { "V2200", V_2x0, PA8200 }, { "V2250", V_2x0, PA8200 }, { "V2500", V_2x0, PA8500 }, - - { "", 0, 0 } /* Last Entry has to be empty. */ -}; - -/* Helper-Functions */ - -// Value() is defined in info.cpp !!! - -static bool Find_in_LOOKUPTABLE(QListView *lBox, char *machine) { - char *Machine; - int len; - const struct _type_LOOKUPTABLE *Entry = PA_LOOKUPTABLE; - QString str; - QListViewItem* olditem = 0; - - Machine = machine; // machine is like: "9000/715/D" - while ((*Machine) && (*Machine!='/')) - ++Machine; - - if (*Machine) - ++Machine; - else - Machine=machine; - - len = strlen(Machine); - - while (Entry->Name[0]) { - if (strncmp(Entry->Name, Machine, len)==0) { - olditem = new QListViewItem(lBox, olditem, i18n("PA-RISC Processor"), - QString(PA_NAME[Entry->parisc_name])); - olditem = new QListViewItem(lBox, olditem, i18n("PA-RISC Revision"), - QString("PA-RISC ") + QString(PA_REVISION[Entry->parisc_rev])); - return true; - } else - ++Entry; // next Entry ! - } - - return false; -} - -/* all following functions should return true, when the Information - was filled into the lBox-Widget. - returning false indicates, that information was not available. - */ - -bool GetInfo_ReadfromFile(QListView *lBox, const char *Name) { - char buf[2048]; - - QFile *file = new QFile(Name); - QListViewItem* olditem = 0; - - if (!file->open(QIODevice::ReadOnly)) { - delete file; - return false; - } - - while (file->readLine(buf, sizeof(buf)-1) >= 0) { - if (strlen(buf)) - olditem = new QListViewItem(lBox, olditem, QString::fromLocal8Bit(buf)); - } - - file->close(); - delete file; - return (lBox->childCount()); -} - -bool GetInfo_IRQ(QListView *) { - return false; -} - -bool GetInfo_DMA(QListView *) { - return false; -} - -bool GetInfo_PCI(QTreeWidget* tree) { - return (GetInfo_ReadfromFile(tree, INFO_PCI) + GetInfo_ReadfromFile(tree, INFO_PCI_EISA) ); -} - -bool GetInfo_IO_Ports(QListView *lBox) { - if (GetInfo_ReadfromPipe(lBox, INFO_IOPORTS_1, false)) - return true; - else - return GetInfo_ReadfromPipe(lBox, INFO_IOPORTS_2, false); -} - -/* Parts taken from fsusage.c from the Midnight Commander (mc) - - Copyright (C) 1991, 1992 Free Software Foundation, In - - Return the number of TOSIZE-byte blocks used by - BLOCKS FROMSIZE-byte blocks, rounding away from zero. - TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */ - -static long fs_adjust_blocks(long blocks, int fromsize, int tosize) { - if (tosize <= 0) - abort(); - if (fromsize <= 0) - return -1; - - if (fromsize == tosize) /* E.g., from 512 to 512. */ - return blocks; - else if (fromsize > tosize) /* E.g., from 2048 to 512. */ - return blocks * (fromsize / tosize); - else - /* E.g., from 256 to 512. */ - return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize); -} - -/* Fill in the fields of FSP with information about space usage for - the filesystem on which PATH resides. - Return 0 if successful, -1 if not. */ - -#define CONVERT_BLOCKS(b) fs_adjust_blocks ((b), fsd.f_bsize, 512) - -static int get_fs_usage(char *path, long *l_total, long *l_avail) { - struct statfs fsd; /* 4.3BSD, SunOS 4, HP-UX, AIX. */ - unsigned long fsu_blocks, fsu_bfree, fsu_bavail; - - *l_total = *l_avail = 0; - if (statfs(path, &fsd) < 0) - return -1; - - fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks); - fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree); - fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail); - - *l_avail = getuid() ? fsu_bavail/2 : fsu_bfree/2; - *l_total = fsu_blocks/2; - - return 0; -} - -bool GetInfo_XServer_and_Video(QListView *lBox) { - lBox = lBox; - return GetInfo_XServer_Generic(lBox); -} diff --git a/Modules/base/info_osx.cpp b/Modules/base/info_osx.cpp deleted file mode 100644 --- a/Modules/base/info_osx.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2003 Benjamin Reed - * - * info_osx.cpp is part of the KDE program kcminfo. Copied wholesale - * from info_fbsd.cpp =) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/* - * all following functions should return true, when the Information - * was filled into the lBox-Widget. Returning false indicates that - * information was not available. - */ - -#include -#include - -#include -#include -#include - -#include - - - -#include -#include - -#include - -bool GetInfo_IRQ(QTreeWidget*) { - return false; -} - -bool GetInfo_DMA(QTreeWidget*) { - return false; -} - -bool GetInfo_PCI(QTreeWidget*) { - return false; -} - -bool GetInfo_IO_Ports(QTreeWidget*) { - return false; -} - -bool GetInfo_XServer_and_Video(QTreeWidget* tree) { -#if HAVE_X11 - return GetInfo_XServer_Generic(tree); -#else - return false; -#endif -} diff --git a/Modules/base/info_sgi.cpp b/Modules/base/info_sgi.cpp deleted file mode 100644 --- a/Modules/base/info_sgi.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* info_sgi.cpp - - !!!!! this file will be included by info.cpp !!!!! - */ - -/* all following functions should return true, when the Information - was filled into the lBox-Widget. - returning false indicates, that information was not available. - */ - -#include - -bool GetInfo_IRQ(QListView *) { - return false; -} - -bool GetInfo_DMA(QListView *) { - return false; -} - -bool GetInfo_PCI(QTreeWidget*) { - return false; -} - -bool GetInfo_IO_Ports(QListView *) { - return false; -} - -bool GetInfo_XServer_and_Video(QListView *lBox) { - return GetInfo_XServer_Generic(lBox); -} - diff --git a/Modules/base/info_solaris.cpp b/Modules/base/info_solaris.cpp deleted file mode 100644 --- a/Modules/base/info_solaris.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * info_solaris.cpp - * - * Torsten Kasch - */ - -#include "config-infocenter.h" - - -#include -#include -#include -#include -#include -#include - -bool GetInfo_IRQ(QTreeWidget*) { - return false; -} - -bool GetInfo_DMA(QTreeWidget*) { - return false; -} - -bool GetInfo_PCI(QTreeWidget*) { - return false; -} - -bool GetInfo_IO_Ports(QTreeWidget*) { - return false; -} - -bool GetInfo_XServer_and_Video(QTreeWidget* tree) { - return GetInfo_XServer_Generic(tree); -} diff --git a/Modules/base/os_current.h b/Modules/base/os_current.h --- a/Modules/base/os_current.h +++ b/Modules/base/os_current.h @@ -46,16 +46,6 @@ /* i18n("Maybe the proc-filesystem is not enabled in Linux-Kernel.") */ #define DEFAULT_ERRORSTRING QString() - -#elif defined(sgi) && sgi - - #define INFO_IRQ_AVAILABLE - #define INFO_DMA_AVAILABLE - #define INFO_IOPORTS_AVAILABLE - #define INFO_XSERVER_AVAILABLE - - #define DEFAULT_ERRORSTRING i18n("This system may not be completely supported yet.") - #elif defined(__FreeBSD__) || defined(__DragonFly__) #define INFO_IRQ_AVAILABLE @@ -65,17 +55,6 @@ #define DEFAULT_ERRORSTRING i18n("This system may not be completely supported yet.") -#elif defined(__hpux) - - #define INFO_IRQ_AVAILABLE - #define INFO_DMA_AVAILABLE - #define INFO_IOPORTS_AVAILABLE - - - #define INFO_XSERVER_AVAILABLE - - #define DEFAULT_ERRORSTRING QString() - #elif defined(__NetBSD__) #define INFO_IRQ_AVAILABLE @@ -94,34 +73,6 @@ #define DEFAULT_ERRORSTRING i18n("This system may not be completely supported yet.") -#elif defined(__svr4__) && defined(sun) - - #define INFO_IRQ_AVAILABLE - #define INFO_DMA_AVAILABLE - #define INFO_IOPORTS_AVAILABLE - #define INFO_XSERVER_AVAILABLE - - #define DEFAULT_ERRORSTRING i18n("This system may not be completely supported yet.") - -#elif defined(_AIX) - - - #define INFO_IRQ_AVAILABLE - #define INFO_DMA_AVAILABLE - #define INFO_IOPORTS_AVAILABLE - #define INFO_XSERVER_AVAILABLE - - #define DEFAULT_ERRORSTRING i18n("This system may not be completely supported yet.") - -#elif defined(__APPLE__) - - //#define INFO_IRQ_AVAILABLE - //#define INFO_DMA_AVAILABLE - //#define INFO_IOPORTS_AVAILABLE - #define INFO_XSERVER_AVAILABLE - - #define DEFAULT_ERRORSTRING i18n("This system may not be completely supported yet.") - #else #define INFO_IRQ_AVAILABLE diff --git a/Modules/base/os_current.cpp b/Modules/base/os_current.cpp --- a/Modules/base/os_current.cpp +++ b/Modules/base/os_current.cpp @@ -24,23 +24,13 @@ #include "os_base.h" #ifdef __linux__ - #include "info_linux.cpp" -#elif defined(sgi) && sgi - #include "info_sgi.cpp" + #include "info_linux.cpp" #elif defined(__FreeBSD__) || defined(__DragonFly__) - #include "info_fbsd.cpp" -#elif defined(__hpux) - #include "info_hpux.cpp" + #include "info_fbsd.cpp" #elif defined(__NetBSD__) #include "info_netbsd.cpp" #elif defined(__OpenBSD__) - #include "info_openbsd.cpp" -#elif defined(__svr4__) && defined(sun) - #include "info_solaris.cpp" -#elif defined(_AIX) - #include "info_aix.cpp" -#elif defined(__APPLE__) - #include "info_osx.cpp" + #include "info_openbsd.cpp" #else #include "info_generic.cpp" /* Default for unsupported systems.... */ #endif diff --git a/Modules/memory/base.h b/Modules/memory/base.h --- a/Modules/memory/base.h +++ b/Modules/memory/base.h @@ -21,15 +21,10 @@ enum { /* entries for memoryInfos[] */ TOTAL_MEM = 0, /* total physical memory (without swaps) */ - FREE_MEM, /* total free physical memory (without swaps) */ -#if !defined(__svr4__) || !defined(sun) + FREE_MEM, /* total free physical memory (without swaps) */ #if !defined(__NetBSD__) && !defined(__OpenBSD__) SHARED_MEM, /* shared memory size */ - BUFFER_MEM, /* buffered memory size */ -#else - ACTIVE_MEM, - INACTIVE_MEM, -#endif + BUFFER_MEM, /* buffered memory size */ #endif CACHED_MEM, /* cache memory size (located in ram) */ SWAP_MEM, /* total size of all swap-partitions */ diff --git a/Modules/memory/memory.cpp b/Modules/memory/memory.cpp --- a/Modules/memory/memory.cpp +++ b/Modules/memory/memory.cpp @@ -127,7 +127,6 @@ case FREE_MEM: title = i18n("Free physical memory:"); break; -#if !defined(__svr4__) || !defined(sun) #if !defined(__NetBSD__) && !defined(__OpenBSD__) case SHARED_MEM: title = i18n("Shared memory:"); @@ -142,7 +141,6 @@ case INACTIVE_MEM: title = i18n("Inactive memory:"); break; -#endif #endif case CACHED_MEM: title = i18n("Disk cache:"); @@ -288,20 +286,10 @@ #ifdef __linux__ #include "memory_linux.cpp" -#elif defined(__APPLE__) -#include "memory_osx.cpp" -#elif defined(sgi) && sgi -#include "memory_sgi.cpp" -#elif defined(__svr4__) && defined(sun) -#include "memory_solaris.cpp" #elif defined(__FreeBSD__) || defined(__DragonFly__) #include "memory_fbsd.cpp" -#elif defined(__hpux) -#include "memory_hpux.cpp" #elif defined(__NetBSD__) || defined(__OpenBSD__) #include "memory_netbsd.cpp" -#elif defined(__osf__) -#include "memory_tru64.cpp" #else /* Default for unsupported systems */ diff --git a/Modules/memory/memory_hpux.cpp b/Modules/memory/memory_hpux.cpp deleted file mode 100644 --- a/Modules/memory/memory_hpux.cpp +++ /dev/null @@ -1,95 +0,0 @@ - -/* -Copyright 1999 Helge Deller deller@gmx.de - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of -the License or (at your option) version 3 or any later version -accepted by the membership of KDE e.V. (or its successor approved -by the membership of KDE e.V.), which shall act as a proxy -defined in Section 14 of version 3 of the license. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include -#include -#include - - -#define MAX_SWAP_AREAS 16 - -void KCMMemory::fetchValues() -{ - int page_size,i; - unsigned long total_mem, total_free, - total_physical, total_swap, free_physical, - used_physical, used_swap, free_swap; - - struct pst_static pststatic; - struct pst_dynamic stats; - struct pst_vminfo vmstats; - unsigned long fields_[4]; - struct pst_swapinfo swapinfo; - - pstat_getstatic( &pststatic, sizeof( struct pst_static ), (size_t)1, 0); - total_physical = pststatic.physical_memory; - page_size = (int)pststatic.page_size; - - pstat_getdynamic(&stats, sizeof( pst_dynamic ), (size_t)1, 0); - pstat_getvminfo(&vmstats, sizeof(vmstats), (size_t)1, 0); - - fields_[0] = stats.psd_rmtxt + stats.psd_arm; // TEXT - fields_[1] = stats.psd_rm - stats.psd_rmtxt; // USED - fields_[2] = total_physical - fields_[0] - fields_[1] - stats.psd_free; //OTHER - fields_[3] = stats.psd_free; // FREE - - used_physical = (total_physical - fields_[3]) * page_size; - total_physical *= page_size; - free_physical = (total_physical - used_physical); - - - /* Now check the SWAP-AREAS !! */ - - total_swap = free_swap = 0; - - for (i = 0 ; i < MAX_SWAP_AREAS ; i++) - { - pstat_getswap(&swapinfo, sizeof(swapinfo), (size_t)1, i); - if (swapinfo.pss_idx == (unsigned)i) - { - swapinfo.pss_nfpgs *= 4; // nfpgs is in 512 Byte Blocks.... - if (swapinfo.pss_nblksenabled == 0) // == 0 ?? - swapinfo.pss_nblksenabled = swapinfo.pss_nfpgs; - total_swap += (((unsigned long)swapinfo.pss_nblksenabled) * 1024); - free_swap += (((unsigned long)swapinfo.pss_nfpgs ) * 1024); - } - } - - used_swap = total_swap - free_swap; - - - /* Now display the results */ - - total_mem = total_physical; // + total_swap; - total_free = (total_physical - used_physical);// + free_swap; - - memoryInfos[TOTAL_MEM] = MEMORY(total_mem); // total physical memory (without swaps) - memoryInfos[FREE_MEM] = MEMORY(total_free);// total free physical memory (without swaps) - memoryInfos[SHARED_MEM] = NO_MEMORY_INFO; /* FIXME ?? */ - memoryInfos[BUFFER_MEM] = MEMORY(fields_[2])*page_size; /* FIXME ?? */ - memoryInfos[SWAP_MEM] = MEMORY(total_swap); // total size of all swap-partitions - memoryInfos[FREESWAP_MEM] = MEMORY(free_swap); // free memory in swap-partitions -#ifdef __GNUC__ -#warning "FIXME: memoryInfos[CACHED_MEM]" -#endif - memoryInfos[CACHED_MEM] = NO_MEMORY_INFO; // cached memory in ram -} diff --git a/Modules/memory/memory_osx.cpp b/Modules/memory/memory_osx.cpp deleted file mode 100644 --- a/Modules/memory/memory_osx.cpp +++ /dev/null @@ -1,93 +0,0 @@ - -/* - * Copyright (c) 2003 Benjamin Reed - * - * memory_osx.cpp is part of the KDE program kcminfo. Copied wholesale - * from memory_fbsd.cpp =) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -void KCMMemory::fetchValues() -{ - - vm_statistics_data_t vm_info; - mach_msg_type_number_t info_count; - DIR *dirp; - struct dirent *dp; - t_memsize total; - - info_count = HOST_VM_INFO_COUNT; - if (host_statistics(mach_host_self (), HOST_VM_INFO, (host_info_t)&vm_info, &info_count)) { - qDebug() << "could not get memory statistics"; - return; - } - - memoryInfos[TOTAL_MEM] = MEMORY(vm_info.active_count + vm_info.inactive_count + - vm_info.free_count + vm_info.wire_count) * vm_page_size; - memoryInfos[FREE_MEM] = MEMORY(vm_info.free_count) * vm_page_size; - memoryInfos[SHARED_MEM] = NO_MEMORY_INFO; - memoryInfos[BUFFER_MEM] = NO_MEMORY_INFO; - memoryInfos[CACHED_MEM] = NO_MEMORY_INFO; - - dirp = opendir("/private/var/vm"); - if (!dirp) { - qDebug() << "unable to open /private/var/vm"; - return; - } - - total = 0; - - while ((dp = readdir (dirp)) != NULL) { - struct stat sb; - char fname [MAXNAMLEN]; - - if (strncmp (dp->d_name, "swapfile", 8)) - continue; - - strcpy (fname, "/private/var/vm/"); - strcat (fname, dp->d_name); - if (stat (fname, &sb) < 0) - continue; - - total += sb.st_size; - } - closedir (dirp); - - info_count = HOST_VM_INFO_COUNT; - if (host_statistics (mach_host_self (), HOST_VM_INFO, - (host_info_t) &vm_info, &info_count)) { - qDebug() << "unable to get VM info"; - } - - memoryInfos[SWAP_MEM] = total; - // off_t used = (vm_info.pageouts - vm_info.pageins) * vm_page_size; - memoryInfos[FREESWAP_MEM] = NO_MEMORY_INFO; - - /* free = MEMORY(vm_info.free_count) * vm_page_size; - used = MEMORY(vm_info.active_count) * vm_page_size; - total = MEMORY(vm_info.active_count + vm_info.inactive_count + - vm_info.free_count + vm_info.wire_count) * vm_page_size; */ - -} diff --git a/Modules/memory/memory_sgi.cpp b/Modules/memory/memory_sgi.cpp deleted file mode 100644 --- a/Modules/memory/memory_sgi.cpp +++ /dev/null @@ -1,75 +0,0 @@ - -#include -#include -#include -#include - -// The following define is needed for SGI IRIX 6.2 -#define _KMEMUSER -#include - -#include -#include - -#ifndef UBSIZE -#define UBSIZE 512 -#endif - - -void KCMMemory::fetchValues() -{ - int pagesize = getpagesize(); - - struct rminfo rmi; - if( sysmp(MP_SAGET, MPSA_RMINFO, &rmi, sizeof(rmi)) == -1 ) - return; - memoryInfos[TOTAL_MEM] = MEMORY(rmi.physmem) * pagesize; // total physical memory (without swaps) - memoryInfos[FREE_MEM] = MEMORY(rmi.freemem) * pagesize; // total free physical memory (without swaps) - memoryInfos[BUFFER_MEM] = MEMORY(rmi.bufmem) * pagesize; - - - //FIXME: memoryInfos[CACHED_MEM]" - memoryInfos[CACHED_MEM] = NO_MEMORY_INFO; // cached memory in ram - - long val; - swapctl(SC_GETSWAPTOT, &val); - memoryInfos[SWAP_MEM] = MEMORY(val) * UBSIZE; // total size of all swap-partitions - - swapctl(SC_GETFREESWAP, &val); - memoryInfos[FREESWAP_MEM] = MEMORY(val) * UBSIZE; // free memory in swap-partitions - -#ifndef MPKA_SHMINFO - /* Irix 6.5 (also 6.4?) */ - memoryInfos[SHARED_MEM] = NO_MEMORY_INFO; -#else - FILE *kmem = fopen("/dev/kmem", "r"); - if( kmem == 0 ) { - memoryInfos[SHARED_MEM] = NO_MEMORY_INFO; - return; - } - - long shmip = sysmp(MP_KERNADDR, MPKA_SHMINFO); - fseek( kmem, shmip, 0 ); - struct shminfo shmi; - fread( &shmi, sizeof(shmi), 1, kmem ); - - long shmem = sysmp(MP_KERNADDR, MPKA_SHM); - - val = 0; - long pos; - struct shmid_ds shmid; - for( int i=0 ; i - */ - -#include -#include -#include - -/* Stop from crapping out on 32-bit architectures. */ - -#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -# undef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 32 -#endif - -#include -#include -#include - -#define PAGETOK(a) (( (t_memsize) sysconf( _SC_PAGESIZE )) * (t_memsize) a) - -void KCMMemory::fetchValues() { - - kstat_ctl_t *kctl; - kstat_t *ksp; - kstat_named_t *kdata; - - /* - * get a kstat handle first and update the user's kstat chain - */ - if( (kctl = kstat_open()) == NULL ) - return; - while( kstat_chain_update( kctl ) != 0 ) - ; - - /* - * traverse the kstat chain to find the appropriate kstat - */ - if( (ksp = kstat_lookup( kctl, "unix", 0, "system_pages" )) == NULL ) - return; - - if( kstat_read( kctl, ksp, NULL ) == -1 ) - return; - - /* - * lookup the data - */ -#if 0 - kdata = (kstat_named_t *) kstat_data_lookup( ksp, "physmem" ); - if( kdata != NULL ) { - memoryInfos[TOTAL_MEM] = PAGETOK(kdata->value.ui32); - } -#endif - memoryInfos[TOTAL_MEM] = PAGETOK(sysconf(_SC_PHYS_PAGES)); - - kdata = (kstat_named_t *) kstat_data_lookup( ksp, "freemem" ); - if( kdata != NULL ) - memoryInfos[FREE_MEM] = PAGETOK(kdata->value.ui32); -#ifdef __GNUC__ -#warning "FIXME: memoryInfos[CACHED_MEM]" -#endif - memoryInfos[CACHED_MEM] = NO_MEMORY_INFO; // cached memory in ram - - kstat_close( kctl ); - - /* - * Swap Info - */ - - struct anoninfo am_swap; - long swaptotal; - long swapfree; - long swapused; - - swaptotal = swapused = swapfree = 0L; - - /* - * Retrieve overall swap information from anonymous memory structure - - * which is the same way "swap -s" retrieves it's statistics. - * - * swapctl(SC_LIST, void *arg) does not return what we are looking for. - */ - - if (swapctl(SC_AINFO, &am_swap) == -1) - return; - - swaptotal = am_swap.ani_max; - swapused = am_swap.ani_resv; - swapfree = swaptotal - swapused; - - memoryInfos[SWAP_MEM] = PAGETOK(swaptotal); - memoryInfos[FREESWAP_MEM] = PAGETOK(swapfree); -} diff --git a/Modules/memory/memory_tru64.cpp b/Modules/memory/memory_tru64.cpp deleted file mode 100644 --- a/Modules/memory/memory_tru64.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This is memory_tru64.cpp to retrieve memory information under Tru64/Alpha. - * - * Implemented by Tom Leitner, Tom@radar.tu-graz.ac.at - * - * WARNING: This module requires linking with -lmach - * - * This routine is based on m_decosf1.c from the "top" program written by: - * - * AUTHOR: Anthony Baxter, - * - */ - -#include -#include -#include -#include -#include -#include -extern "C" { -#include -} -#include - -#define pagetob(size) (MEMORY(1024L) * ((long) (size) << (long) pageshift)) -#define LOG1024 10 - -extern "C" void vm_statistics(task_t, vm_statistics_data_t*); - -void KCMMemory::fetchValues() -{ - int pageshift; /* log base 2 of the pagesize */ - register int pagesize; - vm_statistics_data_t vmstats; - int swap_pages=0,swap_free=0,i; - struct tbl_swapinfo swbuf; - - /* get the page size with "getpagesize" and calculate pageshift from it */ - - pagesize = getpagesize(); - pageshift = 0; - while (pagesize > 1) { - pageshift++; - pagesize >>= 1; - } - - /* we only need the amount of log(2)1024 for our conversion */ - - pageshift -= LOG1024; - - /* memory information */ - /* this is possibly bogus - we work out total # pages by */ - /* adding up the free, active, inactive, wired down, and */ - /* zero filled. Anyone who knows a better way, TELL ME! */ - /* Change: don't use zero filled. */ - - (void) ::vm_statistics(::task_self(), &vmstats); - - /* thanks DEC for the table() command. No thanks at all for */ - /* omitting the man page for it from OSF/1 1.2, and failing */ - /* to document SWAPINFO in the 1.3 man page. Lets hear it for */ - /* include files. */ - - i=0; - while(table(TBL_SWAPINFO,i,&swbuf,1,sizeof(struct tbl_swapinfo))>0) { - swap_pages += swbuf.size; - swap_free += swbuf.free; - i++; - } - memoryInfos[TOTAL_MEM] = pagetob((vmstats.free_count + - vmstats.active_count + - vmstats.inactive_count + - vmstats.wire_count)); - memoryInfos[FREE_MEM] = pagetob(vmstats.free_count); - memoryInfos[SHARED_MEM] = NO_MEMORY_INFO; /* FIXME ?? */ - memoryInfos[BUFFER_MEM] = NO_MEMORY_INFO; /* FIXME ?? */ -#ifdef __GNUC__ -#warning "FIXME: memoryInfos[CACHED_MEM]" -#endif - memoryInfos[CACHED_MEM] = NO_MEMORY_INFO; /* cached memory in ram */ - memoryInfos[SWAP_MEM] = pagetob(swap_pages); - memoryInfos[FREESWAP_MEM] = pagetob(swap_free); -} diff --git a/Modules/memory/physicalMemoryChart.cpp b/Modules/memory/physicalMemoryChart.cpp --- a/Modules/memory/physicalMemoryChart.cpp +++ b/Modules/memory/physicalMemoryChart.cpp @@ -29,11 +29,9 @@ t_memsize bufferMemory; - bufferMemory = 0; -#if !defined(__svr4__) || !defined(sun) + bufferMemory = 0; #if !defined(__NetBSD__) && !defined(__OpenBSD__) - bufferMemory = ZERO_IF_NO_INFO(memoryInfos[BUFFER_MEM]); -#endif + bufferMemory = ZERO_IF_NO_INFO(memoryInfos[BUFFER_MEM]); #endif t_memsize cachedMemory = ZERO_IF_NO_INFO(memoryInfos[CACHED_MEM]); t_memsize freeMemory = ZERO_IF_NO_INFO(memoryInfos[FREE_MEM]); diff --git a/Modules/nics/nic.cpp b/Modules/nics/nic.cpp --- a/Modules/nics/nic.cpp +++ b/Modules/nics/nic.cpp @@ -42,16 +42,7 @@ #include #include -#ifdef USE_SOLARIS -/* net/if.h is incompatible with STL on Solaris 2.6 - 2.8, redefine - map in the header file because we don't need it. -- Simon Josefsson */ -#define map junkmap -#endif -# include -#ifdef USE_SOLARIS -#undef map -#endif - +#include #include #include #include diff --git a/Modules/pci/CMakeLists.txt b/Modules/pci/CMakeLists.txt --- a/Modules/pci/CMakeLists.txt +++ b/Modules/pci/CMakeLists.txt @@ -30,11 +30,7 @@ if(PCIUTILS_FOUND) message(STATUS "Enabling PCI module based on pciutils library") - add_definitions(-DHAVE_PCIUTILS) - - if(UNIX AND NOT APPLE) - add_definitions (-fpermissive) - endif() + add_definitions(-DHAVE_PCIUTILS -fpermissive) set(KCM_PCI_PART_SRCS ${KCM_PCI_PART_SRCS} kpci.cpp) set(KCM_PCI_LIBS ${KCM_PCI_LIBS} ${PCIUTILS_LIBRARIES} ${ZLIB_LIBRARIES}) diff --git a/kcontrol/menus/CMakeLists.txt b/kcontrol/menus/CMakeLists.txt --- a/kcontrol/menus/CMakeLists.txt +++ b/kcontrol/menus/CMakeLists.txt @@ -1,11 +1,2 @@ - - - -########### install files ############### -if (WIN32) -install( FILES kinfocenter.menu DESTINATION ${SHARE_INSTALL_DIR}/xdg/menus/) -else () install( FILES kinfocenter.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus/) -endif () - install( FILES kinfocenter.directory DESTINATION ${XDG_DIRECTORY_INSTALL_DIR} )