diff options
Diffstat (limited to 'app-laptop')
122 files changed, 3994 insertions, 0 deletions
diff --git a/app-laptop/batti/Manifest b/app-laptop/batti/Manifest new file mode 100644 index 000000000000..8a8a7d66bfc3 --- /dev/null +++ b/app-laptop/batti/Manifest @@ -0,0 +1 @@ +DIST batti-0.3.8.tar.gz 59783 SHA256 a63f99bc63dad743abef18ac666e11247011cf9136a11286b131467d9f484d1c SHA512 39e0085a13847359eb555eff80c3f3b166775558fba3c76ecb4315786e2ce4307d21dcac5fab38da4ee3cc2035356906eb1354ced56a1f007735029e0484a4de WHIRLPOOL 93f9dcc1b7a42968859eb79db593e0be694b6a31a14152e589cd1866172185a296b67b4e2131923d369ee21b3f36f80f42d8b7eb4aa91edad5d6ef96a5d2038c diff --git a/app-laptop/batti/batti-0.3.8-r2.ebuild b/app-laptop/batti/batti-0.3.8-r2.ebuild new file mode 100644 index 000000000000..f056fec03e6b --- /dev/null +++ b/app-laptop/batti/batti-0.3.8-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +SUPPORT_PYTHON_ABIS="1" +PYTHON_DEPEND="2" +RESTRICT_PYTHON_ABIS="3.*" + +inherit python distutils gnome2-utils eutils + +DESCRIPTION="A upower based battery monitor for the system tray, similar to batterymon" +HOMEPAGE="http://code.google.com/p/batti-gtk/" +SRC_URI="http://batti-gtk.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="libnotify" + +RDEPEND="dev-python/pygtk + dev-python/dbus-python + || ( sys-power/upower sys-power/upower-pm-utils ) + x11-themes/gnome-icon-theme + libnotify? ( x11-libs/libnotify )" +DEPEND="" + +DOCS="AUTHORS" + +src_prepare() { + has_version ">=sys-power/upower-0.99" && epatch "${FILESDIR}/${P}-upower-0.99.patch" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update + distutils_pkg_postinst +} + +pkg_postrm() { + gnome2_icon_cache_update + distutils_pkg_postrm +} diff --git a/app-laptop/batti/batti-0.3.8-r3.ebuild b/app-laptop/batti/batti-0.3.8-r3.ebuild new file mode 100644 index 000000000000..313c72e7044f --- /dev/null +++ b/app-laptop/batti/batti-0.3.8-r3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 gnome2-utils eutils + +DESCRIPTION="A upower based battery monitor for the system tray, similar to batterymon" +HOMEPAGE="http://code.google.com/p/batti-gtk/" +SRC_URI="http://batti-gtk.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libnotify" + +RDEPEND="dev-python/pygtk[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + || ( sys-power/upower sys-power/upower-pm-utils ) + x11-themes/gnome-icon-theme + libnotify? ( x11-libs/libnotify )" +DEPEND="" + +DOCS=( AUTHORS ChangeLog ) + +src_prepare() { + has_version ">=sys-power/upower-0.99" && epatch "${FILESDIR}/${P}-upower-0.99.patch" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch b/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch new file mode 100644 index 000000000000..6f313a594c94 --- /dev/null +++ b/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch @@ -0,0 +1,34 @@ +diff -Naur batti-0.3.8.orig/src/PowerBackend.py batti-0.3.8/src/PowerBackend.py +--- batti-0.3.8.orig/src/PowerBackend.py 2014-04-15 19:30:34.123260000 +0200 ++++ batti-0.3.8/src/PowerBackend.py 2014-04-15 19:32:11.859168509 +0200 +@@ -180,17 +180,6 @@ + + properties = dbus.Interface(iface, 'org.freedesktop.DBus.Properties') + +- if properties.Get(self.dbus_interface, 'CanSuspend'): +- self.__can_suspend = True +- else: +- self.__can_suspend = False +- +- if properties.Get(self.dbus_interface, 'CanHibernate'): +- self.__can_hibernate = True +- else: +- self.__can_hibernate = False +- +- + def __get_interface(self): + dkit_obj = self.__bus.get_object(self.dbus_service, self.dbus_object) + return dbus.Interface(dkit_obj, self.dbus_interface) +@@ -201,12 +190,6 @@ + self.__mc_action(widget, event, data) + + +- def can_suspend(self): +- return self.__can_suspend and self.__get_interface().SuspendAllowed() +- +- def can_hibernate(self): +- return self.__can_hibernate and self.__get_interface().HibernateAllowed() +- + def suspend(self): + self.__get_interface().Suspend() + diff --git a/app-laptop/batti/metadata.xml b/app-laptop/batti/metadata.xml new file mode 100644 index 000000000000..497332ae9c14 --- /dev/null +++ b/app-laptop/batti/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>naota@gentoo.org</email> + <name>Naohiro Aota</name> + </maintainer> + <upstream> + <remote-id type="google-code">batti-gtk</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/configure-trackpoint/Manifest b/app-laptop/configure-trackpoint/Manifest new file mode 100644 index 000000000000..22edbdd859ef --- /dev/null +++ b/app-laptop/configure-trackpoint/Manifest @@ -0,0 +1 @@ +DIST configure-trackpoint-0.7.tar.gz 118439 SHA256 6c2dfbd0dd2b9df97dd1f2c468f91de34012d8138486be57cf9db6d792058bdf SHA512 cc43a8d4f7c7c58e151d5663701dcdadfbea2b2fa7ed424245ee13a108487cc2eba9a03c6a7867f21db43c744b2321adff6266af23280c95d2a75adc53b74d1a WHIRLPOOL da5bbf3b4912df75c4697c4769c054258347f23cbc2054c69bb0ab7802110aa4048c1ea1d4180d5b3088635ab72e421ae243d9a43a5ecccebb15f97c6722d032 diff --git a/app-laptop/configure-trackpoint/configure-trackpoint-0.7.ebuild b/app-laptop/configure-trackpoint/configure-trackpoint-0.7.ebuild new file mode 100644 index 000000000000..4b4b441a1fe7 --- /dev/null +++ b/app-laptop/configure-trackpoint/configure-trackpoint-0.7.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +GCONF_DEBUG="no" + +inherit gnome2 readme.gentoo + +DESCRIPTION="Thinkpad GNOME configuration utility for TrackPoint (For the linux +kernel 2.6 TrackPoint driver)" +HOMEPAGE="http://tpctl.sourceforge.net/configure-trackpoint.html" +SRC_URI="mirror://sourceforge/tpctl/${PN}/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="app-laptop/tp_smapi + >=x11-libs/gtk+-2.2:2 + || ( x11-libs/gksu kde-apps/kdesu ) + >=gnome-base/libgnomeui-2.4 + >=sys-devel/gettext-0.11" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + DOC_CONTENTS="The ${PN} does not automatically load the app-laptop/tp_smapi modules + so you need to do it manually" + + if has_version kde-apps/kdesu && ! has_version x11-libs/gksu; then + sed -i -e "/^Exec/s:gksu:kdesu:" ${PN}.desktop \ + || die "Failed to replace gksu with kdesu" + fi + gnome2_src_prepare +} + +src_install() { + gnome2_src_install + readme.gentoo_create_doc +} + +pkg_postinst() { + gnome2_pkg_postinst + readme.gentoo_print_elog +} diff --git a/app-laptop/configure-trackpoint/metadata.xml b/app-laptop/configure-trackpoint/metadata.xml new file mode 100644 index 000000000000..06d24143b235 --- /dev/null +++ b/app-laptop/configure-trackpoint/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>hwoarang@gentoo.org</email> + <name>Markos Chandras</name> + <description>Proxy maintainer. CC him on bugs</description> + </maintainer> + <maintainer> + <email>m4rk@silverarrow.org</email> + <name>Markellos Orfanos</name> + <description>Assign bugs to him</description> + </maintainer> + <longdescription lang="en"> +</longdescription> + <upstream> + <remote-id type="sourceforge">tpctl</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/dispad/Manifest b/app-laptop/dispad/Manifest new file mode 100644 index 000000000000..448acf192069 --- /dev/null +++ b/app-laptop/dispad/Manifest @@ -0,0 +1,2 @@ +DIST dispad-0.3.1.tar.gz 97952 SHA256 507ec8ab213db38dcef81df9df776b8dad1ec9e8aa5ea52cff1cd2c29a32c647 SHA512 fa9666e79de31f79f3567ae3b529c6df3cf56c134c1fe30d62b7d863d623c89abd6b1153de972507a3795c20001f11caf1e49926a402d145a048014aa97cd400 WHIRLPOOL 8cdc48bd58db72d49a1e794bd858b74cfac88867f0a2612ba7a1d8c85d443f177425c32752babbbae4fd8517d621d66bd0bd2dec9c449ff8f170c345bab559f6 +DIST dispad-0.3.tar.gz 20062 SHA256 fac39c50cdae5d6a2dee5ceaf3c6e6bea95b65b72b5bf5e1829ac08f91b696a0 SHA512 c0d548a2218200f435f25d1837bf9fe1b9fe19fc4f52f19832d1b5718699f1d5af2eabe36a669a382c614902fa174c7d06b3ee15cc6e5cc2124d8423c2804965 WHIRLPOOL 42a6dacd7d4ab9bd74a3f97e94e4dfdad0ce7e7b83c6bcbeaf47ed73b4328e01017ec5e1a660d89e8f76f243666b9fe3af6b9771c689c560f08e0af33c54a055 diff --git a/app-laptop/dispad/dispad-0.3.1.ebuild b/app-laptop/dispad/dispad-0.3.1.ebuild new file mode 100644 index 000000000000..70d88e15ef74 --- /dev/null +++ b/app-laptop/dispad/dispad-0.3.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit autotools + +DESCRIPTION="Daemon to disable trackpads while typing" +HOMEPAGE="https://github.com/BlueDragonX/dispad" +SRC_URI="https://github.com/BlueDragonX/dispad/tarball/v${PV/_/-} -> ${P}.tar.gz" + +S="${WORKDIR}/BlueDragonX-dispad-dbb9be3" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="x11-libs/libX11 + x11-libs/libXi + dev-libs/confuse" +RDEPEND="${DEPEND}" + +src_prepare() { + eautoreconf -i +} diff --git a/app-laptop/dispad/dispad-0.3.ebuild b/app-laptop/dispad/dispad-0.3.ebuild new file mode 100644 index 000000000000..17a2d71c3091 --- /dev/null +++ b/app-laptop/dispad/dispad-0.3.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit autotools + +DESCRIPTION="Daemon to disable trackpads while typing" +HOMEPAGE="https://github.com/BlueDragonX/dispad" +SRC_URI="https://github.com/BlueDragonX/dispad/tarball/v${PV/_/-} -> ${P}.tar.gz" + +S="${WORKDIR}/BlueDragonX-dispad-6e96d0d" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="x11-libs/libX11 + x11-libs/libXi + dev-libs/confuse" +RDEPEND="${DEPEND}" + +src_prepare() { + eautoreconf -i +} diff --git a/app-laptop/dispad/metadata.xml b/app-laptop/dispad/metadata.xml new file mode 100644 index 000000000000..f3f98610c338 --- /dev/null +++ b/app-laptop/dispad/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jsbronder@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">BlueDragonX/dispad</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/easy-slow-down-manager/Manifest b/app-laptop/easy-slow-down-manager/Manifest new file mode 100644 index 000000000000..eec1f21b4c16 --- /dev/null +++ b/app-laptop/easy-slow-down-manager/Manifest @@ -0,0 +1 @@ +DIST easy-slow-down-manager-0.3.tar.gz 5636 SHA256 c9296226d4e0d41955988d0dbd7f143ff2e06a40744705c78f89f9a51c1c0253 SHA512 9974fb3af48a529f050aa5730988614a91b615e3fd2e5b6edc5b70ac6a1faffb4f4a1423cb634aff671dc7228bb70be8ef150c274bf57895048fae5566aac77a WHIRLPOOL 8820c937e308b940f58fe7c0132394a17b0d6e78844b0b72757f8f8f76c000a548fb291a508b8e803460ba75c745ce045f54541480f25756c976129d64236ff0 diff --git a/app-laptop/easy-slow-down-manager/easy-slow-down-manager-0.3.ebuild b/app-laptop/easy-slow-down-manager/easy-slow-down-manager-0.3.ebuild new file mode 100644 index 000000000000..9f55f7f06a9a --- /dev/null +++ b/app-laptop/easy-slow-down-manager/easy-slow-down-manager-0.3.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit eutils linux-mod + +DESCRIPTION="provides Linux users with functionality similar to Samsung Easy Speed Up Manager" +HOMEPAGE="http://code.google.com/p/easy-slow-down-manager/" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-1" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +S=${WORKDIR} + +BUILD_TARGETS="all" +MODULE_NAMES="samsung-backlight() easy_slow_down_manager()" + +src_prepare() { + get_version + if kernel_is -ge 3 10; then + epatch "${FILESDIR}"/${P}-kernel-3.10-1.patch + fi + epatch "${FILESDIR}"/${P}-kv_dir.patch +} + +src_compile() { + BUILD_PARAMS="KERN_DIR=${KV_DIR}" + linux-mod_src_compile +} diff --git a/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kernel-3.10-1.patch b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kernel-3.10-1.patch new file mode 100644 index 000000000000..272143eeea3b --- /dev/null +++ b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kernel-3.10-1.patch @@ -0,0 +1,205 @@ +diff --git a/easy_slow_down_manager.c b/easy_slow_down_manager.c +index 7b2d1e9..1336557 100644 +--- a/easy_slow_down_manager.c ++++ b/easy_slow_down_manager.c +@@ -4,6 +4,7 @@ + #include <linux/proc_fs.h> + #include <linux/pci.h> + #include <linux/delay.h> ++#include <linux/version.h> + #include <asm/uaccess.h> + #include <linux/dmi.h> + +@@ -101,7 +102,7 @@ MODULE_PARM_DESC(debug, "Verbose output"); + int sabi_exec_command(u8 command, u8 data, struct sabi_retval *sretval) + { + int retval = 0; +- ++ + mutex_lock(&sabi_mutex); + + /* enable memory to be able to write to it */ +@@ -141,22 +142,25 @@ int sabi_exec_command(u8 command, u8 data, struct sabi_retval *sretval) + return retval; + } + +-int easy_slow_down_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) { ++ssize_t easy_slow_down_read(struct file *filp, char __user *buffer, ++ size_t length, loff_t *off) { + struct sabi_retval sretval; +- +- if (off > 0) { +- *eof = 1; +- } +- else if (!sabi_exec_command(SABI_GET_ETIQUETTE_MODE, 0, &sretval)) { +- page[0] = sretval.retval[0] + '0'; ++ ++ if (*off > 0) ++ return 0; ++ ++ if (!sabi_exec_command(SABI_GET_ETIQUETTE_MODE, 0, &sretval)) { ++ char mode = sretval.retval[0] + '0'; ++ if (copy_to_user(buffer, &mode, 1)) ++ return -EFAULT; ++ (*off)++; + return 1; + } + return 0; + } + +-int easy_slow_down_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) { ++ssize_t easy_slow_down_write(struct file *filp, const char __user *buffer, ++ size_t count, loff_t *off) { + char mode = '0'; + if (copy_from_user(&mode, buffer, 1)) { + return -EFAULT; +@@ -167,22 +171,25 @@ int easy_slow_down_write(struct file *file, const char __user *buffer, + return count; + } + +-int easy_backlight_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) { ++ssize_t easy_backlight_read(struct file *filp, char __user *buffer, ++ size_t length, loff_t *off) { + struct sabi_retval sretval; +- +- if (off > 0) { +- *eof = 1; +- } +- else if (!sabi_exec_command(SABI_GET_BACKLIGHT, 0, &sretval)) { +- page[0] = sretval.retval[0] + '0'; ++ ++ if (*off > 0) ++ return 0; ++ ++ if (!sabi_exec_command(SABI_GET_BACKLIGHT, 0, &sretval)) { ++ char mode = sretval.retval[0] + '0'; ++ if (copy_to_user(buffer, &mode, 1)) ++ return -EFAULT; ++ (*off)++; + return 1; + } + return 0; + } + +-int easy_backlight_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) { ++ssize_t easy_backlight_write(struct file *file, const char __user *buffer, ++ size_t count, loff_t *off) { + char mode = '0'; + if (copy_from_user(&mode, buffer, 1)) { + return -EFAULT; +@@ -193,22 +200,25 @@ int easy_backlight_write(struct file *file, const char __user *buffer, + return count; + } + +-int easy_wifi_kill_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) { ++ssize_t easy_wifi_kill_read(struct file *filp, char __user *buffer, ++ size_t length, loff_t *off) { + struct sabi_retval sretval; +- +- if (off > 0) { +- *eof = 1; +- } +- else if (!sabi_exec_command(SABI_GET_WIRELESS_BUTTON, 0, &sretval)) { +- page[0] = sretval.retval[0] + '0'; ++ ++ if (*off > 0) ++ return 0; ++ ++ if (!sabi_exec_command(SABI_GET_WIRELESS_BUTTON, 0, &sretval)) { ++ char mode = sretval.retval[0] + '0'; ++ if (copy_to_user(buffer, &mode, 1)) ++ return -EFAULT; ++ (*off)++; + return 1; + } + return 0; + } + +-int easy_wifi_kill_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) { ++ssize_t easy_wifi_kill_write(struct file *file, const char __user *buffer, ++ size_t count, loff_t *off) { + char mode = '0'; + if (copy_from_user(&mode, buffer, 1)) { + return -EFAULT; +@@ -219,8 +229,26 @@ int easy_wifi_kill_write(struct file *file, const char __user *buffer, + return count; + } + ++static const struct file_operations proc_fops_slow_down = { ++ .owner = THIS_MODULE, ++ .read = easy_slow_down_read, ++ .write = easy_slow_down_write ++}; ++ ++static const struct file_operations proc_fops_wifi_kill = { ++ .owner = THIS_MODULE, ++ .read = easy_wifi_kill_read, ++ .write = easy_wifi_kill_write ++}; ++ ++static const struct file_operations proc_fops_backlight = { ++ .owner = THIS_MODULE, ++ .read = easy_backlight_read, ++ .write = easy_backlight_write ++}; ++ + int __init easy_slow_down_init(void) { +- ++ + const char *test_str = "SwSmi@"; + int pos; + int index = 0; +@@ -290,19 +318,15 @@ int __init easy_slow_down_init(void) { + } + + +- proc_entry_slow_down = create_proc_entry("easy_slow_down_manager", 0666, NULL); ++ proc_entry_slow_down = proc_create("easy_slow_down_manager", 0666, NULL, &proc_fops_slow_down); + if (proc_entry_slow_down == NULL) { + printk(KERN_INFO "Easy slow down manager: Couldn't create proc entry\n"); + iounmap(sabi_iface); + iounmap(f0000_segment); + return -ENOMEM; + } +- else { +- proc_entry_slow_down->read_proc = easy_slow_down_read; +- proc_entry_slow_down->write_proc = easy_slow_down_write; +- } + +- proc_entry_wifi_kill = create_proc_entry("easy_wifi_kill", 0666, NULL); ++ proc_entry_wifi_kill = proc_create("easy_wifi_kill", 0666, NULL, &proc_fops_wifi_kill); + if (proc_entry_wifi_kill == NULL) { + printk(KERN_INFO "Easy slow down manager: Couldn't create proc entry\n"); + remove_proc_entry("easy_slow_down_manager", NULL); +@@ -310,12 +334,8 @@ int __init easy_slow_down_init(void) { + iounmap(f0000_segment); + return -ENOMEM; + } +- else { +- proc_entry_wifi_kill->read_proc = easy_wifi_kill_read; +- proc_entry_wifi_kill->write_proc = easy_wifi_kill_write; +- } +- +- proc_entry_backlight = create_proc_entry("easy_backlight", 0666, NULL); ++ ++ proc_entry_backlight = proc_create("easy_backlight", 0666, NULL, &proc_fops_backlight); + if (proc_entry_backlight == NULL) { + printk(KERN_INFO "Easy slow down manager: Couldn't create proc entry\n"); + remove_proc_entry("easy_slow_down_manager", NULL); +@@ -324,10 +344,6 @@ int __init easy_slow_down_init(void) { + iounmap(f0000_segment); + return -ENOMEM; + } +- else { +- proc_entry_backlight->read_proc = easy_backlight_read; +- proc_entry_backlight->write_proc = easy_backlight_write; +- } + return 0; + } + diff --git a/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kv_dir.patch b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kv_dir.patch new file mode 100644 index 000000000000..1f8ab6fbb46f --- /dev/null +++ b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kv_dir.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile b/Makefile +index 60a649c..fbdc332 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,8 @@ + obj-m := easy_slow_down_manager.o samsung-backlight.o +-KVERSION = $(shell uname -r) ++KERN_DIR=/usr/src/linux + + all: +- $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) modules ++ $(MAKE) -C /$(KERN_DIR) M=$(PWD) modules + + clean: +- $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) clean ++ $(MAKE) -C /$(KERN_DIR) M=$(PWD) clean diff --git a/app-laptop/easy-slow-down-manager/metadata.xml b/app-laptop/easy-slow-down-manager/metadata.xml new file mode 100644 index 000000000000..b3ced0ed9e9a --- /dev/null +++ b/app-laptop/easy-slow-down-manager/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="google-code">easy-slow-down-manager</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/hdaps-gl/Manifest b/app-laptop/hdaps-gl/Manifest new file mode 100644 index 000000000000..fa8391ed8604 --- /dev/null +++ b/app-laptop/hdaps-gl/Manifest @@ -0,0 +1 @@ +DIST hdaps-gl-0.0.5.tar.gz 2495 SHA256 d7696a42be66b09d492345c3a05b7c3b45f5e8e33464d3a74844b78182c73c64 SHA512 6ebef6324fcdfaf5c2ec6cc8382d376c711e5d957a4ffdd4ee150317649ea0a47552e421f8008a3498ac49487657dca2f49b1a50169d7ab02ee5bef856625d19 WHIRLPOOL 1e8182f8d6e7c378204c2b91c4bb9d8a7574b3d636485e1349b037c82feee06985ee9d4e9e7cc155d5c67b2bb81739a6ff9350a29e87ac5f7d16efedec1ad1fa diff --git a/app-laptop/hdaps-gl/files/hdaps-gl-0.0.5-as-needed.diff b/app-laptop/hdaps-gl/files/hdaps-gl-0.0.5-as-needed.diff new file mode 100644 index 000000000000..0d0214033252 --- /dev/null +++ b/app-laptop/hdaps-gl/files/hdaps-gl-0.0.5-as-needed.diff @@ -0,0 +1,11 @@ +--- hdaps-gl-0.0.5/Makefile 2005-08-30 20:06:53.000000000 +0200 ++++ hdaps-gl-0.0.5-1/Makefile 2008-09-22 22:55:57.000000000 +0200 +@@ -10,7 +10,7 @@ + all: hdaps-gl + + hdaps-gl: hdaps-gl.c +- $(CC) $(CFLAGS) $(LIBDIR) $(LIBRARIES) -o hdaps-gl hdaps-gl.c ++ $(CC) $(CFLAGS) $(LIBDIR) -o hdaps-gl hdaps-gl.c $(LIBRARIES) + + clean: + rm -f hdaps-gl *.o diff --git a/app-laptop/hdaps-gl/hdaps-gl-0.0.5.ebuild b/app-laptop/hdaps-gl/hdaps-gl-0.0.5.ebuild new file mode 100644 index 000000000000..e3cc49627890 --- /dev/null +++ b/app-laptop/hdaps-gl/hdaps-gl-0.0.5.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="OpenGL visualization for HDAPS data" +HOMEPAGE="http://hdaps.sourceforge.net" +SRC_URI="mirror://sourceforge/hdaps/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="virtual/opengl + media-libs/freeglut" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${P}-as-needed.diff" +} + +src_compile() { + emake CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} ${LDFLAGS}" \ + || die "emake failed" +} + +src_install() { + dobin ${PN} +} diff --git a/app-laptop/hdaps-gl/metadata.xml b/app-laptop/hdaps-gl/metadata.xml new file mode 100644 index 000000000000..1f206e8e76da --- /dev/null +++ b/app-laptop/hdaps-gl/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">hdaps</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/hdapsd/Manifest b/app-laptop/hdapsd/Manifest new file mode 100644 index 000000000000..0e9092b1e14b --- /dev/null +++ b/app-laptop/hdapsd/Manifest @@ -0,0 +1,2 @@ +DIST hdapsd-20090401.tar.gz 95058 SHA256 32979d58de4c54a7cc5671e7e7b4f0b653b659104faa9610433f8bb5dd4cef7a SHA512 4984a6c636d3447051ca5629fec89f08eee3773750f9623b80d7c0d4af65dcf9868392f2e93f5d13ac329d311ec2ebcdddf3e438007d1f851a920137c6903c96 WHIRLPOOL 9c3822acb39ff1f10e47604725bf6e42546b95ba9db26ebd751b69c4162e3df4f33d177a2a0b7a764c5e0f2478f470595cda304221a0ec165b07ef183b6ea9be +DIST hdapsd-20141203.tar.gz 128818 SHA256 6650db6b2251b9774bdfba34dd58f712de4c761e6c78eb61ea3b82b694cbef5e SHA512 19c1a8b362f15864b71f4fb221c0993b43b3b2d965d5826af06fb9f6b0e345e5da99181493e13e230c7fe77060ae5b373027e8ec90a511566a6ccaef43998178 WHIRLPOOL befbcbbdcfc5ae9a844f0a96703a7c9a7d43bf4c5d6d9735412efc136d9e20aff6a4dc3e5755cfa9837122b4f7890b00be53a21237838b078271ba7c9650589c diff --git a/app-laptop/hdapsd/files/hdapsd.conf-20141024 b/app-laptop/hdapsd/files/hdapsd.conf-20141024 new file mode 100644 index 000000000000..a83d8bb181ac --- /dev/null +++ b/app-laptop/hdapsd/files/hdapsd.conf-20141024 @@ -0,0 +1,24 @@ +# Configuration for the HDAPS daemon (hdapsd). All settings here are +# optional and will override those set in /etc/hdapsd.conf (if hdapsd +# was built with libconfig support). + +# The list of the disk devices that hdapsd should monitor. Usually +# this is "hda", "sda", or "hda sda". The hdaps daemon will attempt to +# auto-detect your drive if this is left empty. Empty by default. +# +#DISKLIST="sda" + +# Hdapsd sensitivity. The lower the threshold, the earlier the heads +# are parked when movement is detected. The default is determined by +# hdapsd, and is currently 15. +# +#THRESHOLD="10" + +# Log to syslog? Disabled by default. +# +#SYSLOG="true" + +# Set any extra options here, like -a for "adaptive mode". Empty by +# default. +# +#OPTIONS="-a" diff --git a/app-laptop/hdapsd/files/hdapsd.conf.3 b/app-laptop/hdapsd/files/hdapsd.conf.3 new file mode 100644 index 000000000000..509d3afa2013 --- /dev/null +++ b/app-laptop/hdapsd/files/hdapsd.conf.3 @@ -0,0 +1,12 @@ +# The list of the disk devices that hdapsd should monitor. +# Usually this is 'hda', 'sda' or 'hda sda'. +# hdaps will auto-devices if empty +#DISKLIST="sda" + +# hdapsd sensitivity +# The lower the threshold is the earlier +# the heads are parked when the laptop is shaked +THRESHOLD="10" + +# Set any extra options here, like -a for Adaptive mode +OPTIONS="-a" diff --git a/app-laptop/hdapsd/files/hdapsd.init-20141024 b/app-laptop/hdapsd/files/hdapsd.init-20141024 new file mode 100644 index 000000000000..b4d0eab26b5c --- /dev/null +++ b/app-laptop/hdapsd/files/hdapsd.init-20141024 @@ -0,0 +1,76 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +description="Hard Drive Active Protection System daemon" +command="/usr/sbin/hdapsd" +pidfile="/run/hdapsd.pid" + +# Always daemonize when started by OpenRC, and don't make the pidfile +# configurable. Even if the user sets something dumb for the pidfile +# in /etc/hdapsd.conf, we want it to work! Fortunately the settings +# passed on the command-line override the config file. +command_args="--background --pidfile=${pidfile}" + + +depend() { + need localmount +} + +checkconfig() { + # An empty DISKLIST is allowed because the disk will be + # auto-detected. + for DISK in ${DISKLIST}; do + if [ ! -b /dev/${DISK} ]; then + eerror "Could not find disk /dev/${DISK}!" + eerror "Adjust the DISK setting in /etc/conf.d/hdapsd" + return 1 + fi + + if [ ! -e /sys/block/${DISK}/queue/protect ] && \ + [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then + eerror "No protect entry for ${DISK}!" + eerror "Make sure your kernel is patched with the blk_freeze patch" + return 1 + fi + done + + # Load the tp_smapi module first. This is not a requirement, but + # it helps hdapsd's adaptive mode. + if [ ! -e /sys/devices/platform/smapi ] ; then + modprobe tp_smapi 2>/dev/null + fi + + if [ ! -d /sys/devices/platform/hdaps ] ; then + ebegin "Loading hdaps module" + modprobe hdaps + eend $? || return 1 + fi +} + +start() { + checkconfig || return 1 + + for DISK in ${DISKLIST}; do + command_args="${command_args} -d ${DISK}" + done + + # Since all of these settings are now optional, we append them + # only if we need to. + if [ ! -z "${THRESHOLD}" ] ; then + command_args="${command_args} --sensitivity ${THRESHOLD}" + fi + + if [ ! -z "${SYSLOG}" ] ; then + command_args="${command_args} --syslog" + fi + + if [ ! -z "${OPTIONS}" ] ; then + command_args="${command_args} ${OPTIONS}" + fi + + ebegin "Starting the ${description}" + start-stop-daemon --start --exec "${command}" --pidfile "${pidfile}" \ + -- ${command_args} + eend $? +} diff --git a/app-laptop/hdapsd/files/hdapsd.init.3 b/app-laptop/hdapsd/files/hdapsd.init.3 new file mode 100644 index 000000000000..d7894fbc8ada --- /dev/null +++ b/app-laptop/hdapsd/files/hdapsd.init.3 @@ -0,0 +1,69 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +depend() { + need localmount +} + +checkconfig() { + if [ -n "${DISK}" ]; then + ewarn "Please migrate DISK to DISKLIST in /etc/conf.d/hdapsd." + DISKLIST=${DISK} + fi + + if [ -z "${THRESHOLD}" ] ; then + eerror "You should setup THRESHOLD in /etc/conf.d/hdapsd." + return 1 + fi + + #empty DISKLIST is allowed as well + for DISK in ${DISKLIST}; do + if [ ! -b /dev/${DISK} ]; then + eerror "Could not find disk /dev/${DISK}!" + eerror "Adjust the DISK setting in /etc/conf.d/hdapsd" + return 1 + fi + + if [ ! -e /sys/block/${DISK}/queue/protect ] && [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then + eerror "No protect entry for ${DISK}!" + eerror "Make sure your kernel is patched with the blk_freeze patch" + return 1 + fi + done + + # Load the tp_smapi module first + # This is not a requirement, but it helps hdapsd adaptive mode + if [ ! -e /sys/devices/platform/smapi ] ; then + modprobe tp_smapi 2>/dev/null + fi + + if [ ! -d /sys/devices/platform/hdaps ] ; then + ebegin "Loading hdaps module" + modprobe hdaps + eend $? || return 1 + fi +} + +start() { + checkconfig || return 1 + + local DISKOPTS DISK + for DISK in ${DISKLIST}; do + DISKOPTS="${DISKOPTS} -d ${DISK}" + done + + ebegin "Starting Hard Drive Active Protection System daemon" + start-stop-daemon --start --exec /usr/sbin/hdapsd \ + --pidfile /var/run/hdapsd.pid \ + -- --syslog --background --pidfile \ + ${DISKOPTS} --sensitivity "${THRESHOLD}" ${OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping Hard Drive Active Protection System daemon" + start-stop-daemon --stop --exec /usr/sbin/hdapsd \ + --pidfile /var/run/hdapsd.pid + eend $? +} diff --git a/app-laptop/hdapsd/hdapsd-20090401-r2.ebuild b/app-laptop/hdapsd/hdapsd-20090401-r2.ebuild new file mode 100644 index 000000000000..42abdeeee8d5 --- /dev/null +++ b/app-laptop/hdapsd/hdapsd-20090401-r2.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit linux-info readme.gentoo + +DESCRIPTION="IBM ThinkPad Harddrive Active Protection disk head parking daemon" +HOMEPAGE="http://hdaps.sourceforge.net/" +SRC_URI="mirror://sourceforge/hdaps/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +pkg_setup() { + # We require the hdaps module which can either come from kernel sources + # or from the tp_smapi package. + if ! has_version app-laptop/tp_smapi[hdaps]; then + CONFIG_CHECK="~SENSORS_HDAPS" + ERROR_SENSORS_HDAPS="${P} requires app-laptop/tp_smapi (with hdaps USE enabled) or support for CONFIG_SENSORS_HDAPS enabled" + linux-info_pkg_setup + fi + + DOC_CONTENTS="You can change the default frequency by modifing /sys/devices/platform/hdaps/sampling_rate. + You might need to enable shock protection manually by running:\n + # echo -1 > /sys/block/DEVICE/device/unload_heads" +} + +src_install() { + emake DESTDIR="${ED}" install + rm -rf "${ED}"/usr/share/doc/hdapsd + dodoc ChangeLog README AUTHORS + newconfd "${FILESDIR}"/hdapsd.conf.3 hdapsd + newinitd "${FILESDIR}"/hdapsd.init.3 hdapsd + readme.gentoo_create_doc +} + +pkg_postinst(){ + [[ -z $(ls ${EROOT}/sys/block/*/queue/protect 2>/dev/null) ]] && \ + [[ -z $(ls ${EROOT}/sys/block/*/device/unload_heads 2>/dev/null) ]] && \ + ewarn "Your kernel does NOT support shock protection. Kernel 2.6.28 and above is recommended!" + + if ! has_version app-laptop/tp_smapi[hdaps]; then + ewarn "Using the hdaps module provided by app-laptop/tp_smapi instead" + ewarn "of the in-kernel driver is strongly recommended!" + fi + + readme.gentoo_print_elog +} diff --git a/app-laptop/hdapsd/hdapsd-20141203.ebuild b/app-laptop/hdapsd/hdapsd-20141203.ebuild new file mode 100644 index 000000000000..6cdd859386dc --- /dev/null +++ b/app-laptop/hdapsd/hdapsd-20141203.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit linux-info readme.gentoo systemd + +DESCRIPTION="IBM ThinkPad Hard Drive Active Protection System (HDAPS) daemon" +HOMEPAGE="https://github.com/evgeni/${PN}/" +SRC_URI="https://github.com/evgeni/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="libconfig" + +DEPEND="libconfig? ( dev-libs/libconfig )" +RDEPEND="${DEPEND}" + +pkg_setup() { + # We require the hdaps module which can either come from either the + # kernel itself (CONFIG_SENSORS_HDAPS) or from the tp_smapi package. + if ! has_version app-laptop/tp_smapi[hdaps]; then + CONFIG_CHECK="~SENSORS_HDAPS" + ERROR_SENSORS_HDAPS="${P} requires app-laptop/tp_smapi[hdaps] or " + ERROR_SENSORS_HDAPS+="kernel support for CONFIG_SENSORS_HDAPS enabled" + linux-info_pkg_setup + fi +} + +src_configure(){ + econf \ + $(use_enable libconfig) \ + --with-systemdsystemunitdir=$(systemd_get_unitdir) \ + --docdir="/usr/share/doc/${PF}" +} + +src_install() { + default + newconfd "${FILESDIR}/hdapsd.conf-20141024" hdapsd + newinitd "${FILESDIR}/hdapsd.init-20141024" hdapsd + readme.gentoo_create_doc +} + +pkg_postinst(){ + [[ -z $(ls "${ROOT}"sys/block/*/queue/protect 2>/dev/null) ]] && \ + [[ -z $(ls "${ROOT}"sys/block/*/device/unload_heads 2>/dev/null) ]] && \ + ewarn "Your kernel does NOT support shock protection." + + readme.gentoo_print_elog +} + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +${PN} requires a kernel module to function properly. The recommended +approach is to install app-laptop/tp_smapi[hdaps], but the in-tree +module provided by CONFIG_SENSORS_HDAPS may work as well. + +Common daemon parameters can be set in ${EROOT}etc/conf.d/${PN}. If the +package was installed with USE=libconfig, then the parameters can also +be set in ${EROOT}etc/${PN}.conf, although the former will take +precedence over the latter if both are used. + +You can change the default sampling rate by modifing + + /sys/devices/platform/hdaps/sampling_rate + +and you may need to enable shock protection manually by running + + # echo -1 > /sys/block/<disk>/device/unload_heads + +as root. +" diff --git a/app-laptop/hdapsd/metadata.xml b/app-laptop/hdapsd/metadata.xml new file mode 100644 index 000000000000..c9b72ec04f01 --- /dev/null +++ b/app-laptop/hdapsd/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>ottxor@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <maintainer> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <use> + <flag name="libconfig"> + Require <pkg>dev-libs/libconfig</pkg> to allow the daemon to + read a configuration file at startup + </flag> + </use> + <upstream> + <remote-id type="github">evgeni/hdapsd</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/i8kutils/Manifest b/app-laptop/i8kutils/Manifest new file mode 100644 index 000000000000..cdd104cd9451 --- /dev/null +++ b/app-laptop/i8kutils/Manifest @@ -0,0 +1 @@ +DIST i8kutils_1.33.tar.gz 50378 SHA256 ebdd39a2be8b5742bd7b24a5dbcbef36ab3b9980330ad07eea471e68b800ecd7 SHA512 a7b9277b8c9bc2642a65122dda31cfa7cc0c4fa780ba980364c0a4e0e4599502c6557871464ff256c5911370d98944826d0e29d4d3621605d5e8c1c8a23e5578 WHIRLPOOL 162cec2b48c1573a8b49d7966db312357754bc4445a9247d6fd0ca43bfabf1ccbe155bdc19c66fcc654f1dd6ff7499e82829e62a726f602a846b01b4a0189eb2 diff --git a/app-laptop/i8kutils/files/i8k.conf b/app-laptop/i8kutils/files/i8k.conf new file mode 100644 index 000000000000..c5bd389b294a --- /dev/null +++ b/app-laptop/i8kutils/files/i8k.conf @@ -0,0 +1,31 @@ +# Config file for /etc/init.d/i8k + +# Parameters: +# +# i8kbuttons Parameters +# ===================== +# VOLUME_UP : command for i8kbuttons to run on volume up key +# VOLUME_DOWN : command for i8kbuttons to run on volume down key +# VOLUME_MUTE : command for i8kbuttons to run on mute key +# BUTTON_REPEAT : repeat rate, in milliseconds, for i8kbuttons keypresses +# +# If VOLUME_* commands are not defined, i8kbuttons will not be started +# +# i8kmon Parameters +# ================= +# NOMON : if set, i8kmon will not be started +# NOAUTO : if set, i8kmon will not control the fans +# TIMEOUT : timeout, in seconds, at which i8kmon will check/update status +# (default is 2) + +# for ALSA +MIXER="/usr/bin/amixer -q set Master" +VOLUME_UP="$MIXER 1+" +VOLUME_DOWN="$MIXER 1-" +VOLUME_MUTE="$MIXER toggle" + +# for aumix (no mute support) +#VOLUME_UP="aumix -v +4" +#VOLUME_DOWN="aumix -v -4" + +BUTTON_REPEAT=100 diff --git a/app-laptop/i8kutils/files/i8k.init-r1 b/app-laptop/i8kutils/files/i8k.init-r1 new file mode 100644 index 000000000000..21211b0538b7 --- /dev/null +++ b/app-laptop/i8kutils/files/i8k.init-r1 @@ -0,0 +1,50 @@ +#!/sbin/runscript + +depend() { + after alsasound + after modules +} + +checkconfig() { + if [ ! -e /proc/i8k ] ; then + eerror "The i8k driver is not installed" + return 1 + fi +} + +start() { + checkconfig || return 1 + if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then + ebegin "Starting i8kbuttons" + start-stop-daemon --start --quiet --pidfile /var/run/i8kbuttons.pid \ + --make-pidfile --exec /usr/bin/i8kbuttons --background \ + -- ${VOLUME_UP:+-u "${VOLUME_UP}"} \ + ${VOLUME_DOWN:+-d "$VOLUME_DOWN"} \ + ${VOLUME_MUTE:+-m "$VOLUME_MUTE"} \ + ${BUTTON_REPEAT:+-r "$BUTTON_REPEAT"} + eend $? + fi + if [ ! -n "$NOMON" ]; then + ebegin "Starting i8kmon" + start-stop-daemon --start -b --quiet \ + --pidfile /var/run/i8kmon.pid \ + --make-pidfile \ + --exec /usr/bin/i8kmon --background \ + --name "tclsh /usr/bin/i8kmon" \ + -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT} + eend $? + fi +} + +stop() { + if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then + ebegin "Stopping i8kbuttons" + start-stop-daemon --stop --quiet --pidfile /var/run/i8kbuttons.pid + eend $? + fi + if [ ! -n "$NOMON" ]; then + ebegin "Stopping i8kmon" + start-stop-daemon --stop --quiet --pidfile /var/run/i8kmon.pid + eend $? + fi +} diff --git a/app-laptop/i8kutils/files/i8kmon.service b/app-laptop/i8kutils/files/i8kmon.service new file mode 100644 index 000000000000..3b80f46334af --- /dev/null +++ b/app-laptop/i8kutils/files/i8kmon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Dell laptop thermal monitoring +ConditionPathExists=/proc/i8k + +[Service] +ExecStart=/usr/bin/i8kmon -d + +[Install] +WantedBy=multi-user.target diff --git a/app-laptop/i8kutils/i8kutils-1.33-r1.ebuild b/app-laptop/i8kutils/i8kutils-1.33-r1.ebuild new file mode 100644 index 000000000000..c49b35f0c4bf --- /dev/null +++ b/app-laptop/i8kutils/i8kutils-1.33-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit systemd toolchain-funcs + +DESCRIPTION="Dell Inspiron and Latitude utilities" +HOMEPAGE="http://packages.debian.org/sid/i8kutils" +SRC_URI="mirror://debian/pool/main/i/${PN}/${P/-/_}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="examples tk" + +DEPEND="tk? ( dev-lang/tk )" +RDEPEND="${DEPEND}" + +DOCS=( README.i8kutils ) + +src_prepare() { + sed \ + -e '/^CC/d' \ + -e '/^CFLAGS/d' \ + -e 's: -g : $(LDFLAGS) :g' \ + -i Makefile || die + + tc-export CC +} + +src_install() { + dobin i8kbuttons i8kctl + doman i8kbuttons.1 i8kctl.1 + dosym /usr/bin/i8kctl /usr/bin/i8kfan + + use examples && dodoc -r examples + + newinitd "${FILESDIR}"/i8k.init-r1 i8k + newconfd "${FILESDIR}"/i8k.conf i8k + + if use tk; then + dobin i8kmon + doman i8kmon.1 + dodoc i8kmon.conf + systemd_dounit "${FILESDIR}"/i8kmon.service + else + cat >> "${ED}"/etc/conf.d/i8k <<- EOF + # i8kmon disabled because the package was installed without USE=tk + NOMON=1 + EOF + fi + +} diff --git a/app-laptop/i8kutils/metadata.xml b/app-laptop/i8kutils/metadata.xml new file mode 100644 index 000000000000..59e2b8f78cb5 --- /dev/null +++ b/app-laptop/i8kutils/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + <name>Default assignee for orphaned packages</name> + </maintainer> +</pkgmetadata> diff --git a/app-laptop/ibam/Manifest b/app-laptop/ibam/Manifest new file mode 100644 index 000000000000..6fd6af28f6b0 --- /dev/null +++ b/app-laptop/ibam/Manifest @@ -0,0 +1,2 @@ +DIST ibam-0.5.2.tar.gz 22149 SHA256 d668f23088e48be537dbf3ab63f1a8f6f9acb32031b1f6ba6fb185e9e6079d91 SHA512 c70d728a2f1250ed291e663bd9f4e9ba01308fce14edf1ffd1902057de7e5527548bd06e2e3caaaeabc064d0ee123f536a626fd50b84092f6fc9201fc6bdba58 WHIRLPOOL 027878ed946ba0c828c7786ede9f01a7ba8745f44cbb68bb49613da3edab367d17976319c8f32f14dfc0337709b6895afe86bd5700a8d02628bc88d0834ad342 +DIST ibam_0.5.2-2.diff.gz 5914 SHA256 8986814e13e8014bac3daf15a10c446d045e11c0468fff442fab437956a16890 SHA512 baad1e6bdc416de6d82181e55ba5a8c9871dcdaf756172558d093384cd2f4d0fe89d37f1266407e2bea784d18e429eeab5fde0a304b63bce97c73ba9391e7556 WHIRLPOOL b997021897aa68816d370867c241a59ba19f59e30943adc62cec6c9da2442101fa5b83c0cfd72faa38658111e12e2dbfd1664d64293488febdb72ee556f37dd7 diff --git a/app-laptop/ibam/files/ibam-0.5.2-build.patch b/app-laptop/ibam/files/ibam-0.5.2-build.patch new file mode 100644 index 000000000000..77854b5f3d5a --- /dev/null +++ b/app-laptop/ibam/files/ibam-0.5.2-build.patch @@ -0,0 +1,42 @@ +--- Makefile ++++ Makefile +@@ -17,8 +17,8 @@ + # + IBAM_VERSION=0.5.2 + +-CC=g++ +-CFLAGS=-O3 -DIBAM_VERSION=\"$(IBAM_VERSION)\" -Wall ++CXX?=g++ ++CXXFLAGS+=-DIBAM_VERSION=\"$(IBAM_VERSION)\" -Wall + + PREFIX=/usr + +@@ -30,23 +30,23 @@ + all: ibam + + ibam: ibam.cpp ibam.inl ibam.hpp +- $(CC) $(CFLAGS) ibam.cpp -o ibam ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) ibam.cpp -o ibam + + krell: ibam-krell.so + + ibam-krell.so: ibam-krell.o +- $(CC) $(CFLAGS) -fPIC -shared -Wl -o ibam-krell.so ibam-krell.o ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -fPIC -shared -Wl -o ibam-krell.so ibam-krell.o + + ibam-krell.o: ibam-krell.cpp ibam.hpp ibam.inl +- $(CC) $(CFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` `gdk-pixbuf-config --cflags` -c ibam-krell.cpp ++ $(CXX) $(CXXFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` `gdk-pixbuf-config --cflags` -c ibam-krell.cpp + + krell1: ibam-krell1.so + + ibam-krell1.so: ibam-krell1.o +- $(CC) $(CFLAGS) -shared -Wl -o ibam-krell1.so ibam-krell1.o ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -shared -Wl -o ibam-krell1.so ibam-krell1.o + + ibam-krell1.o: ibam-krell1.cpp ibam.hpp ibam.inl +- $(CC) $(CFLAGS) -fPIC `gtk-config --cflags` `imlib-config --cflags-gdk` -c ibam-krell1.cpp ++ $(CXX) $(CXXFLAGS) -fPIC `gtk-config --cflags` `imlib-config --cflags-gdk` -c ibam-krell1.cpp + + install: ibam + $(INSTALL) ./ibam $(PREFIX)/local/bin/ diff --git a/app-laptop/ibam/ibam-0.5.2-r3.ebuild b/app-laptop/ibam/ibam-0.5.2-r3.ebuild new file mode 100644 index 000000000000..21db0e9f2c42 --- /dev/null +++ b/app-laptop/ibam/ibam-0.5.2-r3.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +PATCH_LEVEL=2 + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Intelligent Battery Monitor" +HOMEPAGE="http://ibam.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${PATCH_LEVEL}.diff.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gkrellm" + +RDEPEND=" + gkrellm? ( + app-admin/gkrellm + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + )" +DEPEND=" + ${RDEPEND} + gkrellm? ( virtual/pkgconfig )" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-build.patch \ + "${WORKDIR}"/${PN}_${PV}-${PATCH_LEVEL}.diff + + local f + for f in `find . -name '*.dpatch'`; do + epatch ${f} + done +} + +src_compile() { + tc-export CXX + emake + use gkrellm && emake krell +} + +src_install() { + dobin ibam + dodoc CHANGES README REPORT + + if use gkrellm; then + insinto /usr/$(get_libdir)/gkrellm2/plugins + doins ibam-krell.so + fi +} + +pkg_postinst() { + elog + elog "You will need to install sci-visualization/gnuplot if you wish to use" + elog "the --plot argument to ibam." + elog +} diff --git a/app-laptop/ibam/metadata.xml b/app-laptop/ibam/metadata.xml new file mode 100644 index 000000000000..2e236dcb0f86 --- /dev/null +++ b/app-laptop/ibam/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <use> + <flag name="gkrellm">Enable building of app-admin/gkrellm module</flag> + </use> + <upstream> + <remote-id type="sourceforge">ibam</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest new file mode 100644 index 000000000000..10ccfc134477 --- /dev/null +++ b/app-laptop/laptop-mode-tools/Manifest @@ -0,0 +1,2 @@ +DIST laptop-mode-tools_1.66.tar.gz 111175 SHA256 0e8488d6112fa7edfa7e4b1084b16f8c7c6726d935029e4afd7d7034caed5f62 SHA512 8649f70ab63ca0a1e5edf5c4c69062b01dce97b34ef6686a2c044f177aaac59008d4275b237e2c97a2541b6b824c0513d32323c156a43684264ba6d2c5fc8b6c WHIRLPOOL 4fc981f00c4afd74da74e192beb292c5d39e2a3bcc23d77e5daf37c71b75acb4df81c70a68586c0704b47fbe08dce69b1921d0d151777b5451b8d6302bac5b0f +DIST laptop-mode-tools_1.67.tar.gz 111730 SHA256 5205e5b4fa0eddcbb14e06a496a9e405cf3873eb5065e03e6a1237e29c8f3cd0 SHA512 a0f8f5c6c2616bbdbe86f82b0dc7ad1bd4b4315fc074b7b97ad29a9dec4e63164d625da732f6b6b9a73dd039d415c06da51c83c5aa1056e7893b65691da1437f WHIRLPOOL 03fd0f7bc7300d7357d6b1f27a38aed54c7b77a7f8633910d3bfa6aede862f24238bde9322398cedea0e6b9d1bcd85b988e56ff1f2aeb62d691a209aa6f2acab diff --git a/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 b/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 new file mode 100644 index 000000000000..ba97adfe0a0a --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 @@ -0,0 +1,53 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +depend() { + need localmount + use acpid hald + after bootmisc +} + +checkconfig() { + if [ ! -f /proc/sys/vm/laptop_mode ] ; then + eerror "Kernel does not support laptop_mode" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting laptop_mode" + # bug #342049 fix + # check if dir exists and creates if it doesn't + checkpath -q -d -m 755 /var/run/laptop-mode-tools + touch /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode auto >/dev/null + eend $? +} + +stop() { + ebegin "Stopping laptop_mode" + rm -f /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode stop >/dev/null + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} has not yet been started" + return 1 + fi + + ebegin "Reloading laptop_mode" + /usr/sbin/laptop_mode stop >/dev/null + rm -f /var/run/laptop-mode-tools/* + /usr/sbin/laptop_mode auto force >/dev/null + eend $? +} + +# vim: set ts=4 : diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.66.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.66.ebuild new file mode 100644 index 000000000000..7c5e5768ce6d --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.66.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils multilib systemd udev + +MY_P=${PN}_${PV} + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="http://www.samwel.tk/laptop_mode/" +SRC_URI="http://www.samwel.tk/laptop_mode/tools/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="+acpi apm bluetooth scsi" + +RDEPEND="net-wireless/wireless-tools + sys-apps/iproute2 + sys-apps/ethtool + sys-apps/hdparm + sys-apps/which + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) + bluetooth? ( net-wireless/bluez:= ) + scsi? ( sys-apps/sdparm )" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + # This should avoid conflict with pm-powersave wrt #327443 and #396703 + cat <<-EOF > "${T}"/${PN} + HOOK_BLACKLIST="00powersave" + EOF +} + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + LIB_D="/usr/$(get_libdir)" \ + UDEV_D="$(get_udevdir)" \ + SYSTEMD_UNIT_D="$(systemd_get_unitdir)" \ + TMPFILES_D="/usr/lib/tmpfiles.d" \ + ACPI="$(use acpi && echo force || echo disabled)" \ + PMU="$(false && echo force || echo disabled)" \ + APM="$(use apm && echo force || echo disabled)" \ + SYSTEMD=yes \ + sh ./install.sh || die + + dodoc Documentation/*.txt README.md + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + # See src_prepare() + insinto /etc/pm/config.d + doins "${T}"/${PN} +} + +pkg_postinst() { + if use acpi || use apm; then + if use acpi; then + daemon_name="acpid" + elif use apm; then + deamon_name="apmd" + fi + if [ "$(rc-config list default | grep laptop_mode)" = "" ] || [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "To enable automatic power state event handling," + ewarn "e.g. enabling laptop_mode after unplugging the battery," + ewarn "both laptop_mode and the ${daemon_name} daemon must be" + ewarn "added to default runlevel:" + if [ "$(rc-config list default | grep laptop_mode)" = "" ]; then + ewarn "# rc-update add laptop_mode default" + fi + if [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "# rc-update add ${daemon_name} default" + fi + fi + else + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further" + ewarn "information." + ewarn + fi +} diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.67.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.67.ebuild new file mode 100644 index 000000000000..bf853c4e03ed --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.67.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils multilib systemd udev + +MY_P=${PN}_${PV} + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="http://www.samwel.tk/laptop_mode/" +SRC_URI="http://www.samwel.tk/laptop_mode/tools/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+acpi apm bluetooth scsi" + +RDEPEND="net-wireless/wireless-tools + sys-apps/iproute2 + sys-apps/ethtool + sys-apps/hdparm + sys-apps/which + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) + bluetooth? ( net-wireless/bluez:= ) + scsi? ( sys-apps/sdparm )" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + # This should avoid conflict with pm-powersave wrt #327443 and #396703 + cat <<-EOF > "${T}"/${PN} + HOOK_BLACKLIST="00powersave" + EOF +} + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + LIB_D="/usr/$(get_libdir)" \ + UDEV_D="$(get_udevdir)" \ + SYSTEMD_UNIT_D="$(systemd_get_unitdir)" \ + TMPFILES_D="/usr/lib/tmpfiles.d" \ + ACPI="$(use acpi && echo force || echo disabled)" \ + PMU="$(false && echo force || echo disabled)" \ + APM="$(use apm && echo force || echo disabled)" \ + SYSTEMD=yes \ + sh ./install.sh || die + + dodoc Documentation/*.txt README.md + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + # See src_prepare() + insinto /etc/pm/config.d + doins "${T}"/${PN} +} + +pkg_postinst() { + if use acpi || use apm; then + if use acpi; then + daemon_name="acpid" + elif use apm; then + deamon_name="apmd" + fi + if [ "$(rc-config list default | grep laptop_mode)" = "" ] || [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "To enable automatic power state event handling," + ewarn "e.g. enabling laptop_mode after unplugging the battery," + ewarn "both laptop_mode and the ${daemon_name} daemon must be" + ewarn "added to default runlevel:" + if [ "$(rc-config list default | grep laptop_mode)" = "" ]; then + ewarn "# rc-update add laptop_mode default" + fi + if [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "# rc-update add ${daemon_name} default" + fi + fi + else + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further" + ewarn "information." + ewarn + fi +} diff --git a/app-laptop/laptop-mode-tools/metadata.xml b/app-laptop/laptop-mode-tools/metadata.xml new file mode 100644 index 000000000000..a757c1c9b81b --- /dev/null +++ b/app-laptop/laptop-mode-tools/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> + <email>alonbl@gentoo.org</email> + </maintainer> + <upstream> + <maintainer status="active"> + <email>gentoo-lmt@researchut.com</email> + </maintainer> + </upstream> + <use> + <flag name='scsi'>Adds dependency on sdparm to control non-SATA SCSI drivers</flag> + </use> +</pkgmetadata> diff --git a/app-laptop/lphdisk/Manifest b/app-laptop/lphdisk/Manifest new file mode 100644 index 000000000000..30c121ac8748 --- /dev/null +++ b/app-laptop/lphdisk/Manifest @@ -0,0 +1 @@ +DIST lphdisk-0.9.1.tar.bz2 26343 SHA256 42a6df491db3bd581fad5bfd2af09008cd604d7767a7f3984c1a77f69d571249 SHA512 28bd93acd854e79009722e83f063c3704333ae97d7fadff194101f24bd9fdc81c98464a3c0e7bbaf6097a56bed19fc7798e108ec7872cc85f3e327fbfb942521 WHIRLPOOL d68cc00c76d2c7dab8178d99734fd299207270a37fe5674850f64a16bae069cc907e6164c75acdd2253ff6cc92ec38d555d7ebabd66898e2551bfeacec8b5883 diff --git a/app-laptop/lphdisk/files/lphdisk-0.9.1-gentoo.patch b/app-laptop/lphdisk/files/lphdisk-0.9.1-gentoo.patch new file mode 100644 index 000000000000..73e1b5a715f4 --- /dev/null +++ b/app-laptop/lphdisk/files/lphdisk-0.9.1-gentoo.patch @@ -0,0 +1,252 @@ +diff -ur lphdisk-0.9.1.orig/lphdisk.c lphdisk-0.9.1/lphdisk.c +--- lphdisk-0.9.1.orig/lphdisk.c 2002-02-12 13:04:27.000000000 +0200 ++++ lphdisk-0.9.1/lphdisk.c 2008-12-08 12:21:29.000000000 +0200 +@@ -19,8 +19,10 @@ + Be careful! + */ + ++#define _LARGEFILE64_SOURCE + #include <stdio.h> + #include <stdlib.h> ++#include <sys/types.h> + #include <unistd.h> + #include <string.h> + #include <stdarg.h> +@@ -29,8 +31,8 @@ + #include <fcntl.h> + #include <sys/stat.h> + #include <sys/io.h> +-#include "lrmi.h" +-#include "vbe.h" ++#include <lrmi.h> ++#include <vbe.h> + + /* General Program Defines: */ + +@@ -100,58 +102,6 @@ + /* General Purpose Utility Routines */ + /*****************************************************************************/ + +-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +-/* The following is a hack to take advantage of the ext2 "_llseek" system */ +-/* call to do seeks to "long long" offsets under linux (this is needed to */ +-/* seek to sectors beyond 4194303 (2GB)). This isn't directly supported by */ +-/* glibc, so we need to make our own interface function for it. We should */ +-/* be able to get the _NR__llseek define from linux/unistd.h. From this we */ +-/* can construct a wrapper to perform the right system call. */ +- +-#include <linux/unistd.h> /* for __NR__llseek */ +- +-typedef long long lloff_t; +- +-#ifdef __NR__llseek +- +-static _syscall5(int,_llseek, unsigned int,fd, unsigned long,offset_high, +- unsigned long,offset_low, lloff_t *,result, +- unsigned int,origin) +- +-lloff_t llseek (unsigned int fd, lloff_t offset, unsigned int origin) { +- lloff_t result; +- int retval; +- +- retval = _llseek (fd, ((unsigned long long) offset) >> 32, +- ((unsigned long long) offset) & 0xffffffff, +- &result, origin); +- return (retval == -1 ? (lloff_t) retval : result); +-} +- +-#else /* __NR__llseek */ +- +-/* Somehow, __NR__llseek wasn't in linux/unistd.h. This shouldn't ever */ +-/* happen, but better safe than sorry.. The best we can do is emulate it */ +-/* with lseek, and hope we don't get an offset that's too large (throw an */ +-/* error if we do) */ +- +-lloff_t llseek (unsigned int fd, lloff_t offset, unsigned int origin) { +- off_t offt_offset = (off_t) offset; +- +- if ((lloff_t)offt_offset != offset) { +- /* converting to off_t and back yields different result, indicating an */ +- /* overflow.. */ +- errno = EINVAL; +- return -1; +- } else { +- return lseek(fd, offt_offset, origin); +- } +-} +- +-#endif /* __NR__llseek */ +- +-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +- + #define get16(p) get_int_le(p,2) + #define get32(p) get_int_le(p,4) + +@@ -189,9 +139,9 @@ + /* success, nonzero on error. */ + + int seek_sector (int fd, size_t secno) { +- lloff_t offset = (lloff_t) secno * SECTOR_SIZE; ++ off64_t offset = (off64_t) secno * SECTOR_SIZE; + +- if (llseek(fd, offset, SEEK_SET) == (lloff_t) -1) ++ if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1) + return -1; + + return 0; +@@ -556,25 +506,29 @@ + + int meminfo_physmem(void) { + FILE *f; +- unsigned int size; ++ unsigned int size = 0; + int ramsize; ++ char s[128]; + + if (!(f = fopen(meminfo_filename, "r"))) { + debug("Unable to open %s: %s\n", meminfo_filename, strerror(errno)); + return 0; + } +- fscanf(f, "%*[^\n]\n"); /* Read the header line and discard it */ + +- if (fscanf(f, "Mem: %u", &size) != 1) { ++ while (fgets(s, sizeof(s), f)) { ++ if (sscanf(s, "MemTotal: %u", &size) == 1) { ++ break; ++ } ++ } ++ if (size == 0) { + debug("Parse of %s failed.\n", meminfo_filename); + return 0; + } + fclose(f); + +- /* convert to KB and then round up to the next power of 2 (since RAM */ ++ /* size is in KB and then round up to the next power of 2 (since RAM */ + /* sizes don't come in anything else, so this should correct for the */ + /* kernel size, etc) */ +- size >>= 10; + debug("%s reports memory size of %d KB", meminfo_filename, size); + for (ramsize = 1; size; size >>= 1) ramsize <<= 1; + +@@ -718,22 +672,22 @@ + {"force", 0, 0, 'f'}, + {0,0,0,0}}; + +-const char usage_string[] = "\ +-Usage: %1$s [options] [device] +-Prepare a hibernation partition for APM suspend-to-disk. +- +-options: +- -h, --help Display brief usage and option information (this screen) +- -p, --probeonly Only calculate and display required size, do not format +- -q, --quiet Turn off informational messages, useful for scripts +- -d, --debug Turn on (verbose) debugging messages +- -n, --nowrite Do not actually write to the disk +- -f, --force **DANGEROUS** Format without regard to potential problems +- +-'device' should be a raw disk device (not a partition). The default device +-is /dev/hda. +- +-(%2$s)\n\n"; ++const char usage_string[] = "" ++"Usage: %1$s [options] [device]\n" ++"Prepare a hibernation partition for APM suspend-to-disk.\n" ++"\n" ++"options:\n" ++" -h, --help Display brief usage and option information (this screen)\n" ++" -p, --probeonly Only calculate and display required size, do not format\n" ++" -q, --quiet Turn off informational messages, useful for scripts\n" ++" -d, --debug Turn on (verbose) debugging messages\n" ++" -n, --nowrite Do not actually write to the disk\n" ++" -f, --force **DANGEROUS** Format without regard to potential problems\n" ++"\n" ++"'device' should be a raw disk device (not a partition). The default device\n" ++"is /dev/hda.\n" ++"\n" ++"(%2$s)\n\n"; + + void print_usage (void) { + char *progname = rindex(argv0, '/'); +@@ -750,7 +704,7 @@ + dev_t dev; + int partition; + int ramsize, vramsize, required_size; +- size_t required_sectors; ++ size_t required_sectors = 0; + + argv0 = argv[0]; + +@@ -821,9 +775,9 @@ + } + + if (!required_size) { +- if (!quiet_flag) printf("Reccomended partition size is unknown.\n"); ++ if (!quiet_flag) printf("Recommended partition size is unknown.\n"); + } else { +- if (!quiet_flag) printf("Reccomended partition size is %d MB" ++ if (!quiet_flag) printf("Recommended partition size is %d MB" + " (%d sectors)\n", ((required_size+1023) >> 10), + required_sectors); + } +@@ -923,7 +877,7 @@ + + if ((pi[partition-1].size < required_sectors) && !quiet_flag) { + fprintf(stderr, "Warning: hibernate partition size (%d) is smaller than" +- " reccomended size (%d).\n", pi[partition-1].size, ++ " recommended size (%d).\n", pi[partition-1].size, + required_sectors); + } + +diff -ur lphdisk-0.9.1.orig/Makefile lphdisk-0.9.1/Makefile +--- lphdisk-0.9.1.orig/Makefile 2002-02-12 11:06:46.000000000 +0200 ++++ lphdisk-0.9.1/Makefile 2008-12-08 12:26:49.000000000 +0200 +@@ -4,37 +4,28 @@ + # lphdisk 0.9.1 + # + +-INSTALL_PREFIX = /usr/local ++INSTALL_PREFIX = /usr + +-CFLAGS = -g -Wall +-LIBS = +- +-LRMIDIR = lrmi-0.6m ++CFLAGS += -Wall ++LIBS = -llrmi + + all: lphdisk + +-lphdisk: lphdisk.o lrmi.o +- $(CC) $(CFLAGS) -o lphdisk lphdisk.o lrmi.o $(LIBS) +- +-lphdisk.o: lphdisk.c lrmi.h vbe.h +- +-lrmi.o: +- cd $(LRMIDIR) && $(MAKE) $@ +- cp $(LRMIDIR)/lrmi.o . ++lphdisk: lphdisk.o ++ $(CC) $(LDFLAGS) $(CFLAGS) -o lphdisk lphdisk.o $(LIBS) + +-%.h: $(LRMIDIR)/%.h +- cp $^ $@ ++lphdisk.o: lphdisk.c + + install: all +- install -m 755 lphdisk $(INSTALL_PREFIX)/sbin +- install -m 644 lphdisk.8 $(INSTALL_PREFIX)/man/man8 ++ mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/sbin ++ install -m 755 lphdisk $(DESTDIR)$(INSTALL_PREFIX)/sbin ++ mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share/man/man8 ++ install -m 644 lphdisk.8 $(DESTDIR)$(INSTALL_PREFIX)/share/man/man8 + + clean: +- cd $(LRMIDIR) && $(MAKE) $@ +- rm -f *.o lrmi.h vbe.h ++ rm -f *.o + + distclean: clean +- cd $(LRMIDIR) && $(MAKE) $@ + rm -f lphdisk + + .PHONY: all install clean distclean diff --git a/app-laptop/lphdisk/lphdisk-0.9.1-r2.ebuild b/app-laptop/lphdisk/lphdisk-0.9.1-r2.ebuild new file mode 100644 index 000000000000..843a3ce4a2f5 --- /dev/null +++ b/app-laptop/lphdisk/lphdisk-0.9.1-r2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 +inherit eutils toolchain-funcs + +DESCRIPTION="utility for preparing a hibernation partition for APM Suspend-To-Disk" +HOMEPAGE="http://www.procyon.com/~pda/lphdisk/" +SRC_URI="http://www.procyon.com/~pda/lphdisk/${P}.tar.bz2" + +LICENSE="Artistic" +SLOT="0" +KEYWORDS="x86" +IUSE="" + +DEPEND="sys-libs/lrmi" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch +} + +src_compile() { + tc-export CC + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die +} diff --git a/app-laptop/lphdisk/metadata.xml b/app-laptop/lphdisk/metadata.xml new file mode 100644 index 000000000000..f9d50da18d39 --- /dev/null +++ b/app-laptop/lphdisk/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + <description>This package lacks a primary herd or maintainer.</description> + </maintainer> +</pkgmetadata> diff --git a/app-laptop/metadata.xml b/app-laptop/metadata.xml new file mode 100644 index 000000000000..bee35931772d --- /dev/null +++ b/app-laptop/metadata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The app-laptop category contains packages which are designed to work + with certain kinds of laptop or notebook computer. + </longdescription> + <longdescription lang="de"> + Die Kategorie app-laptop enthält Pakete für das Arbeiten mit verschiedenen + Notebook- und Laptop-Modellen. + </longdescription> + <longdescription lang="es"> + La categoría app-laptop contiene paquetes diseñados para trabajar + con ciertas clases de laptops ó computadoras portátiles. + </longdescription> + <longdescription lang="ja"> + app-laptopカテゴリには様々なラップトップとノートブックコンピュータで + 使うパッケージが含まれます。 + </longdescription> + <longdescription lang="nl"> + De app-laptop categorie bevat applicaties voor laptopgebruikers. + </longdescription> + <longdescription lang="vi"> + Nhóm app-laptop chứa các gói danh cho các loại máy + tính laptop và notebook. + </longdescription> + <longdescription lang="it"> + La categoria app-laptop contiene pacchetti progettaati per lavorare con alcuni + tipi di laptop o notebook. + </longdescription> + <longdescription lang="pt"> + A categoria app-laptop contém pacotes que são desenhados para + trabalhar com certos tipos de laptops e notebooks. + </longdescription> + <longdescription lang="pl"> + Kategoria app-laptop zawiera pakiety ściśle związane z pracą na + laptopach i notebookach. + </longdescription> +</catmetadata> + diff --git a/app-laptop/nvidiabl/Manifest b/app-laptop/nvidiabl/Manifest new file mode 100644 index 000000000000..76a124acede6 --- /dev/null +++ b/app-laptop/nvidiabl/Manifest @@ -0,0 +1 @@ +DIST v0.83.tar.gz 448594 SHA256 0ea79770c02ae297fb6d660ee28ecf7a7acc346de0a55e3231ce499d4184db0f SHA512 cbf4f042acb9005c25d8d008973220f4d42fe890bfd86a34b72c0e56129dfcdcad2383acacf048e5e9da33aaf759053cdadeddac9e0946ae49a8a29ed03447dd WHIRLPOOL 4d1e13ffe1bed36ffee1c498c6384a9ff3fcc561e3aa443c15106baa9711523b8798f0283e42d6365afa57f8d7b4a394835bbea2eb8c6d41a8910c38d661012b diff --git a/app-laptop/nvidiabl/metadata.xml b/app-laptop/nvidiabl/metadata.xml new file mode 100644 index 000000000000..206e5c0a7aa3 --- /dev/null +++ b/app-laptop/nvidiabl/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">guillaumezin/nvidiabl</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/nvidiabl/nvidiabl-0.83.ebuild b/app-laptop/nvidiabl/nvidiabl-0.83.ebuild new file mode 100644 index 000000000000..15d8f8e2b77d --- /dev/null +++ b/app-laptop/nvidiabl/nvidiabl-0.83.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit linux-mod + +DESCRIPTION="Linux driver for setting the backlight brightness on laptops using +NVIDIA GPU" +HOMEPAGE="https://github.com/guillaumezin/nvidiabl" +SRC_URI="https://github.com/guillaumezin/${PN}/archive/v${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +RESTRICT="test" + +BUILD_TARGETS="modules" +MODULE_NAMES="nvidiabl()" + +pkg_pretend() { + CONFIG_CHECK="FB_BACKLIGHT" + ERROR_FB_BACKLIGHT="Your kernel does not support FB_BACKLIGHT. To enable you +it you can enable any frame buffer with backlight control or nouveau. +Note that you cannot use FB_NVIDIA with nvidia's proprietary driver" + linux-mod_pkg_setup +} + +src_compile() { + BUILD_PARAMS="KVER=${KV_FULL}" + MAKEOPTS+=" V=1" + linux-mod_src_compile +} diff --git a/app-laptop/pbbuttonsd/Manifest b/app-laptop/pbbuttonsd/Manifest new file mode 100644 index 000000000000..d48ac50bb5bc --- /dev/null +++ b/app-laptop/pbbuttonsd/Manifest @@ -0,0 +1 @@ +DIST pbbuttonsd-0.8.1.tar.gz 589630 SHA256 b391fd98ed263f355d7e7addc6566959e986627c87dcfdaa1da15310ad70bffa SHA512 856f8533c1f6489986c232baa8b8002a01d009ed3728ee35bc723aece91ba626ce961119c0d424f40c2f9289827f317c56d70fe8f0e035cbd9f08d7701316ac3 WHIRLPOOL 21a18a9f6a204156beb7373f89c6477c68ef90d8d9fe15cb7322b811b15856fd38bca7705860584716b00cd29378b85d0f2ac7624f00fe50ec44ac83033c073b 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 diff --git a/app-laptop/pbbuttonsd/metadata.xml b/app-laptop/pbbuttonsd/metadata.xml new file mode 100644 index 000000000000..1a1b5460d183 --- /dev/null +++ b/app-laptop/pbbuttonsd/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ppc</herd> + <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..08fb920a2ffa --- /dev/null +++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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}/pmcs.patch" + ### Don't link with g++ if we don't use ibam + if ! use ibam; then + epatch "${FILESDIR}/g++.patch" + fi + ### Fix macbook -lz issue + epatch "${FILESDIR}/lz.patch" + epatch "${FILESDIR}/lm.patch" + ### Fix new apple hid fnmode issue + epatch "${FILESDIR}/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..27bdd3d92dcd --- /dev/null +++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r4.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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}/pmcs.patch" + ### Don't link with g++ if we don't use ibam + if ! use ibam; then + epatch "${FILESDIR}/g++.patch" + fi + ### Fix macbook -lz issue + epatch "${FILESDIR}/lz.patch" + epatch "${FILESDIR}/lm.patch" + ### Fix new apple hid fnmode issue + epatch "${FILESDIR}/fnmode.patch" + ### Add kernel 2.6.x stuff for 3.x as well + epatch "${FILESDIR}/laptopmode.sh.patch" + epatch "${FILESDIR}/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/pommed/Manifest b/app-laptop/pommed/Manifest new file mode 100644 index 000000000000..b6bbff7157f3 --- /dev/null +++ b/app-laptop/pommed/Manifest @@ -0,0 +1 @@ +DIST pommed-1.39.tar.gz 995020 SHA256 d715cf1f85525a62bb18a3f9ebd229a2f586906ab8c9306fc9d2aa192bf79da2 SHA512 26568e359d8ef853710b1d86f397981e87245a84b2ff006964035ea8643e97df44fe52b01841d085eb8dd1aee586e1c8b60c44089f463e2a64b2b95c010a9d10 WHIRLPOOL cdb214162f87e24f8add4023d126a8a0fe2db0714a29dc43ec844dc4eb8b02edecc6866ba41555fea13881c30e6fb5439c99b452ee5f2240db9969e9504ab298 diff --git a/app-laptop/pommed/files/pommed-1.21-r1.patch b/app-laptop/pommed/files/pommed-1.21-r1.patch new file mode 100644 index 000000000000..5b899a369f1b --- /dev/null +++ b/app-laptop/pommed/files/pommed-1.21-r1.patch @@ -0,0 +1,75 @@ +diff -ru pommed-1.21~/gpomme/Makefile pommed-1.21/gpomme/Makefile +--- pommed-1.21~/gpomme/Makefile 2008-12-21 13:38:27.000000000 +0100 ++++ pommed-1.21/gpomme/Makefile 2008-12-21 14:06:46.000000000 +0100 +@@ -17,8 +17,8 @@ + + INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS) +-LDFLAGS = -lpthread $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS) ++CFLAGS += -g -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS) ++LDFLAGS += -lpthread $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS) + + SOURCES = gpomme.c theme.c conffile.c \ + ../client-common/dbus-client.c \ +@@ -33,6 +33,7 @@ + mo: $(MOFILES) + + gpomme: $(OBJS) $(LIBS) ++ ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS} + + gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h + +diff -ru pommed-1.21~/pommed/Makefile pommed-1.21/pommed/Makefile +--- pommed-1.21~/pommed/Makefile 2008-12-21 13:38:27.000000000 +0100 ++++ pommed-1.21/pommed/Makefile 2008-12-21 14:04:52.000000000 +0100 +@@ -16,9 +16,9 @@ + + INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) ++CFLAGS += -g -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) + +-LDFLAGS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) ++LDFLAGS += -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) + + ifneq (, $(findstring ppc, $(ARCH))) + OFLIB ?= +@@ -50,6 +50,7 @@ + + CFLAGS += $(LIBPCI_CFLAGS) + LDFLAGS += $(LIBPCI_LIBS) ++ LIBS = $(LIBPCI_LIBS) + else + LIBS = /usr/lib/libpci.a + LDFLAGS += -lz +@@ -66,6 +67,7 @@ + + + pommed: $(OBJS) $(LIBS) ++ ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS} + + pommed.o: pommed.c pommed.h evloop.h kbd_backlight.h lcd_backlight.h cd_eject.h evdev.h conffile.h audio.h dbus.h beep.h + +diff -ru pommed-1.21~/wmpomme/Makefile pommed-1.21/wmpomme/Makefile +--- pommed-1.21~/wmpomme/Makefile 2008-12-21 13:38:27.000000000 +0100 ++++ pommed-1.21/wmpomme/Makefile 2008-12-21 14:07:09.000000000 +0100 +@@ -3,8 +3,8 @@ + DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE + DBUS_LIBS = $(shell pkg-config dbus-1 --libs) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) +-LDFLAGS = -lXpm -lXext -lX11 $(DBUS_LIBS) ++CFLAGS += -g -Wall $(DBUS_CFLAGS) ++LDFLAGS += -lXpm -lXext -lX11 $(DBUS_LIBS) + + SOURCES = wmgeneral.c wmpomme.c \ + ../client-common/dbus-client.c \ +@@ -13,6 +13,7 @@ + OBJS = $(SOURCES:%.c=%.o) + + wmpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDFLAGS} + + wmpomme.o: wmpomme.c wmgeneral.h wmpomme-master.xpm ../client-common/dbus-client.h + diff --git a/app-laptop/pommed/files/pommed-1.30.patch b/app-laptop/pommed/files/pommed-1.30.patch new file mode 100644 index 000000000000..48c0fd02bdcf --- /dev/null +++ b/app-laptop/pommed/files/pommed-1.30.patch @@ -0,0 +1,75 @@ +diff -ru pommed-1.30~/gpomme/Makefile pommed-1.30/gpomme/Makefile +--- pommed-1.30~/gpomme/Makefile 2009-10-22 21:25:30.000000000 +0200 ++++ pommed-1.30/gpomme/Makefile 2009-11-21 19:41:08.000000000 +0100 +@@ -17,8 +17,8 @@ + + INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS) +-LDFLAGS = -lpthread $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS) ++CFLAGS += -g -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS) ++LDFLAGS += -lpthread $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS) + + SOURCES = gpomme.c theme.c conffile.c \ + ../client-common/dbus-client.c \ +@@ -33,6 +33,7 @@ + mo: $(MOFILES) + + gpomme: $(OBJS) $(LIBS) ++ ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS} + + gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h + +diff -ru pommed-1.30~/pommed/Makefile pommed-1.30/pommed/Makefile +--- pommed-1.30~/pommed/Makefile 2009-10-22 21:25:30.000000000 +0200 ++++ pommed-1.30/pommed/Makefile 2009-11-21 19:41:08.000000000 +0100 +@@ -18,9 +18,9 @@ + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) ++CFLAGS += -g -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) + +-LDFLAGS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) ++LDFLAGS += -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) + + ifneq (, $(findstring ppc, $(ARCH))) + OFLIB ?= +@@ -52,6 +52,7 @@ + + CFLAGS += $(LIBPCI_CFLAGS) + LDFLAGS += $(LIBPCI_LIBS) ++ LIBS = $(LIBPCI_LIBS) + else + LIBS = /usr/lib/libpci.a + LDFLAGS += -lz +@@ -69,6 +70,7 @@ + + + pommed: $(OBJS) $(LIBS) ++ ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS} + + pommed.o: pommed.c pommed.h evloop.h kbd_backlight.h lcd_backlight.h cd_eject.h evdev.h conffile.h audio.h dbus.h beep.h + +diff -ru pommed-1.30~/wmpomme/Makefile pommed-1.30/wmpomme/Makefile +--- pommed-1.30~/wmpomme/Makefile 2009-10-22 21:25:30.000000000 +0200 ++++ pommed-1.30/wmpomme/Makefile 2009-11-21 19:41:08.000000000 +0100 +@@ -5,8 +5,8 @@ + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) +-LDFLAGS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS) ++CFLAGS += -g -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) ++LDFLAGS += -lrt -lXpm -lXext -lX11 $(DBUS_LIBS) + + SOURCES = wmgeneral.c wmpomme.c \ + ../client-common/dbus-client.c \ +@@ -15,6 +15,7 @@ + OBJS = $(SOURCES:%.c=%.o) + + wmpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDFLAGS} + + wmpomme.o: wmpomme.c wmgeneral.h wmpomme-master.xpm ../client-common/dbus-client.h + diff --git a/app-laptop/pommed/files/pommed-1.31.patch b/app-laptop/pommed/files/pommed-1.31.patch new file mode 100644 index 000000000000..94061909a53c --- /dev/null +++ b/app-laptop/pommed/files/pommed-1.31.patch @@ -0,0 +1,75 @@ +diff -ru pommed-1.31~/gpomme/Makefile pommed-1.31/gpomme/Makefile +--- pommed-1.31~/gpomme/Makefile 2010-02-28 17:24:31.000000000 +0100 ++++ pommed-1.31/gpomme/Makefile 2010-02-28 17:25:31.000000000 +0100 +@@ -17,8 +17,8 @@ + + INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS) +-LDFLAGS = -lpthread -lX11 $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS) ++LDFLAGS += -lpthread -lX11 $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS) + + SOURCES = gpomme.c theme.c conffile.c \ + ../client-common/dbus-client.c \ +@@ -33,6 +33,7 @@ + mo: $(MOFILES) + + gpomme: $(OBJS) $(LIBS) ++ ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS} + + gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h + +diff -ru pommed-1.31~/pommed/Makefile pommed-1.31/pommed/Makefile +--- pommed-1.31~/pommed/Makefile 2010-02-28 17:24:31.000000000 +0100 ++++ pommed-1.31/pommed/Makefile 2010-02-28 17:26:20.000000000 +0100 +@@ -18,9 +18,9 @@ + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) + +-LDFLAGS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) ++LDFLAGS += -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) + + ifneq (, $(findstring ppc, $(ARCH))) + OFLIB ?= +@@ -52,6 +52,7 @@ + + CFLAGS += $(LIBPCI_CFLAGS) + LDFLAGS += $(LIBPCI_LIBS) ++ LIBS = $(LIBPCI_LIBS) + else + LIBS = /usr/lib/libpci.a + LDFLAGS += -lz +@@ -69,6 +70,7 @@ + + + pommed: $(OBJS) $(LIBS) ++ ${CC} -o $@ ${OBJS} ${LIBS} ${LDFLAGS} + + pommed.o: pommed.c pommed.h evloop.h kbd_backlight.h lcd_backlight.h cd_eject.h evdev.h conffile.h audio.h dbus.h beep.h + +diff -ru pommed-1.31~/wmpomme/Makefile pommed-1.31/wmpomme/Makefile +--- pommed-1.31~/wmpomme/Makefile 2010-02-28 17:24:31.000000000 +0100 ++++ pommed-1.31/wmpomme/Makefile 2010-02-28 17:26:42.000000000 +0100 +@@ -5,8 +5,8 @@ + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) +-LDFLAGS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) ++LDFLAGS += -lrt -lXpm -lXext -lX11 $(DBUS_LIBS) + + SOURCES = wmgeneral.c wmpomme.c \ + ../client-common/dbus-client.c \ +@@ -15,6 +15,7 @@ + OBJS = $(SOURCES:%.c=%.o) + + wmpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDFLAGS} + + wmpomme.o: wmpomme.c wmgeneral.h wmpomme-master.xpm ../client-common/dbus-client.h + diff --git a/app-laptop/pommed/files/pommed-1.39.patch b/app-laptop/pommed/files/pommed-1.39.patch new file mode 100644 index 000000000000..1215606c35cb --- /dev/null +++ b/app-laptop/pommed/files/pommed-1.39.patch @@ -0,0 +1,89 @@ +diff --git a/gpomme/Makefile b/gpomme/Makefile +index 0874b48..a3ab64a 100644 +--- a/gpomme/Makefile ++++ b/gpomme/Makefile +@@ -1,5 +1,3 @@ +-CC = gcc +- + GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0) + GTK_LIBS = $(shell pkg-config --libs gtk+-2.0) + +@@ -14,7 +12,7 @@ CONFUSE_LIBS = $(shell pkg-config libconfuse --libs) + + INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) + LDLIBS = -lpthread -lX11 $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) + + SOURCES = gpomme.c theme.c conffile.c \ +@@ -30,6 +28,7 @@ all: gpomme mo + mo: $(MOFILES) + + gpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS} + + gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h + +diff --git a/pommed/Makefile b/pommed/Makefile +index 5f3cbf9..3425a2a 100644 +--- a/pommed/Makefile ++++ b/pommed/Makefile +@@ -1,7 +1,5 @@ + ARCH ?= $(shell uname -m) + +-CC = gcc +- + DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE + DBUS_LIBS = $(shell pkg-config dbus-1 --libs) + +@@ -18,7 +16,7 @@ INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INO + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) + + LDLIBS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) + +@@ -54,6 +52,7 @@ ifeq ($(LIBPCI_SHARED), true) + + CFLAGS += $(LIBPCI_CFLAGS) + LDLIBS += $(LIBPCI_LIBS) ++ LIBS = $(LIBPCI_LIBS) + else + LIB_OBJS += /usr/lib/libpci.a + LDLIBS += -lz +@@ -73,6 +72,7 @@ OBJS = $(SOURCES:%.c=%.o) + + + pommed: $(OBJS) $(LIB_OBJS) ++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS} + + pommed.o: pommed.c pommed.h evloop.h kbd_backlight.h lcd_backlight.h cd_eject.h evdev.h conffile.h audio.h dbus.h beep.h + +diff --git a/wmpomme/Makefile b/wmpomme/Makefile +index cc7a438..6c4bee1 100644 +--- a/wmpomme/Makefile ++++ b/wmpomme/Makefile +@@ -1,11 +1,9 @@ +-CC = gcc +- + DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE + DBUS_LIBS = $(shell pkg-config dbus-1 --libs) + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) + LDLIBS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS) + + SOURCES = wmgeneral.c wmpomme.c \ +@@ -15,6 +13,7 @@ SOURCES = wmgeneral.c wmpomme.c \ + OBJS = $(SOURCES:%.c=%.o) + + wmpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS} + + wmpomme.o: wmpomme.c wmgeneral.h wmpomme-master.xpm ../client-common/dbus-client.h + diff --git a/app-laptop/pommed/files/pommed.rc b/app-laptop/pommed/files/pommed.rc new file mode 100755 index 000000000000..062d1a9c3994 --- /dev/null +++ b/app-laptop/pommed/files/pommed.rc @@ -0,0 +1,19 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need dbus alsasound +} + +start() { + ebegin "Running pommed daemon" + start-stop-daemon --start --quiet --exec /usr/bin/pommed + eend $? +} + +stop() { + ebegin "Stopping pommed daemon" + start-stop-daemon --stop --pidfile /var/run/pommed.pid + eend $? +} diff --git a/app-laptop/pommed/files/pommed.service b/app-laptop/pommed/files/pommed.service new file mode 100644 index 000000000000..8407c1db9550 --- /dev/null +++ b/app-laptop/pommed/files/pommed.service @@ -0,0 +1,10 @@ +[Unit] +Description=MacBook Hotkey Event Handler + +[Service] +Type=dbus +BusName=org.pommed +ExecStart=/usr/bin/pommed -f + +[Install] +WantedBy=multi-user.target diff --git a/app-laptop/pommed/metadata.xml b/app-laptop/pommed/metadata.xml new file mode 100644 index 000000000000..604982faffe2 --- /dev/null +++ b/app-laptop/pommed/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>naota@gentoo.org</email> +</maintainer> +<longdescription> pommed handles the hotkeys found on the Apple MacBook Pro, +MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume, +keyboard backlight or ejects the CD-ROM drive accordingly. +pommed also monitors the ambient light sensors to automatically light up the +keyboard backlight on the MacBook Pro and the latest PowerBook. +Optional support for the Apple Remote control is available.</longdescription> +</pkgmetadata> diff --git a/app-laptop/pommed/pommed-1.39-r1.ebuild b/app-laptop/pommed/pommed-1.39-r1.ebuild new file mode 100644 index 000000000000..7c931a957826 --- /dev/null +++ b/app-laptop/pommed/pommed-1.39-r1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils toolchain-funcs linux-info systemd + +DESCRIPTION="Manage special features such as screen and keyboard backlight on Apple MacBook Pro/PowerBook" +HOMEPAGE="http://technologeek.org/projects/pommed/index.html" +ALIOTH_NUMBER="3583" +SRC_URI="http://alioth.debian.org/frs/download.php/${ALIOTH_NUMBER}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="gtk X" + +COMMON_DEPEND="media-libs/alsa-lib + x86? ( sys-apps/pciutils ) + amd64? ( sys-apps/pciutils ) + dev-libs/confuse + >=sys-apps/dbus-1.1 + dev-libs/dbus-glib + sys-libs/zlib + media-libs/audiofile + gtk? ( x11-libs/gtk+:2 ) + X? ( x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig" +RDEPEND="${COMMON_DEPEND} + media-sound/alsa-utils + virtual/eject" + +pkg_setup() { + if ! use ppc; then + linux-info_pkg_setup + + CONFIG_CHECK="~DMIID" + check_extra_config + fi +} + +src_prepare() { + epatch "${FILESDIR}/${P}.patch" +} + +src_compile() { + cd "${S}"/pommed + emake CC="$(tc-getCC)" OFLIB=1 || die "emake pommed failed" + + if use gtk; then + cd "${S}"/gpomme + local POFILES="" + for LANG in ${LINGUAS}; do + if [ -f po/${LANG}.po ]; then + POFILES="${POFILES} po/${LANG}.po" + fi + done + emake CC="$(tc-getCC)" POFILES="${POFILES}" || die "emake gpomme failed" + fi + if use X; then + cd "${S}"/wmpomme + emake CC="$(tc-getCC)" || die "emake wmpomme failed" + fi +} + +src_install() { + insinto /etc + if use x86 || use amd64; then + newins pommed.conf.mactel pommed.conf + elif use ppc; then + newins pommed.conf.pmac pommed.conf + fi + + insinto /etc/dbus-1/system.d + newins dbus-policy.conf pommed.conf + + insinto /usr/share/pommed + doins pommed/data/*.wav + + dobin pommed/pommed + + newinitd "${FILESDIR}"/pommed.rc pommed + systemd_dounit "${FILESDIR}"/${PN}.service + + dodoc AUTHORS ChangeLog README TODO + + if use gtk ; then + dobin gpomme/gpomme + for LANG in ${LINGUAS}; do + if [ -f gpomme/po/${LANG}.mo ]; then + einfo "Installing lang ${LANG}" + insinto /usr/share/locale/${LANG}/LC_MESSAGES/ + doins gpomme/po/${LANG}.mo + fi + done + + domenu gpomme/gpomme.desktop gpomme/gpomme-c.desktop + insinto /usr/share/gpomme/ + doins -r gpomme/themes + fi + + if use X ; then + dobin wmpomme/wmpomme + fi +} diff --git a/app-laptop/powerprefs/Manifest b/app-laptop/powerprefs/Manifest new file mode 100644 index 000000000000..153834a543f0 --- /dev/null +++ b/app-laptop/powerprefs/Manifest @@ -0,0 +1 @@ +DIST powerprefs-0.8.0.tar.gz 400749 SHA256 d6c236b933655e5a66a6cbec0db1d7294d0d5a195a0b020dbbf43a121b04fd3a SHA512 79f30fffd9cda707084e7acebd5dca0849dc9ba368ba03d4553c518e2d8d0265c8f5cc4849a8d8d5c8bd8c973320a00bd3d635f36fb94b3373391ceef802ca99 WHIRLPOOL f0a9ec65cf47ee0104e660d8907252328ee0dee4790f0aa781b4e7baeeffccf2d92e769a71dc4668fdf85522705852302ffef033c14e12f0ee39d4bb69af7b9c diff --git a/app-laptop/powerprefs/metadata.xml b/app-laptop/powerprefs/metadata.xml new file mode 100644 index 000000000000..261472dfbb66 --- /dev/null +++ b/app-laptop/powerprefs/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ppc</herd> + <upstream> + <remote-id type="sourceforge">pbbuttons</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/powerprefs/powerprefs-0.8.0.ebuild b/app-laptop/powerprefs/powerprefs-0.8.0.ebuild new file mode 100644 index 000000000000..e20c0c459dac --- /dev/null +++ b/app-laptop/powerprefs/powerprefs-0.8.0.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +DESCRIPTION="program to interface with pbbuttonsd (Powerbook/iBook) keys" +HOMEPAGE="http://pbbuttons.sf.net" +SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ppc ~x86" +IUSE="" + +DEPEND=">=x11-libs/gtk+-2.4:2 + >=app-laptop/pbbuttonsd-0.8.0" + +src_install() { + make DESTDIR="${D}" install || die + dodoc README +} diff --git a/app-laptop/prey/Manifest b/app-laptop/prey/Manifest new file mode 100644 index 000000000000..63191d5eb4c2 --- /dev/null +++ b/app-laptop/prey/Manifest @@ -0,0 +1 @@ +DIST prey-0.5.4-linux.zip 646891 SHA256 5d0f6f3e3a48dc5668ff82de55e202e5c28b3fab1f4d71dd55c22b8565583d7e SHA512 15e13b08dd786b3fddf39f8d0e02ceb0e2503be09ea3abde9cfc6431fb2c8388c077f2960dd82d9fb2119929274f2f57e70f642cd8cf3c6e6d76af9701c56724 WHIRLPOOL 3d7e10cfb5926a7f6a5a46c638bb859e6b4b2decb49a979f39573e8f4d2a9c66904e595c144dc4039018d567cd3810f69ef31658018ab3e2dd167ee8bcbbd114 diff --git a/app-laptop/prey/files/prey-0.5.3-mplayer-support.patch b/app-laptop/prey/files/prey-0.5.3-mplayer-support.patch new file mode 100644 index 000000000000..970f50d751d9 --- /dev/null +++ b/app-laptop/prey/files/prey-0.5.3-mplayer-support.patch @@ -0,0 +1,48 @@ +--- modules/webcam/platform/linux/functions.orig 2011-01-19 22:49:55.457000055 -0700 ++++ modules/webcam/platform/linux/functions 2011-01-20 18:19:11.046000085 -0700 +@@ -9,6 +9,7 @@ + + # do we have streamer installed ? + local streamer=`which streamer` ++ local mencoder=`which mencoder` + if [ -n "$streamer" ]; then + + # take four pictures every 0.5 seconds as JPEG +@@ -37,19 +38,32 @@ + fi + + fi +- ++ elif [ -n "${mencoder}" ]; then ++ # not sure how to do this same thing with mencoder ++ mplayer tv:// -tv driver=v4l2:noaudio:device=/dev/video0 -frames 10 -vo jpeg &> /dev/null ++ if [ $? == 0 ]; then ++ mv 00000010.jpg "${webcam__picture}" > /dev/null ++ rm 000000*.jpg > /dev/null ++ fi + fi + + } + + capture_video() { + +- # we should already know if we do have streamer ++ local frames=$(( $webcam__video_capture_time * $webcam__frames_per_second )) ++ ++ # do we have streamer installed ? ++ local streamer=`which streamer` ++ local mencoder=`which mencoder` ++ + if [ -n "$streamer" ]; then +- +- local frames=$(( $webcam__video_capture_time * $webcam__frames_per_second )) + $streamer -o "$webcam__video" -f yuv2 -F stereo -r $webcam__frames_per_second -t $frames +- ++ elif [ -n "${mencoder}" ]; then ++ ${mencoder} tv:// -tv driver=v4l2:noaudio:device=/dev/video0 -ovc lavc -ffourcc DX50 -ofps ${webcam__frames_per_second} -endpos ${webcam__video_capture_time} -o "${tmpdir}/prey-video.avi" &> /dev/null ++ if [ $? == 0 ]; then ++ webcam__video="${tmpdir}/prey-video.avi" ++ fi + fi + + } diff --git a/app-laptop/prey/files/prey-0.5.4-cron-functions.patch b/app-laptop/prey/files/prey-0.5.4-cron-functions.patch new file mode 100644 index 000000000000..963b685292c7 --- /dev/null +++ b/app-laptop/prey/files/prey-0.5.4-cron-functions.patch @@ -0,0 +1,28 @@ +Index: prey/core/functions +=================================================================== +--- prey.orig/core/functions ++++ prey/core/functions +@@ -194,12 +194,12 @@ get_delay_for(){ + + get_current_delay(){ + # crontab -l | grep prey | sed "s/^..\([0-9]*\).*/\1/" +- crontab -l 2> /dev/null | grep prey | head -1 | sed 's/ \/.*//' ++ sed -i 's/ \/.*//' /etc/cron.d/prey.cron + } + + update_execution_delay(){ + local full_path=$(full_path "$base_path") +- (crontab -l 2> /dev/null | grep -v prey; echo "${1}" "${full_path}/prey.sh > /var/log/prey.log 2>&1") | crontab - ++ echo "${new_delay}" "/usr/bin/prey.sh > /var/log/prey.log" > /etc/cron.d/prey.cron + } + + # if device is missing we'll make sure the current delay matches the one +@@ -273,7 +273,7 @@ verify_installation(){ + log " !! Cron daemon not found! Try running it with 'sudo /etc/init.d/cron start'." + fi + log " -- Checking for crontab entry..." +- local result=`crontab -l | grep 'prey.sh' | wc -l 2> /dev/null` ++ local result=`wc -l /etc/cron.d/prey.cron 2> /dev/null` + if [ "$result" -gt 0 ]; then + log " -- Found!" + else diff --git a/app-laptop/prey/files/prey-0.5.4-gtk-ui.patch b/app-laptop/prey/files/prey-0.5.4-gtk-ui.patch new file mode 100644 index 000000000000..6a50a4e0426e --- /dev/null +++ b/app-laptop/prey/files/prey-0.5.4-gtk-ui.patch @@ -0,0 +1,22 @@ +Index: prey/platform/linux/prey-config.py +=================================================================== +--- prey.orig/platform/linux/prey-config.py ++++ prey/platform/linux/prey-config.py +@@ -23,7 +23,7 @@ import base64 + + app_name = 'prey-config' + lang_path = 'lang' +-script_path = os.sys.path[0] ++script_path = '/usr/share/prey/platform/linux/' + + ################################################ + # gettext localization +@@ -42,7 +42,7 @@ _ = gettext.gettext + ################################################ + + PREY_PATH = '/usr/share/prey' +-PREY_CONFIG_FILE = PREY_PATH + '/config' ++PREY_CONFIG_FILE = '/etc/config' + PREY_COMMAND = PREY_PATH + '/prey.sh > /var/log/prey.log 2>&1' + CONTROL_PANEL_URL = 'http://control.preyproject.com' + CONTROL_PANEL_URL_SSL = 'https://control.preyproject.com' diff --git a/app-laptop/prey/files/prey-cron-functions.patch b/app-laptop/prey/files/prey-cron-functions.patch new file mode 100644 index 000000000000..0e5486d27d9b --- /dev/null +++ b/app-laptop/prey/files/prey-cron-functions.patch @@ -0,0 +1,31 @@ +Index: prey/core/functions +=================================================================== +--- prey.orig/core/functions ++++ prey/core/functions +@@ -170,7 +170,7 @@ remove_files(){ + + get_current_delay(){ + # crontab -l | grep prey | sed "s/^..\([0-9]*\).*/\1/" +- crontab -l | grep prey | head -1 | sed 's/ \/.*//' ++ sed -i 's/ \/.*//' /etc/cron.d/prey.cron + } + + get_delay_for(){ +@@ -197,7 +197,7 @@ get_delay_for(){ + + update_execution_delay(){ + local full_path=`full_path "$base_path"` +- (crontab -l | grep -v prey; echo "${new_delay}" "${full_path}/prey.sh > /var/log/prey.log") | crontab - ++ echo "${new_delay}" "/usr/bin/prey.sh > /var/log/prey.log" > /etc/cron.d/prey.cron + } + + #################################################################### +@@ -250,7 +250,7 @@ verify_installation(){ + log " !! Cron daemon not found! Try running it with 'sudo /etc/init.d/cron start'." + fi + log " -- Checking for crontab entry..." +- local result=`crontab -l | grep 'prey.sh' | wc -l 2> /dev/null` ++ local result=`wc -l /etc/cron.d/prey.cron 2> /dev/null` + if [ "$result" -gt 0 ]; then + log " -- Found!" + else diff --git a/app-laptop/prey/files/prey.cron b/app-laptop/prey/files/prey.cron new file mode 100644 index 000000000000..fe036185a2d5 --- /dev/null +++ b/app-laptop/prey/files/prey.cron @@ -0,0 +1 @@ +#*/20 * * * * /usr/bin/prey &>/dev/null diff --git a/app-laptop/prey/metadata.xml b/app-laptop/prey/metadata.xml new file mode 100644 index 000000000000..a2c028af4292 --- /dev/null +++ b/app-laptop/prey/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</maintainer> +<use> + <flag name="alarm">Module for playing an audio file</flag> + <flag name="alert">Display a warning message when the computer seems to be stolen"</flag> + <flag name="geo">Module for retrieving the physical location of the stolen computer</flag> + <flag name="lock">Lock stolen computer</flag> + <flag name="network">Get network information (active connections, traceroute) from stolen computer</flag> + <flag name="secure">Delete or hide sensitive user data</flag> + <flag name="session">Get screenshots from user session</flag> + <flag name="userpriv">Create a prey user group so regular users can access and modify the prey configuration. Use it with caution</flag> + <flag name="webcam">Use computer's webcam to take screenshots of the thief</flag> +</use> +<longdescription lang="en"> +</longdescription> +</pkgmetadata> + diff --git a/app-laptop/prey/prey-0.5.4-r1.ebuild b/app-laptop/prey/prey-0.5.4-r1.ebuild new file mode 100644 index 000000000000..40077d72216f --- /dev/null +++ b/app-laptop/prey/prey-0.5.4-r1.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils readme.gentoo user + +DESCRIPTION="Tracking software for asset recovery" +HOMEPAGE="http://preyproject.com/" +SRC_URI="http://preyproject.com/releases/${PV}/${P}-linux.zip" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="gtk userpriv" + +LINGUAS="en it sv es" +for x in ${LINGUAS}; do + IUSE="${IUSE} linguas_${x}" +done + +MODULES="+alarm +alert +geo lock +network secure +session webcam" +IUSE="${IUSE} ${MODULES}" + +DEPEND="" +#TODO: some of these deps may be dependent on USE +RDEPEND="${DEPEND} + app-shells/bash + virtual/cron + || ( net-misc/curl net-misc/wget ) + dev-perl/IO-Socket-SSL + dev-perl/Net-SSLeay + sys-apps/net-tools + alarm? ( media-sound/mpg123 + media-sound/pulseaudio + ) + alert? ( || ( ( gnome-extra/zenity ) ( kde-apps/kdialog ) ) ) + gtk? ( dev-python/pygtk ) + lock? ( dev-python/pygtk ) + network? ( net-analyzer/traceroute ) + session? ( sys-apps/iproute2 + || ( media-gfx/scrot media-gfx/imagemagick ) + ) + webcam? ( || ( ( media-video/mplayer[encode,jpeg,v4l] ) ( media-tv/xawtv ) ) )" + +S=${WORKDIR}/${PN} + +pkg_setup() { + if use userpriv; then + enewgroup ${PN} + fi + if use gtk; then + ewarn "You have the 'gtk' useflag enabled" + ewarn "This means that the ${PN} configuration" + ewarn "will be accessible via a graphical user" + ewarn "interface. This may allow the thief to alter" + ewarn "or disable the ${PN} functionality" + fi +} + +src_prepare() { + DISABLE_AUTOFORMATTING="yes" + use userpriv && has_version "${CATEGORY}/${PN}:${SLOT}[-userpriv]" && FORCE_PRINT_ELOG="yes" + ! use userpriv && has_version "${CATEGORY}/${PN}:${SLOT}[userpriv]" && FORCE_PRINT_ELOG="yes" + + DOC_CONTENTS="--Configuration-- +Make sure you follow the next steps before running prey for the +first time. +" + + if use userpriv; then + DOC_CONTENTS+="- Add your user to ${PN} group using: +# gpasswd -a <your_user> ${PN}" + else + DOC_CONTENTS+="You don't seem to have 'userpriv' enabled so +${PN} configuration is only accessible as root" + fi + + DOC_CONTENTS+=" +- Create an account on http://preyproject.com/ +- Modify the core and module configuration in /etc/prey +- Uncomment the line in /etc/cron.d/prey.cron" + + # remove system module since it depends on hal and we don't + # have hal in portage anymore + rm -rf "${S}"/modules/system || die + + epatch "${FILESDIR}"/${P}-cron-functions.patch \ + "${FILESDIR}"/${P}-gtk-ui.patch \ + "${FILESDIR}"/${PN}-0.5.3-mplayer-support.patch + sed -i -e 's,readonly base_path=`dirname "$0"`,readonly \ + base_path="/usr/share/prey",' \ + "${S}"/prey.sh || die + # Fix base path. Bug #438728 + sed -i -e "/readonly/s:base_path=.*:base_path=/usr/share/${PN}:" \ + prey.sh || die +} + +src_install() { + # Remove config app if -gtk + if use gtk; then + # fix the path + doicon "${S}"/pixmaps/${PN}.png + newbin "${S}"/platform/linux/${PN}-config.py ${PN}-config + make_desktop_entry ${PN}-config "Prey Configuration" ${PN} \ + "System;Monitor" + else + rm -f "${S}"/platform/linux/prey-config.py || die + fi + + # clear out unneeded language files + for lang in ${LINGUAS}; do + use "linguas_${lang}" || rm -f lang/${lang} modules/*/lang/${lang} + done + + # Core files + insinto /usr/share/prey + doins -r "${S}"/core "${S}"/lang "${S}"/pixmaps "${S}"/platform "${S}"/version + + # Main script + newbin ${PN}.sh ${PN} + + # Put the configuration file into /etc, strict perms, symlink + insinto /etc/prey + newins config ${PN}.conf + # some scripts require /usr/share/prey/config file to be present + # so symlink it to prey.conf + dosym /etc/${PN}/${PN}.conf /usr/share/${PN}/config + use userpriv && { fowners root:${PN} /etc/prey ; } + fperms 770 /etc/prey + use userpriv && { fowners root:${PN} /etc/prey/prey.conf ; } + fperms 660 /etc/prey/prey.conf + + # Add cron.d script + insinto /etc/cron.d + doins "${FILESDIR}/prey.cron" + use userpriv && { fowners root:${PN} /etc/cron.d/prey.cron ; } + fperms 660 /etc/cron.d/prey.cron + + dodoc README + + # modules + cd "${S}"/modules + for mod in * + do + use ${mod} || continue + + # move config, if present, to /etc/prey + if [ -f $mod/config ] + then + insinto "/etc/prey" + newins "$mod/config" "mod-$mod.conf" + use userpriv && { fowners root:${PN} "/etc/${PN}/mod-$mod.conf" ; } + fperms 660 "/etc/${PN}/mod-$mod.conf" + # Rest of the module in its expected location + insinto /usr/share/prey/modules + doins -r "$mod" + if [[ $mod == "lock" ]]; then + fperms 555 \ + "/usr/share/${PN}/modules/lock/platform/linux/${PN}-lock" + fi + fi + done + + readme.gentoo_create_doc +} diff --git a/app-laptop/radeontool/Manifest b/app-laptop/radeontool/Manifest new file mode 100644 index 000000000000..3dbccd59c988 --- /dev/null +++ b/app-laptop/radeontool/Manifest @@ -0,0 +1 @@ +DIST radeontool-1.6.3.tar.bz2 367487 SHA256 f73d1ec1a962822e681c2eefa77d9843a02ee0c63196ba0c1181cc1da016a76c SHA512 937ddf3e2b7dc35b9bc872d770b184303ac9e8199c0de6c17d187acfc5c398abc0cec2071c1af5ad16b0df2976418e06db8b1f90775fe59a8a80bdb3f8e2dca6 WHIRLPOOL 59a2542dbe865fa6e834eff2fbab9a05ef768849d575c260add0fc7b374cb084638f471a6df7d7be3c16c4d9223ee775b2eb47e286bf58c8d3ecf1b91e833ab8 diff --git a/app-laptop/radeontool/metadata.xml b/app-laptop/radeontool/metadata.xml new file mode 100644 index 000000000000..4538a68724a6 --- /dev/null +++ b/app-laptop/radeontool/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>maintainer-needed@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/app-laptop/radeontool/radeontool-1.6.3.ebuild b/app-laptop/radeontool/radeontool-1.6.3.ebuild new file mode 100644 index 000000000000..5462068c590d --- /dev/null +++ b/app-laptop/radeontool/radeontool-1.6.3.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Manage the backlight, external video output and registers of ATI Radeon graphics cards" + +HOMEPAGE="http://cgit.freedesktop.org/~airlied/radeontool/" +SRC_URI="http://people.freedesktop.org/~airlied/${PN}/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +IUSE="" + +RDEPEND=">=x11-libs/libpciaccess-0.12.0" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_install() { + emake install DESTDIR="${D}" +} diff --git a/app-laptop/samsung-tools/Manifest b/app-laptop/samsung-tools/Manifest new file mode 100644 index 000000000000..8be96c087d6f --- /dev/null +++ b/app-laptop/samsung-tools/Manifest @@ -0,0 +1,2 @@ +DIST samsung-tools-2.1.tar.gz 415254 SHA256 dc5a4d7f24e621785ca9c73f07d18e88cacf0e4b9d77e0f798f7abd9290d6ab9 SHA512 c7e60ef9accd5707913951d37442f9cf1c2363ca4150f0058c1345ea0a8027ddc32b9cf6da386e2c001c75d163034a48dbe16bf0936ade03e7067082257d42bd WHIRLPOOL b629ed0bc7a891148e3c1e9df5d3591a1391ed350d5373b52c44a443d156226dbf02d65afb5c1dcd7270ace3a84365813fccfb87bc84e565f9032e7a6b800673 +DIST samsung-tools-2.3.1.tar.gz 425379 SHA256 423ec128d75035b77d9bdeaa3662acbf0e644ae7a6b15671943e7a5764d7b370 SHA512 1234972ceea3925c95d631a2429b9669ba8ece078adb5790784a8ee2f88ec269b5fef98e915604f9c68b404bb37a37a79c8192554c3a5aca97ec654f291d74f1 WHIRLPOOL f7b45eb94406102febd3fcb8079a7a1ebdf31d26d397a900fae20ec052aa262baf20b95deeddba411efd7a17644a889cba06df3e14a909bd5e6fb781e0fc0f2d diff --git a/app-laptop/samsung-tools/files/samsung-tools.init b/app-laptop/samsung-tools/files/samsung-tools.init new file mode 100644 index 000000000000..3580390a1758 --- /dev/null +++ b/app-laptop/samsung-tools/files/samsung-tools.init @@ -0,0 +1,15 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need dbus +} + +start() { + ebegin "Setting up samsung-tools" + dbus-send --system --print-reply=literal --dest='org.voria.SamsungTools.System' \ + '/' org.voria.SamsungTools.System.SetInitialDevicesStatus + eend $? +} diff --git a/app-laptop/samsung-tools/metadata.xml b/app-laptop/samsung-tools/metadata.xml new file mode 100644 index 000000000000..f80fe720b6e1 --- /dev/null +++ b/app-laptop/samsung-tools/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="launchpad">samsung-tools</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/samsung-tools/samsung-tools-2.1.ebuild b/app-laptop/samsung-tools/samsung-tools-2.1.ebuild new file mode 100644 index 000000000000..822055b17c79 --- /dev/null +++ b/app-laptop/samsung-tools/samsung-tools-2.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +inherit fdo-mime python-r1 + +DESCRIPTION="Tools for Samsung laptops" +HOMEPAGE="http://launchpad.net/samsung-tools" +SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="app-laptop/easy-slow-down-manager + dev-python/dbus-python + dev-python/notify-python + dev-python/pygtk + net-wireless/rfkill + sys-apps/vbetool + sys-power/pm-utils + x11-misc/xbindkeys" +RDEPEND="${DEPEND}" + +src_compile() { + return +} + +src_install() { + emake DESTDIR="${D}" install + newinitd "${FILESDIR}"/${PN}.init ${PN} +} + +pkg_postinst() { + fdo-mime_desktop_database_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} diff --git a/app-laptop/samsung-tools/samsung-tools-2.3.1.ebuild b/app-laptop/samsung-tools/samsung-tools-2.3.1.ebuild new file mode 100644 index 000000000000..52eaa37c7a17 --- /dev/null +++ b/app-laptop/samsung-tools/samsung-tools-2.3.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +inherit fdo-mime python-single-r1 + +DESCRIPTION="Tools for Samsung laptops" +HOMEPAGE="http://launchpad.net/samsung-tools" +SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="${PYTHON_DEPS} + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/notify-python[${PYTHON_USEDEP}] + dev-python/pygtk[${PYTHON_USEDEP}] + app-laptop/easy-slow-down-manager + net-wireless/rfkill + sys-apps/vbetool + sys-power/pm-utils + x11-misc/xbindkeys" +DEPEND="${RDEPEND}" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_compile() { + return +} + +src_install() { + emake DESTDIR="${D}" install + newinitd "${FILESDIR}"/${PN}.init ${PN} + + python_fix_shebang "${D}"/usr/bin + python_fix_shebang "${D}"/usr/share/samsung-tools/system-service.py + python_fix_shebang "${D}"/usr/share/samsung-tools/session-service.py + python_optimize "${D}"/usr/share/samsung-tools/backends +} + +pkg_postinst() { + fdo-mime_desktop_database_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} diff --git a/app-laptop/spicctrl/Manifest b/app-laptop/spicctrl/Manifest new file mode 100644 index 000000000000..36cc4efa36cf --- /dev/null +++ b/app-laptop/spicctrl/Manifest @@ -0,0 +1 @@ +DIST spicctrl-1.9.tar.bz2 10917 SHA256 88d9795bf51af3496fdce2fec263363ff90929e0e7036f9c117fb2b829353b6b SHA512 7b1d7862a51dd3321fe84cc5921d71a8f0b978755cbd7c31e54a59ad1c9d3f781d649436bd9b7fba71446a593ad7e925470731f5bd135350942fb0c03fbd4d3e WHIRLPOOL 7d852723784dc9797b6f4f58b8d2aba54e2cd4ae70000e3482ed29354a0e2f8165ffc070721a60572d480b17bc4845906e09a4b2161f0b4977dae9322f053f5f diff --git a/app-laptop/spicctrl/files/spicctrl-1.9-makefile.patch b/app-laptop/spicctrl/files/spicctrl-1.9-makefile.patch new file mode 100644 index 000000000000..a49a29c30fb5 --- /dev/null +++ b/app-laptop/spicctrl/files/spicctrl-1.9-makefile.patch @@ -0,0 +1,11 @@ +--- Makefile.orig 2012-11-20 12:38:41.528871594 +0400 ++++ Makefile 2012-11-20 12:39:42.630871103 +0400 +@@ -14,7 +14,7 @@ + all: spicctrl + + spicctrl: $(OBJ) +- $(CC) -o spicctrl $(OBJ) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o spicctrl $(OBJ) $(LIBS) + + clean: + rm -f $(OBJ) spicctrl *~ diff --git a/app-laptop/spicctrl/metadata.xml b/app-laptop/spicctrl/metadata.xml new file mode 100644 index 000000000000..4538a68724a6 --- /dev/null +++ b/app-laptop/spicctrl/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>maintainer-needed@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/app-laptop/spicctrl/spicctrl-1.9-r1.ebuild b/app-laptop/spicctrl/spicctrl-1.9-r1.ebuild new file mode 100644 index 000000000000..a23894985ca0 --- /dev/null +++ b/app-laptop/spicctrl/spicctrl-1.9-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit base toolchain-funcs + +DESCRIPTION="tool for the sonypi-Device (found in Sony Vaio Notebooks)" +HOMEPAGE="http://www.popies.net/sonypi/" +SRC_URI="http://www.popies.net/sonypi/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 -ppc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +PATCHES=( "${FILESDIR}/${P}-makefile.patch" ) + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install() { + dobin spicctrl +} diff --git a/app-laptop/thinkfan/Manifest b/app-laptop/thinkfan/Manifest new file mode 100644 index 000000000000..709a139494ae --- /dev/null +++ b/app-laptop/thinkfan/Manifest @@ -0,0 +1,3 @@ +DIST thinkfan-0.8.1.tar.gz 38417 SHA256 ba630fdcdefa238b2c87f050f6fcbd5a4828527497d52d410761a26c8ca25311 SHA512 6e5c7df599ca6f1c99cf61bfafb752f5886a7eeff9166a43006ea8d86f82ff8c4d5eb6ddc2e62dc5d01235038b4606fbbfc849f81b971388ccbe6417ee9f3208 WHIRLPOOL 975eee0b64db52bbd5552a540aff035abe36bd8a602ec6f966ec30a9ffd1bc9ef30481b91f37c6c3f771a2ba0b38850d7d4dc40387c475deffa7850288d122b4 +DIST thinkfan-0.9.2.tar.gz 39539 SHA256 90daa0f2db221e1d5085d7f25cb6c63608d174db2987478c340e9523e652af79 SHA512 b27fd60a02ad06d30485ae3d658af6b9e79af3c898f415d0ff613839424f5dc9731be03d1d9bf3ed1311ecd0778aef5b30fa908cab386cf419db77ae29940684 WHIRLPOOL 2ca120ad9cf4960c7536cf6252b711257cbb7c1ca6061d028aebf53fd18e41d3b852d36158bddd18f791e1128b98d35a3f68fae5bb29077820f4dff6fc9b1919 +DIST thinkfan-0.9_beta2.tar.gz 41554 SHA256 0db4a0e56c02b991be13741f622a8e475a8361112ff9a38a0430ccc22f104a39 SHA512 3cf1b33de625a663b32482943f99dba88cc09106c1b96701ba6a36a5ea1abb3cfd8b32c3822af93d1cf19ab25c61370abca5bd0b313a9fb055dd191086c1df01 WHIRLPOOL 1a8e71fb0906fb11c5922f09e6136f48cbcb7128525fafeeb7f3474f01a00eeb046f69b2d5788428828a395dbc11ae084e9655259a1a74f6aafe04ca8417d4ad diff --git a/app-laptop/thinkfan/files/thinkfan-0.8.1-openrc.patch b/app-laptop/thinkfan/files/thinkfan-0.8.1-openrc.patch new file mode 100644 index 000000000000..82acbe91de39 --- /dev/null +++ b/app-laptop/thinkfan/files/thinkfan-0.8.1-openrc.patch @@ -0,0 +1,11 @@ +--- thinkfan-0.8.1/rcscripts/thinkfan.gentoo ++++ thinkfan-0.8.1/rcscripts/thinkfan.gentoo +@@ -11,7 +11,7 @@ + + start() { + ebegin "Starting thinkfan" +- start-stop-daemon --start --exec /usr/sbin/thinkfan -- -q -s5 ++ start-stop-daemon --start --exec /usr/sbin/thinkfan -- -q -s5 -c /etc/thinkfan.conf + eend $? + } + diff --git a/app-laptop/thinkfan/files/thinkfan-0.9.2-openrc.patch b/app-laptop/thinkfan/files/thinkfan-0.9.2-openrc.patch new file mode 100644 index 000000000000..34e665321f12 --- /dev/null +++ b/app-laptop/thinkfan/files/thinkfan-0.9.2-openrc.patch @@ -0,0 +1,11 @@ +--- thinkfan-0.9.2/rcscripts/thinkfan.gentoo ++++ thinkfan-0.9.2/rcscripts/thinkfan.gentoo +@@ -11,7 +11,7 @@ + + start() { + ebegin "Starting thinkfan" +- start-stop-daemon --start --exec /usr/sbin/thinkfan -- -q -s5 -c /etc/thinkfan.com ++ start-stop-daemon --start --exec /usr/sbin/thinkfan -- -q -s5 -c /etc/thinkfan.conf + eend $? + } + diff --git a/app-laptop/thinkfan/metadata.xml b/app-laptop/thinkfan/metadata.xml new file mode 100644 index 000000000000..282baf91c074 --- /dev/null +++ b/app-laptop/thinkfan/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> + </maintainer> + <use> + <flag name="atasmart">include libatasmart support to get disc temperature</flag> + </use> + <upstream> + <remote-id type="sourceforge">thinkfan</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/thinkfan/thinkfan-0.8.1-r1.ebuild b/app-laptop/thinkfan/thinkfan-0.8.1-r1.ebuild new file mode 100644 index 000000000000..394e35d82ff0 --- /dev/null +++ b/app-laptop/thinkfan/thinkfan-0.8.1-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="simple fan control program for thinkpads" +HOMEPAGE="http://thinkfan.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-openrc.patch + tc-export CC +} + +src_install() { + dosbin ${PN} + + newinitd rcscripts/thinkfan.gentoo ${PN} + + doman ${PN}.1 + dodoc ChangeLog NEWS README \ + examples/${PN}.conf.{complex,sysfs,thinkpad} +} + +pkg_postinst() { + elog "Please read the documentation and copy an" + elog "appropriate file to /etc/thinkfan.conf." +} diff --git a/app-laptop/thinkfan/thinkfan-0.9.2-r1.ebuild b/app-laptop/thinkfan/thinkfan-0.9.2-r1.ebuild new file mode 100644 index 000000000000..b3688a5b4b7d --- /dev/null +++ b/app-laptop/thinkfan/thinkfan-0.9.2-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils readme.gentoo systemd + +DESCRIPTION="simple fan control program for thinkpads" +HOMEPAGE="http://thinkfan.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="atasmart" + +DEPEND="atasmart? ( dev-libs/libatasmart )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-openrc.patch + + sed -e "s:share/doc/${PN}:share/doc/${P}:" \ + -i CMakeLists.txt +} + +src_configure() { + mycmakeargs+=( + "-DCMAKE_BUILD_TYPE:STRING=Debug" + "$(cmake-utils_use_use atasmart ATASMART)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd rcscripts/${PN}.gentoo ${PN} + systemd_dounit rcscripts/${PN}.service + + readme.gentoo_create_doc +} + +DOC_CONTENTS="Please read the documentation and copy an +appropriate file to /etc/thinkfan.conf." diff --git a/app-laptop/thinkfan/thinkfan-0.9.2.ebuild b/app-laptop/thinkfan/thinkfan-0.9.2.ebuild new file mode 100644 index 000000000000..865e858b286a --- /dev/null +++ b/app-laptop/thinkfan/thinkfan-0.9.2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils readme.gentoo systemd + +DESCRIPTION="simple fan control program for thinkpads" +HOMEPAGE="http://thinkfan.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="atasmart" + +DEPEND="atasmart? ( dev-libs/libatasmart )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +src_prepare() { + sed -e "s:share/doc/${PN}:share/doc/${P}:" \ + -i CMakeLists.txt +} + +src_configure() { + mycmakeargs+=( + "-DCMAKE_BUILD_TYPE:STRING=Debug" + "$(cmake-utils_use_use atasmart ATASMART)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd rcscripts/${PN}.gentoo ${PN} + systemd_dounit rcscripts/${PN}.service + + readme.gentoo_create_doc +} + +DOC_CONTENTS="Please read the documentation and copy an +appropriate file to /etc/thinkfan.conf." diff --git a/app-laptop/thinkfan/thinkfan-0.9_beta2.ebuild b/app-laptop/thinkfan/thinkfan-0.9_beta2.ebuild new file mode 100644 index 000000000000..64f673064d9c --- /dev/null +++ b/app-laptop/thinkfan/thinkfan-0.9_beta2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit cmake-utils readme.gentoo systemd + +DESCRIPTION="simple fan control program for thinkpads" +HOMEPAGE="http://thinkfan.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="atasmart" + +DEPEND="atasmart? ( dev-libs/libatasmart )" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.8.1-openrc.patch + sed -e '/^set(CMAKE_C_FLAGS/d' \ + -i CMakeLists.txt || die +} + +src_configure() { + mycmakeargs+=( + "-DCMAKE_BUILD_TYPE:STRING=Debug" + "$(cmake-utils_use_use atasmart ATASMART)" + ) + + cmake-utils_src_configure +} + +src_install() { + dosbin "${BUILD_DIR}"/${PN} + + newinitd rcscripts/${PN}.gentoo ${PN} + systemd_dounit rcscripts/${PN}.service + + doman ${PN}.1 + dodoc ChangeLog NEWS README \ + examples/${PN}.conf.{complex,simple} + readme.gentoo_create_doc +} + +DOC_CONTENTS="Please read the documentation and copy an +appropriate file to /etc/thinkfan.conf." diff --git a/app-laptop/tp_smapi/Manifest b/app-laptop/tp_smapi/Manifest new file mode 100644 index 000000000000..425ca7eb52d3 --- /dev/null +++ b/app-laptop/tp_smapi/Manifest @@ -0,0 +1 @@ +DIST tp_smapi-0.41.tar.gz 38852 SHA256 6aef02b92d10360ac9be0db29ae390636be55017990063a092a285c70b54e666 SHA512 924a11cdf64bc151d069d4f61ca476cf006773291f363b21a80ce091f560a78c4828d2e522e646a5b133c58149a37cb5c2432a165e92e6980eb510b9488c728e WHIRLPOOL 10c74811148934a49b2d2b65cd65d366c58de03682c02d6b82694b4831634a25f2da9986b0493e28b372abf7ada692ee8ea85b2881b823b0cb7b35b73f348d6e diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-confd b/app-laptop/tp_smapi/files/tp_smapi-0.40-confd new file mode 100644 index 000000000000..7c80f35e390b --- /dev/null +++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-confd @@ -0,0 +1,20 @@ +# /etc/conf.d/smapi: config file for /etc/init.d/smapi + +# use '/etc/init.d/smapi info' at any time to check the thresholds +# currently used by the driver +# Note that the kernel does some sanity checking on the values and +# will not accept any combination of values you may try to set up. +# (i.e. stop value lower than start) So if the output of info does +# not match what you wanted the driver probably did not like your +# configuration. + +# default thresholds for '/etc/init.d/smapi start' +SMAPI_THRESH_START="30" +SMAPI_THRESH_STOP="85" +# values to be used for '/etc/init.d/smapi low' +SMAPI_LOW_THRESH_START="${SMAPI_THRESH_START}" +SMAPI_LOW_THRESH_STOP="${SMAPI_THRESH_STOP}" + +# values to be used for '/etc/init.d/smapi high' +SMAPI_HIGH_THRESH_START="95" +SMAPI_HIGH_THRESH_STOP="100" diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-initd b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd new file mode 100755 index 000000000000..e0b3bd5e0d8e --- /dev/null +++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd @@ -0,0 +1,92 @@ +#!/sbin/runscript +# Copyright (C) 2011 Henning Schild <henning@wh9.tu-dresden.de> +# Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +SMAPI_SYSFS="/sys/devices/platform/smapi" +BATS="BAT0 BAT1" + +depend() { + after modules +} + +start() { + local state1 + local state2 + + ebegin "Making sure that module 'tp_smapi' is loaded" + modprobe tp_smapi + state1=$? + eend ${state1} + + ebegin "Checking for \"${SMAPI_SYSFS}\"" + test -d "${SMAPI_SYSFS}" + state2=$? + eend ${state2} + + if [ "${state1}" -ne "0" ] || [ "${state2}" -ne "0" ]; then + return 1 + fi + + ebegin "Starting ${SVCNAME}" + set_all ${SMAPI_THRESH_START} ${SMAPI_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${SMAPI_HIGH_THRESH_START} ${SMAPI_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${SMAPI_LOW_THRESH_START} ${SMAPI_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + echo ${tstart} > ${SMAPI_SYSFS}/${bat}/start_charge_thresh + echo ${tstop} > ${SMAPI_SYSFS}/${bat}/stop_charge_thresh + eend $? + done +} + +info() { + local presence + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(cat ${SMAPI_SYSFS}/${bat}/start_charge_thresh) + tstop=$(cat ${SMAPI_SYSFS}/${bat}/stop_charge_thresh) + if [ "$(cat ${SMAPI_SYSFS}/${bat}/installed)" -eq "1" ]; then + presence=" [installed]" + fi + einfo "${bat}: ${tstart} ${tstop}${presence}" + done +} diff --git a/app-laptop/tp_smapi/metadata.xml b/app-laptop/tp_smapi/metadata.xml new file mode 100644 index 000000000000..ec6d801992d5 --- /dev/null +++ b/app-laptop/tp_smapi/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <use> + <flag name="hdaps">Install a compatible HDAPS module</flag> + </use> + <upstream> + <remote-id type="github">evgeni/tp_smapi</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/tp_smapi/tp_smapi-0.41.ebuild b/app-laptop/tp_smapi/tp_smapi-0.41.ebuild new file mode 100644 index 000000000000..10c12688beed --- /dev/null +++ b/app-laptop/tp_smapi/tp_smapi-0.41.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit linux-mod + +DESCRIPTION="IBM ThinkPad SMAPI BIOS driver" +HOMEPAGE="https://github.com/evgeni/tp_smapi/ http://tpctl.sourceforge.net/" +SRC_URI="mirror://github/evgeni/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="hdaps" + +RESTRICT="userpriv" + +# We need dmideode if the kernel does not support DMI_DEV_TYPE_OEM_STRING +# in dmi.h +DEPEND="sys-apps/dmidecode" +RDEPEND="${DEPEND}" + +pkg_pretend() { + linux-mod_pkg_setup + + if kernel_is lt 2 6 19; then + eerror + eerror "${P} requires Linux kernel 2.6.19 or above." + eerror + die "Unsupported kernel version" + fi + + MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)" + BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}" + BUILD_TARGETS="default" + + if use hdaps; then + CONFIG_CHECK="~INPUT_UINPUT" + WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better" + linux-info_pkg_setup + + MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)" + BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1" + + CONFIG_CHECK="~!SENSORS_HDAPS" + ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)" + linux-info_pkg_setup + fi +} + +pkg_setup() { + # run again as pkg_pretend is not var safe + pkg_pretend +} + +src_install() { + linux-mod_src_install + dodoc CHANGES README + newinitd "${FILESDIR}"/${PN}-0.40-initd smapi + newconfd "${FILESDIR}"/${PN}-0.40-confd smapi +} diff --git a/app-laptop/tpacpi-bat/Manifest b/app-laptop/tpacpi-bat/Manifest new file mode 100644 index 000000000000..2f013be7fce2 --- /dev/null +++ b/app-laptop/tpacpi-bat/Manifest @@ -0,0 +1,2 @@ +DIST tpacpi-bat-1.1.tar.gz 17781 SHA256 99bfeae60c672d981ea70a98470b8c2a1a9da52da0fce7f669270f216d2230a3 SHA512 7b8838e6db7f98cd5bb674a99dbb880ba6574529de68d97ce704bf225ba416183971aae3c2dd623bc8750767c54a2a52cd0b525bce70640ecf0b307fdba03821 WHIRLPOOL 3a057e57da77f997ed27f679c2503a139d760949027c02aa5dd5bef71579d525acc866655e0008b59ef6ae8b0c567f7de627838baac5c7ed2969523a7355a879 +DIST tpacpi-bat-2.1.tar.gz 17753 SHA256 0a4b273215ef814a1932b0c8ff1571c6e45eecb3b28d8462deab460f0bcdc337 SHA512 7ed4974d84c3f1ddc9fd5cd6d7f103a11e2f808a223692749e3ae0ec2e888b62083d577214e27634cd76e9b616a6b8d5cb5474ddb64f73972d08641051c5c6f8 WHIRLPOOL 303c28a287b657514e985227b8f4c9c3d044fdf46a7dca0e52ce3ab7b6852a65aa46a8805cf6a945b3936432d3c3e43855d0d88c7549b05e95d271e8c605b1b7 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 new file mode 100644 index 000000000000..94da0a3eb12a --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 @@ -0,0 +1,15 @@ +# /etc/conf.d/tpacpi-bat: config file for /etc/init.d/tpacpi-bat + +# use '/etc/init.d/tpacpi-bat info' at any time to check the thresholds +# currently used by the driver + +# default thresholds for '/etc/init.d/tpacpi-bat start' +TPACPI_BAT_THRESH_START="30" +TPACPI_BAT_THRESH_STOP="85" +# values to be used for '/etc/init.d/tpacpi-bat low' +TPACPI_BAT_LOW_THRESH_START="${TPACPI_BAT_THRESH_START}" +TPACPI_BAT_LOW_THRESH_STOP="${TPACPI_BAT_THRESH_STOP}" + +# values to be used for '/etc/init.d/tpacpi-bat high' +TPACPI_BAT_HIGH_THRESH_START="95" +TPACPI_BAT_HIGH_THRESH_STOP="99" #see bug #485526 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 new file mode 100644 index 000000000000..a1900794daab --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 @@ -0,0 +1,78 @@ +#!/sbin/runscript +# Copyright (C) 2012-2013 Christoph Junghans <ottxor@gentoo.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +BATS="1" + +depend() { + after modules +} + +start() { + local state1 + + ebegin "Making sure that module 'acpi_call' is loaded" + modprobe acpi_call + state1=$? + eend ${state1} + + [ "${state1}" -ne "0" ] && return 1 + + ebegin "Starting ${SVCNAME}" + set_all ${TPACPI_BAT_THRESH_START} ${TPACPI_BAT_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${TPACPI_BAT_HIGH_THRESH_START} ${TPACPI_BAT_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${TPACPI_BAT_LOW_THRESH_START} ${TPACPI_BAT_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + /usr/bin/tpacpi-bat -s startThreshold ${bat} ${tstart} + /usr/bin/tpacpi-bat -s stopThreshold ${bat} ${tstop} + eend $? + done +} + +info() { + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(/usr/bin/tpacpi-bat -g startThreshold ${bat}) + tstop=$(/usr/bin/tpacpi-bat -g stopThreshold ${bat}) + einfo "Battery ${bat}: ${tstart} ${tstop}" + done +} diff --git a/app-laptop/tpacpi-bat/metadata.xml b/app-laptop/tpacpi-bat/metadata.xml new file mode 100644 index 000000000000..730a6cdcb702 --- /dev/null +++ b/app-laptop/tpacpi-bat/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>ottxor@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <upstream> + <remote-id type="github">teleshoes/tpacpi-bat</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild new file mode 100644 index 000000000000..cf44a50d0420 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="git://github.com/teleshoes/tpacpi-bat.git http://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, which are not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild new file mode 100644 index 000000000000..3db6351dfaad --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="git://github.com/teleshoes/tpacpi-bat.git http://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, which are not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild new file mode 100644 index 000000000000..cf44a50d0420 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="git://github.com/teleshoes/tpacpi-bat.git http://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, which are not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpb/Manifest b/app-laptop/tpb/Manifest new file mode 100644 index 000000000000..ef2eb7b76818 --- /dev/null +++ b/app-laptop/tpb/Manifest @@ -0,0 +1 @@ +DIST tpb-0.6.4.tar.gz 280316 SHA256 9ce4599ff4cb7397a3f49f747ff0225ef32bc6152778e55419f15aaf4cbff32a SHA512 1a12f4231b86bc3da2867670d5800f8f99f347743cf40b229c92485b6fe52e12b0222356d95d071ec26162ac778d2fe40867b4e635701620bc52236dbdb7b76a WHIRLPOOL 3b9fba89561d3c02cb2b36a266d52cba3d08f8305bcc2863b900ca3b8a2c8e5f1705bb1ffd20c03f8d28f531092ac26e2caaac634ad599f4601b9c6171652dfc diff --git a/app-laptop/tpb/files/tpb-0.6.4-nvram.patch b/app-laptop/tpb/files/tpb-0.6.4-nvram.patch new file mode 100644 index 000000000000..1ead9cbe5929 --- /dev/null +++ b/app-laptop/tpb/files/tpb-0.6.4-nvram.patch @@ -0,0 +1,34 @@ +diff -Naur tpb-0.6.4-org/src/tpb.c tpb-0.6.4/src/tpb.c +--- tpb-0.6.4-org/src/tpb.c 2005-07-18 16:15:59.000000000 +0200 ++++ tpb-0.6.4/src/tpb.c 2008-05-13 15:15:34.000000000 +0200 +@@ -523,10 +523,10 @@ + /* determine the state of the brightness buttons {{{ */ + if(thinkpad_state.brightness_level != last_thinkpad_state.brightness_level) { + if(cfg.verbose == STATE_ON) { +- printf(_("Brightness changed: Level %d\n"), thinkpad_state.brightness_level * 100 / 7); ++ printf(_("Brightness changed: Level %d\n"), thinkpad_state.brightness_level * 100 / 15); + } + if(cfg.callback != NULL) { +- snprintf(callback_cmd, sizeof(callback_cmd), "%s brightness %d", cfg.callback, thinkpad_state.brightness_level * 100 / 7); ++ snprintf(callback_cmd, sizeof(callback_cmd), "%s brightness %d", cfg.callback, thinkpad_state.brightness_level * 100 / 15); + if(fork_app(callback_cmd) != 0) { + _exit(0); + } +@@ -537,7 +537,7 @@ + if(osd_ptr != NULL && + ((cfg.osd == STATE_OFF && cfg.osdbrightness == STATE_ON) || (cfg.osd == STATE_ON && cfg.osdbrightness != STATE_OFF))) { + xosd_display(osd_ptr, 0, XOSD_string, _("Brightness")); +- xosd_display(osd_ptr, 1, XOSD_percentage, thinkpad_state.brightness_level * 100 / 7); ++ xosd_display(osd_ptr, 1, XOSD_percentage, thinkpad_state.brightness_level * 100 / 15); + } + } + #endif /* HAVE_LIBXOSD */ /* }}} */ +@@ -1031,7 +1031,7 @@ + thinkpad_state->hibernate_toggle = (thinkpad_state->hibernate_toggle & ~0x01) | (( buffer[0x58] & 0x01) ); + thinkpad_state->display_state = (( buffer[0x59] & 0x03) ); + thinkpad_state->expand_toggle = (thinkpad_state->expand_toggle & ~0x01) | (( buffer[0x59] & 0x10) >> 4); +- thinkpad_state->brightness_level = (( buffer[0x5E] & 0x07) ); ++ thinkpad_state->brightness_level = (( buffer[0x5E] & 0x0F) ); + thinkpad_state->brightness_toggle = (thinkpad_state->brightness_toggle & ~0x01) | (( buffer[0x5E] & 0x20) >> 5); + thinkpad_state->volume_level = (( buffer[0x60] & 0x0f) ); + thinkpad_state->volume_toggle = (thinkpad_state->volume_toggle & ~0x01) | (( buffer[0x60] & 0x80) >> 7); diff --git a/app-laptop/tpb/files/tpb-configure-fix.diff b/app-laptop/tpb/files/tpb-configure-fix.diff new file mode 100644 index 000000000000..7dc4683d158b --- /dev/null +++ b/app-laptop/tpb/files/tpb-configure-fix.diff @@ -0,0 +1,16 @@ +diff -aur tpb-0.5.1/configure tpb-0.5.1-patched/configure +--- tpb-0.5.1/configure 2003-04-10 04:06:26.000000000 -0400 ++++ tpb-0.5.1-patched/configure 2003-06-30 12:06:41.000000000 -0400 +@@ -790,10 +790,10 @@ + + # additional options + # Check whether --enable-xosd or --disable-xosd was given. +-if test "${enable_xosd+set}" = set; then +- enableval="$enable_xosd" ++if test "x${enable_xosd}" = xno; then + enable_xosd=no + else ++ enableval="$enable_xosd" + enable_xosd=yes + fi + diff --git a/app-laptop/tpb/metadata.xml b/app-laptop/tpb/metadata.xml new file mode 100644 index 000000000000..4538a68724a6 --- /dev/null +++ b/app-laptop/tpb/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>maintainer-needed@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/app-laptop/tpb/tpb-0.6.4-r1.ebuild b/app-laptop/tpb/tpb-0.6.4-r1.ebuild new file mode 100644 index 000000000000..f9c57af8d3a3 --- /dev/null +++ b/app-laptop/tpb/tpb-0.6.4-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit linux-info eutils + +DESCRIPTION="IBM ThinkPad buttons utility" +HOMEPAGE="http://savannah.nongnu.org/projects/tpb/" +SRC_URI="http://savannah.nongnu.org/download/tpb/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 -ppc x86" +IUSE="nls xosd" + +RDEPEND="x11-libs/libXt + x11-libs/libXext + xosd? ( >=x11-libs/xosd-2.2.0 )" +DEPEND="${RDEPEND}" + +CONFIG_CHECK="~NVRAM" +ERROR_NVRAM="${P} requires /dev/nvram support (CONFIG_NVRAM)" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-configure-fix.diff + epatch "${FILESDIR}"/${P}-nvram.patch +} + +src_configure() { + econf \ + $(use_enable nls) \ + $(use_enable xosd) +} + +src_install() { + default + dodoc doc/{callback_example.sh,nvram.txt,tpbrc} +} |