Thu Mar 8 09:07:28 2012 UTC ()
PR/40020 -- provide laptop_portable::has_software_suspend().  This stops
the crash in kcontrol and allows battery monitor to work.


(shattered)
diff -r1.82 -r1.83 pkgsrc/misc/kdeutils3/Makefile
diff -r1.50 -r1.51 pkgsrc/misc/kdeutils3/distinfo
diff -r1.4 -r1.5 pkgsrc/misc/kdeutils3/patches/patch-an

cvs diff -r1.82 -r1.83 pkgsrc/misc/kdeutils3/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/misc/kdeutils3/Attic/Makefile 2012/03/03 00:13:36 1.82
+++ pkgsrc/misc/kdeutils3/Attic/Makefile 2012/03/08 09:07:28 1.83
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.82 2012/03/03 00:13:36 wiz Exp $ 1# $NetBSD: Makefile,v 1.83 2012/03/08 09:07:28 shattered Exp $
2 2
3DISTNAME= kdeutils-${_KDE_VERSION} 3DISTNAME= kdeutils-${_KDE_VERSION}
4PKGREVISION= 16 4PKGREVISION= 17
5COMMENT= Utilities for the KDE integrated X11 desktop 5COMMENT= Utilities for the KDE integrated X11 desktop
6 6
7PKG_DESTDIR_SUPPORT= user-destdir 7PKG_DESTDIR_SUPPORT= user-destdir
8 8
9.include "../../meta-pkgs/kde3/Makefile.kde3" 9.include "../../meta-pkgs/kde3/Makefile.kde3"
10 10
11.include "../../mk/bsd.prefs.mk" 11.include "../../mk/bsd.prefs.mk"
12 12
13# Ensure we export symbols in the linked shared object. 13# Ensure we export symbols in the linked shared object.
14LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} 14LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
15MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS=${EXPORT_SYMBOLS_LDFLAGS:Q} 15MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS=${EXPORT_SYMBOLS_LDFLAGS:Q}
16 16
17DEPENDS+= gtar-base>=1.13.25:../../archivers/gtar-base 17DEPENDS+= gtar-base>=1.13.25:../../archivers/gtar-base

cvs diff -r1.50 -r1.51 pkgsrc/misc/kdeutils3/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/kdeutils3/Attic/distinfo 2008/08/27 12:13:55 1.50
+++ pkgsrc/misc/kdeutils3/Attic/distinfo 2012/03/08 09:07:28 1.51
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1$NetBSD: distinfo,v 1.50 2008/08/27 12:13:55 markd Exp $ 1$NetBSD: distinfo,v 1.51 2012/03/08 09:07:28 shattered Exp $
2 2
3SHA1 (kdeutils-3.5.10.tar.bz2) = dfa440253fd9802d1a9665d339c20d903ea676af 3SHA1 (kdeutils-3.5.10.tar.bz2) = dfa440253fd9802d1a9665d339c20d903ea676af
4RMD160 (kdeutils-3.5.10.tar.bz2) = 98edf87a92c6baf2a3dcd119659cead1110d5789 4RMD160 (kdeutils-3.5.10.tar.bz2) = 98edf87a92c6baf2a3dcd119659cead1110d5789
5Size (kdeutils-3.5.10.tar.bz2) = 3062038 bytes 5Size (kdeutils-3.5.10.tar.bz2) = 3062038 bytes
6SHA1 (patch-ac) = 9b31039b0e3cc05dc4fb288ee8f66ebf3e440f6e 6SHA1 (patch-ac) = 9b31039b0e3cc05dc4fb288ee8f66ebf3e440f6e
7SHA1 (patch-ae) = 7e46d3a6f2b148b7e85314ed998689fb59b98561 7SHA1 (patch-ae) = 7e46d3a6f2b148b7e85314ed998689fb59b98561
8SHA1 (patch-ai) = 6a4b3d3d77ba2756a7ee71d923d8bfe78c735bce 8SHA1 (patch-ai) = 6a4b3d3d77ba2756a7ee71d923d8bfe78c735bce
9SHA1 (patch-an) = e13957a9fa0d23aebbe149ecaca7b9dacde5c9fb 9SHA1 (patch-an) = be425dd332ec5293fe472bba48496c10ec84c7ad
10SHA1 (patch-ao) = ef89fd10177e3164a1b3c0dcaccd104f1079ec6a 10SHA1 (patch-ao) = ef89fd10177e3164a1b3c0dcaccd104f1079ec6a
11SHA1 (patch-aq) = a76ff5042c3dec821026f512f6e83f5a3eaa3d91 11SHA1 (patch-aq) = a76ff5042c3dec821026f512f6e83f5a3eaa3d91

cvs diff -r1.4 -r1.5 pkgsrc/misc/kdeutils3/patches/Attic/patch-an (expand / switch to unified diff)

