Changeset 113828 for trunk/dports/kde


Ignore:
Timestamp:
Nov 24, 2013, 3:35:17 PM (6 years ago)
Author:
nicos@…
Message:

kde4-filelight: correct patch to build on Mavericks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/kde/kde4-filelight/files/fix-filelight-mounts.diff

    r89498 r113828  
    1 diff -ur ../filelight-4.8.0_orig/src/part/localLister.cpp ./src/part/localLister.cpp
    2 --- ../filelight-4.8.0_orig/src/part/localLister.cpp    2012-01-31 14:47:57.000000000 +0900
    3 +++ ./src/part/localLister.cpp  2012-01-31 14:50:21.000000000 +0900
    4 @@ -45,6 +45,10 @@
    5  #include <sys/types.h>
    6  #include <unistd.h>
    7  
    8 +#ifdef __APPLE_KDE__
    9 +#include <sys/mount.h>
    10 +#endif
    11 +
    12  #ifdef HAVE_MNTENT_H
    13  #include <mntent.h>
    14  #endif
    15 @@ -250,7 +254,25 @@
    16          }
    17      }
    18  
    19 -    kDebug() << "Found the following remote filesystems: " << s_remoteMounts;
    20 +#ifdef __APPLE_KDE__
    21 +    struct statfs *mounts;
    22 +    int nmounts = getmntinfo(&mounts, MNT_WAIT);
    23 +    for (int i = 0; i < nmounts; ++i) {
    24 +       struct statfs *m = mounts + i;
    25 +       if (m->f_flags & MNT_ROOTFS)
    26 +               continue;
    27 +       
    28 +       QString str = QString::fromUtf8(m->f_mntonname);
    29 +       str += QLatin1Char('/');
    30 +       
    31 +       QStringList &list = (m->f_flags & MNT_LOCAL)
    32 +               ? s_localMounts : s_remoteMounts;
    33 +       if (!list.contains(str))
    34 +               list.append(str);
    35 +    }
    36 +#endif
    37 +
    38 +       kDebug() << "Found the following remote filesystems: " << s_remoteMounts;
    39      kDebug() << "Found the following local filesystems: " << s_localMounts;
    40  }
    41  
    42 diff -ur ../filelight-4.8.0_orig/src/part/summaryWidget.cpp ./src/part/summaryWidget.cpp
    43 --- ../filelight-4.8.0_orig/src/part/summaryWidget.cpp  2011-08-22 22:26:05.000000000 +0900
    44 +++ ./src/part/summaryWidget.cpp        2012-01-31 14:50:42.000000000 +0900
    45 @@ -45,6 +45,11 @@
     1--- src/part/summaryWidget.cpp.orig     2013-11-24 22:07:54.000000000 +0900
     2+++ src/part/summaryWidget.cpp  2013-11-24 22:06:42.000000000 +0900
     3@@ -45,6 +45,13 @@
    464 #include <QtGui/QMouseEvent>
    475 #include <QtGui/QLayout>
     
    508+#include <QFileIconProvider>
    519+#include <sys/mount.h>
     10+#include <sys/unistd.h>
     11+#include <unistd.h>
    5212+#endif
    5313+
     
    5515 {
    5616     QString mount;
    57 @@ -137,7 +142,12 @@
     17@@ -137,7 +144,12 @@
    5818         QLabel *label = new QLabel(text, this);
    5919         horizontalLayout->addWidget(label);
     
    6828 
    6929         horizontalLayout->setAlignment(Qt::AlignCenter);
    70 @@ -159,6 +169,25 @@
     30@@ -159,6 +171,25 @@
    7131 
    7232 DiskList::DiskList()
     
    9454     QStringList partitions;
    9555 
    96 @@ -186,4 +215,5 @@
     56@@ -186,4 +217,5 @@
    9757 
    9858         *this += disk;
Note: See TracChangeset for help on using the changeset viewer.