summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorjperkin <jperkin>2015-01-12 11:25:06 +0000
committerjperkin <jperkin>2015-01-12 11:25:06 +0000
commita89f80dd07efb5f93e1b416154bd379e6d94a2cc (patch)
tree8ab7858ef32f693a7c26b4ad64f8e61205330fef /x11
parent67930c921525ac699636b3ad4c8532b49b88d6a6 (diff)
downloadpkgsrc-a89f80dd07efb5f93e1b416154bd379e6d94a2cc.tar.gz
SunOS does not have dirent d_type, use S_IS* stat macros instead.
Diffstat (limited to 'x11')
-rw-r--r--x11/kde-baseapps4/distinfo3
-rw-r--r--x11/kde-baseapps4/patches/patch-dolphin_src_kitemviews_private_kdirectorycontentscounterworker.cpp42
2 files changed, 44 insertions, 1 deletions
diff --git a/x11/kde-baseapps4/distinfo b/x11/kde-baseapps4/distinfo
index 4c00afe7cc0..c484400a21b 100644
--- a/x11/kde-baseapps4/distinfo
+++ b/x11/kde-baseapps4/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.9 2014/11/13 10:53:49 markd Exp $
+$NetBSD: distinfo,v 1.10 2015/01/12 11:25:06 jperkin Exp $
SHA1 (kde-baseapps-4.14.3.tar.xz) = c4e28755454e1925b96eaf5374ca5c2f6c8bd9c8
RMD160 (kde-baseapps-4.14.3.tar.xz) = 318ac5cae826538ae6e4fcb805ece512f537378a
Size (kde-baseapps-4.14.3.tar.xz) = 2548152 bytes
+SHA1 (patch-dolphin_src_kitemviews_private_kdirectorycontentscounterworker.cpp) = db1d193f2413ae1aa53dbc979076ba76d485883f
diff --git a/x11/kde-baseapps4/patches/patch-dolphin_src_kitemviews_private_kdirectorycontentscounterworker.cpp b/x11/kde-baseapps4/patches/patch-dolphin_src_kitemviews_private_kdirectorycontentscounterworker.cpp
new file mode 100644
index 00000000000..0423a8636e8
--- /dev/null
+++ b/x11/kde-baseapps4/patches/patch-dolphin_src_kitemviews_private_kdirectorycontentscounterworker.cpp
@@ -0,0 +1,42 @@
+$NetBSD: patch-dolphin_src_kitemviews_private_kdirectorycontentscounterworker.cpp,v 1.1 2015/01/12 11:25:06 jperkin Exp $
+
+SunOS does not have dirent d_type.
+
+--- dolphin/src/kitemviews/private/kdirectorycontentscounterworker.cpp.orig 2014-11-11 11:22:05.000000000 +0000
++++ dolphin/src/kitemviews/private/kdirectorycontentscounterworker.cpp
+@@ -21,6 +21,9 @@
+ #include "kdirectorycontentscounterworker.h"
+
+ // Required includes for subItemsCount():
++#ifdef __sun
++#include <sys/stat.h>
++#endif
+ #ifdef Q_WS_WIN
+ #include <QDir>
+ #else
+@@ -60,6 +63,9 @@ int KDirectoryContentsCounterWorker::sub
+ if (dir) { // krazy:exclude=syscalls
+ count = 0;
+ struct dirent *dirEntry = 0;
++#ifdef __sun
++ struct stat s;
++#endif
+ while ((dirEntry = ::readdir(dir))) {
+ if (dirEntry->d_name[0] == '.') {
+ if (dirEntry->d_name[1] == '\0' || !countHiddenFiles) {
+@@ -75,10 +81,15 @@ int KDirectoryContentsCounterWorker::sub
+ // If only directories are counted, consider an unknown file type and links also
+ // as directory instead of trying to do an expensive stat()
+ // (see bugs 292642 and 299997).
++#ifdef __sun
++ stat(dirEntry->d_name, &s);
++ const bool countEntry = !countDirectoriesOnly || S_ISDIR(s.st_mode) || S_ISLNK(s.st_mode);
++#else
+ const bool countEntry = !countDirectoriesOnly ||
+ dirEntry->d_type == DT_DIR ||
+ dirEntry->d_type == DT_LNK ||
+ dirEntry->d_type == DT_UNKNOWN;
++#endif
+ if (countEntry) {
+ ++count;
+ }