head 1.5; access; symbols pkgsrc-2013Q2:1.5.0.44 pkgsrc-2013Q2-base:1.5 pkgsrc-2012Q4:1.5.0.42 pkgsrc-2012Q4-base:1.5 pkgsrc-2011Q4:1.5.0.40 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q2:1.5.0.38 pkgsrc-2011Q2-base:1.5 pkgsrc-2009Q4:1.5.0.36 pkgsrc-2009Q4-base:1.5 pkgsrc-2008Q4:1.5.0.34 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.32 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.30 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.28 pkgsrc-2008Q2-base:1.5 pkgsrc-2008Q1:1.5.0.26 pkgsrc-2008Q1-base:1.5 pkgsrc-2007Q4:1.5.0.24 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.5.0.22 pkgsrc-2007Q3-base:1.5 pkgsrc-2007Q2:1.5.0.20 pkgsrc-2007Q2-base:1.5 pkgsrc-2007Q1:1.5.0.18 pkgsrc-2007Q1-base:1.5 pkgsrc-2006Q4:1.5.0.16 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.14 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.5.0.12 pkgsrc-2006Q2-base:1.5 pkgsrc-2006Q1:1.5.0.10 pkgsrc-2006Q1-base:1.5 pkgsrc-2005Q4:1.5.0.8 pkgsrc-2005Q4-base:1.5 pkgsrc-2005Q3:1.5.0.6 pkgsrc-2005Q3-base:1.5 pkgsrc-2005Q2:1.5.0.4 pkgsrc-2005Q2-base:1.5 pkgsrc-2005Q1:1.5.0.2 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.4.0.12 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.10 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.8 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.6 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.4 pkgsrc-2003Q4-base:1.4 netbsd-1-6-1:1.4.0.2 netbsd-1-6-1-base:1.4 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.3; locks; strict; comment @# @; 1.5 date 2005.01.03.14.32.30; author wiz; state dead; branches; next 1.4; 1.4 date 2002.11.28.03.36.43; author markd; state Exp; branches; next 1.3; 1.3 date 2001.12.03.15.37.15; author skrll; state Exp; branches; next 1.2; 1.2 date 2001.07.29.05.51.51; author tron; state Exp; branches; next 1.1; 1.1 date 2001.07.22.14.08.32; author skrll; state Exp; branches; next ; desc @@ 1.5 log @Remove KDE2 packages (and their dependencies) as proposed on tech-pkg. @ text @$NetBSD: patch-ai,v 1.4 2002/11/28 03:36:43 markd Exp $ --- klaptopdaemon/portable.cpp.orig Wed May 16 11:16:35 2001 +++ klaptopdaemon/portable.cpp Mon Sep 16 14:45:41 2002 @@@@ -658,6 +658,241 @@@@ { return(1); } + +#elif __NetBSD_APM__ + +#include +#include +#include +#include +#include +#include +#include +#include + +// +// klaptopdeamon interface to NetBSD 1.5 apm. +// Scott Presnell, srp@@zgi.com, srp@@tworoads.net +// Fri Jun 29 17:21:25 PDT 2001 +// Tested on Dell I4K running NetBSD 1.5R +// +#define APMDEV "/dev/apm" + +// +// Check for apm in kernel by talking to /dev/apm +// (opening read only is allowed by any process). +// returns 1 if we support power management +// +int +laptop_portable::has_power_management() +{ + int ret, fd = ::open(APMDEV, O_RDONLY); + + if (fd == -1) { + return 0; + } + + struct apm_power_info info; + memset(&info, 0, sizeof(info)); + ret=ioctl(fd, APM_IOC_GETPOWER, &info); + ::close(fd); + + if (ret == -1) { + return 0; + } + + return 1; +} + +// +// returns 1 if the BIOS returns the time left in the battery rather than a % of full +// +int laptop_portable::has_battery_time() +{ + int ret, fd = ::open(APMDEV, O_RDONLY); + + if (fd == -1) + return 0; + + struct apm_power_info info; + memset(&info, 0, sizeof(info)); + ret=ioctl(fd, APM_IOC_GETPOWER, &info); + ::close(fd); + + if (ret == -1) + return 0; + + return (info.minutes_left != 0xffff); +} + +// +// returns 1 if we can perform a change-to-suspend-mode operation for the user +// (ust check to see if we have the binary) +// (has_power_management() has already returned 1) +// +int laptop_portable::has_suspend() +{ + + struct stat s; + if (stat("/usr/sbin/apm", &s)) + return(0); + return(1); +} + +// +// returns 1 if we can perform a change-to-standby-mode operation for the user +// (just check to see if we have the binary) +// (has_power_management() has already returned 1) +// +int laptop_portable::has_standby() +{ + + struct stat s; + if (stat("/usr/sbin/apm", &s)) + return(0); + return(1); +} + +// +// returns 1 if we can perform a change-to-hibernate-mode for a user +// (has_power_management() has already returned 1) [hibernate is the save-to-disk mode +// not supported by linux - different laptops have their own - the first here is for +// a ThinkPad] +// No support in NetBSD at this time. +// +int laptop_portable::has_hibernation() +{ + return(0); +} + +// +// explain to the user what they need to do if has_power_management() returned 0 +// to get any software they lack +// +QLabel *laptop_portable::no_power_management_explanation(QWidget *parent) +{ + int fd; + QLabel *explain; + + fd = ::open(APMDEV, O_RDONLY); + if (fd == -1) { + switch (errno) { + case ENOENT: + explain = new QLabel("There is no /dev/apm file on this system. Pleae review the NetBSD documentation on how to create a device node for the apm device driver (man 4 apm)", parent); + break; + case EACCES: + explain = new QLabel("Your system has the proper device node for apm support, however you can't access it. If you have apm in the kernel this should not happen", parent); + break; + case ENXIO: + explain = new QLabel("Your kernel lacks support for Advanced Power Managment.", parent); + break; + break; + default: + explain = new QLabel("There was some generic error while opening /dev/apm.", parent); + break; + } + } else { + close(fd); + explain = new QLabel("APM has most likely been disabled. Oops", parent); + } + + explain->setMinimumSize(explain->sizeHint()); + return(explain); +} + +// +// explain to the user what they need to do to get suspend/resume to work from user mode +// +QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent) +{ + QLabel* note = new QLabel(i18n(" "), parent); + note->setMinimumSize(note->sizeHint()); + return(note); +} + +// +// pcmcia support - this will be replaced by better - pcmcia support being worked on by +// others +// +QLabel *laptop_portable::pcmcia_info(int x, QWidget *parent) +{ + if (x == 0) + return(new QLabel(i18n("No PCMCIA controller detected"), parent)); + return(new QLabel(i18n(""), parent)); +} + +// +// puts us into standby mode +// Use apm rather than ioctls in case they are running apmd +// (as they should be). +// +void laptop_portable::invoke_standby() +{ + ::system("/usr/sbin/apm -S"); +} + +// +// puts us into suspend mode +// Use apm rather than ioctls in case they are running apmd +// (as they should be). +// +void laptop_portable::invoke_suspend() +{ + + ::system("/usr/sbin/apm -z"); +} + +// +// puts us into hibernate mode +// No hibernate mode for NetBSD. +// +void laptop_portable::invoke_hibernation() +{ + return; +} + + +// +// return current battery state +// +struct power_result laptop_portable::poll_battery_state() +{ + struct power_result p; + int ret; + + int fd = ::open(APMDEV, O_RDONLY); + + if (fd == -1) + goto bad; + + struct apm_power_info info; + memset(&info, 0, sizeof(info)); + ret=ioctl(fd, APM_IOC_GETPOWER, &info); + ::close(fd); + + if (ret == -1) + goto bad; + + p.powered = (info.ac_state == APM_AC_ON); + p.percentage = (info.battery_life==255 ? 100 : info.battery_life); + p.time = (info.minutes_left != 0xffff ? info.minutes_left : -1); + return(p); + +bad: + p.powered = 1; + p.percentage = 100; + p.time = 0; + return(p); +} + +// +// +// returns true if any mouse or kdb activity has been detected +// +int laptop_portable::poll_activity() +{ + return(1); +} #else // INSERT HERE @ 1.4 log @ioctl APM_IOC_GETPOWER has changed between 1.5 and 1.6, so we need to set batteryid (or clear apm_power_info structure) before calling it. From PR 18447 by Takeshi Nakayama. @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Update to KDE 2.2.2 Closes pkg/14728 from Mark Davies . Changes from him with updates from myself. From www.kde.org... The principal improvements over KDE 2.2.1, release two months ago, include: o security-related - SSL certificate loading - symlink vulnerability in .wmrc access by KDM introduced in 2.2 - security problem with eFax (used by klprfax) - potential problem in PAM invocation by KDM - potential harmful side-effect of failed KDM session starts o new features - added support for CodeWeavers' CrossOver plug-in (provides support for QuickTime, etc.) - added support for the wheelmouse for scrolling through the KGhostview PS/PDF viewer component - ability to search for multiple patterns at a time in the file search dialog - debugging multi-threaded applications with KDevelop o improvements/fixes - handling of HTTP links that redirect to FTP - POST using SSL through a proxy and sending headers through proxies - saving of recently-selected files in the file dialog - handling of non-ASCII characters over SMB - toolbar button captions with certain styles - selecting items with the mouse in Konqueror - sorting in Konqueror's textview - saving current settings as a theme in the theme manager - crashes in KMail with certain mails - crash on invoking the KDM chooser - non-Latin languages with KDevelop performance - icon loading optimized - file dialog speedups - stop spinning SMB client processes - handling of large files in Kate @ text @d1 1 a1 1 $NetBSD: patch-ai,v 1.2 2001/07/29 05:51:51 tron Exp $ d3 3 a5 3 --- klaptopdaemon/portable.cpp.orig Sun Feb 18 15:31:14 2001 +++ klaptopdaemon/portable.cpp @@@@ -658,6 +658,238 @@@@ d44 1 d66 1 d217 1 @ 1.2 log @Only enable APM support on NetBSD ports which support it. Fixes PR pkg/13585 by Jim Bernard. @ text @d1 1 a1 1 $NetBSD: patch-ai,v 1.1 2001/07/22 14:08:32 skrll Exp $ d5 1 a5 1 @@@@ -657,6 +657,238 @@@@ @ 1.1 log @Add advanced power management support to klaptopdaemon as provided by Scott Presnell in pr/13345 @ text @d1 1 a1 1 $NetBSD$ d10 1 a10 1 +#elif __NetBSD__ @