summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-laptop/pbbuttonsd/files')
-rw-r--r--app-laptop/pbbuttonsd/files/cpufreq.patch20
-rw-r--r--app-laptop/pbbuttonsd/files/fnmode.patch23
-rw-r--r--app-laptop/pbbuttonsd/files/g++.patch11
-rw-r--r--app-laptop/pbbuttonsd/files/laptopmode.sh.patch29
-rw-r--r--app-laptop/pbbuttonsd/files/lm.patch11
-rw-r--r--app-laptop/pbbuttonsd/files/lz.patch25
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd.rc620
-rw-r--r--app-laptop/pbbuttonsd/files/pmcs.patch21
-rw-r--r--app-laptop/pbbuttonsd/files/wireless7
9 files changed, 167 insertions, 0 deletions
diff --git a/app-laptop/pbbuttonsd/files/cpufreq.patch b/app-laptop/pbbuttonsd/files/cpufreq.patch
new file mode 100644
index 000000000000..c5a9f963b632
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/cpufreq.patch
@@ -0,0 +1,20 @@
+--- scripts/scripts.d/cpufreq.bak 2012-09-09 12:17:29.842743727 -0400
++++ scripts/scripts.d/cpufreq 2012-09-09 12:18:08.709696894 -0400
+@@ -18,7 +18,7 @@
+ case "$1" in
+ powersave|custom)
+ case "$KVER" in
+- 2.6.*)
++ "2.6."*|"3."*)
+ if [ -d /sys ]; then
+ echo -n "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+@@ -41,7 +41,7 @@
+ ;;
+ performance)
+ case "$KVER" in
+- 2.6.*)
++ "2.6."*|"3."*)
+ if [ -d /sys ]; then
+ echo -n "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
diff --git a/app-laptop/pbbuttonsd/files/fnmode.patch b/app-laptop/pbbuttonsd/files/fnmode.patch
new file mode 100644
index 000000000000..e33019a43694
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/fnmode.patch
@@ -0,0 +1,23 @@
+--- src/module_pmac.c 2007-07-01 07:05:17.000000000 -0400
++++ src/module_pmac.kbdfix.c 2008-12-27 11:46:36.000000000 -0500
+@@ -990,7 +990,9 @@
+ }
+ } else {
+ if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_RDONLY)) < 0)
+- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY);
++ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY)) < 0)
++ fd = open("/sys/module/hid_apple/parameters/fnmode", O_RDONLY);
++
+
+ if (fd >= 0) {
+ if ((n = read (fd, ADBBuffer, ADB_BUFSIZE-1)) > 0) {
+@@ -1025,7 +1027,8 @@
+ }
+ } else {
+ if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_WRONLY)) < 0)
+- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY);
++ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY)) < 0)
++ fd = open ("/sys/module/hid_apple/parameters/fnmode", O_WRONLY);
+
+ if (fd >= 0) {
+ sprintf ((char*)ADBBuffer, "%d", config);
diff --git a/app-laptop/pbbuttonsd/files/g++.patch b/app-laptop/pbbuttonsd/files/g++.patch
new file mode 100644
index 000000000000..5743bf0aa5df
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/g++.patch
@@ -0,0 +1,11 @@
+--- src/Makefile.tmp 2007-11-29 20:42:38.000000000 -0500
++++ src/Makefile.in 2007-11-29 20:47:23.000000000 -0500
+@@ -319,7 +319,7 @@
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+ pbbuttonsd$(EXEEXT): $(pbbuttonsd_OBJECTS) $(pbbuttonsd_DEPENDENCIES)
+ @rm -f pbbuttonsd$(EXEEXT)
+- $(CXXLINK) $(pbbuttonsd_LDFLAGS) $(pbbuttonsd_OBJECTS) $(pbbuttonsd_LDADD) $(LIBS)
++ $(LINK) $(pbbuttonsd_LDFLAGS) $(pbbuttonsd_OBJECTS) $(pbbuttonsd_LDADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
diff --git a/app-laptop/pbbuttonsd/files/laptopmode.sh.patch b/app-laptop/pbbuttonsd/files/laptopmode.sh.patch
new file mode 100644
index 000000000000..b3eac6da0464
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/laptopmode.sh.patch
@@ -0,0 +1,29 @@
+--- scripts/scripts.d/laptopmode.sh.bak 2012-09-09 12:15:45.632869735 -0400
++++ scripts/scripts.d/laptopmode.sh 2012-09-09 12:16:23.157824284 -0400
+@@ -122,7 +122,7 @@
+ )
+ )
+ case "$KLEVEL" in
+- "2.4"|"2.6")
++ "2.4"|"2.6"|"3."*)
+ true
+ ;;
+ *)
+@@ -222,7 +222,7 @@
+ echo "1" > /proc/sys/vm/laptop_mode
+ echo "30 500 0 0 $AGE $AGE 60 20 0" > /proc/sys/vm/bdflush
+ ;;
+- "2.6")
++ "2.6"|"3."*)
+ echo "5" > /proc/sys/vm/laptop_mode
+ echo "$AGE" > /proc/sys/vm/dirty_writeback_centisecs
+ echo "$AGE" > /proc/sys/vm/dirty_expire_centisecs
+@@ -268,7 +268,7 @@
+ "2.4")
+ echo "30 500 0 0 $U_AGE $B_AGE 60 20 0" > /proc/sys/vm/bdflush
+ ;;
+- "2.6")
++ "2.6"|"3."*)
+ echo "$U_AGE" > /proc/sys/vm/dirty_writeback_centisecs
+ echo "$B_AGE" > /proc/sys/vm/dirty_expire_centisecs
+ echo "$DEF_DIRTY_RATIO" > /proc/sys/vm/dirty_ratio
diff --git a/app-laptop/pbbuttonsd/files/lm.patch b/app-laptop/pbbuttonsd/files/lm.patch
new file mode 100644
index 000000000000..feb7620ea97b
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/lm.patch
@@ -0,0 +1,11 @@
+--- src/Makefile.in.bak 2008-01-11 14:48:19.000000000 -0500
++++ src/Makefile.in 2008-01-11 14:46:01.000000000 -0500
+@@ -255,7 +255,7 @@
+ module_peep.c module_peep.h debug.h \
+ tcp.c tcp.h
+
+-pbbuttonsd_LDADD = -lpbb $(INTLLIBS) $(PB_OBJECTS) $(PB_LIBS) @PACKAGE_LIBS@
++pbbuttonsd_LDADD = -lpbb -lm $(INTLLIBS) $(PB_OBJECTS) $(PB_LIBS) @PACKAGE_LIBS@
+ pbbuttonsd_LDFLAGS = -L$(top_srcdir)/libpbbipc
+ pbbuttonsd_DEPENDENCIES = $(PB_OBJECTS)
+ @DEBUG_TRUE@AM_CFLAGS1 = -DDEBUG
diff --git a/app-laptop/pbbuttonsd/files/lz.patch b/app-laptop/pbbuttonsd/files/lz.patch
new file mode 100644
index 000000000000..d648754e3ef3
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/lz.patch
@@ -0,0 +1,25 @@
+--- configure.in.bak 2007-12-01 11:45:51.000000000 -0500
++++ configure.in 2007-12-01 11:46:42.000000000 -0500
+@@ -33,6 +33,9 @@
+ PB_OBJECTS=
+ PB_LIBS=
+
++### Setup PKG_CONFIG
++PKG_PROG_PKG_CONFIG
++
+ if test "x$laptop" != "x"; then
+ ac_laptop=$laptop
+ elif test "x$LAPTOP" != "x"; then
+@@ -59,10 +62,9 @@
+ AC_CHECK_HEADERS([smbios/SystemInfo.h],
+ AC_DEFINE_UNQUOTED(WITH_SMBIOS, 1, [SMBIOS available]),
+ AC_MSG_ERROR([SMBios library not available. Please install development files for libsmbios.]), [/* dummy */])
+- AC_CHECK_HEADERS([pci/pci.h sys/io.h], ac_macbook=yes,
+- AC_MSG_ERROR([Please install development files for libpci and direct I/O.]), [/* dummy */])
++ PKG_CHECK_MODULES(LIBPCI, libpci)
+ PB_OBJECTS+=" driver_backlight_x1600.$OBJEXT driver_backlight_gma950.$OBJEXT module_acpi.$OBJEXT module_imac.$OBJEXT"
+- PB_LIBS+=" -lpci -lsmbios"
++ PB_LIBS+=" -lsmbios $LIBPCI_LIBS"
+ LCD_FADINGSPEED="448"
+ LCD_AUTOADJMODE="linear"
+ LCD_AUTOADJPARMBAT="0,10,80,30"
diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 b/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6
new file mode 100644
index 000000000000..f56c1465acdf
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use alsasound
+}
+
+start() {
+ ebegin "Starting pbbuttonsd"
+ /usr/bin/pbbuttonsd -d > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pbbuttonsd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/pbbuttonsd
+ eend $?
+}
diff --git a/app-laptop/pbbuttonsd/files/pmcs.patch b/app-laptop/pbbuttonsd/files/pmcs.patch
new file mode 100644
index 000000000000..21dd23831a36
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/pmcs.patch
@@ -0,0 +1,21 @@
+--- scripts/pmcs-config.bak 2007-07-07 13:52:25.000000000 -0400
++++ scripts/pmcs-config 2007-07-18 21:29:27.000000000 -0400
+@@ -11,15 +11,15 @@
+
+ # Section for power policy 'performance'
+ performance_HDTimeOff=0 # hdsetup - timeout in seconds
+-performance_HDOptions="-p" # hdsetup
++performance_HDOptions="" # hdsetup
+ performance_LaptopMode="stop" # bdflush
+
+ # Section for power policy 'custom'
+ custom_HDTimeOff=60 # hdsetup - timeout in seconds
+-custom_HDOptions="-p" # hdsetup
++custom_HDOptions="" # hdsetup
+ custom_LaptopMode="start" # bdflush
+
+ # Section for power policy 'powersave'
+ powersave_HDTimeOff=60 # hdsetup - timeout in seconds
+-powersave_HDOptions="-p" # hdsetup
++powersave_HDOptions="" # hdsetup
+ powersave_LaptopMode="start" # bdflush
diff --git a/app-laptop/pbbuttonsd/files/wireless b/app-laptop/pbbuttonsd/files/wireless
new file mode 100644
index 000000000000..b110b3819a68
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/wireless
@@ -0,0 +1,7 @@
+#!/bin/sh
+### Restart the wireless device on Gentoo
+### Useful for bcm43xx/b43 which doesn't reconnect on resume
+
+### Uncomment the line below and properly set the device variable
+WIRELESS="net.wlan0"
+# /etc/init.d/${WIRELESS} restart