From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../files/pbbuttonsd-0.8.1-cpufreq.patch | 20 +++++++++++++++ .../pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch | 23 +++++++++++++++++ .../pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch | 11 ++++++++ .../files/pbbuttonsd-0.8.1-laptopmode.sh.patch | 29 ++++++++++++++++++++++ .../pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch | 11 ++++++++ .../pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch | 25 +++++++++++++++++++ .../pbbuttonsd/files/pbbuttonsd-0.8.1-pmcs.patch | 21 ++++++++++++++++ app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 | 19 ++++++++++++++ app-laptop/pbbuttonsd/files/wireless | 7 ++++++ 9 files changed, 166 insertions(+) create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-pmcs.patch create mode 100644 app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 create mode 100644 app-laptop/pbbuttonsd/files/wireless (limited to 'app-laptop/pbbuttonsd/files') diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch new file mode 100644 index 000000000000..89ab72a8947f --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch @@ -0,0 +1,20 @@ +--- a/scripts/scripts.d/cpufreq ++++ b/scripts/scripts.d/cpufreq +@@ -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/pbbuttonsd-0.8.1-fnmode.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch new file mode 100644 index 000000000000..3c4ed71cb367 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch @@ -0,0 +1,23 @@ +--- a/src/module_pmac.c ++++ b/src/module_pmac.c +@@ -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/pbbuttonsd-0.8.1-g++.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch new file mode 100644 index 000000000000..de43b800128f --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -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/pbbuttonsd-0.8.1-laptopmode.sh.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch new file mode 100644 index 000000000000..c29efe3122ac --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch @@ -0,0 +1,29 @@ +--- a/scripts/scripts.d/laptopmode.sh ++++ b/scripts/scripts.d/laptopmode.sh +@@ -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/pbbuttonsd-0.8.1-lm.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch new file mode 100644 index 000000000000..794de96244cb --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -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/pbbuttonsd-0.8.1-lz.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch new file mode 100644 index 000000000000..93cebe1d5c6e --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch @@ -0,0 +1,25 @@ +--- a/configure.in ++++ b/configure.in +@@ -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-0.8.1-pmcs.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-pmcs.patch new file mode 100644 index 000000000000..2ed3bf329e28 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-pmcs.patch @@ -0,0 +1,21 @@ +--- a/scripts/pmcs-config ++++ b/scripts/pmcs-config +@@ -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/pbbuttonsd.rc6 b/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 new file mode 100644 index 000000000000..ba5e167790d0 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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/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 -- cgit v1.2.3