summaryrefslogtreecommitdiff
path: root/app-laptop/pbbuttonsd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-laptop/pbbuttonsd
reinit the tree, so we can have metadata
Diffstat (limited to 'app-laptop/pbbuttonsd')
-rw-r--r--app-laptop/pbbuttonsd/Manifest17
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch20
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch23
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch11
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch29
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch11
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch25
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-pmcs.patch21
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd.rc619
-rw-r--r--app-laptop/pbbuttonsd/files/wireless7
-rw-r--r--app-laptop/pbbuttonsd/metadata.xml15
-rw-r--r--app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild124
-rw-r--r--app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r4.ebuild128
-rw-r--r--app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild137
14 files changed, 587 insertions, 0 deletions
diff --git a/app-laptop/pbbuttonsd/Manifest b/app-laptop/pbbuttonsd/Manifest
new file mode 100644
index 000000000000..71fb6e29dd7d
--- /dev/null
+++ b/app-laptop/pbbuttonsd/Manifest
@@ -0,0 +1,17 @@
+AUX pbbuttonsd-0.8.1-cpufreq.patch 757 SHA256 a5cfb505f6124e1d7ab9da24e89b74c5f23c9e264d714ebae4ec13a15a460647 SHA512 b458ddbcbe8e20fdb316d436f3c3f6c7668ce02cabd2d25d7ed731ad14b431a3f1eb67185d3d5bec26921db1343d5996541c248b7bfeaf1117d469aa4f2a7bad WHIRLPOOL ef6f0b78e8dae02e8956e1915a553fc1d601910af71894ebf5d706ce5898986afdfada1b888d1507ae2813f8625e918a68d966f568ecd065ff509b873515ced0
+AUX pbbuttonsd-0.8.1-fnmode.patch 850 SHA256 3ade78844d061de5055730c4f40df2a7d7097185fbb00ac47ee5193b708cfe8d SHA512 00ed4dd0c0e9e7e92078275fc9fb71c5dd1afd78796cf644f091e32d8d97d7e6f2dce31cf01664f40c51e8ecbfcfe200b09c626c898dfb002426bc2e59ef1609 WHIRLPOOL fd31a4964a75967edd450e84b469688be76925dce158bc129cd9288280b065a7a33c8230922ceaee6d17e0270f19f19fa2f63234180a2ed4118b0e16e9cbb9f8
+AUX pbbuttonsd-0.8.1-g++.patch 431 SHA256 5c87958dd621265686e4f7dec9529b939ce1fcd507f5ff892dd9db1cbadf6270 SHA512 01597510267ea52816bbe7e90e6ac1f872265b77f689387557b8263e5631e1ebfba09af2fc27a1034f2cde7164801c284e1b565064675dd598cc0aa82bd64073 WHIRLPOOL 75e9564773f8817db5bbb6a3dcba6949169b929c798caf537a2331a49e70e4cf8eedbe560e1776f86d459f74586c4a43bd9aa18d41621721d0683ba108d060a4
+AUX pbbuttonsd-0.8.1-laptopmode.sh.patch 827 SHA256 88c41e21229e608e776d899c1a6e34888c0fb1b4a73e8b7ce36c0ef9372fcf93 SHA512 3ab0e2ce5b3fa050d7cc27c7e9d90fb3e7fdca46ba2de8e34cfd0a6338b5ba27dcb07204827ccaa8b228f37ae5941e5829b3cfe1a9c4aa3cc50754c7fcedc307 WHIRLPOOL 2ad579a122c6edcdb9a41f58439e77221d7b1cf734fc647a3882e0df50af132bf6ad5a4c3ecfcf3b2f02c299b5c870db57998bca1a651e2eaf97dfdcb2fd4f04
+AUX pbbuttonsd-0.8.1-lm.patch 419 SHA256 3af258a7611165a56eed47c83ed64ae2a1dc0aeb73a5a4322f724c0e15bf8e55 SHA512 1ce79d85f9119d0d94b789557f8dc41ddcd8ca030c8b03c2399035e21115e2ff3bfb7c4284750450733ac5ad305fa2513041e65feeecd7dca81db4a23ae53e34 WHIRLPOOL e2490d90312aa0ba3f0ed7b1f59d3e24180091827023dc6c991eca4378192608a5fc35f5f56cb9d3636feb2f8c15e51f2db2b80176af63e23a6241f15186bf6a
+AUX pbbuttonsd-0.8.1-lz.patch 920 SHA256 638af170879e623f4e3ec2dc275b7ac0beb2f90084a6c179a2be8a6f028a7563 SHA512 17546f9b7e8b488a2ace5cab29da3738ff59c708aeaae1ef58e6240dba0876254f83f5df358d76af271c636d64c512d7d9fa550e377d4e57d92851a720441dea WHIRLPOOL 9584970f21e87e6920a534465070533a794064e4104ab4c494fc23346237d3c321fc8c4d84866e06b0e8b48407a3d8d2cc6969799bd1b2f46aa975d059802d8b
+AUX pbbuttonsd-0.8.1-pmcs.patch 692 SHA256 e3f422422145da76d958a70f882eaa888ed8bb79bbbe08f569978c7ed3dc4ab9 SHA512 ae8e9c695d80fa775c07b64968f13b3092858e14b37b1ce725e10ea06b897304e9f5079339633163b02e565d9dbb96db321d628394fcfefe528c7a1d36c66b31 WHIRLPOOL a687e120a44f25990f8bd336705e2e2e84425510b1c24fc43a59935f9a2a427353fc8e1d6a860af7415b2b024d88d49c35abd652dda0bfff31157ec51dddcc53
+AUX pbbuttonsd.rc6 355 SHA256 3562146513caaeae7cf4d24b82c6e4500ec0e68aba1f1d71aa9b486232f1aef0 SHA512 93165ce1d1c757e58b407656bf86084bb3fcfe0c55897fbb382f107ff9b3d69559255a11ac3017cf5741eb2923d753f5cc3f1b495e31e16b18b16757accfbdfb WHIRLPOOL 4817d545d85a17392867fe6a90e98e3ff25a8179745cca7beb4c9bb92caa8cca50709486d56b3de7f659f04ca2cd961120c4a990cd15a7c1e83615fb06d39340
+AUX wireless 235 SHA256 0bc03fac1b17933200a3e6d3f50a1d2d2717857006aa06ddaf5d6650c902a978 SHA512 58cbfb80ec32ba6868fea500bcf58bf649a0f468a017ec8c200fe0edd0fd7f1fe17efaafca3e67c20df9fc5a6c80b2941237a375f6e73349a83593dcfacf2816 WHIRLPOOL 6c201feba4cd33677bfadf6305146693fef9dc49b14fc43e407179f0c35cb92653c24e92b7270bf5389e75d790ed6e665864c1941efd435a91c99f5e6bee06d9
+DIST pbbuttonsd-0.8.1.tar.gz 589630 SHA256 b391fd98ed263f355d7e7addc6566959e986627c87dcfdaa1da15310ad70bffa SHA512 856f8533c1f6489986c232baa8b8002a01d009ed3728ee35bc723aece91ba626ce961119c0d424f40c2f9289827f317c56d70fe8f0e035cbd9f08d7701316ac3 WHIRLPOOL 21a18a9f6a204156beb7373f89c6477c68ef90d8d9fe15cb7322b811b15856fd38bca7705860584716b00cd29378b85d0f2ac7624f00fe50ec44ac83033c073b
+DIST pbbuttonsd-0.8.1a.tar.gz 589747 SHA256 254cc391bcb0a4a58a62224b4cca2b29fdf9ca174c1dc18ab0784f1a86465ed1 SHA512 4aaf674872982925f7aa8e06a363f50830f13d9491f4a3b850c1852a8a6d4b2c72164f839c482eed059703dd25d900fe3bb774f78e7039ac2464ea7a1837bf99 WHIRLPOOL ee17f8ff9c39c84b40aa39a6652b18de2c1a183972f4d0cb2585b46ddf6f0d34d9b8af2b7460f84fa0ee19d99497cbe6240996e3f58eb6b83f8053fdc7616165
+EBUILD pbbuttonsd-0.8.1-r3.ebuild 3424 SHA256 4a2abda0060221a00ed798a1c89580501a526a1754733318143e80cc31cbaa4e SHA512 14d1f926a6bb7114984ea4cc90f6b4d23a69ca487b5e6b0f8967a494353b147cbc57ea83f7d92870062976d783c741c36f67b92c69a6942a2be564e79c6d0cbf WHIRLPOOL c1b44184fb7d656ad29a7560dfca1a6422bac78ddad0fd4cb5f7c171d39167d160c46123138de5231a575dc5a67aab9a5f9344f9aeb66f68a9565d5c83cea069
+EBUILD pbbuttonsd-0.8.1-r4.ebuild 3572 SHA256 47d6677d94b89992d35ba7593639351a8056273d5b2f6dca644cbf9371915b93 SHA512 f8b1a365634a3c4103c96bec1d360b1f25a116e7896c78b5c3fdbf66904c1753b66f1bfde7e497c6758529a2ad4ef2a8eeab986bbbd90d5cfadd1b771af5e7d2 WHIRLPOOL 51e331b0b7b43b0f82f9746a220e4a4fbb3dc53a73acf341635b9c935bc550ea7204b6c6ba8da8f97f8571326610399c52ea09ab8a379a8a614eff1599f9f9fd
+EBUILD pbbuttonsd-0.8.1a.ebuild 3251 SHA256 93447a5dd3d1ffb8eded599b482fd7134e358a1f5626afbf5a4419e47663665b SHA512 05df1091b4f54a8797a756d87549a4a88075993a5f8f4027127041209b3f65956f457fa9e682b914b6565c47ba19994af1adb81a76ca8f5944e7317cfe161cb1 WHIRLPOOL 9b56599efce2148ce92d95c09fda67e3537f43cb7718f5899e2334a5f51a8be3ac6176f3e9c4189e58a719608603af0a9d703fa7c26ff2e18bce0ef299fc3d52
+MISC ChangeLog 2827 SHA256 43314e474de9c34aee3f0c58a00cbaa3870d07315101a0a6d26dc7748ce8fbfd SHA512 92288d57099e2f2c87a41621df0507e6dcf549d3f698ed2074acbe67a2f6e04197defda7ac9d31a93cef74918743346edd727e359c2c86478b82fb7b249522e3 WHIRLPOOL 8f94b95964bd405d81fd036337740043704cf646a9b322eded61569574fbf156c5ee5b9f8a499b51bc3a96ae35dbf5f9bb7ee5716c359c0c7570beac9d61d66e
+MISC ChangeLog-2015 17205 SHA256 2b5bd8c0b6a873c919cae7d7c0ad693177fea467c0ab2b7144cc981e0b6fd791 SHA512 b5307d94ae26ced2ae218fa865ea827c0a7501a3c6b8cee0943e28cfeaf1030036b5a6111c894d2d0a9b763bd988d77357e176eea58ba1275a190955468b5221 WHIRLPOOL 8f1bf04099b108c6581b6e10093a4ad85846b39ca7af658db1903aa8abfed0c551918c6df6043f02f3a67e77dc4c644fed4c0ccdec45a85dfb369e64f77ac048
+MISC metadata.xml 511 SHA256 37aa68e489334ad3bd1dee7a1d938759124c100782c9cd430f2ed96f5669d103 SHA512 5a56b1fe175cd76fa23d90e4499f0a6bacfacdb9cb2fd647dbabec42030021c0b4f27eb04b523b9ae7bc44706ee9404abdf5ff16aa92655fab5d00ac187eca5b WHIRLPOOL f86d8c330fbda23c91b424e08e2cb93fbd9964d6d62e2f3fac5fdee4e8757a23c4256ef9099db11f4cdcf7132eb4c2b664c3d83de1508ea4ab2cd2a285d12071
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
diff --git a/app-laptop/pbbuttonsd/metadata.xml b/app-laptop/pbbuttonsd/metadata.xml
new file mode 100644
index 000000000000..c123825ee27e
--- /dev/null
+++ b/app-laptop/pbbuttonsd/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+ </maintainer>
+ <use>
+ <flag name="ibam">Enable support for Intelligent Battery Monitoring</flag>
+ <flag name="macbook">Enable support for the Macbook and Macbook Pro</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">pbbuttons</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild
new file mode 100644
index 000000000000..21c530b0a04b
--- /dev/null
+++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit autotools flag-o-matic eutils
+
+DESCRIPTION="Handles power management and special keys on laptops"
+HOMEPAGE="http://pbbuttons.berlios.de"
+SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="acpi alsa debug doc ibam macbook oss"
+
+DEPEND="macbook? (
+ sys-libs/libsmbios
+ sys-apps/pciutils
+ )
+ >=dev-libs/glib-2.6
+ doc? ( app-doc/doxygen )"
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0 )
+ >=dev-libs/glib-2.6"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-0.8.1-pmcs.patch"
+ ### Don't link with g++ if we don't use ibam
+ if ! use ibam; then
+ epatch "${FILESDIR}/${PN}-0.8.1-g++.patch"
+ fi
+ ### Fix macbook -lz issue
+ epatch "${FILESDIR}/${PN}-0.8.1-lz.patch"
+ epatch "${FILESDIR}/${PN}-0.8.1-lm.patch"
+ ### Fix new apple hid fnmode issue
+ epatch "${FILESDIR}/${PN}-0.8.1-fnmode.patch"
+ eautoconf
+}
+
+src_compile() {
+ # Fix crash bug on some systems
+ replace-flags -O? -O1
+
+ if use macbook; then
+ laptop=macbook
+ elif use x86 || use amd64; then
+ if use acpi; then
+ laptop=acpi
+ else
+ laptop=i386
+ fi
+ # Default to PowerBook
+ else
+ laptop=powerbook
+ fi
+
+ econf laptop=$laptop \
+ $(use_enable debug) \
+ $(use_with doc doxygen_docs) \
+ $(use_with alsa) \
+ $(use_with oss) \
+ $(use_with ibam) \
+ || die "Sorry, failed to configure pbbuttonsd"
+
+ # Thanks to Stefan Bruda for this workaround
+ # Using -j1 fixes a parallel build issue with the docs
+ if use doc; then
+ emake -j1 || die "Sorry, failed to compile pbbuttonsd"
+ else
+ emake || die "Sorry, failed to compile pbbuttonsd"
+ fi
+}
+
+src_install() {
+ dodir /etc/power
+ use ibam && dodir /var/lib/ibam
+ make DESTDIR="${D}" install || die "failed to install"
+ newinitd "${FILESDIR}/pbbuttonsd.rc6" pbbuttonsd
+ dodoc README
+ use doc && dohtml -r doc/*
+
+ dodir /etc/power/resume.d
+ dodir /etc/power/suspend.d
+ dodir /etc/power/scripts.d
+ exeinto "/etc/power/scripts.d"
+ doexe "${FILESDIR}/wireless"
+ ln -s "${D}/etc/power/scripts.d/wireless" "${D}/etc/power/resume.d/wireless"
+}
+
+pkg_postinst() {
+ if [ -e /etc/pbbuttonsd.conf ]; then
+ ewarn "The pbbuttonsd.cnf file replaces /etc/pbuttonsd.conf with a new"
+ ewarn "file (/etc/pbbuttonsd.conf) and a new format. Please check the"
+ ewarn "manual page with 'man pbbuttonsd.cnf' for details."
+ ewarn
+ fi
+
+ if use macbook; then
+ ewarn "Macbook and Macbook Pro users should make sure to have applesmc"
+ ewarn "loaded before starting pbbuttonsdm otherwise auto-adjustments"
+ ewarn "will not work and pbbuttonsd may segfault."
+ fi
+
+ ewarn "Ensure that the evdev kernel module is loaded otherwise"
+ ewarn "pbbuttonsd won't work. SysV IPC is also required."
+ ewarn
+ ewarn "If you need extra security, you can tell pbbuttonsd to only accept"
+ ewarn "input from one user. You can set the userallowed option in"
+ ewarn "/etc/pbbuttonsd.cnf to limit access."
+ ewarn
+
+ if use ibam; then
+ elog "To properly initialize the IBaM battery database, you will"
+ elog "need to perform a full discharge/charge cycle. For more"
+ elog "details, please see the pbbuttonsd man page."
+ elog
+ fi
+
+ elog "A script is now available to reset your wirless connection on resume."
+ elog "Simply uncomment the commented command and set the correct device to"
+ elog "use it. You can find the script in /etc/power/resume.d/wireless"
+
+}
diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r4.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r4.ebuild
new file mode 100644
index 000000000000..03c5674bc6d6
--- /dev/null
+++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r4.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit autotools flag-o-matic eutils
+
+DESCRIPTION="Handles power management and special keys on laptops"
+HOMEPAGE="http://pbbuttons.berlios.de"
+SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="acpi alsa debug doc ibam macbook oss"
+
+DEPEND="macbook? (
+ sys-libs/libsmbios
+ sys-apps/pciutils
+ )
+ >=dev-libs/glib-2.6
+ doc? ( app-doc/doxygen )"
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0 )
+ >=dev-libs/glib-2.6"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-0.8.1-pmcs.patch"
+ ### Don't link with g++ if we don't use ibam
+ if ! use ibam; then
+ epatch "${FILESDIR}/${PN}-0.8.1-g++.patch"
+ fi
+ ### Fix macbook -lz issue
+ epatch "${FILESDIR}/${PN}-0.8.1-lz.patch"
+ epatch "${FILESDIR}/${PN}-0.8.1-lm.patch"
+ ### Fix new apple hid fnmode issue
+ epatch "${FILESDIR}/${PN}-0.8.1-fnmode.patch"
+ ### Add kernel 2.6.x stuff for 3.x as well
+ epatch "${FILESDIR}/${PN}-0.8.1-laptopmode.sh.patch"
+ epatch "${FILESDIR}/${PN}-0.8.1-cpufreq.patch"
+
+ eautoconf
+}
+
+src_compile() {
+ # Fix crash bug on some systems
+ replace-flags -O? -O1
+
+ if use macbook; then
+ laptop=macbook
+ elif use x86 || use amd64; then
+ if use acpi; then
+ laptop=acpi
+ else
+ laptop=i386
+ fi
+ # Default to PowerBook
+ else
+ laptop=powerbook
+ fi
+
+ econf laptop=$laptop \
+ $(use_enable debug) \
+ $(use_with doc doxygen_docs) \
+ $(use_with alsa) \
+ $(use_with oss) \
+ $(use_with ibam) \
+ || die "Sorry, failed to configure pbbuttonsd"
+
+ # Thanks to Stefan Bruda for this workaround
+ # Using -j1 fixes a parallel build issue with the docs
+ if use doc; then
+ emake -j1 || die "Sorry, failed to compile pbbuttonsd"
+ else
+ emake || die "Sorry, failed to compile pbbuttonsd"
+ fi
+}
+
+src_install() {
+ dodir /etc/power
+ use ibam && dodir /var/lib/ibam
+ make DESTDIR="${D}" install || die "failed to install"
+ newinitd "${FILESDIR}/pbbuttonsd.rc6" pbbuttonsd
+ dodoc README
+ use doc && dohtml -r doc/*
+
+ dodir /etc/power/resume.d
+ dodir /etc/power/suspend.d
+ dodir /etc/power/scripts.d
+ exeinto "/etc/power/scripts.d"
+ doexe "${FILESDIR}/wireless"
+ ln -s "${D}/etc/power/scripts.d/wireless" "${D}/etc/power/resume.d/wireless"
+}
+
+pkg_postinst() {
+ if [ -e /etc/pbbuttonsd.conf ]; then
+ ewarn "The pbbuttonsd.cnf file replaces /etc/pbuttonsd.conf with a new"
+ ewarn "file (/etc/pbbuttonsd.conf) and a new format. Please check the"
+ ewarn "manual page with 'man pbbuttonsd.cnf' for details."
+ ewarn
+ fi
+
+ if use macbook; then
+ ewarn "Macbook and Macbook Pro users should make sure to have applesmc"
+ ewarn "loaded before starting pbbuttonsdm otherwise auto-adjustments"
+ ewarn "will not work and pbbuttonsd may segfault."
+ fi
+
+ ewarn "Ensure that the evdev kernel module is loaded otherwise"
+ ewarn "pbbuttonsd won't work. SysV IPC is also required."
+ ewarn
+ ewarn "If you need extra security, you can tell pbbuttonsd to only accept"
+ ewarn "input from one user. You can set the userallowed option in"
+ ewarn "/etc/pbbuttonsd.cnf to limit access."
+ ewarn
+
+ if use ibam; then
+ elog "To properly initialize the IBaM battery database, you will"
+ elog "need to perform a full discharge/charge cycle. For more"
+ elog "details, please see the pbbuttonsd man page."
+ elog
+ fi
+
+ elog "A script is now available to reset your wirless connection on resume."
+ elog "Simply uncomment the commented command and set the correct device to"
+ elog "use it. You can find the script in /etc/power/resume.d/wireless"
+
+}
diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild
new file mode 100644
index 000000000000..8a17130c0544
--- /dev/null
+++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools flag-o-matic
+
+DESCRIPTION="Handles power management and special keys on laptops"
+HOMEPAGE="http://pbbuttons.berlios.de"
+SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="acpi alsa doc ibam macbook oss static-libs"
+
+RDEPEND="
+ >=dev-libs/glib-2.6
+ alsa? ( >=media-libs/alsa-lib-1.0 )
+ macbook? (
+ sys-apps/pciutils
+ sys-libs/libsmbios
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ doc? ( app-doc/doxygen )
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.1-cpufreq.patch"
+ "${FILESDIR}/${PN}-0.8.1-fnmode.patch"
+ "${FILESDIR}/${PN}-0.8.1-laptopmode.sh.patch"
+ "${FILESDIR}/${PN}-0.8.1-lm.patch"
+ "${FILESDIR}/${PN}-0.8.1-lz.patch"
+)
+
+src_prepare() {
+ ### Don't link with g++ if we don't use ibam
+ if ! use ibam; then
+ eapply "${FILESDIR}/${PN}-0.8.1-g++.patch"
+ fi
+
+ default
+
+ eautoconf
+}
+
+src_configure() {
+ # Fix crash bug on some systems
+ replace-flags -O? -O1
+
+ if use macbook; then
+ laptop=macbook
+ elif use x86 || use amd64; then
+ if use acpi; then
+ laptop=acpi
+ else
+ laptop=i386
+ fi
+ # Default to PowerBook
+ else
+ laptop=powerbook
+ fi
+
+ laptop=$laptop \
+ econf \
+ $(use_with alsa) \
+ $(use_with doc doxygen_docs) \
+ $(use_with ibam) \
+ $(use_with oss)
+
+}
+
+src_compile() {
+ # Thanks to Stefan Bruda for this workaround
+ # Using -j1 fixes a parallel build issue with the docs
+ if use doc; then
+ emake -j1
+ else
+ emake
+ fi
+}
+
+src_install() {
+ dodir /etc/power
+ use ibam && dodir /var/lib/ibam
+
+ default
+
+ use static-libs || rm "${D}"/usr/$(get_libdir)/libpbb.a
+
+ newinitd "${FILESDIR}/pbbuttonsd.rc6" pbbuttonsd
+ dodoc README
+ use doc && dodoc -r doc/
+
+ dodir /etc/power/resume.d
+ dodir /etc/power/suspend.d
+ dodir /etc/power/scripts.d
+ exeinto /etc/power/scripts.d
+ doexe "${FILESDIR}"/wireless
+ ln -s "${D}"/etc/power/scripts.d/wireless "${D}"/etc/power/resume.d/wireless
+}
+
+pkg_postinst() {
+ if [ -e /etc/pbbuttonsd.conf ]; then
+ ewarn "The pbbuttonsd.cnf file replaces /etc/pbuttonsd.conf with a new"
+ ewarn "file (/etc/pbbuttonsd.conf) and a new format. Please check the"
+ ewarn "manual page with 'man pbbuttonsd.cnf' for details."
+ ewarn
+ fi
+
+ if use macbook; then
+ ewarn "Macbook and Macbook Pro users should make sure to have applesmc"
+ ewarn "loaded before starting pbbuttonsdm otherwise auto-adjustments"
+ ewarn "will not work and pbbuttonsd may segfault."
+ ewarn
+ fi
+
+ ewarn "Ensure that the evdev kernel module is loaded otherwise"
+ ewarn "pbbuttonsd won't work. SysV IPC is also required."
+ ewarn
+ ewarn "If you need extra security, you can tell pbbuttonsd to only accept"
+ ewarn "input from one user. You can set the userallowed option in"
+ ewarn "/etc/pbbuttonsd.cnf to limit access."
+ ewarn
+
+ if use ibam; then
+ elog "To properly initialize the IBaM battery database, you will"
+ elog "need to perform a full discharge/charge cycle. For more"
+ elog "details, please see the pbbuttonsd man page."
+ elog
+ fi
+
+ elog "A script is now available to reset your wirless connection on resume."
+ elog "Simply uncomment the commented command and set the correct device to"
+ elog "use it. You can find the script in /etc/power/resume.d/wireless"
+
+}