--- pkgsrc/misc/kdeutils3/patches/Attic/patch-an 2004/02/04 20:38:00 1.4
+++ pkgsrc/misc/kdeutils3/patches/Attic/patch-an 2012/03/08 09:07:28 1.5
@@ -1,92 +1,98 @@ @@ -1,92 +1,98 @@
1$NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $ 1$NetBSD: patch-an,v 1.5 2012/03/08 09:07:28 shattered Exp $
2 2
3--- klaptopdaemon/portable.cpp.orig 2003-11-30 22:50:47.000000000 +1300 3--- klaptopdaemon/portable.cpp.orig 2008-02-13 09:38:14.000000000 +0000
4+++ klaptopdaemon/portable.cpp 4+++ klaptopdaemon/portable.cpp
5@@ -2414,10 +2414,14 @@ laptop_portable::software_suspend_set_ma 5@@ -2438,10 +2438,14 @@ laptop_portable::software_suspend_set_ma
6 #include <sys/ioctl.h> 6 #include <sys/ioctl.h>
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <machine/apmvar.h> 8 #include <machine/apmvar.h>
9-#include <iostream.h> 9-#include <iostream.h>
10+#include <iostream> 10+#include <iostream>
11+#include <qpushbutton.h> 11+#include <qpushbutton.h>
12+#include <qobject.h> 12+#include <qobject.h>
13+#include <kactivelabel.h> 13+#include <kactivelabel.h>
14+#include <kprocess.h> 14+#include <kprocess.h>
15  15
16 // 16 //
17-// klaptopdeamon interface to NetBSD 1.5 apm. 17-// klaptopdeamon interface to NetBSD 1.5 apm.
18+// Klaptopdeamon interface to NetBSD 1.5 apm. 18+// Klaptopdeamon interface to NetBSD 1.5 apm.
19 // Scott Presnell, srp@zgi.com, srp@tworoads.net 19 // Scott Presnell, srp@zgi.com, srp@tworoads.net
20 // Fri Jun 29 17:21:25 PDT 2001 20 // Fri Jun 29 17:21:25 PDT 2001
21 // Tested on Dell I4K running NetBSD 1.5R 21 // Tested on Dell I4K running NetBSD 1.5R
22@@ -2439,6 +2443,7 @@ laptop_portable::has_power_management() 22@@ -2463,6 +2467,7 @@ laptop_portable::has_power_management()
23 } 23 }
24  24
25 struct apm_power_info info; 25 struct apm_power_info info;
26+ memset(&info, 0, sizeof(info)); 26+ memset(&info, 0, sizeof(info));
27 ret=ioctl(fd, APM_IOC_GETPOWER, &info); 27 ret=ioctl(fd, APM_IOC_GETPOWER, &info);
28 ::close(fd); 28 ::close(fd);
29  29
30@@ -2466,6 +2471,7 @@ int laptop_portable::has_battery_time() 30@@ -2490,6 +2495,7 @@ int laptop_portable::has_battery_time()
31 return 0; 31 return 0;
32  32
33 struct apm_power_info info; 33 struct apm_power_info info;
34+ memset(&info, 0, sizeof(info)); 34+ memset(&info, 0, sizeof(info));
35 ret=ioctl(fd, APM_IOC_GETPOWER, &info); 35 ret=ioctl(fd, APM_IOC_GETPOWER, &info);
36 ::close(fd); 36 ::close(fd);
37  37
38@@ -2639,6 +2645,15 @@ laptop_portable::apm_set_mask(bool , boo 38@@ -2661,6 +2667,15 @@ laptop_portable::apm_set_mask(bool , boo
39  39
40  40
41 // 41 //
42+// adds extra widgets to the battery panel 42+// adds extra widgets to the battery panel
43+// 43+//
44+void 44+void
45+laptop_portable::extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout) 45+laptop_portable::extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout)
46+{ 46+{
47+} 47+}
48+ 48+
49+ 49+
50+// 50+//
51 // return current battery state 51 // return current battery state
52 // 52 //
53 struct power_result laptop_portable::poll_battery_state() 53 struct power_result laptop_portable::poll_battery_state()
54@@ -2652,6 +2667,7 @@ struct power_result laptop_portable::pol 54@@ -2674,6 +2689,7 @@ struct power_result laptop_portable::pol
55 goto bad; 55 goto bad;
56  56
57 struct apm_power_info info; 57 struct apm_power_info info;
58+ memset(&info, 0, sizeof(info)); 58+ memset(&info, 0, sizeof(info));
59 ret=ioctl(fd, APM_IOC_GETPOWER, &info); 59 ret=ioctl(fd, APM_IOC_GETPOWER, &info);
60 ::close(fd); 60 ::close(fd);
61  61
62@@ -2714,7 +2730,16 @@ laptop_portable::get_brightness() 62@@ -2736,7 +2752,16 @@ laptop_portable::get_brightness()
63 } 63 }
64  64
65 bool 65 bool
66-laptop_portable::get_system_throttling(bool, int &current, QStringList &s) // do something to help get system throttling data from places like ACPI 66-laptop_portable::get_system_throttling(bool, int &current, QStringList &s) // do something to help get system throttling data from places like ACPI
67+laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool *&) // do something to help get system profiles from places like ACPI 67+laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool *&) // do something to help get system profiles from places like ACPI
68+{ 68+{
69+ // INSERT HERE 69+ // INSERT HERE
70+ current = 0; 70+ current = 0;
71+ s.clear(); 71+ s.clear();
72+ return(0); // if no profiles are available 72+ return(0); // if no profiles are available
73+} 73+}
74+ 74+
75+bool 75+bool
76+laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool *&) // do something to help get system throttling data from places like ACPI 76+laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool *&) // do something to help get system throttling data from places like ACPI
77 { 77 {
78 // INSERT HERE 78 // INSERT HERE
79 current = 0; 79 current = 0;
80@@ -2772,6 +2797,12 @@ laptop_portable::get_battery_status(int  80@@ -2794,6 +2819,18 @@ laptop_portable::get_battery_status(int
81 values.append(s); 81 values.append(s);
82 } 82 }
83  83
 84+bool
 85+laptop_portable::has_software_suspend(int /*type*/)
 86+{
 87+ return false; // (::has_software_suspend(type));
 88+}
 89+
84+void 90+void
85+laptop_portable::software_suspend_set_mask(bool hibernate) 91+laptop_portable::software_suspend_set_mask(bool hibernate)
86+{ 92+{
87+ // software_suspend_is_preferred = hibernate; 93+ // software_suspend_is_preferred = hibernate;
88+} 94+}
89+ 95+
90 #else 96 #else
91  97
92 /* 98 /*