[89498] trunk/dports/kde

nicos at macports.org nicos at macports.org
Wed Feb 1 04:22:19 PST 2012


Revision: 89498
          http://trac.macports.org/changeset/89498
Author:   nicos at macports.org
Date:     2012-02-01 04:22:17 -0800 (Wed, 01 Feb 2012)
Log Message:
-----------
kde4-filelight: adding port after splitting of kdeutils4 in KDE 4.8.0

Added Paths:
-----------
    trunk/dports/kde/kde4-filelight/
    trunk/dports/kde/kde4-filelight/Portfile
    trunk/dports/kde/kde4-filelight/files/
    trunk/dports/kde/kde4-filelight/files/fix-filelight-cache.diff
    trunk/dports/kde/kde4-filelight/files/fix-filelight-mounts.diff
    trunk/dports/kde/kde4-filelight/files/patch-CMakeLists.txt.diff

Added: trunk/dports/kde/kde4-filelight/Portfile
===================================================================
--- trunk/dports/kde/kde4-filelight/Portfile	                        (rev 0)
+++ trunk/dports/kde/kde4-filelight/Portfile	2012-02-01 12:22:17 UTC (rev 89498)
@@ -0,0 +1,36 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           kde4   1.1
+
+name                kde4-filelight
+version             4.8.0
+categories          kde kde4
+license             GPL-2+
+maintainers         nicos openmaintainer
+description         Understand usage of disk space.
+long_description    Filelight allows you to quickly understand exactly \
+                    where your diskspace is being used by graphically \
+                    representing your file system as a set of concentric \
+                    segmented-rings. 
+platforms           darwin
+homepage            http://utils.kde.org/projects/filelight/
+master_sites        kde:stable/${version}/src
+use_bzip2           yes
+distname            filelight-${version}
+checksums           rmd160  a2202a806440638b8cb9cca82911967ae36817f0 \
+                    sha256  4e924805fb7962b1af6a0032015c21cf1d679aa887f5252c150ea4ee862d4be7
+
+patchfiles          fix-filelight-mounts.diff \
+                    fix-filelight-cache.diff
+
+depends_lib-append  port:kdelibs4 \
+                    port:oxygen-icons
+
+if {![variant_isset doc]} {
+    patchfiles-append       patch-CMakeLists.txt.diff
+}
+
+livecheck.url       http://kde.mirrors.hoobly.com/stable/${version}/src
+livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)${extract.suffix}


Property changes on: trunk/dports/kde/kde4-filelight/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/kde/kde4-filelight/files/fix-filelight-cache.diff
===================================================================
--- trunk/dports/kde/kde4-filelight/files/fix-filelight-cache.diff	                        (rev 0)
+++ trunk/dports/kde/kde4-filelight/files/fix-filelight-cache.diff	2012-02-01 12:22:17 UTC (rev 89498)
@@ -0,0 +1,62 @@
+diff -ur ../filelight-4.8.0_orig/src/part/scan.cpp ./src/part/scan.cpp
+--- ../filelight-4.8.0_orig/src/part/scan.cpp	2011-08-22 22:26:05.000000000 +0900
++++ ./src/part/scan.cpp	2012-01-31 15:12:09.000000000 +0900
+@@ -42,6 +42,7 @@
+ {
+     Filelight::LocalLister::readMounts();
+     connect(this, SIGNAL(branchCompleted(Folder*,bool)), this, SLOT(cacheTree(Folder*,bool)), Qt::QueuedConnection);
++    connect(this, SIGNAL(branchCacheHit(Folder*)), this, SLOT(foundCached(Folder*)), Qt::QueuedConnection);	
+ }
+ 
+ ScanManager::~ScanManager()
+@@ -112,6 +113,8 @@
+ 
+                     const Link<File> *end = d->end();
+                     QString s = split.first();
++                    if (s.isEmpty()) //found the dir
++                        break;					
+                     s += QLatin1Char( '/' );
+ 
+                     for (d = 0; jt != end; ++jt)
+@@ -131,7 +134,7 @@
+                     //we found a completed tree, thus no need to scan
+                     kDebug() << "Found cache-handle, generating map.." << endl;
+ 
+-                    emit branchCompleted(d, true);
++                    emit branchCacheHit(d);
+ 
+                     return true;
+                 }
+@@ -221,6 +224,13 @@
+ 
+     QApplication::restoreOverrideCursor();
+ }
++
++void
++ScanManager::foundCached(Folder *tree)
++{
++    emit completed(tree);
++    QApplication::restoreOverrideCursor();
++}	
+ }
+ 
+ #include "scan.moc"
+diff -ur ../filelight-4.8.0_orig/src/part/scan.h ./src/part/scan.h
+--- ../filelight-4.8.0_orig/src/part/scan.h	2011-08-22 22:26:05.000000000 +0900
++++ ./src/part/scan.h	2012-01-31 15:12:35.000000000 +0900
+@@ -54,12 +54,14 @@
+     bool abort();
+     void emptyCache();
+     void cacheTree(Folder*, bool);
++    void foundCached(Folder*);
+ 
+ signals:
+     void completed(Folder*);
+     void aboutToEmptyCache();
+     void branchCompleted(Folder* tree, bool finished);
+-
++    void branchCacheHit(Folder* tree);
++	
+ private:
+     bool m_abort;
+     uint m_files;

