From 092675b6b60fca6785ca47616704eaf188167845 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 12 Jul 2011 20:41:51 +0000 Subject: Linux3 support for my laptop to save power again. Package-Manager: portage-2.2.0_alpha43/cvs/Linux i686 --- app-laptop/laptop-mode-tools/ChangeLog | 11 +++- app-laptop/laptop-mode-tools/Manifest | 4 +- .../laptop-mode-tools-1.55-linux3-support.patch | 40 +++++++++++++ .../laptop-mode-tools-1.55-r2.ebuild | 70 ++++++++++++++++++++++ 4 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.55-linux3-support.patch create mode 100644 app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r2.ebuild (limited to 'app-laptop/laptop-mode-tools') diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog index b1a6b064c712..b8f95bf22e5a 100644 --- a/app-laptop/laptop-mode-tools/ChangeLog +++ b/app-laptop/laptop-mode-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-laptop/laptop-mode-tools -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.53 2010/09/09 03:15:31 josejx Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.54 2011/07/12 20:41:51 robbat2 Exp $ + +*laptop-mode-tools-1.55-r2 (12 Jul 2011) + + 12 Jul 2011; Robin H. Johnson + +laptop-mode-tools-1.55-r2.ebuild, + +files/laptop-mode-tools-1.55-linux3-support.patch: + Linux3 support for my laptop to save power again. 09 Sep 2010; Joseph Jezak laptop-mode-tools-1.55-r1.ebuild: diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest index 628a9d704552..783103dba405 100644 --- a/app-laptop/laptop-mode-tools/Manifest +++ b/app-laptop/laptop-mode-tools/Manifest @@ -1,7 +1,9 @@ +AUX laptop-mode-tools-1.55-linux3-support.patch 2026 RMD160 d99e1f38b8793ef4bebf64f5bb5372a237fe7f78 SHA1 dee19f1b0bab06e80112f8038794267834fb0f9b SHA256 65c8ade2ea8691d6384ff03f39bf06d96499ef3dde9960d70747882242249720 AUX laptop-mode-tools-1.55-pm-utils-1.4.0.patch 698 RMD160 f63a8b4fe7a485b5c9f2581a960029f95c43f2ea SHA1 739243fdbe9fc49d9402b6522bce0b21f82ab443 SHA256 369cc448d84565704b48c046f0c0d96a305b1f920a6714f41cfbb4f90b045d16 AUX laptop_mode.init-1.4 1062 RMD160 953efd488b4aadb530fe10e4038612c2a523c229 SHA1 41e7e279663904c70471d1a4f6713c25f103e64f SHA256 d48711562527aa670e57e1bec83a06089db50771da742d0155a7b12086770ce0 AUX laptop_mode_tools.pmutils 38 RMD160 fc746f824625d0ae2eb3c63d9474423bcadf8eb3 SHA1 ab72851ce8351f002bd8db9d23d7dbd4bcff6fb9 SHA256 1d5ae9a7045d0c0ec0d56ec8ff153ea80b27cf52cab82db8fcc49b1f835f5cfe DIST laptop-mode-tools_1.55.tar.gz 97675 RMD160 af1476c4ff4c08c2a077eb592ca2c3369c57b8e9 SHA1 e2dcec04f4c1152bce07dd621ad8a63f70b013ef SHA256 4fc8420253bc053a643c736238a6dcde6f8e32b48674cad6d42cc90a5ff727b5 EBUILD laptop-mode-tools-1.55-r1.ebuild 1876 RMD160 e686c094b9b17a76fa94cf4b0ebc69414ca76b92 SHA1 df835052663fdc7e263b8582292d5a2fa453f458 SHA256 12dbdbb8d6d4797848bd18f3219ef0ba551055b019378ff51465591b42fe7b59 -MISC ChangeLog 9477 RMD160 b62e884ca0d80023b59c374d95dad2b4fd0d9b63 SHA1 baff73156cfe442a3eae36f7d442e93209ef6d62 SHA256 69fd6fb2e1cea43a69de0bb717652f6cd18c271e8693bf8a01c68aac2dc74f76 +EBUILD laptop-mode-tools-1.55-r2.ebuild 1951 RMD160 37b98b01108b35a6797084ce0dcfe168461f9d58 SHA1 257c286f9c4f6b4eda600b36aca01e0516e4dab6 SHA256 e41415ebfc01c73cd2c03ff277a5739a96a8b980ff51fd755864cc0ed40577ba +MISC ChangeLog 9717 RMD160 725d21474b4b11ab7b1603bc61865439d0170856 SHA1 750b29fa947439267ce58db4db10bf48d7d96f46 SHA256 b5a2d283e4b978ce26da0b3836e4160f4e0be8204e08afb3f015e40176e5b48d MISC metadata.xml 258 RMD160 d5cfed30adbe41387b0e7f435ce781dc90044c9e SHA1 4b1b83d58d1410fdb64efbc4792abd7053fdbdfe SHA256 a0dfbea03e2ef7978a9fd258493d8d50af7520a99400eba9a44be12d7bbce192 diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.55-linux3-support.patch b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.55-linux3-support.patch new file mode 100644 index 000000000000..aab707aedc6f --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.55-linux3-support.patch @@ -0,0 +1,40 @@ +Add support for Linux 3.0 kernels + +Signed-off-by: Robin H. Johnson + +diff -Nuar --exclude '*~' laptop-mode-tools_1.55.orig//usr/sbin/laptop_mode laptop-mode-tools_1.55/usr/sbin/laptop_mode +--- laptop-mode-tools_1.55.orig//usr/sbin/laptop_mode 2010-05-26 08:54:44.000000000 -0700 ++++ laptop-mode-tools_1.55/usr/sbin/laptop_mode 2011-07-12 13:29:38.000000000 -0700 +@@ -496,6 +496,7 @@ + case "$KLEVEL" in + "2.4" ) ;; + "2.6" ) ;; ++ "3.0" ) ;; + *) + log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2 + exit 1 +diff -Nuar --exclude '*~' laptop-mode-tools_1.55.orig//usr/share/laptop-mode-tools/modules/laptop-mode laptop-mode-tools_1.55/usr/share/laptop-mode-tools/modules/laptop-mode +--- laptop-mode-tools_1.55.orig//usr/share/laptop-mode-tools/modules/laptop-mode 2010-05-26 08:54:44.000000000 -0700 ++++ laptop-mode-tools_1.55/usr/share/laptop-mode-tools/modules/laptop-mode 2011-07-12 13:29:20.000000000 -0700 +@@ -193,8 +193,8 @@ + set_sysctl /proc/sys/vm/laptop_mode 1 + set_sysctl /proc/sys/vm/bdflush "30 500 0 0 $AGE $AGE 60 20 0" + ;; +- "2.6") +- log "VERBOSE" "Adjusting 2.6 kernel parameters to enable laptop mode." ++ "2.6"|"3.0") ++ log "VERBOSE" "Adjusting $KLEVEL kernel parameters to enable laptop mode." + set_sysctl /proc/sys/vm/laptop_mode "$LM_SECONDS_BEFORE_SYNC" + set_sysctl /proc/sys/vm/dirty_writeback_centisecs "$AGE" + set_sysctl /proc/sys/vm/dirty_expire_centisecs "$AGE" +@@ -321,8 +321,8 @@ + log "VERBOSE" "Adjusting 2.4 kernel parameters to disable laptop mode." + set_sysctl /proc/sys/vm/bdflush "30 500 0 0 $U_AGE $B_AGE 60 20 0" + ;; +- "2.6") +- log "VERBOSE" "Adjusting 2.6 kernel parameters to disable laptop mode." ++ "2.6"|"3.0") ++ log "VERBOSE" "Adjusting $KLEVEL kernel parameters to disable laptop mode." + set_sysctl /proc/sys/vm/dirty_writeback_centisecs "$U_AGE" + set_sysctl /proc/sys/vm/dirty_expire_centisecs "$B_AGE" + set_sysctl /proc/sys/vm/dirty_ratio "$NOLM_DIRTY_RATIO" diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r2.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r2.ebuild new file mode 100644 index 000000000000..84bd8302afe5 --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r2.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r2.ebuild,v 1.1 2011/07/12 20:41:51 robbat2 Exp $ + +EAPI=2 +inherit eutils + +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="sys-apps/ethtool + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) + bluetooth? ( net-wireless/bluez ) + scsi? ( sys-apps/sdparm ) + sys-apps/hdparm" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + # Patching to avoid !sys-power/pm-utils depend wrt #327443 + epatch "${FILESDIR}"/${P}-pm-utils-1.4.0.patch + # Add support for Linux3 + epatch "${FILESDIR}"/${P}-linux3-support.patch +} + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + ACPI="$(use acpi && echo force || echo disabled)" \ + PMU="$(false && echo force || echo disabled)" \ + APM="$(use apm && echo force || echo disabled)" \ + ./install.sh || die + + dodoc Documentation/*.txt README || die + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + # Commented out to avoid !sys-power/pm-utils depend wrt #327443 + # exeinto /etc/pm/power.d + # newexe "${FILESDIR}"/laptop_mode_tools.pmutils laptop_mode_tools + + keepdir /var/run/laptop-mode-tools +} + +pkg_postinst() { + if ! use acpi && ! use apm; then + ewarn + 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 /usr/share/doc/${PF}/laptop-mode.txt.gz for further" + ewarn "information." + ewarn + fi +} -- cgit v1.2.3-65-gdbad