Added: trunk/dports/kde/kde4-filelight/files/fix-filelight-mounts.diff
===================================================================
--- trunk/dports/kde/kde4-filelight/files/fix-filelight-mounts.diff	                        (rev 0)
+++ trunk/dports/kde/kde4-filelight/files/fix-filelight-mounts.diff	2012-02-01 12:22:17 UTC (rev 89498)
@@ -0,0 +1,101 @@
+diff -ur ../filelight-4.8.0_orig/src/part/localLister.cpp ./src/part/localLister.cpp
+--- ../filelight-4.8.0_orig/src/part/localLister.cpp	2012-01-31 14:47:57.000000000 +0900
++++ ./src/part/localLister.cpp	2012-01-31 14:50:21.000000000 +0900
+@@ -45,6 +45,10 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#ifdef __APPLE_KDE__
++#include <sys/mount.h>
++#endif
++
+ #ifdef HAVE_MNTENT_H
+ #include <mntent.h>
+ #endif
+@@ -250,7 +254,25 @@
+         }
+     }
+ 
+-    kDebug() << "Found the following remote filesystems: " << s_remoteMounts;
++#ifdef __APPLE_KDE__
++    struct statfs *mounts;
++    int nmounts = getmntinfo(&mounts, MNT_WAIT);
++    for (int i = 0; i < nmounts; ++i) {
++    	struct statfs *m = mounts + i;
++    	if (m->f_flags & MNT_ROOTFS)
++    		continue;
++	
++    	QString str = QString::fromUtf8(m->f_mntonname);
++    	str += QLatin1Char('/');
++	
++    	QStringList &list = (m->f_flags & MNT_LOCAL)
++    		? s_localMounts : s_remoteMounts;
++    	if (!list.contains(str))
++    		list.append(str);
++    }
++#endif
++
++	kDebug() << "Found the following remote filesystems: " << s_remoteMounts;
+     kDebug() << "Found the following local filesystems: " << s_localMounts;
+ }
+ 
+diff -ur ../filelight-4.8.0_orig/src/part/summaryWidget.cpp ./src/part/summaryWidget.cpp
+--- ../filelight-4.8.0_orig/src/part/summaryWidget.cpp	2011-08-22 22:26:05.000000000 +0900
++++ ./src/part/summaryWidget.cpp	2012-01-31 14:50:42.000000000 +0900
+@@ -45,6 +45,11 @@
+ #include <QtGui/QMouseEvent>
+ #include <QtGui/QLayout>
+ 
++#ifdef __APPLE_KDE__
++#include <QFileIconProvider>
++#include <sys/mount.h>
++#endif
++
+ struct Disk
+ {
+     QString mount;
+@@ -137,7 +142,12 @@
+         QLabel *label = new QLabel(text, this);
+         horizontalLayout->addWidget(label);
+         QLabel *icon = new QLabel(this);
++#ifdef __APPLE_KDE__
++		QIcon i = QFileIconProvider().icon(QFileInfo(disk.mount));
++        icon->setPixmap(i.pixmap(32,32));
++#else
+         icon->setPixmap(KIcon(disk.icon).pixmap(16,16));
++#endif
+         horizontalLayout->addWidget(icon);
+ 
+         horizontalLayout->setAlignment(Qt::AlignCenter);
+@@ -159,6 +169,25 @@
+ 
+ DiskList::DiskList()
+ {
++#ifdef __APPLE_KDE__
++	struct statfs *mounts;
++	int nmounts = getmntinfo(&mounts, MNT_WAIT);
++	for (int i = 0; i < nmounts; ++i) {
++		struct statfs *m = mounts + i;
++		
++		char *path = m->f_mntonname;
++		if (m->f_blocks == 0 || m->f_flags & MNT_DONTBROWSE ||
++				access(path, R_OK | X_OK) != 0)
++			continue;
++		
++		Disk disk;
++		disk.mount = QString::fromUtf8(path);
++		disk.size = m->f_blocks * m->f_bsize / 1024;
++		disk.free = m->f_bfree * m->f_bsize / 1024;
++		disk.used = disk.size - disk.free;
++        *this += disk;
++    }
++#else
+     const Solid::StorageAccess *partition;
+     QStringList partitions;
+ 
+@@ -186,4 +215,5 @@
+ 
+         *this += disk;
+     }
++#endif
+ }

Added: trunk/dports/kde/kde4-filelight/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/kde/kde4-filelight/files/patch-CMakeLists.txt.diff	                        (rev 0)
+++ trunk/dports/kde/kde4-filelight/files/patch-CMakeLists.txt.diff	2012-02-01 12:22:17 UTC (rev 89498)
@@ -0,0 +1,8 @@
+--- CMakeLists.txt.orig	2012-01-30 10:00:09.000000000 +0900
++++ CMakeLists.txt	2012-01-30 10:00:18.000000000 +0900
+@@ -37,4 +37,4 @@
+ add_subdirectory(src)
+ add_subdirectory(misc)
+ 
+-add_subdirectory(doc)
++#add_subdirectory(doc)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120201/dd4a5280/attachment.html>


More information about the macports-changes mailing list