diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-power |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-power')
247 files changed, 12173 insertions, 0 deletions
diff --git a/sys-power/acpi/Manifest b/sys-power/acpi/Manifest new file mode 100644 index 000000000000..e32577e95665 --- /dev/null +++ b/sys-power/acpi/Manifest @@ -0,0 +1,8 @@ +DIST acpi-1.6.tar.gz 92448 SHA256 ed61d20400c4fd3965dde9b49ab3ac74da02f8eca1a55454f7a1ac3fa1fd5c31 SHA512 29d9a59beaed119a48cb426807e6fc6c90597ced2b8b9be3356b1d763478174fc5a2824c64c66b742c0bc4ff54a9cc94224225b7978f00496f977422ec5f6ede WHIRLPOOL 1cc2fd06db0e91fe401e09e05280013a215393e43a129fe019ecbe28259bfa93eca79bb6618280cea002a134e9e823e1e8e9d0f93de5922282314be8f61d59bf +DIST acpi-1.7.tar.gz 100501 SHA256 d7a504b61c716ae5b7e81a0c67a50a51f06c7326f197b66a4b823de076a35005 SHA512 e6c96707d651eb20aa4a4c76f78891154d576ccdfaef08b5eff6094b90b62a0e97f6e35a4a996dcc3b5f0b57ee2c60542f41832039c6cbdf853ff3d022c1b609 WHIRLPOOL 3db63479189de0ef8ecefad1495e5ab0a3570649c64d2d41460a4ec60150b6f04ba39d1c1ed78b5061e4bda96770a40fc21d804cc8bcd92b73f64ab211fe0d17 +EBUILD acpi-1.6.ebuild 368 SHA256 36aea66d55be677d91c23f4b929b997a8e7007bb15ae5cfd9db96c1c67822ff1 SHA512 69786bc78cd8129231e8af181856a5665cdce7cea04bc7b762ddc26d84aa2c3e3657d557137661129fe6d0ea64bab8cd4098d35d20e261ec33cd3e4045e0d7d2 WHIRLPOOL 53ae2adfabb428c0f58284e7a4cfc9ba5149ac5162a0a4e52f4b528cb560f1b66740f6d0c977987a240efcc4bdf48566e64a0139444663c99b905607ac64cec2 +EBUILD acpi-1.7-r1.ebuild 371 SHA256 e9cfeff367a56c691da78fdd0ccf5a9f5b46840d7990d279232e3412c97505f5 SHA512 c11e2301e198289d7c3a65bbe65ae040c77d04a1e19aa02a1ceed3199c5a60d2133e42aa71d5f533f4dadbefc03ab055de0fca8541e48f8bc8d9110711fe7910 WHIRLPOOL 40d8fb604f51f4c06cf211eae6c3194a875d538404151ccd47cb01ed033de28f2d0023b896dc9bfdff2ea2a007efb02c33b484ddb126e52a85349acfee0c7c3a +EBUILD acpi-1.7.ebuild 370 SHA256 67bf19533919506fc97813453d575e7b9b1dd427f5e97d2a6b2eeca82d664551 SHA512 204bb916f93d7a751d78431db75bd6a7828115b0a1e50ecfef08118928b584acb1ef55c01324f37940e973dfd73e7c21ce8a18f6d6f46f7876eb131fedf3c5de WHIRLPOOL 38107866ec3c8ab9bbcc462625c6f34969caa18b8c4efb67d8d59e633776e77e4d07d99e586d5bd44f9bd52a158ee4b16029881b1c33f0601e005f6d914b09f9 +MISC ChangeLog 2788 SHA256 6283737b640fa5b03aa6f709e1f2826016ee08f4d8913243640fcb63ba29155d SHA512 3f5a20e55ffd816ff0a45289d36dcb244502295a66b479674ce98c7f24a827e0e38817974d5d2c35b531c742763480198c5639d93f1748b4f844e962d45062c9 WHIRLPOOL d21bf80dbdfb542f4ae122c4e00d667471b6f4ca92c6ba1ece1b3cc0fdb1191a91650df139da8c9b3581e340cc9f357f89a876e95a8401b910351e6973778806 +MISC ChangeLog-2015 2823 SHA256 29a20fd67ea174066e5c823138e66336d7c14ace746ad1ef331fb24a64eea6f1 SHA512 14fb02ea6fb9606f9793a99462d97a38e801c0c5e7830f8dc482167abae0dc0e50812addd6fce5cae9f3021eb782584b4e673e4644fef9b1501f2e4025bdd3f0 WHIRLPOOL a5f927afceab014b8cc3fadcc6986f1b6c5ff8856c4ef82953addc756c3a6f125025dbf1eb8c2ff6e78b5bb6893d57585156ea06fff36a83299ceb0c7e06dc57 +MISC metadata.xml 787 SHA256 df901afb81f7daa654c7486283285dc9fcf0639ea2d93dc9372cf0b23f6ea394 SHA512 f3176fa006cfd777c3a9ac5cd117f20e7f8e43ce5ff1919d939731a5cb106b6edb4f7bb8d5970a10082967d977a3aa5a22067b9e2e776a10586880dc794ba0b8 WHIRLPOOL dc54f13c2fe0f01457272cb7add82110cfdc6c4f22ee8fdc47823da4cd9a7d837e950821dbc8237b08771fdeefa6fa29f96be3758bf16c9a235fd99fd0cbf10a diff --git a/sys-power/acpi/acpi-1.6.ebuild b/sys-power/acpi/acpi-1.6.ebuild new file mode 100644 index 000000000000..c9040617f29a --- /dev/null +++ b/sys-power/acpi/acpi-1.6.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Displays information about ACPI devices" +HOMEPAGE="https://sourceforge.net/projects/acpiclient/" +SRC_URI="mirror://sourceforge/acpiclient/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DOCS="AUTHORS ChangeLog README" diff --git a/sys-power/acpi/acpi-1.7-r1.ebuild b/sys-power/acpi/acpi-1.7-r1.ebuild new file mode 100644 index 000000000000..cb6a3bcb269a --- /dev/null +++ b/sys-power/acpi/acpi-1.7-r1.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Displays information about ACPI devices" +HOMEPAGE="https://sourceforge.net/projects/acpiclient/" +SRC_URI="mirror://sourceforge/acpiclient/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_install() { + default + einstalldocs +} diff --git a/sys-power/acpi/acpi-1.7.ebuild b/sys-power/acpi/acpi-1.7.ebuild new file mode 100644 index 000000000000..986980eda154 --- /dev/null +++ b/sys-power/acpi/acpi-1.7.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Displays information about ACPI devices" +HOMEPAGE="https://sourceforge.net/projects/acpiclient/" +SRC_URI="mirror://sourceforge/acpiclient/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DOCS="AUTHORS ChangeLog README" diff --git a/sys-power/acpi/metadata.xml b/sys-power/acpi/metadata.xml new file mode 100644 index 000000000000..a1fc90f12a32 --- /dev/null +++ b/sys-power/acpi/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 type="person"> + <email>axelgenus@gmail.com</email> + <name>Alessandro Calorì</name> + <description>Proxied maintainer; set to assignee in all bugs</description> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">acpiclient</remote-id> + </upstream> + <longdescription lang="en"> + Attempts to replicate the functionality of the 'old' apm command + on ACPI systems, including battery and thermal information. Does not + support ACPI suspending, only displays information about ACPI devices. + </longdescription> +</pkgmetadata> diff --git a/sys-power/acpi_call/Manifest b/sys-power/acpi_call/Manifest new file mode 100644 index 000000000000..fbf303dc643b --- /dev/null +++ b/sys-power/acpi_call/Manifest @@ -0,0 +1,10 @@ +AUX acpi_call-1.1.0-linux-3.17.patch 607 SHA256 957713bcd5e0521bdc06418d43ca775c5af55a098eff6228cf5d528bb2b7cfdb SHA512 dec605256d0eab24542e550abec19ba64bc49c58ab84f23593f1cd835cd0db8e2da89fa7020881501ef7a4f4a00dc04c116f77fc70e0c1036554055272ed2137 WHIRLPOOL bb7bf796fc3fb0ed15f79e2739a79cc673aaabccbbd99c383bb01ae987af7e39e77bacb219a813e8671c6e79ff3c2490d80d6556b366f3b982fcbd0adcabcb69 +AUX acpi_call-1.1.0-linux-4.12.patch 315 SHA256 e6408423322c7556c53020286037271c1c856cdd801d1c29223187e2e4bcb158 SHA512 ce8d7c04508eb396c8633376cf21dcbfb9b7ec6110143666300ab66e1d30563b4e687d07a86dfe92566dd8be47ac43f295e7244317bdc12449b6426048edac4f WHIRLPOOL 6eb68a48d0640795562fa89c29f0e8459434a2d9a3a62b737b4844f424d3cb619c739954b95deb977a77282446e96df182f139e5d12fbefb529d114fea3f5bb6 +DIST acpi_call-1.1.0.tar.gz 10470 SHA256 d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0 SHA512 d5cf13c15f9057e3a27aaacfee6dcdb17b6a79194bdc8fd57b8140c07a532e2e58151bea881aa158c1183ac3bbe89f83fcfc2279ffd9e945a72331b6ddbf2c70 WHIRLPOOL 9cfc9e8a9b21e712eb21ee2e708e9f1825f5ad19ddfc292e9b0c9e126b7841114f9e6bee2716bc58094a71a7cb231cdc70943cf33b2a5d8c15bd477af0abe849 +EBUILD acpi_call-1.1.0-r1.ebuild 779 SHA256 1aacbf8ce47b39391e9d58acbda32a17ce987a4337c01ef2a93195350c08817a SHA512 164f8346a983c6b7c525dbc8206d5e0a51f4f3316b4efcd55cca2c884000967e4ea63280e182ca6512b8e69698e6af71f709ad4e3c64d5d7199dbd4b8bdc2245 WHIRLPOOL 40abcd5cad91922c3553db790441f0e82ae2d516fc49e501765ea1070540dd124cc24dc4f3bf6faa6e14f461a2e10053ce81e7937f393a1549026e0eeb89b671 +EBUILD acpi_call-1.1.0-r2.ebuild 797 SHA256 bfa508a756370c0ad943e02f21ade5ad8df5ba3f5cc3bc4fb6a01072f598ea59 SHA512 299ca53d3f99eb09a031d928373a394965e9bb48fbc850f3b96c26f7495fa6a6f51ace7fa6061f41179f63071ad6628a80ce35e4626ba4fb6f65a98248edf129 WHIRLPOOL ab68dc7d6de9536f6311e9cbefd474b4c296e0e2e6102816621511120f947ae6005c2f89f18a9db6696eb33196ca5e79c34cccb13bef2b5196bde7b6fd7f2d65 +EBUILD acpi_call-1.1.0.ebuild 710 SHA256 f46ff287427462fc2dcaa75b3cca20ca6f54a748280fd4eae63e2c0ea9394b5c SHA512 bf3759f82e75bf3f7bdd3d5f208d5f57ebde4a6f1991b1945a6373185ec47c3723fd7edba0f0fa6f18d9e32cd0182996397e3a39dfc3c5387afca32c2f24e206 WHIRLPOOL 6afcfcc7eef49581fbe9c5b54458c433a8a6b2b493a375e44f0d43f5eb6ab6c700561c2c9455fc3638f49ebff4b6693bc46c01d8d571178687e0f3e48e86c122 +EBUILD acpi_call-9999.ebuild 710 SHA256 f46ff287427462fc2dcaa75b3cca20ca6f54a748280fd4eae63e2c0ea9394b5c SHA512 bf3759f82e75bf3f7bdd3d5f208d5f57ebde4a6f1991b1945a6373185ec47c3723fd7edba0f0fa6f18d9e32cd0182996397e3a39dfc3c5387afca32c2f24e206 WHIRLPOOL 6afcfcc7eef49581fbe9c5b54458c433a8a6b2b493a375e44f0d43f5eb6ab6c700561c2c9455fc3638f49ebff4b6693bc46c01d8d571178687e0f3e48e86c122 +MISC ChangeLog 2810 SHA256 0322cc4b3fb80d81dbd3b76a38e2375bef59f5b3f53a7a88f71223b61230ba5a SHA512 bcd4bba1844687c5a829421bde07bac21cf8ecf9c785c9221ba359159ec13b4f5ebec8940ee4602ff2cddfb391b796f4d6d7e7e235035c77902518ec4639a00d WHIRLPOOL 95c34afa56f29751a95b59c96861d3bd00887b70cd48177e45771f60ac8168887789f582019d507ab7865b8f2e5be75d715fb58024274a34841c364f5dde717b +MISC ChangeLog-2015 1410 SHA256 01cad6f333e7ee5b64bf817e6a267fd5bf9f59c5d4848af691b812481fb9c262 SHA512 57d3769a45b47f67f8e1a7025293b1ac54a03c0bce8805a1c6eeda654787d6c13ee9e5e490fa8fadf0ca7654491fa7119f83331646fd3349812f1b818685ca77 WHIRLPOOL 3c186037e75d8b28b3f097f6f2fe1975b11801a9b7fb8359a02fba71aa59bf29affe79257b98d508706b855884107a8793400978f7afbf6169a5e7307e5576fe +MISC metadata.xml 303 SHA256 d2e40557b09963b08b6a5659bed70d0c41efafe85e99983ffb1103b42b216545 SHA512 ac96ee0d022c1b7f7e0e2d3823469ab00da1caa680607e634620382f0da3a114ddde2955f1ba173ffb074ccaa90030ee41022273a1f37678ec9ab62f9588b114 WHIRLPOOL e73392124f2f85fe7cb927aa7b62322791ea49789d25aab42bc7ad5940b54f31c71cfb9ce7969e8702989305c924184863cfd74873b74ecd5de3d9dcf1b68226 diff --git a/sys-power/acpi_call/acpi_call-1.1.0-r1.ebuild b/sys-power/acpi_call/acpi_call-1.1.0-r1.ebuild new file mode 100644 index 000000000000..b3f3963c65cf --- /dev/null +++ b/sys-power/acpi_call/acpi_call-1.1.0-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils linux-info linux-mod + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="https://github.com/mkottman/acpi_call.git" + KEYWORDS="" +else + inherit vcs-snapshot + SRC_URI="https://github.com/mkottman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="A kernel module that enables you to call ACPI methods" +HOMEPAGE="https://github.com/mkottman/acpi_call" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +CONFIG_CHECK="ACPI" +MODULE_NAMES="acpi_call(misc:${S})" +BUILD_TARGETS="default" + +src_prepare(){ + epatch "${FILESDIR}/${P}-linux-3.17.patch" +} + +src_compile(){ + BUILD_PARAMS="KDIR=${KV_OUT_DIR} M=${S}" + linux-mod_src_compile +} diff --git a/sys-power/acpi_call/acpi_call-1.1.0-r2.ebuild b/sys-power/acpi_call/acpi_call-1.1.0-r2.ebuild new file mode 100644 index 000000000000..711fd3f5d64d --- /dev/null +++ b/sys-power/acpi_call/acpi_call-1.1.0-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info linux-mod + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="https://github.com/mkottman/acpi_call.git" + KEYWORDS="" +else + inherit vcs-snapshot + SRC_URI="https://github.com/mkottman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="A kernel module that enables you to call ACPI methods" +HOMEPAGE="https://github.com/mkottman/acpi_call" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +CONFIG_CHECK="ACPI" +MODULE_NAMES="acpi_call(misc:${S})" +BUILD_TARGETS="default" + +PATCHES=( + "${FILESDIR}/${P}-linux-3.17.patch" + "${FILESDIR}/${P}-linux-4.12.patch" +) + +src_compile(){ + BUILD_PARAMS="KDIR=${KV_OUT_DIR} M=${S}" + linux-mod_src_compile +} diff --git a/sys-power/acpi_call/acpi_call-1.1.0.ebuild b/sys-power/acpi_call/acpi_call-1.1.0.ebuild new file mode 100644 index 000000000000..a2501dc4df20 --- /dev/null +++ b/sys-power/acpi_call/acpi_call-1.1.0.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit linux-info linux-mod + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="https://github.com/mkottman/acpi_call.git" + KEYWORDS="" +else + inherit vcs-snapshot + SRC_URI="https://github.com/mkottman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="A kernel module that enables you to call ACPI methods" +HOMEPAGE="https://github.com/mkottman/acpi_call" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +CONFIG_CHECK="ACPI" +MODULE_NAMES="acpi_call(misc:${S})" +BUILD_TARGETS="default" + +src_compile(){ + BUILD_PARAMS="KDIR=${KV_OUT_DIR} M=${S}" + linux-mod_src_compile +} diff --git a/sys-power/acpi_call/acpi_call-9999.ebuild b/sys-power/acpi_call/acpi_call-9999.ebuild new file mode 100644 index 000000000000..a2501dc4df20 --- /dev/null +++ b/sys-power/acpi_call/acpi_call-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit linux-info linux-mod + +if [ "${PV}" = "9999" ]; then + inherit git-2 + EGIT_REPO_URI="https://github.com/mkottman/acpi_call.git" + KEYWORDS="" +else + inherit vcs-snapshot + SRC_URI="https://github.com/mkottman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="A kernel module that enables you to call ACPI methods" +HOMEPAGE="https://github.com/mkottman/acpi_call" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +CONFIG_CHECK="ACPI" +MODULE_NAMES="acpi_call(misc:${S})" +BUILD_TARGETS="default" + +src_compile(){ + BUILD_PARAMS="KDIR=${KV_OUT_DIR} M=${S}" + linux-mod_src_compile +} diff --git a/sys-power/acpi_call/files/acpi_call-1.1.0-linux-3.17.patch b/sys-power/acpi_call/files/acpi_call-1.1.0-linux-3.17.patch new file mode 100644 index 000000000000..0db7d37e2fa6 --- /dev/null +++ b/sys-power/acpi_call/files/acpi_call-1.1.0-linux-3.17.patch @@ -0,0 +1,26 @@ +From c5b7a4bf93a28e6ce68beb54b48d3745db943e54 Mon Sep 17 00:00:00 2001 +From: Christoph Junghans <junghans@gentoo.org> +Date: Mon, 27 Oct 2014 21:57:10 -0600 +Subject: [PATCH] fix build with linux-3.17 + +https://bugs.gentoo.org/show_bug.cgi?id=524614 +--- + acpi_call.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/acpi_call.c b/acpi_call.c +index 3025d97..fa4f2c6 100644 +--- a/acpi_call.c ++++ b/acpi_call.c +@@ -6,7 +6,7 @@ + #include <linux/proc_fs.h> + #include <linux/slab.h> + #include <asm/uaccess.h> +-#include <acpi/acpi.h> ++#include <linux/acpi.h> + + MODULE_LICENSE("GPL"); + +-- +2.0.4 + diff --git a/sys-power/acpi_call/files/acpi_call-1.1.0-linux-4.12.patch b/sys-power/acpi_call/files/acpi_call-1.1.0-linux-4.12.patch new file mode 100644 index 000000000000..ef9fde9f2958 --- /dev/null +++ b/sys-power/acpi_call/files/acpi_call-1.1.0-linux-4.12.patch @@ -0,0 +1,10 @@ +--- acpi_call-1.1.0.orig/acpi_call.c 2017-07-03 22:44:38.111270788 +0200 ++++ acpi_call-1.1.0/acpi_call.c 2017-07-03 22:44:31.010270815 +0200 +@@ -6,6 +6,7 @@ + #include <linux/proc_fs.h> + #include <linux/slab.h> + #include <asm/uaccess.h> ++#include <linux/uaccess.h> + #include <linux/acpi.h> + + MODULE_LICENSE("GPL"); diff --git a/sys-power/acpi_call/metadata.xml b/sys-power/acpi_call/metadata.xml new file mode 100644 index 000000000000..3e6c789e7835 --- /dev/null +++ b/sys-power/acpi_call/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 type="person"> + <email>maksbotan@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">mkottman/acpi_call</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/acpid/Manifest b/sys-power/acpid/Manifest new file mode 100644 index 000000000000..e837d30d3078 --- /dev/null +++ b/sys-power/acpid/Manifest @@ -0,0 +1,18 @@ +AUX acpid-1.0.4-default 663 SHA256 2b18111978043d68848983a54dfc946dd9b9b15592d0f4dc33491599dbe24b23 SHA512 817c971371046bdac72c644eed508b17fe524007f0cf360198d2649bc80254a0b127def0f6442288432ea2fb822b42299324507711feb13dd14a29e9315e9238 WHIRLPOOL 53b617a76c7a0716f1768789009ed0eca57b8b24e7e8f435d4cbb4cd6b1e201c1e28355c873893d73cbfcb0cb0f9091c438989016dc85c06f8df965307659842 +AUX acpid-1.0.6-default.sh 1231 SHA256 37079c125004cc7b66debc8021eb53b4b1dbcebd03f5dc213b4bbab34a1c1b01 SHA512 25629153eb97d7dc60d9a2b3a40fb7c22d4dd8ff84bbe5431230b70660d6ad8efb43976be062ac581b796f7e515722c67f8875a3aaa5f460a1172580dcac3d14 WHIRLPOOL 9e70f931c85c726f9ad8c7ae7498d40659d23f9d6d154893b7a2694e9ed68ea25c6e983662e5e92aada5a1ee373dfb5c78675746e53f4eb78f69010a8b743c3f +AUX acpid-2.0.16-conf.d 153 SHA256 3755d4eb8bb64a1304e5defedb949305ac550565da36fe4f94d5f31beee821ba SHA512 518cb397b2aa63b893ead1be08f32fe436d19b72663dee66834cfbc112b003333f0df8b9e4f1ffe64b813783f657d3fe8b9a0c5e992d5665583357e68b266705 WHIRLPOOL bc6e88e3558869e493725d3381633b2943f5fb0047f4157b847d02d54560df25e52b95d1e2899e3ac6f20bb405456e12866236265f77769184b9825cafa6f659 +AUX acpid-2.0.16-init.d 469 SHA256 b9c53d78bee4eb726babb027831ad339ac06df1e7095cefa4d23fbbce7f59a42 SHA512 f7c1c8f2f71b587c7c215f217283ae47c673eca3ccbcbc0b9a48699b2619e36d8f51d0986af4980b337692f7bfbbc491be592484ced6c4dfdacbf7642eb0ae34 WHIRLPOOL 4a845df3b4f6402b1e41f94b9cc8b107735e2f86920ee2a594bbf7e3671325fc727e8526854ba74a23d05a4c59ece5dd161f6b476f0dd48bd67d2aac27bec42d +AUX acpid-2.0.25-add_mate-power-manager.patch 461 SHA256 618c0ea6f04753a0c3a68385199083272043b22951acd4e8b7edd8f1cb0e888e SHA512 faee772d2ba8e26d249d2fc9a7c9e1825383f82a1b90294581d315ffab413b67de2aee1887ee21fa6f9b782da988fb7261cd99505ae682024aaf5972669204ab WHIRLPOOL 8b92e6807e07e1c6c931fc3b313ebd1817098909898a006c290832e98db225f7fc4814a951f11810176fccd8c59e42d5f3581cedae8029e780548bc01c5021b7 +AUX acpid-2.0.25-kde4.patch 1015 SHA256 4599856ab4f7024a90c8a7808e441fb9e799d91ac0219691271c69c8f7d69e7e SHA512 a619743a0e05948f368b1a884c06317be8434dd5d9ffa47571ce541e180cf938a6c4846f93ca6255243bddcce91be40d3c0efecf399a087f747a49136b1d3ab1 WHIRLPOOL 0840e93bcf3c63b591e5ec6f57c50d5bc47f877b5845c45c2aa7bfd9df75f37a9f67402a1c04e2a66c1d1cfe558df2503bac91c0c75e395e4b142339a0f06f46 +AUX acpid-2.0.26-init.d 436 SHA256 5dcf5721a129b3782c13fc453853c390c34e2ad4ee00706388ce014454b063ee SHA512 7381d30b5c6478cdbf5dff93ae95baa0b3b1fe0a04b02cf491831f1657d6f71b8eef121b7e78f3201d11a5856bfb30df0a57437c76e6fbe05ad88cd45e86ae64 WHIRLPOOL 60a91ff9ebccb1d1728ded7a6f028217ee2f4e8543c2b249460735f9d82b2902631c1f4834942b52118fd28a15235e9a7ccca31fa09deb21d37e1abac72a762f +AUX systemd/acpid.service 155 SHA256 93edfc49425ed60a4355d85b2c23ad5b0968e90fdf977edb06a20d49f9bd9028 SHA512 51c1e2a10968bd6555debf237c064dec7a347a5adfe0e8612e9ad49168e727d0779744ae8c2842b2e943dd46ab310343aeebb9eb6c9e85cb77123d966e8561b1 WHIRLPOOL 0cbbd618f6e3ac0e4b63d634095d84722caaa84e946b4f1e7036bff9ac05f45e23a8aa9f6101968c2c5af5ed29f1a9c420b7dd2271da3e59d9ecc9d04614f64e +AUX systemd/acpid.socket 119 SHA256 a6ea89749651e38ba79598d286fd252dc814461a2cb3ceba14c25a4d6aa10bc4 SHA512 9a8293166b3818255d39d972dd354e675d23e4d59fb4ce3a8b5dedbf33e809f808ae3020f308426ba8d9d1317396727edc5be5bf51a7a30bc40c809442c96c0a WHIRLPOOL 81dcdb288bc86b97035da911a102b2627b4573302e9dd98076cb4eb41ada564f6ef6751f4b863a54e97f2266010d29afa79ab3ada094a68bdd57b0e96921c507 +DIST acpid-2.0.23.tar.xz 154504 SHA256 4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee SHA512 b2f01f04a9c5370608016c16ecfbc5b503170c2686e6557ab1463e25d56a3ef1d2093d4701205ec1261564b1073653b404d0ae278c0bd8c8496606be1785963f WHIRLPOOL b9c7d4d64e663ffb9c58d2129b4f599453b4da0111b244269cf89ca50cc2de7ecdbea361825724963ee0b93294cadde12dee06c4816f5b709a23e7d443df0afd +DIST acpid-2.0.27.tar.xz 155012 SHA256 820c223e53cc11d9d7229fb1ffc2c2205f1054082c80f83f5a4ec4df16d3a616 SHA512 0633f494b7f8cfd362f8baad9c69508acb650ea6545a59e6ec572aef610244341ea851084c737ede4bfcf8822431ac01e4b90f5e505cb838683296749307c22f WHIRLPOOL 9698daa35db7cc63b5fce1cdd310f9b3019b91e89793cfd565aa146e8f26856ad9b4e198117280bf6a2d06f1425926ade7127b027af3e3475256b2c4ab5f5b44 +DIST acpid-2.0.28.tar.xz 156036 SHA256 980c3a54b0d3f2fd49fd845a0584c5c2abeaab9e9ac09fcbb68686bbb57a7110 SHA512 effe9c3b30b4a6ea20eca4b36a06d4b3da9b262d100685958faec4b38f89377a87dcaecee7a69b87aaddfa47688bcc46fc47a38391ac4bd2019cb3b48ab18fcb WHIRLPOOL 90e3586b0f261d3fcdad6436f554144f29da1c30577b0232c2df022d148c65c4b0235cd9bc8719781087fa5d5892d89b18a6fdfe986d2849d522dfb9ceda6190 +EBUILD acpid-2.0.23.ebuild 1781 SHA256 52b2bf0b21fc435ac4097b3f760a7c9b2c631439f25efdc94ef0e03efcf5eafd SHA512 db3aab684c4282cdd4d28bc4a1c8468cf375800e29d7a89ec771a0f9a2e909a4956254d87a3c07ce9ca9a18022cbf714bfc71aa6763e1e1ea6a0edea2716f97b WHIRLPOOL fe88eff1b20048780b0054dfa3369472c1839508045b732ab3adbf76ea9f6a2447c10b45c0b660123e5ee76ce83adb74546527ca0bf586671390c49827a3c845 +EBUILD acpid-2.0.27.ebuild 1848 SHA256 49c023a7bf9e6b2485a5b44c484dd0296f563dc83ea2eff1ff6372e0912ca9bb SHA512 27e2050ec71f5e21045dbe27cded18b3c9666e4f7d914d254b025c5797a98406345dd97ba9fabd727db2ed3475fbd51f4eb21c50f4c298a4179875f48af43068 WHIRLPOOL 07cae4caa80a57e86d05942313d412f98dbff58eff0262bb6fcdce83d5bb67c18952d7eea311156da8c9adf0c3c1e1891bce4c7df1c84af1262f155c71a00c90 +EBUILD acpid-2.0.28.ebuild 1848 SHA256 5d124fb0723d8ab4471609aff7baba9df3abcfb7aaab51d22fe2f336a24b407d SHA512 bf95f7a34b85e83b22c934bfcbb353a17041f0f93c11dd2eabe21c59dadf01ce02a7fdca9cf3ceb43e6ea6e6e057874b4a0c09cfb998c026785f2c80b9082da2 WHIRLPOOL aa2dae349c44a6c0c66e19e179b9ef91fdeff859b9b84fcd6842c73183e1ef94960e779d23d9e4e502f89898ca56cc855b5829ebeccded468b03b0aa6caf1c63 +MISC ChangeLog 4804 SHA256 a6901538f564839ea7e89bebcffbd5a79addc82ebbb9c774f579a074741a8612 SHA512 a876963a2997dabbe91dfbbdbac0f46fe8eea233fd0fc388b905000be2255dd2d18d92444dbf92c6a773af87ad38f2237587729907d653be9d649202ac63557a WHIRLPOOL dc4c439d16391a10bd79843252a2868cc72fb504e7a9ba3d07d2f952ef65d18cddb20299ce1adf18081642847860ee45835a540781ae5298bb3572eb663d4c3e +MISC ChangeLog-2015 20996 SHA256 598ccea2f5834229ff0b53f0d3c702614ee3b12c153b734d5dbe170d72f92f39 SHA512 49fb25b989ec63bb7d56aa02cdfe2d89f6283e485740cf7304e735d617816cdcf1387402e12034ecfae3c8fd40e0193e5255acb7ca5715cabec10276ee2f9bd3 WHIRLPOOL 02209ff1c57d4582f7604e0efc36e4369d5b25d6b8d7f63554afc26c5db7e2561c4b07d2ca7541a7ae8aaa7c59e42556c4740755d8c67cdf1b61ba6a5993e6dc +MISC metadata.xml 325 SHA256 23d0fb33e95356f48defcf9d9c9662ee2a2bd32f32cb362679dacc20cfddfdb6 SHA512 0d624100b483b02a7dfa77048c4ca53a3cf22832fde166eee5a87374f2a4c1b655eae57b9b8b3b472a5603f7ca9b8353d00e619a14e618a6a097ffb179f6adf3 WHIRLPOOL 46be7ec7c2de80b33ee4d5e97350d1e0ff9f4c18b25935e3565f28a807edba9adb2352ec6b8f12d0eab5b367d066e8f4c1b449914ecd298ba4efb62b1340152e diff --git a/sys-power/acpid/acpid-2.0.23.ebuild b/sys-power/acpid/acpid-2.0.23.ebuild new file mode 100644 index 000000000000..e81b43464451 --- /dev/null +++ b/sys-power/acpid/acpid-2.0.23.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit linux-info systemd + +DESCRIPTION="Daemon for Advanced Configuration and Power Interface" +HOMEPAGE="https://sourceforge.net/projects/acpid2" +SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ia64 x86" +IUSE="selinux" + +RDEPEND="selinux? ( sec-policy/selinux-apm )" +DEPEND=">=sys-kernel/linux-headers-3" + +pkg_pretend() { + local CONFIG_CHECK="~INPUT_EVDEV" + local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support." + [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config +} + +pkg_setup() { :; } + +src_configure() { + econf --docdir=/usr/share/doc/${PF} +} + +src_install() { + emake DESTDIR="${D}" install + + newdoc kacpimon/README README.kacpimon + dodoc -r samples + rm -f "${D}"/usr/share/doc/${PF}/COPYING || die + + exeinto /etc/acpi + newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh + exeinto /etc/acpi/actions + newexe samples/powerbtn/powerbtn.sh powerbtn.sh + insinto /etc/acpi/events + newins "${FILESDIR}"/${PN}-1.0.4-default default + + newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN} + newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN} + + systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket} +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog + elog "You may wish to read the Gentoo Linux Power Management Guide," + elog "which can be found online at:" + elog "https://wiki.gentoo.org/wiki/Power_management/Guide" + elog + fi + + # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket + mkdir -p "${ROOT%/}"/run + + if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then + echo + ewarn "You should reboot the system now to get /run mounted with tmpfs!" + fi +} diff --git a/sys-power/acpid/acpid-2.0.27.ebuild b/sys-power/acpid/acpid-2.0.27.ebuild new file mode 100644 index 000000000000..fe7a205ccae4 --- /dev/null +++ b/sys-power/acpid/acpid-2.0.27.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit linux-info systemd + +DESCRIPTION="Daemon for Advanced Configuration and Power Interface" +HOMEPAGE="https://sourceforge.net/projects/acpid2" +SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ia64 x86" +IUSE="selinux" + +RDEPEND="selinux? ( sec-policy/selinux-apm )" +DEPEND=">=sys-kernel/linux-headers-3" + +pkg_pretend() { + local CONFIG_CHECK="~INPUT_EVDEV" + local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support." + [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config +} + +pkg_setup() { :; } + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.25-kde4.patch #515088 + "${FILESDIR}"/${PN}-2.0.25-add_mate-power-manager.patch #538590 +) + +src_install() { + emake DESTDIR="${D}" install + + newdoc kacpimon/README README.kacpimon + dodoc -r samples + rm -f "${D}"/usr/share/doc/${PF}/COPYING || die + + exeinto /etc/acpi + newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh + exeinto /etc/acpi/actions + newexe samples/powerbtn/powerbtn.sh powerbtn.sh + insinto /etc/acpi/events + newins "${FILESDIR}"/${PN}-1.0.4-default default + + newinitd "${FILESDIR}"/${PN}-2.0.26-init.d ${PN} + newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN} + + systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket} +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog + elog "You may wish to read the Gentoo Linux Power Management Guide," + elog "which can be found online at:" + elog "https://wiki.gentoo.org/wiki/Power_management/Guide" + elog + fi + + # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket + mkdir -p "${ROOT%/}"/run + + if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then + echo + ewarn "You should reboot the system now to get /run mounted with tmpfs!" + fi +} diff --git a/sys-power/acpid/acpid-2.0.28.ebuild b/sys-power/acpid/acpid-2.0.28.ebuild new file mode 100644 index 000000000000..766c975e51a1 --- /dev/null +++ b/sys-power/acpid/acpid-2.0.28.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit linux-info systemd + +DESCRIPTION="Daemon for Advanced Configuration and Power Interface" +HOMEPAGE="https://sourceforge.net/projects/acpid2" +SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ia64 x86" +IUSE="selinux" + +RDEPEND="selinux? ( sec-policy/selinux-apm )" +DEPEND=">=sys-kernel/linux-headers-3" + +pkg_pretend() { + local CONFIG_CHECK="~INPUT_EVDEV" + local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support." + [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config +} + +pkg_setup() { :; } + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.25-kde4.patch #515088 + "${FILESDIR}"/${PN}-2.0.25-add_mate-power-manager.patch #538590 +) + +src_install() { + emake DESTDIR="${D}" install + + newdoc kacpimon/README README.kacpimon + dodoc -r samples + rm -f "${D}"/usr/share/doc/${PF}/COPYING || die + + exeinto /etc/acpi + newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh + exeinto /etc/acpi/actions + newexe samples/powerbtn/powerbtn.sh powerbtn.sh + insinto /etc/acpi/events + newins "${FILESDIR}"/${PN}-1.0.4-default default + + newinitd "${FILESDIR}"/${PN}-2.0.26-init.d ${PN} + newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN} + + systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket} +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog + elog "You may wish to read the Gentoo Linux Power Management Guide," + elog "which can be found online at:" + elog "https://wiki.gentoo.org/wiki/Power_management/Guide" + elog + fi + + # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket + mkdir -p "${ROOT%/}"/run + + if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then + echo + ewarn "You should reboot the system now to get /run mounted with tmpfs!" + fi +} diff --git a/sys-power/acpid/files/acpid-1.0.4-default b/sys-power/acpid/files/acpid-1.0.4-default new file mode 100644 index 000000000000..a07c1827f4e9 --- /dev/null +++ b/sys-power/acpid/files/acpid-1.0.4-default @@ -0,0 +1,19 @@ +# /etc/acpi/events/default +# This is the ACPID default configuration, it takes all +# events and passes them to /etc/acpi/default.sh for further +# processing. + +# event keeps a regular expression matching the event. To get +# power events only, just use something like "event=button[ /]power.*" +# to catch it. +# action keeps the command to be executed after an event occurs +# In case of the power event above, your entry may look this way: +#event=button[ /]power.* +#action=/sbin/init 0 + +# Optionally you can specify the placeholder %e. It will pass +# through the whole kernel event message to the program you've +# specified. + +event=.* +action=/etc/acpi/default.sh %e diff --git a/sys-power/acpid/files/acpid-1.0.6-default.sh b/sys-power/acpid/files/acpid-1.0.6-default.sh new file mode 100644 index 000000000000..8be6f3e1a9f4 --- /dev/null +++ b/sys-power/acpid/files/acpid-1.0.6-default.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# /etc/acpi/default.sh +# Default acpi script that takes an entry for all actions + +set $* + +group=${1%%/*} +action=${1#*/} +device=$2 +id=$3 +value=$4 + +log_unhandled() { + logger "ACPI event unhandled: $*" +} + +case "$group" in + button) + case "$action" in + power) + /etc/acpi/actions/powerbtn.sh + ;; + + # if your laptop doesnt turn on/off the display via hardware + # switch and instead just generates an acpi event, you can force + # X to turn off the display via dpms. note you will have to run + # 'xhost +local:0' so root can access the X DISPLAY. + #lid) + # xset dpms force off + # ;; + + *) log_unhandled $* ;; + esac + ;; + + ac_adapter) + case "$value" in + # Add code here to handle when the system is unplugged + # (maybe change cpu scaling to powersave mode). For + # multicore systems, make sure you set powersave mode + # for each core! + #*0) + # cpufreq-set -g powersave + # ;; + + # Add code here to handle when the system is plugged in + # (maybe change cpu scaling to performance mode). For + # multicore systems, make sure you set performance mode + # for each core! + #*1) + # cpufreq-set -g performance + # ;; + + *) log_unhandled $* ;; + esac + ;; + + *) log_unhandled $* ;; +esac diff --git a/sys-power/acpid/files/acpid-2.0.16-conf.d b/sys-power/acpid/files/acpid-2.0.16-conf.d new file mode 100644 index 000000000000..9aadb4cd814a --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.16-conf.d @@ -0,0 +1,6 @@ +# /etc/conf.d/acpid: config file for /etc/init.d/acpid + +# Options to pass to the acpid daemon. +# See the acpid(8) man page for more info. + +ACPID_ARGS="" diff --git a/sys-power/acpid/files/acpid-2.0.16-init.d b/sys-power/acpid/files/acpid-2.0.16-init.d new file mode 100644 index 000000000000..642d8008ccd4 --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.16-init.d @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +command="/usr/sbin/acpid" +command_args="${ACPID_ARGS}" +start_stop_daemon_args="--quiet" +description="Daemon for Advanced Configuration and Power Interface" + +depend() { + need localmount + use logger +} + +reload() { + ebegin "Reloading acpid configuration" + start-stop-daemon --exec $command --signal HUP + eend $? +} diff --git a/sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch b/sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch new file mode 100644 index 000000000000..7061744ed57e --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/538590 + +--- acpid-2.0.25/samples/powerbtn/powerbtn.sh ++++ acpid-2.0.25/samples/powerbtn/powerbtn.sh +@@ -51,7 +51,7 @@ + getXconsole + + # A list of power management system process names. +-PMS="gnome-power-manager kpowersave xfce4-power-manager" ++PMS="gnome-power-manager kpowersave xfce4-power-manager mate-power-manager" + PMS="$PMS guidance-power-manager.py dalston-power-applet" + + # If one of those is running or any of several others, diff --git a/sys-power/acpid/files/acpid-2.0.25-kde4.patch b/sys-power/acpid/files/acpid-2.0.25-kde4.patch new file mode 100644 index 000000000000..1a91bb945246 --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.25-kde4.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/515088 + +--- acpid-2.0.25/samples/powerbtn/powerbtn.sh ++++ acpid-2.0.25/samples/powerbtn/powerbtn.sh +@@ -57,7 +57,7 @@ + # If one of those is running or any of several others, + if pidof x $PMS > /dev/null || + ( test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon) || +- ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pidof kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pidof kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then ++ ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pgrep -n kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pgrep -n kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then + # Get out as the power manager that is running will take care of things. + exit + fi diff --git a/sys-power/acpid/files/acpid-2.0.26-init.d b/sys-power/acpid/files/acpid-2.0.26-init.d new file mode 100644 index 000000000000..f8076d43b0ab --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.26-init.d @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +command="/usr/sbin/acpid" +command_args="${ACPID_ARGS}" +description="Daemon for Advanced Configuration and Power Interface" + +depend() { + need localmount + use logger +} + +reload() { + ebegin "Reloading acpid configuration" + start-stop-daemon --exec $command --signal HUP + eend $? +} diff --git a/sys-power/acpid/files/systemd/acpid.service b/sys-power/acpid/files/systemd/acpid.service new file mode 100644 index 000000000000..e4ddacdbead7 --- /dev/null +++ b/sys-power/acpid/files/systemd/acpid.service @@ -0,0 +1,10 @@ +[Unit] +Description=ACPI event daemon +Requires=acpid.socket + +[Service] +ExecStart=/usr/sbin/acpid -f + +[Install] +WantedBy=multi-user.target +Also=acpid.socket diff --git a/sys-power/acpid/files/systemd/acpid.socket b/sys-power/acpid/files/systemd/acpid.socket new file mode 100644 index 000000000000..1b23f8735d48 --- /dev/null +++ b/sys-power/acpid/files/systemd/acpid.socket @@ -0,0 +1,8 @@ +[Unit] +Description=ACPID Listen Socket + +[Socket] +ListenStream=/var/run/acpid.socket + +[Install] +WantedBy=sockets.target diff --git a/sys-power/acpid/metadata.xml b/sys-power/acpid/metadata.xml new file mode 100644 index 000000000000..763c9efa4371 --- /dev/null +++ b/sys-power/acpid/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 type="person"> + <email>miska@gentoo.org</email> + <name>Michal Hrušecký</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">acpid2</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/acpilight/Manifest b/sys-power/acpilight/Manifest new file mode 100644 index 000000000000..a72f99b9633e --- /dev/null +++ b/sys-power/acpilight/Manifest @@ -0,0 +1,7 @@ +AUX acpilight.confd 269 SHA256 eb53ad14f9ae86dd8495721d44ddda11eb852b9a54c766f1fde7dc291cd56603 SHA512 28e513dbcaa30cec4d2f876c244766037eb6e94ff660ff2caf9cb955f40c710ea750cac73eb5e3890b42904227ccbd7f6c3e2595c2496e54d3339d6afdd0ffb0 WHIRLPOOL 7fb22f1e8050a466708bb45d3ef351166e363edfd226bcf0b89157f0b5ca1fddfe9d59afe559b18da994f38488ecca21d237a92941afb1bfcf212c672187c368 +AUX acpilight.initd 742 SHA256 194ce20b4b3a1d53dcd62a02dffca098bc4627536c7d3cdecad616a933e3281f SHA512 9fe648ea994eeb9baa294226b55bd6230cb2b28952f651755da622278539fc071527e3aa2425e26687bb8065ef2e372ab93d7090532dbf3208ccac8519f01fca WHIRLPOOL 40401099bcc4b87dd104a6d268351e6f254f197247d66ea1611e87bbcb1dfe625f0182efbc566798a083a018cec8b5145ed32bd50c098d7e5d23671649a738c3 +DIST acpilight-1.0.tar.gz 16452 SHA256 8c717b33632ba60898e68c953ebabb28c2d0b9b2bb44ad9762a39ecce8498f66 SHA512 f7913f7ebf6cbde95a42165d8bfa237be03d90fc097164b971c92721cc76f1260a6a607d85f3ecb05ec482019f0ed7f0827a473608daf39b0d05b37c1d228a8a WHIRLPOOL 56d8e43abf50f23343c692bc094e2e158f41986f887b0bc198612f3d0f58be4b6cb9a560aeb13e676775d316f3ab323997cc895fd9ce5a434ceb8ad96ed6ca2a +EBUILD acpilight-1.0-r1.ebuild 1381 SHA256 9e08595ff7e2fa5617c0fe10c483480c8e975084eeaa3e7edbe56cef380e0bca SHA512 7b0ce1dbe7cd84303de3ef85329475f802f1911341b27130c3981fdc5dfb943b87fb4686c658c20ef138cd7a70a0b3abcc5a87a3a07e427f9ee368f60d8c9654 WHIRLPOOL e5fc4c02f27218fccff3c07367ed7ff82112b483784aa185bcdd07db4863f7e78467d6b3bafab7620442cf38c0a575146a0ebdee3ae73f0b5b0611b4d1c0a9a9 +EBUILD acpilight-1.0.ebuild 1021 SHA256 e1dbb9fe938306008495cb35f55cefdf241f82f7aa39baf528b7264743efe8d0 SHA512 0a19078799a0342a52edb6aa2d5f30babd37d6a290cc69f91f810c1949fd78bb8564a0a6bb7ea1d24eb919d976b449225f2d76639790126551a816089cedaec1 WHIRLPOOL 623f0ba6be2615ef09605232454a5c367bee9eed76bc8a1e76b1170c1b072dbe044b3304c68ba0d1ca1d2dd034fc156ee92f4ae2a43222fac1cb20f18aeb674c +MISC ChangeLog 540 SHA256 1f8ce1420b54cebfb9d4b0361139c5899b87a1714c900923567b23dfd9034948 SHA512 b5e11865f0bfbfb4300cb1836a37a509edfa6c39d44bcf26e9c0fd411c087cfdb1d0b256245bbccf6cd965304a056190b5a2f0527528a9474a9eee2cbfa13543 WHIRLPOOL d281bb31f984b394820817fbdbbbf734ccbd3881b5ba2a8e847c4506ed3f2704a3dee6cb40ce0ac07b648c18a7a04813adc61a2dcd9c73c434aef7924a186fa7 +MISC metadata.xml 337 SHA256 3c36f7198ca0d08996a10462a97bb6d7730ddb3853590864a0ccf350d89f0fce SHA512 4f183fd6e3292302ca589c466292f6222e6980a72a11ff7b82fefc293d3d37902b79439f1f044ec44a88dfa5675f769b2f39e44005e57bfa3e1ed132ff451cd4 WHIRLPOOL fbadc483ac408a6f3abc3074990d79ac3bf8f2920b90ae7aa65de90e8fc9108b405f4481f3f88866ff0cfac705703d158b4ef94668002615d437e58c00646587 diff --git a/sys-power/acpilight/acpilight-1.0-r1.ebuild b/sys-power/acpilight/acpilight-1.0-r1.ebuild new file mode 100644 index 000000000000..8d128ac7d5f6 --- /dev/null +++ b/sys-power/acpilight/acpilight-1.0-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_4 python3_5 ) + +inherit python-r1 udev + +DESCRIPTION="Replacement for xbacklight that uses the ACPI interface to set brightness" +HOMEPAGE="https://github.com/wavexx/acpilight/" +SRC_URI="https://github.com/wavexx/acpilight/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="virtual/udev + ${PYTHON_DEPS} + !x11-apps/xbacklight" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +DOCS=( README.rst ) + +src_install() { + python_foreach_impl python_doscript xbacklight + udev_dorules "${S}"/90-backlight.rules + doman xbacklight.1 + einstalldocs + newinitd "${FILESDIR}"/acpilight.initd acpilight + newconfd "${FILESDIR}"/acpilight.confd acpilight +} + +pkg_postinst() { + udev_reload + einfo + elog "To use the xbacklight binary as a regular user, you must be a part of the video group" + einfo + elog "If this utility does not find any backlights to manipulate," + elog "verify you have kernel support on the device and display driver enabled." + einfo + elog "To take advantage of the init script, and automate the process of" + elog "saving and restoring the brightness level you should add acpilight" + elog "to the boot runlevel. You can do this as root like so:" + elog "# rc-update add acpilight boot" + einfo +} diff --git a/sys-power/acpilight/acpilight-1.0.ebuild b/sys-power/acpilight/acpilight-1.0.ebuild new file mode 100644 index 000000000000..5cad2efcab7f --- /dev/null +++ b/sys-power/acpilight/acpilight-1.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_4 python3_5 ) + +inherit python-r1 udev + +DESCRIPTION="Replacement for xbacklight that uses the ACPI interface to set brightness" +HOMEPAGE="https://github.com/wavexx/acpilight/" +SRC_URI="https://github.com/wavexx/acpilight/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="virtual/udev + ${PYTHON_DEPS} + !x11-apps/xbacklight" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +DOCS=( README.rst ) + +src_install() { + python_foreach_impl python_doscript xbacklight + udev_dorules "${S}"/90-backlight.rules + doman xbacklight.1 + einstalldocs +} + +pkg_postinst() { + udev_reload + einfo + elog "To use the xbacklight binary as a regular user, you must be a part of the video group" + einfo + elog "If this utility does not find any backlights to manipulate," + elog "verify you have kernel support on the device and display driver enabled." + einfo +} diff --git a/sys-power/acpilight/files/acpilight.confd b/sys-power/acpilight/files/acpilight.confd new file mode 100644 index 000000000000..ecb74eb7209f --- /dev/null +++ b/sys-power/acpilight/files/acpilight.confd @@ -0,0 +1,13 @@ +# RESTORE_ON_START: +# Restore brightness level when acpilight starts +# no - Do not restore state +# yes - Restore state + +RESTORE_ON_START="yes" + +# SAVE_ON_STOP: +# Save brightness level when acpilight stops +# no - Do not save state +# yes - Save state + +SAVE_ON_STOP="yes" diff --git a/sys-power/acpilight/files/acpilight.initd b/sys-power/acpilight/files/acpilight.initd new file mode 100644 index 000000000000..0de6029867e0 --- /dev/null +++ b/sys-power/acpilight/files/acpilight.initd @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +state_dir=/var/lib/acpilight + +extra_commands="save restore" + +depend() { + need localmount + after bootmisc modules isapnp coldplug hotplug +} + +restore() { + ebegin "Restoring brightness level" + if [ ! -r "${state_dir}/state" ] ; then + ewarn "No brightness level in ${state_dir}/state" + eend 0 + return 0 + fi + xbacklight "$(cat "${state_dir}/state")" + eend $? +} + +save() { + ebegin "Saving brightness level" + mkdir -p "${state_dir}" && xbacklight -get > "${state_dir}/state" + eend $? +} + +start() { + if [ "${RESTORE_ON_START}" = "yes" ]; then + restore + fi +} + +stop() { + if [ "${SAVE_ON_STOP}" = "yes" ]; then + save + fi +} diff --git a/sys-power/acpilight/metadata.xml b/sys-power/acpilight/metadata.xml new file mode 100644 index 000000000000..f5072a8cbd34 --- /dev/null +++ b/sys-power/acpilight/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 type="person"> + <email>grknight@gentoo.org</email> + <name>Brian Evans</name> + </maintainer> + <upstream> + <remote-id type="github">wavexx/acpilight</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/acpitool/Manifest b/sys-power/acpitool/Manifest new file mode 100644 index 000000000000..ba38f99e0153 --- /dev/null +++ b/sys-power/acpitool/Manifest @@ -0,0 +1,9 @@ +AUX acpitool-0.5.1-ac_adapter.patch 2259 SHA256 8761325c90dd4d10faeefd662f419ad5c4bc85aefc408506800596b49abef680 SHA512 b00dc0785a4773cb917b35287b92d95d480486dfe51ebf73269b6d95e33201200b88c8a628c56bbef694ac0446633042f486d70b79525621782a26f08b3e901f WHIRLPOOL b35f3f9dde2d238f8ff35d71420d8cd6da175d0fb732071ed73635c30e866b606216be1556640e605a8101f95eaabd58823a3de1dd847ac086e443ecf121ef6b +AUX acpitool-0.5.1-battery.patch 17336 SHA256 37190bbc61732809aea917c4568311b681b03808a7340da35df20690d1bbc5cb SHA512 3fcfc91947cfd4e37e26524044673886c2ca999f8626ab141683b51f7d56e2e3f97465cca99277a5b4d6afdf195477ae56560215d5bfa958e585ae7ab634ee2f WHIRLPOOL f87b829fb62c2bd8a52ce9fbb1b03d0963609ff1352d741a0985052a5dc5bd88d922f8e56bd86be3553bd956b4658fe98323c9c3c65aef1faecdb49c6527db63 +AUX acpitool-0.5.1-kernel3.patch 250 SHA256 fd9e112dfdf9ea4390d6da6df841542b98434a3d681f4efe5092d33a97826037 SHA512 64b53ac77dd61a6ab88c6d933840382e62cc650fa7cffd58ea21b76ea91766673242c5c85114486c19d86d680d90cbdd0009bf4c22543cfba8fd6744f2936cbd WHIRLPOOL 63ef13b1b3a237ff8d94cc7c36dd70e8f9f3a1ed7c08bc791de79b66c1c13a7db106eecacef7e8e14a299cc896f5faeca1ffe2b4c41205ae716a8537a895797d +AUX acpitool-0.5.1-wakeup.patch 2570 SHA256 e9d30451fe203c0392a8e4efac349aed83cff8f5cfc373fe5aaf68355b9f3c48 SHA512 792c1356b1b67853383b4c79cc234cd352b1ac88911960f4a48ecdac130f8d23478bc36506613420912539a40bcdd4f92f65ac594b6c7a9c59bd69243a619f18 WHIRLPOOL 6d883f2db11c5cf1b33813db0c61d49d71c4a65777887ce6ee3f4d1617de7955f97c26d87c2304bffd39ff289e3a5d8feddec4cc2852096925a5c6fcd15d6f73 +DIST acpitool-0.5.1.tar.bz2 109584 SHA256 004fb6cd43102918b6302cf537a2db7ceadda04aef2e0906ddf230f820dad34f SHA512 3e8684525b3dbe165b30507943beb975881a374ac3171fcfdf88098721fa3f751bfc161c3ac84180df1ae455673e0c0bc24fd06f0786911f15502effeeaab86b WHIRLPOOL bad79e2513d9c9c8225e6962e172e57eefe9bff35fc40ed2419e5c06e8ce8479363159c3b4c0f11ab671f2b4464afc855c67fee799ee1c70d669009f95c25b83 +EBUILD acpitool-0.5.1-r1.ebuild 585 SHA256 06a127ad344aed5be593aca30c5b8975ce1c8c1eadc27eb80945670563c75cce SHA512 4ec5eae9b5c99ea222879e8eb987da70d1d2211ee11555bbf756c838468ef4836c79e1bcf6698343dab868ef8bd7d941f6d8b27684d0db7a29e69a8acd921af7 WHIRLPOOL b4f0c2b520b1f245add1f36c376f7d3d8017a1bc11f942821670346f132837dd42310d986e429e832024a27dc6f5ca4cba4ee262b1e19db90704242ddd56e59d +MISC ChangeLog 2686 SHA256 5fa275d166aef4ad517c97056ecdc169afbc98d5798da095d743418b34af905a SHA512 067dfb8042601bf2cdf036d3e7834d647a85ff88f2b54eb96efe11beebaad707babd3583b08e5ecc7ea90fdf340c2fc24ff0a87b4bda648697694e3b1219c822 WHIRLPOOL 66508ee5ec491a8d93b5ddeef840b2111c01f63613fd96b0b5ab709b6f89c190b4efcf58489f88d4d9a0ba86e358799a73a5aa8f99527ff18ae0ba7d9c7467a9 +MISC ChangeLog-2015 5158 SHA256 a5fd2159adc572a8d2e2204cdd55f1940002ca912fd816ec4ad97e169c3ccc8d SHA512 0c3dbf239a0babb95b3029cb597bbe1de03c63bbdc14d66822f9432508e31ef2f194f12dcb6f9ddf7c10934096786f19ed35737fdbf5c705f856980ed2c38891 WHIRLPOOL 5a0ff6a1a21dd9d8ad47d502c2851ed93a4a1c9320d74f71b9f4c9ab85b73ecad944bcc60a155e2b379cdac1d8993def26dab195db9a64e4ab044e8a996e2593 +MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968 diff --git a/sys-power/acpitool/acpitool-0.5.1-r1.ebuild b/sys-power/acpitool/acpitool-0.5.1-r1.ebuild new file mode 100644 index 000000000000..825fc55d48e3 --- /dev/null +++ b/sys-power/acpitool/acpitool-0.5.1-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="A small command line application, intended to be a replacement for the apm tool" +HOMEPAGE="http://packages.debian.org/sid/acpitool" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DOCS="AUTHORS ChangeLog README TODO" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-ac_adapter.patch \ + "${FILESDIR}"/${P}-battery.patch \ + "${FILESDIR}"/${P}-kernel3.patch \ + "${FILESDIR}"/${P}-wakeup.patch +} diff --git a/sys-power/acpitool/files/acpitool-0.5.1-ac_adapter.patch b/sys-power/acpitool/files/acpitool-0.5.1-ac_adapter.patch new file mode 100644 index 000000000000..070fdf9de1b7 --- /dev/null +++ b/sys-power/acpitool/files/acpitool-0.5.1-ac_adapter.patch @@ -0,0 +1,73 @@ +Author: Michael Meskes <meskes@debian.org> +Description: Fix reading of ac_adapter information. + +--- src/ac_adapter.cpp ++++ src/ac_adapter.cpp +@@ -149,7 +149,7 @@ + int Do_AC_Info_Sys() + { + ifstream file_in; +- char filename[2][65], str[100], temp[100]; ++ char filename[2][65], str[100], temp[100], attr[100]; + int ac_count = 0, start = 0, findex = 0; + DIR *ac_dir; + char *name, *dirname; +@@ -206,31 +206,40 @@ + + if(ac_count>0) + { +- for(int i=0; i<ac_count; i++) /* I don't expect to find > 1, but you never know */ ++ for(int i=0, t=0; i<ac_count; i++) /* I don't expect to find > 1, but you never know */ + { + FILE *power_fp = fopen(filename[i], "r"); + if(power_fp) + { +- for(int t=0; t<5; t++) +- fgets(str, 100, power_fp); /* just skip the first 5 lines */ +- +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); ++ // see linux-2.6/drivers/power/power_supply_sysfs.c ++ // there can be different number of lines, so read up to 40 lines ++ for(; t<40; t++) ++ { ++ memset(str, '\0', 100); ++ fgets(str, 100, power_fp); + +- if (strlen(str)!=0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); ++ if (strlen(str)!=0) ++ { ++ memset(temp, '\0', 100); ++ memset(attr, '\0', 100); ++ sscanf(str, "%[^=]s %*s %[^\n]", attr); ++ sscanf(str, "%*[^=] %*c %s %[^\n]",temp); + +- /* keep this for debugging */ +- /* printf(" from Do_AC_SYS: temp = %s \n", temp);*/ +- +- if(strncmp(temp,"1",1)==0) +- printf(" AC adapter : online \n"); +- else +- printf(" AC adapter : off-line \n"); ++ /* keep this for debugging */ ++ /* printf(" from Do_AC_SYS: temp = %s \n", temp);*/ ++ ++ if (strcmp(attr, "POWER_SUPPLY_ONLINE") == 0) ++ { ++ if(strncmp(temp,"1",1)==0) ++ printf(" AC adapter : online \n"); ++ else ++ printf(" AC adapter : off-line \n"); ++ ++ break; ++ } ++ } + } +- else ++ if (t == 40) + printf(" AC adapter : <info not available> \n"); + } + else diff --git a/sys-power/acpitool/files/acpitool-0.5.1-battery.patch b/sys-power/acpitool/files/acpitool-0.5.1-battery.patch new file mode 100644 index 000000000000..76428ca7d970 --- /dev/null +++ b/sys-power/acpitool/files/acpitool-0.5.1-battery.patch @@ -0,0 +1,484 @@ +Author: Evgeni Golov <evgeni@debian.org>, Michael Meskes <meskes@debian.org> +Description: Fix reading of battery information. + +--- src/acpitool.h ++++ src/acpitool.h +@@ -39,6 +39,9 @@ + char Serial[13]; + char Bat_Type[13]; + char Voltage_Now[13]; ++ char Charge_Now[13]; ++ char Charge_Full[13]; ++ char Charge_Full_Design[13]; + }; + + +--- src/battery.cpp ++++ src/battery.cpp +@@ -107,6 +107,9 @@ + memset(Batt_Info[i]->Serial, '\0', 13); + memset(Batt_Info[i]->Bat_Type, '\0', 13); + memset(Batt_Info[i]->Voltage_Now, '\0', 13); ++ memset(Batt_Info[i]->Charge_Now, '\0', 13); ++ memset(Batt_Info[i]->Charge_Full, '\0', 13); ++ memset(Batt_Info[i]->Charge_Full_Design, '\0', 13); + + // initialize all struct members to blanks --> avoid rubbish in output // + +@@ -139,7 +142,12 @@ + case 1 : + { + Present_Batteries++; +- Remaining_Percentage = float(atoi(Batt_Info[i]->Remaining_Cap)) / float(atoi(Batt_Info[i]->LastFull_Cap)) * 100.0; ++ ++ if (strcmp(Batt_Info[i]->Charge_Now,"")!=0 && ++ strcmp(Batt_Info[i]->Charge_Now,"unknown")!=0) ++ Remaining_Percentage = float(atoi(Batt_Info[i]->Charge_Now)) / float(atoi(Batt_Info[i]->Charge_Full)) * 100.0; ++ else ++ Remaining_Percentage = float(atoi(Batt_Info[i]->Remaining_Cap)) / float(atoi(Batt_Info[i]->LastFull_Cap)) * 100.0; + + /* from Alan Pope : some broken Dell batteries report a remaining capacity bigger + than their last full capacity or their design capacity. This led acpitool to report +@@ -153,19 +161,24 @@ + else + Precision = 4; + +- if( strncmp(Batt_Info[i]->Charging_State,"char",4)==0 ) ++ if(strncasecmp(Batt_Info[i]->Charging_State,"char",4)==0) + { + Is_Charging = 1; + } + else + { +- if(strncmp(Batt_Info[i]->Charging_State,"disch",5)==0) Is_Discharging = 1; ++ if(strncasecmp(Batt_Info[i]->Charging_State,"disch",5)==0) Is_Discharging = 1; + } + + if(Show_Time) // calculate remaining or charging time only if present battery rate != 0 // + { +- if(Is_Charging) +- Remaining_Time = (float(atoi(Batt_Info[i]->LastFull_Cap)) - float(atoi(Batt_Info[i]->Remaining_Cap))) / float(atoi(Batt_Info[i]->Present_Rate)); ++ if(Is_Charging) { ++ if (strcmp(Batt_Info[i]->Charge_Now,"")!=0 && ++ strcmp(Batt_Info[i]->Charge_Now,"unknown")!=0) ++ Remaining_Time = (float(atoi(Batt_Info[i]->Charge_Full)) - float(atoi(Batt_Info[i]->Charge_Now))) / float(atoi(Batt_Info[i]->Present_Rate)); ++ else ++ Remaining_Time = (float(atoi(Batt_Info[i]->LastFull_Cap)) - float(atoi(Batt_Info[i]->Remaining_Cap))) / float(atoi(Batt_Info[i]->Present_Rate)); ++ } + else + Remaining_Time = float(atoi(Batt_Info[i]->Remaining_Cap)) / float(atoi(Batt_Info[i]->Present_Rate)); + // this represents hours // +@@ -180,9 +193,11 @@ + Minutes = Time_In_Seconds / 60; + Time_In_Seconds = Time_In_Seconds - (Minutes * 60); + } +- ++ + if(atoi(Batt_Info[i]->Design_Cap) > 0) + Battery_Left_Percent = float(atoi(Batt_Info[i]->LastFull_Cap)) / float(atoi(Batt_Info[i]->Design_Cap)) * 100.0; ++ else if(atoi(Batt_Info[i]->Charge_Full_Design) > 0) ++ Battery_Left_Percent = float(atoi(Batt_Info[i]->Charge_Full)) / float(atoi(Batt_Info[i]->Charge_Full_Design)) * 100.0; + else + Battery_Left_Percent = -1.0; + +@@ -207,8 +222,15 @@ + <<setfill('0')<<setw(2)<<Time_In_Seconds; + cout<<endl; + +- cout<<" Design capacity : "<<Batt_Info[i]->Design_Cap<<endl; +- cout<<" Last full capacity : "<<Batt_Info[i]->LastFull_Cap; ++ if(atoi(Batt_Info[i]->Design_Cap) > 0) ++ cout<<" Design capacity : "<<Batt_Info[i]->Design_Cap<<endl; ++ else if(atoi(Batt_Info[i]->Charge_Full_Design) > 0) ++ cout<<" Design capacity : "<<Batt_Info[i]->Charge_Full_Design<<endl; ++ ++ if(atoi(Batt_Info[i]->LastFull_Cap) > 0) ++ cout<<" Last full capacity : "<<Batt_Info[i]->LastFull_Cap; ++ else if(atoi(Batt_Info[i]->Charge_Full) > 0) ++ cout<<" Last full capacity : "<<Batt_Info[i]->Charge_Full; + + if(Battery_Left_Percent<100.0) + { +@@ -327,7 +349,7 @@ + + + +-int Get_Battery_Info_from_Proc(const int bat_nr, Battery_Info *bat_info, int verbose) ++int Get_Battery_Info_from_Proc(const int bat_nr, Battery_Info *batt_info, int verbose) + { + ifstream file_in; + char filename[4][65], str[100], temp[100]; +@@ -378,7 +400,7 @@ + { + if(!verbose) + { +- bat_info->Battery_Present = 2; // 2 represents error value // ++ batt_info->Battery_Present = 2; // 2 represents error value // + return 0; + } + else +@@ -422,24 +444,24 @@ + file_in.getline(str, 100); + strncpy(temp, str+25, 4); + if(strncmp(temp,"yes",3)==0) +- bat_info->Battery_Present = 1; //yes, we have a battery // ++ batt_info->Battery_Present = 1; //yes, we have a battery // + else + { +- bat_info->Battery_Present = 0; ++ batt_info->Battery_Present = 0; + return 0; //bail out if battery is not present // + } + + // then get the design capacity // + file_in.getline(str, 100); +- strncpy(bat_info->Design_Cap, str+25, 9); ++ strncpy(batt_info->Design_Cap, str+25, 9); + + // then get the last full capacity // + file_in.getline(str, 100); +- strncpy(bat_info->LastFull_Cap, str+25, 9); ++ strncpy(batt_info->LastFull_Cap, str+25, 9); + +- if (strncmp(bat_info->LastFull_Cap,"unknown",7)==0) ++ if (strncmp(batt_info->LastFull_Cap,"unknown",7)==0) + { +- bat_info->Battery_Present = 0; ++ batt_info->Battery_Present = 0; + return 0; //bail out if battery is not present // + } + /* some Dell laptops seem to report a 2nd battery as being present, while it is NOT, but then report the +@@ -449,21 +471,21 @@ + + // then get the technology // + file_in.getline(str, 100); +- strncpy(bat_info->Technology, str+25, 12); ++ strncpy(batt_info->Technology, str+25, 12); + + // then get the model number // + for(int t=0; t<5; t++) + file_in.getline(str, 100); //skip 5 lines // + file_in.getline(str, 100); +- strncpy(bat_info->Model, str+25, 12); ++ strncpy(batt_info->Model, str+25, 12); + + // then get the serial number // + file_in.getline(str, 100); +- strncpy(bat_info->Serial, str+25, 12); ++ strncpy(batt_info->Serial, str+25, 12); + + // then get the battery type // + file_in.getline(str, 100); +- strncpy(bat_info->Bat_Type, str+25, 12); ++ strncpy(batt_info->Bat_Type, str+25, 12); + + file_in.close(); + +@@ -480,17 +502,17 @@ + // then get the charging state // + file_in.getline(str, 100); file_in.getline(str, 100); // skip first 2 lines // + file_in.getline(str, 100); +- strncpy(bat_info->Charging_State, str+25, 12); +- if (strncmp(bat_info->Charging_State,"unknown",7)==0) strncpy(bat_info->Charging_State, "charged",7); ++ strncpy(batt_info->Charging_State, str+25, 12); ++ if (strncmp(batt_info->Charging_State,"unknown",7)==0) strncpy(batt_info->Charging_State, "charged",7); + /* on older kernels, like 2.4.22, the charging state is reported as "unknown", whereas in recent kernels + this was changed to "charged". */ + + // then get the charging rate // + file_in.getline(str, 100); +- strncpy(bat_info->Present_Rate, str+25, 9); +- if (strncmp(bat_info->Charging_State,"charged",7)==0) ++ strncpy(batt_info->Present_Rate, str+25, 9); ++ if (strncmp(batt_info->Charging_State,"charged",7)==0) + { +- if (strncmp(bat_info->Present_Rate, "unknown",7)==0) strncpy(bat_info->Present_Rate, "0 ",7); ++ if (strncmp(batt_info->Present_Rate, "unknown",7)==0) strncpy(batt_info->Present_Rate, "0 ",7); + } + /* some batteries report the present rate as "unknown", even when they report the battery as being charged. + If the battery is charged, the rate should be 0 */ +@@ -498,12 +520,12 @@ + + // then get the remaining capacity // + file_in.getline(str, 100); +- strncpy(bat_info->Remaining_Cap, str+25, 9); ++ strncpy(batt_info->Remaining_Cap, str+25, 9); + + file_in.close(); + } + else // battery dir is readable but empty : only . and .. at most // +- bat_info->Battery_Present = 3; ++ batt_info->Battery_Present = 3; + + return 0; + } +@@ -513,8 +535,8 @@ + int Get_Battery_Info_from_Sys(const int bat_nr, Battery_Info *batt_info, int verbose) + { + ifstream file_in; +- char filename[6][65], str[100], temp[100]; +- int bat_count = 0, start = 0, findex = 0; ++ char filename[6][65], str[100], temp[100], attr[100]; ++ int bat_count = 0, start = 0, findex = 0, value = 0; + DIR *battery_dir; + char *name, *dirname; + +@@ -613,165 +635,104 @@ + return -1; + } + +- memset(str, '\0', 100); +- for(int t=0; t<5; t++) +- fgets(str, 100, power_fp); /* skip first 5 lines */ +- +- /* get battery status (full, charging, ...) */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Charging_State, temp, 12); +- } +- +- +- /* get battery presence (0 or 1) */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- strncpy(temp, str+21, 1); +- if(strncmp(temp,"1",1)==0) +- batt_info->Battery_Present = 1; /* yes, we have a battery */ +- else +- { +- batt_info->Battery_Present = 0; +- printf(" Battery is not present, bailing out. \n"); +- return 0; /* bail out if battery is not present */ +- } +- } +- +- +- /* get technology */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Technology, temp, 12); +- } +- else +- strncpy(batt_info->Technology, "unknown", 7); +- +- +- +- //printf(" \n bat_info_tech = %s \n\n ", batt_info->Technology); +- +- +- +- fgets(str, 100, power_fp); /* skip 1 line */ +- +- +- /* get voltage_now */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Voltage_Now, temp, 12); +- } +- else +- strncpy(batt_info->Voltage_Now, "unknown", 7); +- +- +- /* get current_now, which I believe is the charging rate ? */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Present_Rate, temp, 12); +- } +- else +- strncpy(batt_info->Present_Rate, "unknown", 7); +- +- +- /* get charge_full_design */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Design_Cap, temp, 12); +- } +- else +- strncpy(batt_info->Design_Cap, "unknown", 7); +- +- +- //printf(" \n bat_info_design_cap = %s \n ", batt_info->Design_Cap); +- +- +- /* get charge_full, which is the last full capacity I guess ? */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->LastFull_Cap, temp, 12); +- } +- else +- strncpy(batt_info->LastFull_Cap, "unknown", 7); +- +- +- //printf(" \n bat_info_lastfull_cap = %s \n\n ", batt_info->LastFull_Cap); +- +- +- /* get charge_now */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Remaining_Cap, temp, 12); +- } +- else +- strncpy(batt_info->Remaining_Cap, "unknown", 7); +- +- //printf(" \n bat_info_remaining_cap = %s \n\n ", batt_info->Remaining_Cap); +- +- +- /* get model_name */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)>0) +- { +- memset(temp, '\0', 100); +- strncpy(temp, str+24, 12); // use strncpy here because sscanf chokes on blanks in this one ? // +- +- memset(str, '\0', 100); +- sscanf(temp, "%[^\n]", str); // strip trailing \n, fucks up output // +- +- strncpy(batt_info->Model, str, 12); ++ strncpy(batt_info->Technology, "unknown", 7); ++ strncpy(batt_info->Voltage_Now, "unknown", 7); ++ strncpy(batt_info->Charge_Now, "unknown", 7); ++ strncpy(batt_info->Charge_Full, "unknown", 7); ++ strncpy(batt_info->Charge_Full_Design, "unknown", 7); ++ strncpy(batt_info->Present_Rate, "unknown", 7); ++ strncpy(batt_info->Design_Cap, "unknown", 7); ++ strncpy(batt_info->LastFull_Cap, "unknown", 7); ++ strncpy(batt_info->Remaining_Cap, "unknown", 7); ++ strncpy(batt_info->Model, "unknown", 7); ++ strncpy(batt_info->Serial, "unknown", 7); ++ ++ // see linux-2.6/drivers/power/power_supply_sysfs.c ++ // there can be different number of lines, so read up to 40 lines ++ for(int t=0; t<40; t++) { ++ memset(str, '\0', 100); ++ memset(attr, '\0', 100); ++ memset(temp, '\0', 100); ++ fgets(str, 100, power_fp); ++ sscanf(str, "%[^=]s %*s %*[^\n]", attr); ++ sscanf(str, "%*[^=] %*c %s %*[^\n]",temp); ++ if (strcmp(attr,"POWER_SUPPLY_STATUS")==0) { ++ strncpy(batt_info->Charging_State, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_TYPE")==0) { ++ strncpy(batt_info->Bat_Type, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_TECHNOLOGY")==0) { ++ strncpy(batt_info->Technology, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_VOLTAGE_NOW")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mV", value); ++ strncpy(batt_info->Voltage_Now, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_CURRENT_NOW")==0 || ++ strcmp(attr,"POWER_SUPPLY_POWER_NOW")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i", value); ++ strncpy(batt_info->Present_Rate, temp, 9); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_CHARGE_NOW")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mA", value); ++ strncpy(batt_info->Charge_Now, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_CHARGE_FULL_DESIGN")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mA", value); ++ strncpy(batt_info->Charge_Full_Design, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_CHARGE_FULL")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mA", value); ++ strncpy(batt_info->Charge_Full, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_ENERGY_FULL_DESIGN")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mWh", value); ++ strncpy(batt_info->Design_Cap, temp, 9); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_ENERGY_FULL")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mWh", value); ++ strncpy(batt_info->LastFull_Cap, temp, 9); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_ENERGY_NOW")==0) { ++ value = atoi(temp) / 1000; ++ snprintf(temp, sizeof(temp), "%i mWh", value); ++ strncpy(batt_info->Remaining_Cap, temp, 9); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_MODEL_NAME")==0) { ++ strncpy(batt_info->Model, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_SERIAL_NUMBER")==0) { ++ strncpy(batt_info->Serial, temp, 12); ++ } ++ else if (strcmp(attr,"POWER_SUPPLY_PRESENT")==0) { ++ if(strncmp(temp,"1",1)==0) { ++ batt_info->Battery_Present = 1; ++ } ++ else { ++ batt_info->Battery_Present = 0; ++ printf(" Battery is not present, bailing out. \n"); ++ return 0; ++ } ++ } + } ++ if (strcmp(batt_info->Charge_Now,"")!=0 && ++ strcmp(batt_info->Charge_Now,"unknown")!=0) ++ snprintf(temp, sizeof(temp), "%s mA", batt_info->Present_Rate); + else +- strncpy(batt_info->Model, "unknown", 7); ++ snprintf(temp, sizeof(temp), "%s mW", batt_info->Present_Rate); + +- fgets(str, 100, power_fp); ++ strncpy(batt_info->Present_Rate, temp, 9); + +- /* get serial */ +- memset(str, '\0', 100); +- fgets(str, 100, power_fp); +- if (strlen(str)!=0) +- { +- memset(temp, '\0', 100); +- sscanf(str, "%*[^=] %*c %s %[^\n]",temp); +- strncpy(batt_info->Serial, temp, 12); +- } +- else +- strncpy(batt_info->Serial, "unknown", 7); +- + fclose(power_fp); +- } ++ } + else // battery dir is readable but empty : only . and .. at most // + batt_info->Battery_Present = 3; + return 0; diff --git a/sys-power/acpitool/files/acpitool-0.5.1-kernel3.patch b/sys-power/acpitool/files/acpitool-0.5.1-kernel3.patch new file mode 100644 index 000000000000..cd793d2e1e67 --- /dev/null +++ b/sys-power/acpitool/files/acpitool-0.5.1-kernel3.patch @@ -0,0 +1,14 @@ +http://bugs.gentoo.org/377355 + +--- src/acpitool.cpp ++++ src/acpitool.cpp +@@ -205,8 +205,7 @@ + Kernel_24 = 1; + Kernel_26 = 0; + } +- +- if(strncmp(str,"2.6",3)==0) ++ else + { + Kernel_24 = 0; + Kernel_26 = 1; diff --git a/sys-power/acpitool/files/acpitool-0.5.1-wakeup.patch b/sys-power/acpitool/files/acpitool-0.5.1-wakeup.patch new file mode 100644 index 000000000000..b36d7306bddf --- /dev/null +++ b/sys-power/acpitool/files/acpitool-0.5.1-wakeup.patch @@ -0,0 +1,70 @@ +From 3a87a4132667f78fc85c54ad89992bbdd02d1e55 Mon Sep 17 00:00:00 2001 +From: Carlos Alberto Lopez Perez <clopez@igalia.com> +Date: Thu, 6 Oct 2011 03:12:55 +0200 +Subject: [PATCH] Use dynamic structures instead of predefined ones + + * The file /proc/acpi/wakeup can have much more than 25 entries. + In my computer (Dell E6420) I have 27 entries. + So instead of using an array of [x] entries better use dynamic + vectors and push the new entries when a new line from the file + is read. + + * The name of the device is not ever 4 characters. For example I + have a device called "LID" which is 3 characters long. + Instead of using a fixed size for the device we split the line + on the first tab (\t) and use the first part. +--- + src/acpitool.cpp | 23 +++++++++++------------ + 1 files changed, 11 insertions(+), 12 deletions(-) + +diff --git a/src/acpitool.cpp b/src/acpitool.cpp +index 2a610a5..71e01d7 100644 +--- a/src/acpitool.cpp ++++ b/src/acpitool.cpp +@@ -460,16 +460,14 @@ int Show_WakeUp_Devices(int verbose) + + int Toggle_WakeUp_Device(const int Device, int verbose) + { +- ifstream file_in; + ofstream file_out; +- char *filename, str[50]; +- int index = 1; +- char Name[25][5]; // 25 should be enough I guess, I have only 9 so far // +- ++ char *filename; string str; ++ int index = 1; int charindex = 0; ++ std::vector <std::string> Name(index); // Never is enough, use dynamic structures // + filename = "/proc/acpi/wakeup"; + +- file_in.open(filename); +- if (!file_in) ++ ifstream file_in(filename, ifstream::in); ++ if (!file_in.good()) // if opening is not successful + { + if(!verbose) + { +@@ -484,14 +482,15 @@ int Toggle_WakeUp_Device(const int Device, int verbose) + } + } + +- file_in.getline(str, 50); // first line are just headers // ++ getline(file_in, str); // first line are just headers // + while(!file_in.eof()) // count all devices and store their names// + { +- file_in.getline(str, 50); +- if(strlen(str)!=0) // avoid empty last line // ++ getline(file_in, str); ++ if( str.length() != 0 ) // avoid empty last line // + { +- memset(Name[index], '\0', 5); +- strncpy(Name[index], str, 4); ++ charindex = 0; // reset to zero ++ while ( (str[++charindex]!='\t') ); // stop on first tab and get the array index ++ Name.push_back(str.substr(0,charindex)); // Push the name into the vector + index++; + } + } +-- +1.7.5.4 + + diff --git a/sys-power/acpitool/metadata.xml b/sys-power/acpitool/metadata.xml new file mode 100644 index 000000000000..6f49eba8f496 --- /dev/null +++ b/sys-power/acpitool/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-needed --> +</pkgmetadata> diff --git a/sys-power/apcupsd/Manifest b/sys-power/apcupsd/Manifest new file mode 100644 index 000000000000..5c041eb2a99d --- /dev/null +++ b/sys-power/apcupsd/Manifest @@ -0,0 +1,15 @@ +AUX apcupsd-3.14.9-aliasing.patch 2108 SHA256 21343f4798121a828a89eee49ca9fe7574b2fb45a5aad35fbfd5aabec7740761 SHA512 48eb51385136216d1cdddb6b237b89a52c516b223aa7fe50fb35761cd595d9ab7f7fabbd0e4f8c0f7d45df6feed0a2e240d227181f3d772fc5fa9f8bfa62529f WHIRLPOOL 8ad5540b942919c7ce0c3b560feb1dc6a0771b81999f546d62b8c480ecb3731994a930c72dde9c5e36d9024d4c1b97b8bd00d8baa98ee99f273c59e43070ae38 +AUX apcupsd-tmpfiles.conf 70 SHA256 3bbf3117156979e81334f37ac98156f270fb47a113f1c33a6ff7ea13b612725d SHA512 c63242a06cc14242575c24a8aca4ea35a7150e6073425c8230e36c7117a1bc49dc659dbb0c455ddc454a0ac5ebd7faa5638fb70282c38ed5d1ca9ffab700ef05 WHIRLPOOL 61be4ebe524e4538c974f9940eb645f52a02e04a9448b447ef4e6726ded42f260ef5050e20658bc339f16de9e8483add2a643608dd3e3469f478ec43a07618f5 +AUX apcupsd-udev.rules 328 SHA256 0865097a99b321301ec5b0bb51d0560a01df0a21cca0ee0df61f8d33f888b86a SHA512 ba2ebb9f28011548c845a81f17a328b98ec8d79c1e6be33aeab863d77b9d3aa61b4dfbd1bb89a0cae00465387dffe8cc223634a6e9a2f59170846d4bed9e7135 WHIRLPOOL ec304d772bcbcd5ba3cec1437a097d6159ad1f8b8e2bde49125d6cb1970bbc6f1de6264ba35a719431aed83f88210a583bb20fab0b771c115aaa93bf1db8c867 +AUX apcupsd.conf 12475 SHA256 e8b0c0c4d39c2df14f30d40e8dd7078641fcb62d5e36cc6920f39db272f295b7 SHA512 1519d3cd47a2a73ff4148e4f74964ae841d37639616fe5b974b426983f5379db89b8793a6952389c443c56b84d0ef33f6995eccd920f71b4e5efc842a58a04e1 WHIRLPOOL 8be1e249ce3630ef358784ecc364c0a7e319ef22845faa84505b2cd92af48f522415d14569662b32015e36777e10a16afb45f75b999d17184c5a121ab5d4ab78 +AUX apcupsd.init.4 926 SHA256 a43fe46b55d938a5402d6c83235adfc5d488cdd797b6ad722d6156eb711ab688 SHA512 b31d054252d0caeaeee4b3e0d7d9d0f5c1d0ad32a08f952f57fe91a36964d6a895ff26bb5514820cc8e83b7e87df1b0c508c3ae35c39f43d2be2e1cd66ef705e WHIRLPOOL 079e4a86d0e7db410f2e48374b7a4500441ce25a497be54a825389590ec411ca39988c4bfe6cb42a922cecab0be9517948a7a5269823e101ae6ae0a6203e68df +AUX apcupsd.powerfail.init 397 SHA256 edd81aa8249c6f3ec1749c61ec464219380ddb5f2d3667a619ce8a0fdb6905c1 SHA512 cd0ed9d24a8371de7920bf0ce2e89bb63c0bee58da1ac782ed2b929068f95b2af47458529223a33ecea4e8f73ddfe3a7b9591af6f64828de7ed1d91e2edbb6e1 WHIRLPOOL 855346c63e13720f9fa03495fbbeeac502c2b9bfec513641048f5ac0e55fe8c168661b9922ba03ee65a13d73bf7d925471e96a6531986db3189541fd0f9355aa +AUX apcupsd.service 111 SHA256 fef0b088daa7d652b8c30e6105318cff547ad2504627efabd014083eabc7182d SHA512 011e3e52e7909f36fb73b6064277a69e5db41263cfc72bda07e326172396d5318cd2b050f1fb84c4cc6da7a247c0035c36c55322ffb234a1cfa7bf13ba492889 WHIRLPOOL 940b6eb812c010f32b4bf54fd3e1b8d0a47890fd88acd8451bccbf6d17ab894915b179c110dda561c120e346ed20ca481f47761b9a5bac1e3b323457fbbc6f5a +DIST apcupsd-3.14.13.tar.gz 1935043 SHA256 57ecbde01d0448bf8c4dbfe0ad016724ae66ab98adf2de955bf2be553c5d03f9 SHA512 74f7763de268626e24f9dd99090b01d5bff35c2fde769039104105ec27941673d1613c41fcac11e3d97d2fe5c364bcc0459847fcba5d2f7f1aac85795d6d8570 WHIRLPOOL 4b6fb18848aa597bae1066a7f195747f9edfdee75a27e43e3d14e3153d4b434829c5863b7e92c0704ea652583b8c5885fd01fe7280abe93bf1c6cfc370434f73 +DIST apcupsd-3.14.14.tar.gz 1843409 SHA256 db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 SHA512 c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f WHIRLPOOL 9b50390558b3a6192a631ff3dce398d947fb19123969604d2a89ff69a2373beff6a62c314ce351caeb9d9b736fcb8d622a75899166a3710c4c557c5a841c5adc +EBUILD apcupsd-3.14.13.ebuild 3990 SHA256 3a5eff8af11be13dba0928069225a3ea109601fad10dd12958653eb88638cb87 SHA512 2c93c8d8028304a348c6d0937e0629e39a894f699c2ab2089cd9d2472fb66210aeb01fbe187acf5249844fb66a0e525e66fe844bacdd89b15df700265c75a300 WHIRLPOOL 3a60eb8d389edd618c4164ad5cbfa716e3ba0b29497f9142937e9f9387a37ac9469cf268927afa013f9f3ec0d956aef439cf139faccad3342facba1ff5ecabd1 +EBUILD apcupsd-3.14.14-r1.ebuild 4088 SHA256 a3995c04d1ff92f5b1961c08ca3005fd69a72b9e85ee70484e64a31cbeeae312 SHA512 5896d554ad001613e13a60b159d7f3b94a986e314605a9020358543366ea47874171d760cc0c0fc2ea13ee2cba239471f6bb56b1423d4816c9a93ee5708a1e67 WHIRLPOOL 0630df12ab4ed83d58e5195ef72b1f11a5d7e15878543ee4c8d2f40d8b7fb72fc9625eea1a118ea57b9b6ae529965aa8d6a74ff20470a1e239692a6e45295015 +EBUILD apcupsd-3.14.14.ebuild 3934 SHA256 e3b8536374c5c6108ff7d35d9da260e5359076e0d8c145b46450c3cb22c71829 SHA512 954489ed80b948ccb1f0cbb480fe6a1ff87f3f1ba2643e8d6f1834e81a0c8cc46b98fae380a6f96c1b1c9824049fd000d7ff26cfe2c00fa80ea065745edd59e3 WHIRLPOOL 2f7305004512b541e3237034bec333b300d9088be5ac1d23f6988a3f34dd44933889ddb7dbc241fef2366038e1ad7264dbc161e0f87baa39e24d71dd7f60d41f +MISC ChangeLog 6054 SHA256 392e57242bef9a1c1c0e998498fb2b17e8c1b6acfbbb1de3713384b0a9120b6b SHA512 15f0b726226cf8a9f6a4adf450404309db8f8494f15fe2f0377b320ee3de9e5268fe5da3a345bfabf0dd08c6e5d2e2157281a6a40bef1402142f951c1ad8cc21 WHIRLPOOL 8f9c925e087df117753340f159f9ec4666e7a7654b2a9d6de4be684cc1034481870d52040b897f81e140edc069f6813571a642c7888cb98a2b59dae0299a63fa +MISC ChangeLog-2015 30225 SHA256 4091ce2eba45cb9dbaa6110241b4dee52b760558afa9a561f3563419fa7bef8e SHA512 7b1bb09444f3223c485f7ac198a88b88c6f1cab089e9827d99921da40012a284a770b34561a61a50746b079b299d2163cd9dda5e388228c4e351f122d7edad4b WHIRLPOOL fdcf723fe15eadeca8c53f77d7c522d55d33a8797e1807d3fde0a8ec689e4de4941552c3e37ada159197658feaf97a200a2fbff611868f2a5997f4cb96251bf2 +MISC metadata.xml 1247 SHA256 899a6ae48eca489292ce8467b5056a483eb26d5e7f382a86616fdd5e7d285811 SHA512 b528539d879256990c652cf0664f99c87aca5a92cf22490230c91ae86f27b9252310e62ee07fee619e12595a8693cb8bfc85d6bd6b085c5cd1536aa58b243245 WHIRLPOOL b60ddb5461c04fb54be9f038d9dc2d1d1041ceca63cda6597c3275e55036159ef4cb048418d2cf7ef33338f4902ea6bfbc8f4e089d44f271f0bfbd759605d7aa diff --git a/sys-power/apcupsd/apcupsd-3.14.13.ebuild b/sys-power/apcupsd/apcupsd-3.14.13.ebuild new file mode 100644 index 000000000000..f4a462f5b7e3 --- /dev/null +++ b/sys-power/apcupsd/apcupsd-3.14.13.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils linux-info flag-o-matic systemd udev + +DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown" +HOMEPAGE="http://www.apcupsd.org/" +SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc x86 ~x86-fbsd" +IUSE="snmp +usb cgi nls gnome kernel_linux" + +DEPEND=" + || ( >=sys-apps/util-linux-2.23[tty-helpers(-)] + <=sys-apps/sysvinit-2.88-r4 + sys-freebsd/freebsd-ubin + ) + cgi? ( >=media-libs/gd-1.8.4 ) + nls? ( sys-devel/gettext ) + snmp? ( >=net-analyzer/net-snmp-5.7.2 ) + gnome? ( >=x11-libs/gtk+-2.4.0:2 + dev-libs/glib:2 + >=gnome-base/gconf-2.0 )" +RDEPEND="${DEPEND} + sys-apps/openrc + virtual/mailx" + +CONFIG_CHECK="~USB_HIDDEV ~HIDRAW" +ERROR_USB_HIDDEV="CONFIG_USB_HIDDEV: needed to access USB-attached UPSes" +ERROR_HIDRAW="CONFIG_HIDRAW: needed to access USB-attached UPSes" + +pkg_setup() { + if use kernel_linux && use usb && linux_config_exists; then + check_extra_config + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.14.9-aliasing.patch" +} + +src_configure() { + local myconf + use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=/usr/libexec/${PN}/cgi-bin" + if use usb; then + myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= " + else + myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb" + fi + + # We force the DISTNAME to gentoo so it will use gentoo's layout also + # when installed on non-linux systems. + econf \ + --sbindir=/sbin \ + --sysconfdir=/etc/apcupsd \ + --with-pwrfail-dir=/etc/apcupsd \ + --with-lock-dir=/run/apcupsd \ + --with-pid-dir=/run/apcupsd \ + --with-log-dir=/var/log \ + --with-nis-port=3551 \ + --enable-net --enable-pcnet \ + --with-distname=gentoo \ + $(use_enable snmp net-snmp) \ + $(use_enable gnome gapcmon) \ + ${myconf} \ + APCUPSD_MAIL=/bin/mail +} + +src_compile() { + # Workaround for bug #280674; upstream should really just provide + # the text files in the distribution, but I wouldn't count on them + # doing that anytime soon. + MANPAGER=$(type -p cat) \ + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install + rm -f "${D}"/etc/init.d/halt + + insinto /etc/apcupsd + newins examples/safe.apccontrol safe.apccontrol + doins "${FILESDIR}"/apcupsd.conf + + dodoc ChangeLog* ReleaseNotes + doman doc/*.8 doc/*.5 + + dohtml -r doc/manual/* + + rm "${D}"/etc/init.d/apcupsd + newinitd "${FILESDIR}/${PN}.init.4" "${PN}" + newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail + + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}-tmpfiles.conf + + # remove hal settings, we don't really want to have it around still. + rm -r "${D}"/usr/share/hal + + # replace it with our udev rules if we're in Linux + if use kernel_linux; then + udev_newrules "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules + fi + +} + +pkg_postinst() { + if use cgi; then + elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin." + elog "Set up your ScriptAlias or symbolic links accordingly." + fi + + elog "" + elog "Since version 3.14.0 you can use multiple apcupsd instances to" + elog "control more than one UPS in a single box with openRC." + elog "To do this, create a link between /etc/init.d/apcupsd to a new" + elog "/etc/init.d/apcupsd.something, and it will then load the" + elog "configuration file at /etc/apcupsd/something.conf." + elog "" + + elog 'If you want apcupsd to power off your UPS when it' + elog 'shuts down your system in a power failure, you must' + elog 'add apcupsd.powerfail to your shutdown runlevel:' + elog '' + elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m' + elog '' + + if use kernel_linux; then + elog "Starting from version 3.14.9-r1, ${PN} installs udev rules" + elog "for persistent device naming. If you have multiple UPS" + elog "connected to the machine, you can point them to the devices" + elog "in /dev/apcups/by-id directory." + fi +} diff --git a/sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild b/sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild new file mode 100644 index 000000000000..b3e66851bc9a --- /dev/null +++ b/sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils linux-info flag-o-matic systemd udev + +DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown" +HOMEPAGE="http://www.apcupsd.org/" +SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd" +IUSE="snmp +usb +modbus cgi nls gnome kernel_linux" + +DEPEND=" + || ( >=sys-apps/util-linux-2.23[tty-helpers(-)] + sys-freebsd/freebsd-ubin + ) + modbus? ( usb? ( virtual/libusb:0 ) ) + cgi? ( >=media-libs/gd-1.8.4 ) + nls? ( sys-devel/gettext ) + snmp? ( >=net-analyzer/net-snmp-5.7.2 ) + gnome? ( >=x11-libs/gtk+-2.4.0:2 + dev-libs/glib:2 + >=gnome-base/gconf-2.0 )" +RDEPEND="${DEPEND} + virtual/mailx" + +CONFIG_CHECK="~USB_HIDDEV ~HIDRAW" +ERROR_USB_HIDDEV="CONFIG_USB_HIDDEV: needed to access USB-attached UPSes" +ERROR_HIDRAW="CONFIG_HIDRAW: needed to access USB-attached UPSes" + +pkg_setup() { + if use kernel_linux && use usb && linux_config_exists; then + check_extra_config + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.14.9-aliasing.patch" +} + +src_configure() { + local myconf + use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=/usr/libexec/${PN}/cgi-bin" + if use usb; then + myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= " + use modbus && myconf="${myconf} --enable-modbus-usb" + else + myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb" + use modbus || myconf="${myconf} --disable-modbus" + fi + + # We force the DISTNAME to gentoo so it will use gentoo's layout also + # when installed on non-linux systems. + econf \ + --sbindir=/sbin \ + --sysconfdir=/etc/apcupsd \ + --with-pwrfail-dir=/etc/apcupsd \ + --with-lock-dir=/run/apcupsd \ + --with-pid-dir=/run/apcupsd \ + --with-log-dir=/var/log \ + --with-nis-port=3551 \ + --enable-net --enable-pcnet \ + --with-distname=gentoo \ + $(use_enable snmp) \ + $(use_enable gnome gapcmon) \ + ${myconf} \ + APCUPSD_MAIL=/bin/mail +} + +src_compile() { + # Workaround for bug #280674; upstream should really just provide + # the text files in the distribution, but I wouldn't count on them + # doing that anytime soon. + MANPAGER=$(type -p cat) \ + emake +} + +src_install() { + emake DESTDIR="${D}" install + rm -f "${D}"/etc/init.d/halt || die + + insinto /etc/apcupsd + newins examples/safe.apccontrol safe.apccontrol + doins "${FILESDIR}"/apcupsd.conf + + dodoc ChangeLog* ReleaseNotes + doman doc/*.8 doc/*.5 + + dohtml -r doc/manual/* + + rm "${D}"/etc/init.d/apcupsd || die + newinitd "${FILESDIR}/${PN}.init.4" "${PN}" + newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail + + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}-tmpfiles.conf + + # remove hal settings, we don't really want to have it around still. + rm -r "${D}"/usr/share/hal || die + + # replace it with our udev rules if we're in Linux + if use kernel_linux; then + udev_newrules "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules + fi + +} + +pkg_postinst() { + if use cgi; then + elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin." + elog "Set up your ScriptAlias or symbolic links accordingly." + fi + + elog "" + elog "Since version 3.14.0 you can use multiple apcupsd instances to" + elog "control more than one UPS in a single box with openRC." + elog "To do this, create a link between /etc/init.d/apcupsd to a new" + elog "/etc/init.d/apcupsd.something, and it will then load the" + elog "configuration file at /etc/apcupsd/something.conf." + elog "" + + elog 'If you want apcupsd to power off your UPS when it' + elog 'shuts down your system in a power failure, you must' + elog 'add apcupsd.powerfail to your shutdown runlevel:' + elog '' + elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m' + elog '' + + if use kernel_linux; then + elog "Starting from version 3.14.9-r1, ${PN} installs udev rules" + elog "for persistent device naming. If you have multiple UPS" + elog "connected to the machine, you can point them to the devices" + elog "in /dev/apcups/by-id directory." + fi +} diff --git a/sys-power/apcupsd/apcupsd-3.14.14.ebuild b/sys-power/apcupsd/apcupsd-3.14.14.ebuild new file mode 100644 index 000000000000..06483304207a --- /dev/null +++ b/sys-power/apcupsd/apcupsd-3.14.14.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils linux-info flag-o-matic systemd udev + +DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown" +HOMEPAGE="http://www.apcupsd.org/" +SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd" +IUSE="snmp +usb cgi nls gnome kernel_linux" + +DEPEND=" + || ( >=sys-apps/util-linux-2.23[tty-helpers(-)] + sys-freebsd/freebsd-ubin + ) + cgi? ( >=media-libs/gd-1.8.4 ) + nls? ( sys-devel/gettext ) + snmp? ( >=net-analyzer/net-snmp-5.7.2 ) + gnome? ( >=x11-libs/gtk+-2.4.0:2 + dev-libs/glib:2 + >=gnome-base/gconf-2.0 )" +RDEPEND="${DEPEND} + virtual/mailx" + +CONFIG_CHECK="~USB_HIDDEV ~HIDRAW" +ERROR_USB_HIDDEV="CONFIG_USB_HIDDEV: needed to access USB-attached UPSes" +ERROR_HIDRAW="CONFIG_HIDRAW: needed to access USB-attached UPSes" + +pkg_setup() { + if use kernel_linux && use usb && linux_config_exists; then + check_extra_config + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.14.9-aliasing.patch" +} + +src_configure() { + local myconf + use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=/usr/libexec/${PN}/cgi-bin" + if use usb; then + myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= " + else + myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb" + fi + + # We force the DISTNAME to gentoo so it will use gentoo's layout also + # when installed on non-linux systems. + econf \ + --sbindir=/sbin \ + --sysconfdir=/etc/apcupsd \ + --with-pwrfail-dir=/etc/apcupsd \ + --with-lock-dir=/run/apcupsd \ + --with-pid-dir=/run/apcupsd \ + --with-log-dir=/var/log \ + --with-nis-port=3551 \ + --enable-net --enable-pcnet \ + --with-distname=gentoo \ + $(use_enable snmp) \ + $(use_enable gnome gapcmon) \ + ${myconf} \ + APCUPSD_MAIL=/bin/mail +} + +src_compile() { + # Workaround for bug #280674; upstream should really just provide + # the text files in the distribution, but I wouldn't count on them + # doing that anytime soon. + MANPAGER=$(type -p cat) \ + emake +} + +src_install() { + emake DESTDIR="${D}" install + rm -f "${D}"/etc/init.d/halt || die + + insinto /etc/apcupsd + newins examples/safe.apccontrol safe.apccontrol + doins "${FILESDIR}"/apcupsd.conf + + dodoc ChangeLog* ReleaseNotes + doman doc/*.8 doc/*.5 + + dohtml -r doc/manual/* + + rm "${D}"/etc/init.d/apcupsd || die + newinitd "${FILESDIR}/${PN}.init.4" "${PN}" + newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail + + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}-tmpfiles.conf + + # remove hal settings, we don't really want to have it around still. + rm -r "${D}"/usr/share/hal || die + + # replace it with our udev rules if we're in Linux + if use kernel_linux; then + udev_newrules "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules + fi + +} + +pkg_postinst() { + if use cgi; then + elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin." + elog "Set up your ScriptAlias or symbolic links accordingly." + fi + + elog "" + elog "Since version 3.14.0 you can use multiple apcupsd instances to" + elog "control more than one UPS in a single box with openRC." + elog "To do this, create a link between /etc/init.d/apcupsd to a new" + elog "/etc/init.d/apcupsd.something, and it will then load the" + elog "configuration file at /etc/apcupsd/something.conf." + elog "" + + elog 'If you want apcupsd to power off your UPS when it' + elog 'shuts down your system in a power failure, you must' + elog 'add apcupsd.powerfail to your shutdown runlevel:' + elog '' + elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m' + elog '' + + if use kernel_linux; then + elog "Starting from version 3.14.9-r1, ${PN} installs udev rules" + elog "for persistent device naming. If you have multiple UPS" + elog "connected to the machine, you can point them to the devices" + elog "in /dev/apcups/by-id directory." + fi +} diff --git a/sys-power/apcupsd/files/apcupsd-3.14.9-aliasing.patch b/sys-power/apcupsd/files/apcupsd-3.14.9-aliasing.patch new file mode 100644 index 000000000000..09d9883a22f2 --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd-3.14.9-aliasing.patch @@ -0,0 +1,39 @@ +Index: apcupsd-3.14.9/src/apctest.c +=================================================================== +--- apcupsd-3.14.9.orig/src/apctest.c ++++ apcupsd-3.14.9/src/apctest.c +@@ -2206,18 +2206,18 @@ static struct { + const char *config_directive; + const char *descript; + char type; +- int *data; ++ void *data; + } cmd_table[] = { + {'u', "HITRANSFER", "Upper transfer voltage", 'i', &eeprom_ups.hitrans}, + {'l', "LOTRANSFER", "Lower transfer voltage", 'i', &eeprom_ups.lotrans}, + {'e', "RETURNCHARGE", "Return threshold", 'i', &eeprom_ups.rtnpct}, + {'o', "OUTPUTVOLTS", "Output voltage on batts", 'i', &eeprom_ups.NomOutputVoltage}, +- {'s', "SENSITIVITY", "Sensitivity", 'c', (int *)eeprom_ups.sensitivity}, ++ {'s', "SENSITIVITY", "Sensitivity", 'c', eeprom_ups.sensitivity}, + {'q', "LOWBATT", "Low battery warning", 'i', &eeprom_ups.dlowbatt}, + {'p', "SLEEP", "Shutdown grace delay", 'i', &eeprom_ups.dshutd}, +- {'k', "BEEPSTATE", "Alarm delay", 'c', (int *)eeprom_ups.beepstate}, ++ {'k', "BEEPSTATE", "Alarm delay", 'c', eeprom_ups.beepstate}, + {'r', "WAKEUP", "Wakeup delay", 'i', &eeprom_ups.dwake}, +- {'E', "SELFTEST", "Self test interval", 'c', (int *)eeprom_ups.selftest}, ++ {'E', "SELFTEST", "Self test interval", 'c', eeprom_ups.selftest}, + {0, NULL, NULL} /* Last entry */ + }; + +@@ -2240,9 +2240,9 @@ static void print_valid_eeprom_values(UP + for (j = 0; cmd_table[j].cmd; j++) { + if (cmd[i].cmd == cmd_table[j].cmd) { + if (cmd_table[j].type == 'c') +- asnprintf(val, sizeof(val), "%s", (char *)cmd_table[j].data); ++ asnprintf(val, sizeof(val), "%s", cmd_table[j].data); + else +- asnprintf(val, sizeof(val), "%d", *cmd_table[j].data); ++ asnprintf(val, sizeof(val), "%d", *((int*)cmd_table[j].data)); + + pmsg("%-24s %-12s %-6s ", cmd_table[j].descript, + cmd_table[j].config_directive, val); diff --git a/sys-power/apcupsd/files/apcupsd-tmpfiles.conf b/sys-power/apcupsd/files/apcupsd-tmpfiles.conf new file mode 100644 index 000000000000..601b5aeab5ef --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd-tmpfiles.conf @@ -0,0 +1,3 @@ +D /run/apcupsd 0755 root root +r /etc/apcupsd/powerfail +r /etc/nologin diff --git a/sys-power/apcupsd/files/apcupsd-udev.rules b/sys-power/apcupsd/files/apcupsd-udev.rules new file mode 100644 index 000000000000..b2eeb27302d8 --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd-udev.rules @@ -0,0 +1,10 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="apcupsd_end" +SUBSYSTEM!="usb", GOTO="apcupsd_end" +ENV{ID_VENDOR}=="", IMPORT{program}="usb_id --export %p" +ENV{ID_VENDOR_ID}!="051d", GOTO="apcupsd_end" + +KERNEL=="?*", SYMLINK+="apcups/by-id/$env{ID_BUS}-$env{ID_SERIAL_SHORT}" + +LABEL="apcupsd_end" diff --git a/sys-power/apcupsd/files/apcupsd.conf b/sys-power/apcupsd/files/apcupsd.conf new file mode 100644 index 000000000000..83201f3c2b14 --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd.conf @@ -0,0 +1,329 @@ +## apcupsd.conf v1.1 ## +# +# for apcupsd release 3.14.10 (13 September 2011) - gentoo +# +# "apcupsd" POSIX config file + +# +# ========= General configuration parameters ============ +# + +# UPSNAME xxx +# Use this to give your UPS a name in log files and such. This +# is particulary useful if you have multiple UPSes. This does not +# set the EEPROM. It should be 8 characters or less. +#UPSNAME + +# UPSCABLE <cable> +# Defines the type of cable connecting the UPS to your computer. +# +# Possible generic choices for <cable> are: +# simple, smart, ether, usb +# +# Or a specific cable model number may be used: +# 940-0119A, 940-0127A, 940-0128A, 940-0020B, +# 940-0020C, 940-0023A, 940-0024B, 940-0024C, +# 940-1524C, 940-0024G, 940-0095A, 940-0095B, +# 940-0095C, M-04-02-2000 +# +UPSCABLE usb + +# To get apcupsd to work, in addition to defining the cable +# above, you must also define a UPSTYPE, which corresponds to +# the type of UPS you have (see the Description for more details). +# You must also specify a DEVICE, sometimes referred to as a port. +# For USB UPSes, please leave the DEVICE directive blank. For +# other UPS types, you must specify an appropriate port or address. +# +# UPSTYPE DEVICE Description +# apcsmart /dev/tty** Newer serial character device, appropriate for +# SmartUPS models using a serial cable (not USB). +# +# usb <BLANK> Most new UPSes are USB. A blank DEVICE +# setting enables autodetection, which is +# the best choice for most installations. +# +# net hostname:port Network link to a master apcupsd through apcupsd's +# Network Information Server. This is used if the +# UPS powering your computer is connected to a +# different computer for monitoring. +# +# snmp hostname:port:vendor:community +# SNMP network link to an SNMP-enabled UPS device. +# Hostname is the ip address or hostname of the UPS +# on the network. Vendor can be can be "APC" or +# "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap +# catching; you usually want "APC". Port is usually +# 161. Community is usually "private". +# +# netsnmp hostname:port:vendor:community +# OBSOLETE +# Same as SNMP above but requires use of the +# net-snmp library. Unless you have a specific need +# for this old driver, you should use 'snmp' instead. +# +# dumb /dev/tty** Old serial character device for use with +# simple-signaling UPSes. +# +# pcnet ipaddr:username:passphrase:port +# PowerChute Network Shutdown protocol which can be +# used as an alternative to SNMP with the AP9617 +# family of smart slot cards. ipaddr is the IP +# address of the UPS management card. username and +# passphrase are the credentials for which the card +# has been configured. port is the port number on +# which to listen for messages from the UPS, normally +# 3052. If this parameter is empty or missing, the +# default of 3052 will be used. +# +UPSTYPE usb +DEVICE + +# POLLTIME <int> +# Interval (in seconds) at which apcupsd polls the UPS for status. This +# setting applies both to directly-attached UPSes (UPSTYPE apcsmart, usb, +# dumb) and networked UPSes (UPSTYPE net, snmp). Lowering this setting +# will improve apcupsd's responsiveness to certain events at the cost of +# higher CPU utilization. The default of 60 is appropriate for most +# situations. +POLLTIME 30 + +# LOCKFILE <path to lockfile> +# Path for device lock file. Not used on Win32. +LOCKFILE /run/apcupsd + +# SCRIPTDIR <path to script directory> +# Directory in which apccontrol and event scripts are located. +SCRIPTDIR /etc/apcupsd + +# PWRFAILDIR <path to powerfail directory> +# Directory in which to write the powerfail flag file. This file +# is created when apcupsd initiates a system shutdown and is +# checked in the OS halt scripts to determine if a killpower +# (turning off UPS output power) is required. +PWRFAILDIR /etc/apcupsd + +# NOLOGINDIR <path to nologin directory> +# Directory in which to write the nologin file. The existence +# of this flag file tells the OS to disallow new logins. +NOLOGINDIR /etc + + +# +# ======== Configuration parameters used during power failures ========== +# + +# The ONBATTERYDELAY is the time in seconds from when a power failure +# is detected until we react to it with an onbattery event. +# +# This means that, apccontrol will be called with the powerout argument +# immediately when a power failure is detected. However, the +# onbattery argument is passed to apccontrol only after the +# ONBATTERYDELAY time. If you don't want to be annoyed by short +# powerfailures, make sure that apccontrol powerout does nothing +# i.e. comment out the wall. +ONBATTERYDELAY 10 + +# +# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so +# the first that occurs will cause the initation of a shutdown. +# + +# If during a power failure, the remaining battery percentage +# (as reported by the UPS) is below or equal to BATTERYLEVEL, +# apcupsd will initiate a system shutdown. +BATTERYLEVEL 0 + +# If during a power failure, the remaining runtime in minutes +# (as calculated internally by the UPS) is below or equal to MINUTES, +# apcupsd, will initiate a system shutdown. +MINUTES 0 + +# If during a power failure, the UPS has run on batteries for TIMEOUT +# many seconds or longer, apcupsd will initiate a system shutdown. +# A value of 0 disables this timer. +# +# Note, if you have a Smart UPS, you will most likely want to disable +# this timer by setting it to zero. That way, you UPS will continue +# on batteries until either the % charge remaing drops to or below BATTERYLEVEL, +# or the remaining battery runtime drops to or below MINUTES. Of course, +# if you are testing, setting this to 60 causes a quick system shutdown +# if you pull the power plug. +# If you have an older dumb UPS, you will want to set this to less than +# the time you know you can run on batteries. +TIMEOUT 0 + +# Time in seconds between annoying users to signoff prior to +# system shutdown. 0 disables. +ANNOY 45 + +# Initial delay after power failure before warning users to get +# off the system. +ANNOYDELAY 90 + +# The condition which determines when users are prevented from +# logging in during a power failure. +# NOLOGON <string> [ disable | timeout | percent | minutes | always ] +NOLOGON disable + +# If KILLDELAY is non-zero, apcupsd will continue running after a +# shutdown has been requested, and after the specified time in +# seconds attempt to kill the power. This is for use on systems +# where apcupsd cannot regain control after a shutdown. +# KILLDELAY <seconds> 0 disables +KILLDELAY 0 + +# +# ==== Configuration statements for Network Information Server ==== +# + +# NETSERVER [ on | off ] on enables, off disables the network +# information server. If netstatus is on, a network information +# server process will be started for serving the STATUS and +# EVENT data over the network (used by CGI programs). +NETSERVER on + +# NISIP <dotted notation ip address> +# IP address on which NIS server will listen for incoming connections. +# This is useful if your server is multi-homed (has more than one +# network interface and IP address). Default value is 0.0.0.0 which +# means any incoming request will be serviced. Alternatively, you can +# configure this setting to any specific IP address of your server and +# NIS will listen for connections only on that interface. Use the +# loopback address (127.0.0.1) to accept connections only from the +# local machine. +NISIP 127.0.0.1 + +# NISPORT <port> default is 3551 as registered with the IANA +# port to use for sending STATUS and EVENTS data over the network. +# It is not used unless NETSERVER is on. If you change this port, +# you will need to change the corresponding value in the cgi directory +# and rebuild the cgi programs. +NISPORT 3551 + +# If you want the last few EVENTS to be available over the network +# by the network information server, you must define an EVENTSFILE. +EVENTSFILE /var/log/apcupsd.events + +# EVENTSFILEMAX <kilobytes> +# By default, the size of the EVENTSFILE will be not be allowed to exceed +# 10 kilobytes. When the file grows beyond this limit, older EVENTS will +# be removed from the beginning of the file (first in first out). The +# parameter EVENTSFILEMAX can be set to a different kilobyte value, or set +# to zero to allow the EVENTSFILE to grow without limit. +EVENTSFILEMAX 25 + +# +# ========== Configuration statements used if sharing ============= +# a UPS with more than one machine + +# +# Remaining items are for ShareUPS (APC expansion card) ONLY +# + +# UPSCLASS [ standalone | shareslave | sharemaster ] +# Normally standalone unless you share a UPS using an APC ShareUPS +# card. +UPSCLASS standalone + +# UPSMODE [ disable | share ] +# Normally disable unless you share a UPS using an APC ShareUPS card. +UPSMODE disable + +# +# ===== Configuration statements to control apcupsd system logging ======== +# + +# Time interval in seconds between writing the STATUS file; 0 disables +STATTIME 0 + +# Location of STATUS file (written to only if STATTIME is non-zero) +STATFILE /var/log/apcupsd.status + +# LOGSTATS [ on | off ] on enables, off disables +# Note! This generates a lot of output, so if +# you turn this on, be sure that the +# file defined in syslog.conf for LOG_NOTICE is a named pipe. +# You probably do not want this on. +LOGSTATS off + +# Time interval in seconds between writing the DATA records to +# the log file. 0 disables. +DATATIME 0 + +# FACILITY defines the logging facility (class) for logging to syslog. +# If not specified, it defaults to "daemon". This is useful +# if you want to separate the data logged by apcupsd from other +# programs. +#FACILITY DAEMON + +# +# ========== Configuration statements used in updating the UPS EPROM ========= +# + +# +# These statements are used only by apctest when choosing "Set EEPROM with conf +# file values" from the EEPROM menu. THESE STATEMENTS HAVE NO EFFECT ON APCUPSD. +# + +# UPS name, max 8 characters +#UPSNAME UPS_IDEN + +# Battery date - 8 characters +#BATTDATE mm/dd/yy + +# Sensitivity to line voltage quality (H cause faster transfer to batteries) +# SENSITIVITY H M L (default = H) +#SENSITIVITY H + +# UPS delay after power return (seconds) +# WAKEUP 000 060 180 300 (default = 0) +#WAKEUP 60 + +# UPS Grace period after request to power off (seconds) +# SLEEP 020 180 300 600 (default = 20) +#SLEEP 180 + +# Low line voltage causing transfer to batteries +# The permitted values depend on your model as defined by last letter +# of FIRMWARE or APCMODEL. Some representative values are: +# D 106 103 100 097 +# M 177 172 168 182 +# A 092 090 088 086 +# I 208 204 200 196 (default = 0 => not valid) +#LOTRANSFER 208 + +# High line voltage causing transfer to batteries +# The permitted values depend on your model as defined by last letter +# of FIRMWARE or APCMODEL. Some representative values are: +# D 127 130 133 136 +# M 229 234 239 224 +# A 108 110 112 114 +# I 253 257 261 265 (default = 0 => not valid) +#HITRANSFER 253 + +# Battery charge needed to restore power +# RETURNCHARGE 00 15 50 90 (default = 15) +#RETURNCHARGE 15 + +# Alarm delay +# 0 = zero delay after pwr fail, T = power fail + 30 sec, L = low battery, N = never +# BEEPSTATE 0 T L N (default = 0) +#BEEPSTATE T + +# Low battery warning delay in minutes +# LOWBATT 02 05 07 10 (default = 02) +#LOWBATT 2 + +# UPS Output voltage when running on batteries +# The permitted values depend on your model as defined by last letter +# of FIRMWARE or APCMODEL. Some representative values are: +# D 115 +# M 208 +# A 100 +# I 230 240 220 225 (default = 0 => not valid) +#OUTPUTVOLTS 230 + +# Self test interval in hours 336=2 weeks, 168=1 week, ON=at power on +# SELFTEST 336 168 ON OFF (default = 336) +#SELFTEST 336 diff --git a/sys-power/apcupsd/files/apcupsd.init.4 b/sys-power/apcupsd/files/apcupsd.init.4 new file mode 100644 index 000000000000..ebd6b9755d4f --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd.init.4 @@ -0,0 +1,48 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +INSTANCE="${SVCNAME#*.}" +if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "apcupsd" ]; then + INSTANCE="apcupsd" +fi + +dir="/run/apcupsd" + +depend() { + use net +} + +start_pre() { + checkpath -d -m 0775 -o root:uucp ${dir} +} + +start() { + rm -f /etc/apcupsd/powerfail + + export SERVICE="${SVCNAME}" + + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + /bin/mkdir -p "${dir}" + /bin/chown root:uucp "${dir}" + fi + + ebegin "Starting APC UPS daemon" + start-stop-daemon \ + --start --pidfile "${dir}/${SVCNAME}.pid" \ + --exec /sbin/apcupsd -- \ + -f "/etc/apcupsd/${INSTANCE}.conf" \ + -P "${dir}/${SVCNAME}.pid" + eend $? +} + +stop() { + ebegin "Stopping APC UPS daemon" + start-stop-daemon \ + --stop --pidfile "${dir}/${SVCNAME}.pid" \ + --retry TERM/5/TERM/5 \ + --exec /sbin/apcupsd + eend $? +} + diff --git a/sys-power/apcupsd/files/apcupsd.powerfail.init b/sys-power/apcupsd/files/apcupsd.powerfail.init new file mode 100644 index 000000000000..be591f86c185 --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd.powerfail.init @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description='Signal the UPS to kill power in a power failure condition' + +depend() { + need mount-ro +} + +start() { + if [ "$(runlevel | cut -d' ' -f2)" = "0" -a -f /etc/apcupsd/powerfail ] ; then + ebegin 'Signaling UPS to kill power' + /sbin/apcupsd --killpower + eend $? + fi +} diff --git a/sys-power/apcupsd/files/apcupsd.service b/sys-power/apcupsd/files/apcupsd.service new file mode 100644 index 000000000000..9cec6e44194a --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd.service @@ -0,0 +1,8 @@ +[Unit] +Description=APC UPS Monitor + +[Service] +ExecStart=/sbin/apcupsd -b + +[Install] +WantedBy=multi-user.target diff --git a/sys-power/apcupsd/metadata.xml b/sys-power/apcupsd/metadata.xml new file mode 100644 index 000000000000..275b13d12ab3 --- /dev/null +++ b/sys-power/apcupsd/metadata.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>john.einar@gmail.com</email> + <name>John Einar Reitan</name> + </maintainer> + <maintainer type="person"> + <email>k_f@gentoo.org</email> + <name>Kristian Fiskerstrand</name> + </maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> +<longdescription lang="en"> +Apcupsd can be used for power mangement and controlling most of +APC's UPS models on Unix and Windows machines. Apcupsd works with +most of APC's Smart-UPS models as well as most simple signalling +models such a Back-UPS, and BackUPS-Office. During a power failure, +apcupsd will inform the users about the power failure and that a +shutdown may occur. If power is not restored, a system shutdown +will follow when the battery is exhausted, a timeout (seconds) +expires, or runtime expires based on internal APC calculations +determined by power consumption rates. +</longdescription> +<upstream> + <remote-id type="sourceforge">apcupsd</remote-id> +</upstream> +<use> + <flag name="modbus"> + enable MODBUS support over USB + </flag> +</use> +</pkgmetadata> diff --git a/sys-power/athcool/Manifest b/sys-power/athcool/Manifest new file mode 100644 index 000000000000..3ef1c0bdeda2 --- /dev/null +++ b/sys-power/athcool/Manifest @@ -0,0 +1,7 @@ +AUX athcool 180 SHA256 a03f8590ca9fb87cd11925c23045a5f672705dab12a51a17f5432584d841761d SHA512 e26d2cd77371b8cf2a1ff888d2d1fddc7718159525556cc35f5c752d13677a092ee9fc46e71b08814dd923d26925b27bcbfac53c537502949966e549bfd89e35 WHIRLPOOL dceb44811add6f0164b4bcdfed203a1a272ec3d0f75bf29e89210a520e7c734842b9ec4adf064d7f13c51f0b3b199cee1260cdd7815113c57c7f21336cd9204e +AUX athcool-0.3.11-build.patch 853 SHA256 240ead08541958a16e09eb79f0d06ac9d026654cd10e09b6b08dc36eb8a81bb2 SHA512 a6bf284608921d55109183435a33a742150fe1c3f0f30efe9417c89c1974fe8e66f499846b61f1963330e8a1c05118e8e0847de92ebeb419e95e4ccf80d43838 WHIRLPOOL a7dd76d66408ba6a3e6e81c92542b581268cc9034740f326b48e193e1b697cc3e0645cf3555e6ecca7fdf755052a121b2028df25d7ca44972c42a2bb0eefef67 +DIST athcool-0.3.12.tar.gz 18384 SHA256 8a80654cb616064d60e6188fe6d426fe104a439930fceab865930bf1c9ffbbc9 SHA512 f6a8ee2edaf1c1e1c222d7b8a28a86478c23fb946ded1af6c1ce83c35e8f056e3a54e047d0ff5c644ff2fc892cf9e19c08be0dd17ca6195cc6d612f80367b223 WHIRLPOOL 2048db84f488966010e4e4e58cfae94933d2c95fcef6881bb91f16cf80965e4c677360beb985bfcaa7d8666aeb06bf33c97b04630b4b2874f710eb007ad7d783 +EBUILD athcool-0.3.12.ebuild 1118 SHA256 1dec38a251369149a898ea5cda4500a83a68b035637b7ed3028429cfcd6b87a7 SHA512 434726cd2e4fa23f20a637fd5dd3f7f7bf5da5c358a41deab9fce45b8eaaec1ca0afb2666f4ed3f24ee2bf2fda5ec338d6f0e6ced55f286bb649b4e1a501d4f5 WHIRLPOOL fe4b28ec3951bb185484d0f642060c74f984944f6bbc681e292c46925596061bddec3842768ce148f96a9efd3f065a63ac1134d10b5bdd8815d292bcd99ce8e2 +MISC ChangeLog 3220 SHA256 90fffda209fd44a34ccefa328c9b76121642c3b41fb6787aa64284835b906744 SHA512 5396f71472bcae2189c1dd4284bf6a828c1ee2cb04600c6790ad4827451d3aa64dc15bdbb63d133323cf95b03b5852ac56afbe93406d2b32ddff75af57957aa7 WHIRLPOOL e54742fe6ab195b7bd3525b8d03b1ab8a1a25f1f1ebc70e45ef1f71c24916a77beac3f8bdfb29f786cc289b98122b4dcf4b41bbbd20cf3a983bdc2c493ad8028 +MISC ChangeLog-2015 3275 SHA256 b58d4fff17a5ceca2a972c6677a29c5d36fa77c2dafa69cdec305b65fb2120ab SHA512 16f8ec36ff595bb1aaa87e7fa41387a8fb13849551cc409f271311e9eb519127d97f3d4532d3ed10876ce6956f091e1f5d4924caa65b8114a7a4ec7196690c76 WHIRLPOOL dcf9faeeb24d82cf6d7cb4f58fa7a733c56d4ceb27c09788726291f439ac12895447abad25cc60f6fe99532d898d0cd7ef0fd814439b96d533f15714b2552953 +MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8 diff --git a/sys-power/athcool/athcool-0.3.12.ebuild b/sys-power/athcool/athcool-0.3.12.ebuild new file mode 100644 index 000000000000..b9ed25616659 --- /dev/null +++ b/sys-power/athcool/athcool-0.3.12.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +inherit eutils toolchain-funcs + +DESCRIPTION="small utility to toggle Powersaving mode for AMD Athlon/Duron processors" +HOMEPAGE="http://members.jcom.home.ne.jp/jacobi/linux/softwares.html#athcool" +SRC_URI="http://members.jcom.home.ne.jp/jacobi/linux/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* x86" +IUSE="" + +DEPEND="sys-apps/pciutils" +RDEPEND="" + +pkg_setup() { + tc-export CC +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.3.11-build.patch +} + +src_install() { + emake install DESTDIR="${D}" || die + doinitd "${FILESDIR}"/athcool + dodoc README ChangeLog +} + +pkg_postinst() { + ewarn "WARNING: Depending on your motherboard and/or hardware components," + ewarn "enabling powersaving mode may cause:" + ewarn " * noisy or distorted sound playback" + ewarn " * a slowdown in harddisk performance" + ewarn " * system locks or unpredictable behavior" + ewarn " * file system corruption" + ewarn "If you met those problems, you should not use athcool. Please use" + ewarn "athcool AT YOUR OWN RISK!" +} diff --git a/sys-power/athcool/files/athcool b/sys-power/athcool/files/athcool new file mode 100644 index 000000000000..8dfef3a0afa7 --- /dev/null +++ b/sys-power/athcool/files/athcool @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +start() { + ebegin "Starting ${SVCNAME}" + athcool on >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + athcool off >/dev/null 2>&1 + eend $? +} + diff --git a/sys-power/athcool/files/athcool-0.3.11-build.patch b/sys-power/athcool/files/athcool-0.3.11-build.patch new file mode 100644 index 000000000000..8b8e619dd71f --- /dev/null +++ b/sys-power/athcool/files/athcool-0.3.11-build.patch @@ -0,0 +1,36 @@ +--- Makefile ++++ Makefile +@@ -14,13 +14,13 @@ + SRCS = athcool.c scanpci.c + OBJS = $(SRCS:.c=.o) + +-CC = gcc ++CC ?= gcc + RM = rm -f +-CFLAGS = -O2 -Wall +-DEFS = -I. -I$(includedir) -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" ++CFLAGS += -Wall ++DEFS = -I. -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" + #DEFS += -DENABLE_FORCEID=1 + #DEFS += -DDISABLE_WRITE_REG=1 +-LIBS = -lpci ++LIBS = -lpci -lz + + ### rules ### + +@@ -30,13 +30,13 @@ + all: $(PACKAGE) + + $(PACKAGE): $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@ ++ $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@ $(LDFLAGS) + + install: install-program install-man # install-script + + install-program: + [ -d $(sbindir) ] || install -m 755 -d $(sbindir) +- install -s $(PACKAGE) $(sbindir) ++ install $(PACKAGE) $(sbindir) + + install-man: + [ -d $(mandir)/man8 ] || install -m 755 -d $(mandir)/man8 diff --git a/sys-power/athcool/metadata.xml b/sys-power/athcool/metadata.xml new file mode 100644 index 000000000000..56c124413057 --- /dev/null +++ b/sys-power/athcool/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 type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +</pkgmetadata> diff --git a/sys-power/bbswitch/Manifest b/sys-power/bbswitch/Manifest new file mode 100644 index 000000000000..ce9a67ccd721 --- /dev/null +++ b/sys-power/bbswitch/Manifest @@ -0,0 +1,9 @@ +AUX bbswitch-0.8-kernel-4.12.patch 528 SHA256 826d7fd3c2cea968f21cf9c27b2aa6ae69775126d48a09ee7806c5287451702e SHA512 52b8f8cc378d915f0671fff193041c13d756db4d4b8db01594d9411a1422e1d8ff0e364d041f472b15b7c581a2fec583ecd86bcb5477b3703c9d993504a6ab61 WHIRLPOOL 8d4978bad9042a8f8a4d0c9186af521e97987425a4bedb118de54fa144d03185995f2770cea08f09fcf2ac204f4c4e578b1d7c3c430809451e0f27205bb5d97e +AUX bbswitch.modprobe 46 SHA256 e87a481ce095be46efe970769b070d865cb26c91e3a672f61341421acb52e82f SHA512 a4fa992d66b401e039c995b64ac5f3b2491c3ccf4412e211d50d1e514253f9341dc77a6d8da808f03988735e44a97bb973f3303ed3c0eeed6f4e21794d3545b6 WHIRLPOOL 0b913611bcede225d408c9e4a59a3ec9b8044a58fe2613f3e5d4d85b349a7c84e028f7f398b9742787c11e93dcc080baade824d37f8126c8ef3409c6e90f1848 +DIST bbswitch-0.8.tar.gz 15800 SHA256 76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477 SHA512 11ab163931feb6c0e202d04c4552b848e999fedea9990390c26b28abdb4a69081ccfb5a22d1e390cc274f1c0cfc9adedc719c5fece14738b17aaa93e28865b7c WHIRLPOOL 4215bb74779d5bfaacd1177f89636a9006fbce369c381e620868e7012092756417f7df732b373341254fad75e08f6de4536921f5478f0032d2961d22d56a3c15 +EBUILD bbswitch-0.8-r1.ebuild 1067 SHA256 3a1eda51db695c9dad4bd43bbaa4e442ff10a41c2b4b745b7bb916ffe8e06f90 SHA512 4130a6c02e65506877a61590c42bb7afa86a9dcc485b53d7b64a265f8c153d3ab71c8bff03c9bdca758dbb91bff5966c648aa4afa653f24c6346592e445f98bc WHIRLPOOL 33643b3456c6f2c9033576d1801e9f5eb0c96f4bcbcdd53ca5d12714f406dbcf5f6f256cd0f4fe348ff66f3d6ad6f68f1290df3e910416a198a9b26d6fd562c4 +EBUILD bbswitch-0.8.ebuild 870 SHA256 af76c7e173c37d83e41143e4742defc73dac8fd04aed283ee7813f1845f9ca0e SHA512 8fc0d492a417cec27ec87d6e0235758e9017f44b1549b8464b187f30173505a391eefb270b74183784613bbc38930e4df2aa99d67445b80938dc3616c0252418 WHIRLPOOL 4e44bc26b4c44cb0c2e0bfc40896b06544e12c5ba19630ed1a4d36ba2952fa8310b04caae39846474f22df453ba2628a051f08445a35c96248f2b7fd8d67bf5b +EBUILD bbswitch-9999.ebuild 1067 SHA256 3a1eda51db695c9dad4bd43bbaa4e442ff10a41c2b4b745b7bb916ffe8e06f90 SHA512 4130a6c02e65506877a61590c42bb7afa86a9dcc485b53d7b64a265f8c153d3ab71c8bff03c9bdca758dbb91bff5966c648aa4afa653f24c6346592e445f98bc WHIRLPOOL 33643b3456c6f2c9033576d1801e9f5eb0c96f4bcbcdd53ca5d12714f406dbcf5f6f256cd0f4fe348ff66f3d6ad6f68f1290df3e910416a198a9b26d6fd562c4 +MISC ChangeLog 3107 SHA256 62d70ebe1a90bf7b527aa775d5ffb8dc9b5d68a4982ea025719f6b892fc783fe SHA512 22740b78176d912dff71a0d2c213f7e29afdb77762ccfeb5257053b6d5051c1e9c29c8ff725686705f1b1841a27f8c6a51f13f0dcf60d36f195a05edc46adbcf WHIRLPOOL 3663cf9d79106e99644368b28e734495362d4a35a8777d147c5ff6f8db2f170c7af79c836ff9fbaa742674f926f0697c031a2d3f74501f70dacd454b37a821f0 +MISC ChangeLog-2015 2552 SHA256 4a7253c990f38e296a4b72455f5b799834bb55a3b3d99edcb5afa730951e93ee SHA512 16f69184217a479d079496f55c1878b7f1a9ca7d2bc5d2c5e1c7bb7c58906001d173df2691a9e91bfd8e732408f1f21c8ea0d5432edc85742618e9aff358dccb WHIRLPOOL 8a4c3642c7ec119eeab39fd1dd4479c52e56a6107e8fad708f7b57d251153eef5595bc4d9195adcbc0fe685dff88e450362eb9fe6e61ef80c67b3b53cb03e862 +MISC metadata.xml 866 SHA256 377195f3e5895d279128fcb0e29e2b88067293d63786230ffa1f277ec1742cf9 SHA512 0a39acf63faef61a12277e39d96fc866ff30822336ab098a0ab6affdcbc63054ff9c78bcbcddae952e205927ac6f00c04dce803bc825ae1c2853bfaded81124d WHIRLPOOL 902b03d8772a95c6f08368f93302225b29b53bd8ffc9fa3dc7eb6225c36432839a282b203cbc8121b64a3c45361e172031138a26519e21d8ddbbeb75dbf25943 diff --git a/sys-power/bbswitch/bbswitch-0.8-r1.ebuild b/sys-power/bbswitch/bbswitch-0.8-r1.ebuild new file mode 100644 index 000000000000..bb29cb2fd85b --- /dev/null +++ b/sys-power/bbswitch/bbswitch-0.8-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-mod + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Bumblebee-Project/${PN}.git" + EGIT_BRANCH="develop" +else + PATCHES=( "${FILESDIR}/${PN}-0.8-kernel-4.12.patch" ) + SRC_URI="https://github.com/Bumblebee-Project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Toggle discrete NVIDIA Optimus graphics card" +HOMEPAGE="https://github.com/Bumblebee-Project/bbswitch" + +SLOT="0" +LICENSE="GPL-3+" +IUSE="" + +DEPEND=" + virtual/linux-sources + sys-kernel/linux-headers +" +RDEPEND="" + +MODULE_NAMES="bbswitch(acpi)" + +pkg_setup() { + linux-mod_pkg_setup + + BUILD_TARGETS="default" + BUILD_PARAMS="KVERSION=${KV_FULL}" +} + +src_prepare() { + # Fix build failure, bug #513542 + sed -i 's/^KDIR.*$/KDIR\ \:= \/usr\/src\/linux/g' Makefile || die + + default +} + +src_install() { + einstalldocs + + insinto /etc/modprobe.d + newins "${FILESDIR}"/bbswitch.modprobe bbswitch.conf + + linux-mod_src_install +} diff --git a/sys-power/bbswitch/bbswitch-0.8.ebuild b/sys-power/bbswitch/bbswitch-0.8.ebuild new file mode 100644 index 000000000000..6d3bf202702a --- /dev/null +++ b/sys-power/bbswitch/bbswitch-0.8.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils linux-mod + +DESCRIPTION="Toggle discrete NVIDIA Optimus graphics card" +HOMEPAGE="https://github.com/Bumblebee-Project/bbswitch" +SRC_URI="https://github.com/Bumblebee-Project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-3+" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND=" + virtual/linux-sources + sys-kernel/linux-headers +" +RDEPEND="" + +MODULE_NAMES="bbswitch(acpi)" + +pkg_setup() { + linux-mod_pkg_setup + + BUILD_TARGETS="default" + BUILD_PARAMS="KVERSION=${KV_FULL}" +} + +src_prepare() { + # Fix build failure, bug #513542 + sed -i 's/^KDIR.*$/KDIR\ \:= \/usr\/src\/linux/g' Makefile || die +} + +src_install() { + insinto /etc/modprobe.d + newins "${FILESDIR}"/bbswitch.modprobe bbswitch.conf + dodoc NEWS README.md + + linux-mod_src_install +} diff --git a/sys-power/bbswitch/bbswitch-9999.ebuild b/sys-power/bbswitch/bbswitch-9999.ebuild new file mode 100644 index 000000000000..bb29cb2fd85b --- /dev/null +++ b/sys-power/bbswitch/bbswitch-9999.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-mod + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Bumblebee-Project/${PN}.git" + EGIT_BRANCH="develop" +else + PATCHES=( "${FILESDIR}/${PN}-0.8-kernel-4.12.patch" ) + SRC_URI="https://github.com/Bumblebee-Project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Toggle discrete NVIDIA Optimus graphics card" +HOMEPAGE="https://github.com/Bumblebee-Project/bbswitch" + +SLOT="0" +LICENSE="GPL-3+" +IUSE="" + +DEPEND=" + virtual/linux-sources + sys-kernel/linux-headers +" +RDEPEND="" + +MODULE_NAMES="bbswitch(acpi)" + +pkg_setup() { + linux-mod_pkg_setup + + BUILD_TARGETS="default" + BUILD_PARAMS="KVERSION=${KV_FULL}" +} + +src_prepare() { + # Fix build failure, bug #513542 + sed -i 's/^KDIR.*$/KDIR\ \:= \/usr\/src\/linux/g' Makefile || die + + default +} + +src_install() { + einstalldocs + + insinto /etc/modprobe.d + newins "${FILESDIR}"/bbswitch.modprobe bbswitch.conf + + linux-mod_src_install +} diff --git a/sys-power/bbswitch/files/bbswitch-0.8-kernel-4.12.patch b/sys-power/bbswitch/files/bbswitch-0.8-kernel-4.12.patch new file mode 100644 index 000000000000..1db623d583e9 --- /dev/null +++ b/sys-power/bbswitch/files/bbswitch-0.8-kernel-4.12.patch @@ -0,0 +1,18 @@ +diff -uNr bbswitch-0.8/bbswitch.c bbswitch-0.8-new/bbswitch.c +--- bbswitch-0.8/bbswitch.c 2013-12-04 18:22:06.000000000 -0500 ++++ bbswitch-0.8-new/bbswitch.c 2017-07-08 01:11:54.588545766 -0400 +@@ -31,7 +31,14 @@ + #include <linux/pci.h> + #include <linux/acpi.h> + #include <linux/module.h> ++#include <linux/version.h> ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) ++#include <linux/uaccess.h> ++#else + #include <asm/uaccess.h> ++#endif ++ + #include <linux/suspend.h> + #include <linux/seq_file.h> + #include <linux/pm_runtime.h> diff --git a/sys-power/bbswitch/files/bbswitch.modprobe b/sys-power/bbswitch/files/bbswitch.modprobe new file mode 100644 index 000000000000..dd6500c77131 --- /dev/null +++ b/sys-power/bbswitch/files/bbswitch.modprobe @@ -0,0 +1 @@ +options bbswitch load_state=-1 unload_state=-1
\ No newline at end of file diff --git a/sys-power/bbswitch/metadata.xml b/sys-power/bbswitch/metadata.xml new file mode 100644 index 000000000000..437e2daa175e --- /dev/null +++ b/sys-power/bbswitch/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>NP-Hardass@gentoo.org</email> + <name>NP-Hardass</name> + </maintainer> + <maintainer type="person"> + <email>gentoo@mva.name</email> + <name>Vadim A. Misbakh-Soloviov</name> + </maintainer> + <maintainer type="person"> + <email>rei4dan@gmail.com</email> + <name>My Th</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + Kernel module which automatically detects the required ACPI calls for two + kinds of Optimus laptops for safe disabling/enabling the discrete graphics card. +</longdescription> + <upstream> + <remote-id type="github">Bumblebee-Project/bbswitch</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/cpupower/Manifest b/sys-power/cpupower/Manifest new file mode 100644 index 000000000000..75e808e5293d --- /dev/null +++ b/sys-power/cpupower/Manifest @@ -0,0 +1,14 @@ +AUX cflags-strip.patch 423 SHA256 b303f0750aacabfc2bd46fbb46331b16a3fff05c46510ee2056377b3419c98f2 SHA512 546c6c8187638cae094a428226c9c7463168b66fb1d16ffb05167a2bb5fb8792c08b6a68e71cbabaaa95aac352ca5ad4c1fce0a3a6fded6863b40c1ed1a5b4c0 WHIRLPOOL 8db7027cc6110252585ab9addeb660831438195d5f338b86aa5c9c47994ed6d2492e01c194ec95d1822ee0a88ca0ba2374f50f300bae12f624c35f497ad9e818 +AUX conf.d-r2 1616 SHA256 9ab6f022d2b2948660decf5e383984e6ddb9e9e5e6e2761c3031378ddd87e947 SHA512 63cd12a4d8782198c71662e9205e346e064b65bae5e3e175b5bc43bdf7ec6ddf675b60349750afe3c37c8a925f9ae9a93530671821342581bd282a69e0773b8c WHIRLPOOL 6e122d40525b2860b50b3933c6aab8c7fcc602a71faf7f6fb912db538bc58b21c2bee23f60c1801f5fe05dbfe434ce2432483a2e3bf1de4f75e0cce588fbb34c +AUX cpupower-frequency-set.service 151 SHA256 a8390d13efea7d1d8bf84394c04c930c829ca5baa3a2cb92f3f1aad0375a33ff SHA512 dcd6bb5dee338113683c2e222df23195857f44f5430569b3c454078d0650c15fa2fa3876dccd6ee4652d0fd409f925205d0d3e57344487a64945c67a3b0dee67 WHIRLPOOL d99b1775a1a723ceb55ecb5bff8594c09f7cb50756915e941e332e34522d7e4c9cf9e1f67dc7e99e486c3292903018a53dab30f38b58dcc6b60796840c6535e3 +AUX cpupower-frequency-set.service.conf 41 SHA256 13d7b79fbbb91c7c505ccefc56189bbf2c8aedb3fa72d75e7993178c00d7ac98 SHA512 d99b78a5ab4f7b4e8fe92bc0b2cd722cd55e97e234027a0eba37eb39739e2a470bfc369efa9cf7846bf1a6d588d9d5d5d9efbb90a68aac2f687ddeb833e291f1 WHIRLPOOL 056925b8cd5f7a0ec4cdd439f06bc4b6f23e95b267a3eebf99e58ec061f5013a4ec360f5217f68dab3f89dc697213a781e4c120c9b000261ae9844654dd38dd6 +AUX init.d-r4 804 SHA256 c8c092fa80da7c312430389ae06ff7874d651d8e7b6c28236ee5c8d8d3557d9d SHA512 7f6992b17376c0bedb403586e123200272d293b15819260cacd182c19ecdb2da635b177fe3d621ad8605a4ff046fd23669e67ea0bd8f00c9e4339d3ac72d2ddf WHIRLPOOL 2472b9513264e711400e97e5779ce41815f86b5cd56c8c0bd90d5d7cf09d9cc30951be4c1cb99093cdd2a972393fb22237aca555dbaa04a6efb0d167e5c2e2ba +DIST cpupower-4.13.0.tar.xz 67812 SHA256 8336dd1e4e6c5c8ab42c29ba373317987e500b8771a45d5f6289781783955b12 SHA512 5e7095e2741eae920a097864926931afb2656e492b504f203c40c24ddc5aee5014c7689b220225171b5ea10c69b70774fb2a979d05ea56ef1fa063f3097626c7 WHIRLPOOL d4273cbb97f3a0f6aa346513b8b7e3c57d08514e4d30aac710522c96d4b129bd64e03d52f6c97e1b8b48199339de54f60f2d588889161e3dcc4203ae2daf2a9a +DIST cpupower-4.9.0.tar.xz 67620 SHA256 5e0eda0f31c6c14b0b181d98ad89ead6ea62114635eb29ad288778bbe0c88168 SHA512 67137bd7166a34f131332a5165384ebca5b97deb1c92e6d557195da4be4fecb0c5902159f748ea454461ad2181a778c32b4e4dfd1f8ce7e6a3ec41f553f23677 WHIRLPOOL 73dc80fe4308146efcbc05b3b7290a66d23b6653cde9013b76d230a914b184212f7a0713b82857c882c65a3448febcd08ae4581499cf97bb0e21a5622053c519 +DIST linux-3.18.tar.xz 80934708 SHA256 becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd SHA512 2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009 WHIRLPOOL 81634af631b7d30ccd1f4798f96f44d9aa0ba6609b73f2747eb6aebaf7a99487fb2dbd45767605186182533cb222bfd9236e8dd5e11a04fdb67c211e4e0a91d6 +EBUILD cpupower-3.18.ebuild 1603 SHA256 f0a1f8383520d46b6fd7cb73177f32c28b94f30f6233178ae1a12d2043d66554 SHA512 dd1d25708f75be16cd908b252511dab6dbacd5b631e3d8ea385dfb3a40cf52d9f4e92bb62fa643f00570d8f8ec2a5a336770e08c7f18e123f961cd0ff5673399 WHIRLPOOL 2871cd13400f3698a2b4140e13425566d24cfd4084e921db631959734c432171951121feed4c157fb2055ba42c6ff8d42d00f188bb92dcb60ab4d90e71a0060f +EBUILD cpupower-4.13.0.ebuild 1727 SHA256 ec19e7a0de39d3b41538bf275a718c07aa5091ae2ea6005b6752beb8327b1c85 SHA512 55cdc14cba59b6a04747135d2e71b9b6265630f3cf123de6bbdd7035b6033828ef716099dbafd3b2d4f0bb4a0d99277e1242b368357d8e18a87adf0475a172b8 WHIRLPOOL 6f4d87a628542cb137b07442462aa664759f761bbcc0c4d9a79e3dcc301b915767831856c49ff8b296142f6a0a101682e9caa4cd1819904dc57c9e0ea1ecc58e +EBUILD cpupower-4.9.0-r1.ebuild 1460 SHA256 37816849161b9d94f6ce67d38dfbdf26516386efd3d8c69617aea4dfa07fe476 SHA512 e96a435498faf21b6427fbc5bf72ff2d40190b79354a5db11c8f8d4b505d4749b302f55f066396c8d358a55bdb4dbfb3b86d904f291862fb7ad0b24e78705b93 WHIRLPOOL dfd01378c33cdd83d3fcfed2f4f3fc0acaee4be4e80a6ce7375371a472b5c34b6d625545f9afe773803f9d69ac8c5a3c3d167e3439a8f98a782152c6096280ba +MISC ChangeLog 5687 SHA256 d245fb955cc30b4656c43a091589bd52b24fb45aecc591de43ade442b3de3bc6 SHA512 7a289dcc5898464a14c55ba2b9444d67062577472569e23d2b64986629c507d449344a20cdca40fea87583c8d278c541cfe1d7bf26f84b4d0ea18d4f0e189770 WHIRLPOOL 27658ce755aad1952c17cef225106c433e3ce4fdacffd98e1f8189641a2026848b7801a556bb3c9926b9e4812c1c11c738050cbb094df254750d72bc562b9808 +MISC ChangeLog-2015 3810 SHA256 e61406a0bd2961884325a4b40efc640af3784ef6a1794063a16c7959fc620e35 SHA512 161eb848ae106bda3844ddf3e441cfd223471bb6f1c9ba8a9c61c108c6f226e50af66162795afa58644e2b94a456854ba42973140feb1fbf1579c1c7d343aedf WHIRLPOOL 999ebda1a38b9277eff5b680c5808a5c26a1c04caa7309d02be7cded21e00f7c145f92c47c9bd603e23f506538f2c7dc053479e6419842b814dfb060a9192c84 +MISC metadata.xml 434 SHA256 15435b06c669a2d4092eb9c19de609558214a106bc88c7b602722bcc1ff5aaa5 SHA512 9ce805896548834fd7c83f53af781432efcfc9a2d272ccb8ae93e57159507940570323a0fbc9d95097c71496cfb2b508d0c4f14bfebd9641140d5317005b2705 WHIRLPOOL b6e997599965ca305cfbce478f0e0ff3ac33c66228f929116a6d1726dd7d653a85a5a5567e40a8051366e2114c8fc673afbd750ca01a0c435bc5263f303c83ce diff --git a/sys-power/cpupower/cpupower-3.18.ebuild b/sys-power/cpupower/cpupower-3.18.ebuild new file mode 100644 index 000000000000..51bd73b27134 --- /dev/null +++ b/sys-power/cpupower/cpupower-3.18.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit multilib toolchain-funcs + +DESCRIPTION="Shows and sets processor power related values" +HOMEPAGE="https://www.kernel.org/" +SRC_URI="mirror://kernel/linux/kernel/v3.x/linux-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86" +IUSE="cpufreq_bench debug nls" + +# File collision w/ headers of the deprecated cpufrequtils +RDEPEND="sys-apps/pciutils + !<sys-apps/linux-misc-apps-3.6-r2 + !sys-power/cpufrequtils" +DEPEND="${RDEPEND} + virtual/os-headers + virtual/pkgconfig + nls? ( sys-devel/gettext )" + +S=${WORKDIR}/linux-${PV}/tools/power/${PN} + +pkg_setup() { + myemakeargs=( + DEBUG=$(usex debug true false) + V=1 + CPUFREQ_BENCH=$(usex cpufreq_bench true false) + NLS=$(usex nls true false) + docdir=/usr/share/doc/${PF}/${PN} + mandir=/usr/share/man + libdir=/usr/$(get_libdir) + AR="$(tc-getAR)" + CC="$(tc-getCC)" + LD="$(tc-getCC)" + STRIP=true + LDFLAGS="${LDFLAGS}" + OPTIMIZATION="${CFLAGS}" + ) +} + +src_unpack() { + tar -xf "${DISTDIR}"/linux-${PV}.tar.xz \ + linux-${PV}/tools/power/${PN} \ + linux-${PV}/Makefile \ + || die +} + +src_prepare() { + # -Wl,--as-needed compat + local libs="-lcpupower -lrt $($(tc-getPKG_CONFIG) --libs-only-l libpci)" + sed -i \ + -e "/$libs/{ s,${libs},,g; s,\$, ${libs},g;}" \ + -e "s:-O1 -g::" \ + Makefile || die +} + +src_compile() { + emake "${myemakeargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" "${myemakeargs[@]}" install + dodoc README ToDo + + newconfd "${FILESDIR}"/conf.d-r2 ${PN} + newinitd "${FILESDIR}"/init.d-r4 ${PN} +} diff --git a/sys-power/cpupower/cpupower-4.13.0.ebuild b/sys-power/cpupower/cpupower-4.13.0.ebuild new file mode 100644 index 000000000000..795d099aa0a7 --- /dev/null +++ b/sys-power/cpupower/cpupower-4.13.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# eutils: strip-linguas +inherit eutils systemd toolchain-funcs + +DESCRIPTION="Shows and sets processor power related values" +HOMEPAGE="https://www.kernel.org/" +SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +IUSE="cpufreq_bench nls" + +# File collision w/ headers of the deprecated cpufrequtils +RDEPEND="sys-apps/pciutils + !<sys-apps/linux-misc-apps-3.6-r2 + !sys-power/cpufrequtils" +DEPEND="${RDEPEND} + virtual/os-headers + nls? ( sys-devel/gettext )" + +PATCHES=( + "${FILESDIR}"/cflags-strip.patch +) + +src_configure() { + export bindir="${EPREFIX}/usr/bin" + export sbindir="${EPREFIX}/usr/sbin" + export mandir="${EPREFIX}/usr/share/man" + export includedir="${EPREFIX}/usr/include" + export libdir="${EPREFIX}/usr/$(get_libdir)" + export localedir="${EPREFIX}/usr/share/locale" + export docdir="${EPREFIX}/usr/share/doc/${PF}" + export confdir="${EPREFIX}/etc" + export V=1 + export NLS=$(usex nls true false) + export CPUFREQ_BENCH=$(usex cpufreq_bench true false) +} + +src_compile() { + myemakeargs=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + LD="$(tc-getCC)" + VERSION=${PV} + ) + + if [[ -n ${LINGUAS+set} ]]; then + strip-linguas -i po + myemakeargs+=( LANGUAGES="${LINGUAS}" ) + fi + + emake "${myemakeargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" "${myemakeargs[@]}" install + doheader lib/cpupower.h + dodoc README ToDo + + newconfd "${FILESDIR}"/conf.d-r2 cpupower + newinitd "${FILESDIR}"/init.d-r4 cpupower + + systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service + systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf +} diff --git a/sys-power/cpupower/cpupower-4.9.0-r1.ebuild b/sys-power/cpupower/cpupower-4.9.0-r1.ebuild new file mode 100644 index 000000000000..308a7d815fea --- /dev/null +++ b/sys-power/cpupower/cpupower-4.9.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# eutils: strip-linguas +inherit eutils systemd toolchain-funcs + +DESCRIPTION="Shows and sets processor power related values" +HOMEPAGE="https://www.kernel.org/" +SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/0" +KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86" +IUSE="cpufreq_bench debug nls" + +# File collision w/ headers of the deprecated cpufrequtils +RDEPEND="sys-apps/pciutils + !<sys-apps/linux-misc-apps-3.6-r2 + !sys-power/cpufrequtils" +DEPEND="${RDEPEND} + virtual/os-headers + nls? ( sys-devel/gettext )" + +src_compile() { + myemakeargs=( + DEBUG=$(usex debug true false) + V=1 + CPUFREQ_BENCH=$(usex cpufreq_bench true false) + NLS=$(usex nls true false) + docdir=/usr/share/doc/${PF}/${PN} + mandir=/usr/share/man + libdir=/usr/$(get_libdir) + AR="$(tc-getAR)" + CC="$(tc-getCC)" + LD="$(tc-getCC)" + STRIP=true + OPTIMIZATION= + VERSION=${PV} + ) + + if [[ -n ${LINGUAS+set} ]]; then + strip-linguas -i po + myemakeargs+=( LANGUAGES="${LINGUAS}" ) + fi + + emake "${myemakeargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" "${myemakeargs[@]}" install + doheader lib/cpupower.h + dodoc README ToDo + + newconfd "${FILESDIR}"/conf.d-r2 cpupower + newinitd "${FILESDIR}"/init.d-r4 cpupower + + systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service + systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf +} diff --git a/sys-power/cpupower/files/cflags-strip.patch b/sys-power/cpupower/files/cflags-strip.patch new file mode 100644 index 000000000000..6e70fdf38b1c --- /dev/null +++ b/sys-power/cpupower/files/cflags-strip.patch @@ -0,0 +1,18 @@ +--- a/Makefile ++++ b/Makefile +@@ -180,14 +180,7 @@ + endif + export QUIET ECHO + +-# if DEBUG is enabled, then we do not strip or optimize +-ifeq ($(strip $(DEBUG)),true) +- CFLAGS += -O1 -g -DDEBUG +- STRIPCMD = /bin/true -Since_we_are_debugging +-else +- CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer +- STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment +-endif ++STRIPCMD = true + + + # the actual make rules diff --git a/sys-power/cpupower/files/conf.d-r2 b/sys-power/cpupower/files/conf.d-r2 new file mode 100644 index 000000000000..1e67ed04e254 --- /dev/null +++ b/sys-power/cpupower/files/conf.d-r2 @@ -0,0 +1,36 @@ +# /etc/conf.d/cpupower: config file for /etc/init.d/cpupower + +# Options when starting cpufreq (given to the `cpupower` program) +# Possible options are: +# -g --governor <GOV> (ie: ondemand, performance, or powersave) +# -d --min <FREQ> (ie: 1000MHz) +# -u --max <FREQ> (ie: 2000MHz) +# -f --freq <FREQ> (requires userspace governor, this *can not* be combined with +# with any other parameters). +# Frequencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the +# value with the wanted unit name, without any space. +# (frequency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000). + +START_OPTS="--governor ondemand" + +# Options when stopping cpufreq (given to the `cpupower` program) +# This option can be used to change governer on stop. Leaving it empty will ensure +# the governer remains on the one provided above. +STOP_OPTS="" + +# Extra settings to write to sysfs cpufreq values. +# +# up_threshold: threshold for stepping up frequency, where the value represents +# the percentage of cpu load. +# +# down_threshold: threshold for stepping down frequency, where the value +# represents the percentage of cpu load. +# +# sampling_down_factor: determines how frequently the governor polls the cpu, a +# value greater than 1 improves performance by reducing the polling when the +# load is high. This tunable has no effect on behavior at lower CPU frequencies. +# +# ignore_nice_load: when set to '1' the processes that are run with a 'nice' +# value will not count in the usage calculation. + +#SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=75 ondemand/sampling_down_factor=10" diff --git a/sys-power/cpupower/files/cpupower-frequency-set.service b/sys-power/cpupower/files/cpupower-frequency-set.service new file mode 100644 index 000000000000..8f2f4d9b7628 --- /dev/null +++ b/sys-power/cpupower/files/cpupower-frequency-set.service @@ -0,0 +1,9 @@ +[Unit] +Description=CPU Frequency Scaling + +[Service] +Type=oneshot +ExecStart=/usr/bin/cpupower frequency-set $OPTS + +[Install] +WantedBy=multi-user.target diff --git a/sys-power/cpupower/files/cpupower-frequency-set.service.conf b/sys-power/cpupower/files/cpupower-frequency-set.service.conf new file mode 100644 index 000000000000..969c8ab2f214 --- /dev/null +++ b/sys-power/cpupower/files/cpupower-frequency-set.service.conf @@ -0,0 +1,2 @@ +[Service] +Environment="OPTS=-g ondemand" diff --git a/sys-power/cpupower/files/init.d-r4 b/sys-power/cpupower/files/init.d-r4 new file mode 100644 index 000000000000..febed865b250 --- /dev/null +++ b/sys-power/cpupower/files/init.d-r4 @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +CPUFREQ_SYSFS=/sys/devices/system/cpu/cpufreq + +change() { + local c ret=0 opts="$1" + if [ -n "$opts" ] ; then + ebegin "Running cpupower -c all frequency-set ${opts}" + cpupower -c all frequency-set ${opts} >/dev/null 2>&1 + : $(( ret += $? )) + eend ${ret} + + if [ -d ${CPUFREQ_SYSFS} ] && [ -n "${SYSFS_EXTRA}" ] ; then + c=1 + einfo "Setting extra options: ${SYSFS_EXTRA}" + if cd ${CPUFREQ_SYSFS} ; then + local o v + for o in ${SYSFS_EXTRA} ; do + v=${o#*=} + o=${o%%=*} + echo ${v} > ${o} || break + done + c=0 + fi + eend ${c} + : $(( ret += c )) + fi + fi + + return ${ret} +} + +start() { + change "${START_OPTS}" +} + +stop() { + change "${STOP_OPTS}" +} diff --git a/sys-power/cpupower/metadata.xml b/sys-power/cpupower/metadata.xml new file mode 100644 index 000000000000..470032972666 --- /dev/null +++ b/sys-power/cpupower/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 type="person"> + <email>floppym@gentoo.org</email> + <name>Mike Gilbert</name> + </maintainer> + <use> + <flag name="cpufreq_bench">Build and install the cpufreq_bench binary</flag> + </use> + <slots> + <subslots>Subslots correspond to major version of libcpupower</subslots> + </slots> +</pkgmetadata> diff --git a/sys-power/hibernate-script/Manifest b/sys-power/hibernate-script/Manifest new file mode 100644 index 000000000000..682c9d2d4694 --- /dev/null +++ b/sys-power/hibernate-script/Manifest @@ -0,0 +1,6 @@ +DIST hibernate-script-2.0-patches-5.tar.bz2 4203 SHA256 592f6069ed18aa23feb93286ec2bd8c0b8577e977647591cc4d3f1636499c219 SHA512 9e9c45c8f9bfde9bfb7d2ab229e355e635ae2f98cfdefa964c07401cdef5e57d0c58976bd491f82a3b9204af213c82f840e0a9b794b2869f2dfe7783dbdb4970 WHIRLPOOL 1df9605be7d8bf4b3f728738420ab5cfaaeb55d566e1f78227f7fc54b977c5469874b008f57a46d866795a3b11d019c16bb24f92f04c37eb9515d031a75e3626 +DIST hibernate-script-2.0.tar.gz 84453 SHA256 d04597473a50c6ac072e3a4c22f173a7234a97bc2a39e460e56c5d3d985a6545 SHA512 625efdf8bd8561dd9ab93c09436f2fb93edef2fbb0fb2d259727bacffab0b7bd4a6c99d445131390883be75658f6dd28f329fdaf4f03a7d218c0021223ac1a1e WHIRLPOOL 8dab0108063b0d74d49fd075fdba7c96db7eeb8ebab5054329578b3dfe7adeb0d048db6cedfc238ba374bfa97d689eb8e08eb270ab72d861904487b7dc04dc21 +EBUILD hibernate-script-2.0-r6.ebuild 1840 SHA256 a9ce68374c30e418be71e5184046d62415226255d2913f8cac55d5a70c740996 SHA512 3f49f998e364374b9a9b250c82c06c8852c679eb51ac407755567f292cd3247d1628e8428223d98a314ff37c266328ad2cffb1cbab2ce39e0a0f5dff676d639f WHIRLPOOL 1a8ba20756b0f53c676d30ce0972208404eb788616bb87abbe2f6b516309a60fd7be6eb2cb61f24af8e77a3b379f8e57e6e8537c02d6b264bd4ce35c856e61ae +MISC ChangeLog 2600 SHA256 e59c1cf2cbb6f579f439835975e1c1a273c44ffcedc8b2c56f63543bd013180c SHA512 a966a318c50cdc4aca81c4f7d9c519f4eb17a2cafbb09f06d4623059e8ca08b28af8d58c4937e8364177615cbd2d6894d1ea2461429134a0610faac868d5d398 WHIRLPOOL 0f8b2d10c4b333c814813c4efe6d1656d94b691e0e66c241f8d6295f1e2741b26d173d8531fd33109cba89786f8531bf5d9f58eac6de4a0e7a01c3252ce161f4 +MISC ChangeLog-2015 20275 SHA256 22e341591f5ff67465e5ee7f319f9f96ff5a15c9285f973fa1c3a9e55e8d1096 SHA512 6e7d14db02568c1f377633c07e08256fe538d42160309ec6e0e383b25a03efda44e5a74360c11eaebc32b2c9b10d1338bcdb9076c08d3722de3c7843863d77e2 WHIRLPOOL a6cb45cd759eea9e49110e97d343bdefa4fb8e7b4a2ae939fbc472eec55c206c176bd9d3d603319fd76255c35510167bcd7e29d386a472f98af99cef84de087b +MISC metadata.xml 217 SHA256 f1f54874177a53a98de2afc99139f9ca2eb3d15316f15521e5c48bb0c9df997f SHA512 1cb210be8d67d18e50ea53bedbfe8b2807e4b2e5c9bf82cc037ce5d60f98d60b5a967e8863a2964769eb6a15626db1e001cc1a38a18b2d1809cc73a3578df4e4 WHIRLPOOL d2946da8b8cd39dda0326cc591362d8dbdd25b721b4cc757fdd5675ca4e0dc93849c68362468d2c6ab0fdd7efb9aac96a4c409c458e8145412645647ac8f4024 diff --git a/sys-power/hibernate-script/hibernate-script-2.0-r6.ebuild b/sys-power/hibernate-script/hibernate-script-2.0-r6.ebuild new file mode 100644 index 000000000000..52906f7d98f0 --- /dev/null +++ b/sys-power/hibernate-script/hibernate-script-2.0-r6.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PATCH_VERSION="5" + +DESCRIPTION="Hibernate script supporting multiple suspend methods" +HOMEPAGE="https://github.com/NigelCunningham/Hibernate-Script" +SRC_URI="http://tuxonice.nigelcunningham.com.au/downloads/all/${P}.tar.gz + mirror://gentoo/${P}-patches-${PATCH_VERSION}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +IUSE="vim-syntax" + +DEPEND="" +RDEPEND="!<media-gfx/splashutils-1.5.2" + +DOCS=( + CHANGELOG + README + SCRIPTLET-API +) + +PATCHES=( + "${WORKDIR}/${PV}" +) + +src_install() { + BASE_DIR="${D}" \ + DISTRIBUTION="gentoo" \ + PREFIX="/usr" \ + MAN_DIR="${D}/usr/share/man" \ + "${S}/install.sh" || die "Install failed" + + # hibernate-ram will default to using ram.conf + dosym /usr/sbin/hibernate /usr/sbin/hibernate-ram + + newinitd init.d/hibernate-cleanup.sh hibernate-cleanup + + # other ebuilds can install scriplets to this dir + keepdir /etc/hibernate/scriptlets.d/ + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins hibernate.vim + fi + + dodoc ${DOCS[@]} + + insinto /etc/logrotate.d + newins "${S}"/logrotate.d-hibernate-script hibernate-script + chmod 644 \ + "${D}/etc/hibernate/"*.conf \ + "${D}/etc/hibernate/blacklisted-modules" \ + "${D}/usr/share/hibernate/scriptlets.d/"* \ + "${D}/usr/share/hibernate/tuxonice-binary-signature.bin" \ + || die +} + +pkg_postinst() { + elog + elog "You should run the following command to invalidate suspend" + elog "images on a clean boot." + elog + elog " # rc-update add hibernate-cleanup boot" + elog + elog "See /usr/share/doc/${PF}/README.* for further details." + elog + elog "Please note that you will need to manually emerge any utilities" + elog "(radeontool, vbetool, ...) enabled in the configuration files," + elog "should you wish to use them." +} diff --git a/sys-power/hibernate-script/metadata.xml b/sys-power/hibernate-script/metadata.xml new file mode 100644 index 000000000000..041c1966b76b --- /dev/null +++ b/sys-power/hibernate-script/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>alonbl@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-power/iasl/Manifest b/sys-power/iasl/Manifest new file mode 100644 index 000000000000..68ecd9b11a4a --- /dev/null +++ b/sys-power/iasl/Manifest @@ -0,0 +1,18 @@ +AUX iasl-20120816-locale.patch 503 SHA256 bac8c1139b67cc375e0d37bb26e9b5aeafe26f7958a1fde5f9a52be6c702c6a3 SHA512 88012cf788d3ceb319f75834c96a0dbad7cf3db20229616ed7cd19f04903561085086a81adc02eab99aba5d22e215373b5302edc77313e8684a3ec8d4f9ea3a7 WHIRLPOOL c00cf14407e27c45b432206afc9c7d8ed7df758a72c21b8b70d7874f49419f12b4fa7127d89cb50b7f67719019fa200f26846a14b0bf53a55c5dd0b160127117 +AUX iasl-20140214-nostrip.patch 253 SHA256 ee69d121651279e7c3238e72c4996316b2fc06e57ada2863cb7fdd12138f15db SHA512 1379fa71c03d880b53ed1ed34ec925d5e94fe6f636f86cfdbb5a1e65a1c6a82fb99a42b991be154c018da9eaaa70c7443fa4b5ca38eb03fe5cec4f0de1dd6364 WHIRLPOOL 0db963c9eb85c986a88d6beb258168baa578469fc59efbf6a37f77b611bec9fc0029fe3c10b7524fa692b5f3b24196fec0052d32bf694d14b393f8034a6750e8 +AUX iasl-20140828-locale.patch 349 SHA256 5078278e4de1bf7f966d0f72967af5a14be7f460cab192f240785d35fadbf7c4 SHA512 311c20b7d5cdc7e3ce5e2a84e508eb898cd506efa720d1e4bb017ff0b34d786ffed30168b7dcf16b4bee988702d00258289e5e320e0a3bb3cf630a1a71145640 WHIRLPOOL 5c5fe379eec8c1e916ec1440a51e4e33e93af8740ada34c5252814e10991e4cbde39bd648e90ed66527df358d31ae03b5988ac46551cd0a4585b648339d4d25b +DIST acpica-unix-20121018.tar.gz 1272523 SHA256 e4008fb70ebe967994fe1caff84c2b16206011234e55fc4e849a11df76550c24 SHA512 32824579dccb9d5ba39a895a7905d746d61e2b0d19dcb215aba28e7d976e090d798af2361d474ee0b103a47776d00a6f44128a75a13b1bafb02e86364255523a WHIRLPOOL f56ff1c3f96349d0fe271bc66d84c87ba29d98f3313a9f4998b94b4db21510851a8cf2d839910181956b5ef1789a7b4abfdc5479db6e9dcc285716b574b9466c +DIST acpica-unix-20140828.tar.gz 1423788 SHA256 37984860aac35a8d35c25c4e71f519fd3ea61f2405bb37ad64caeda4543e535a SHA512 ab4cb8ba74c5abf05913b6ef39955698f2bb5c243f723d660bd8f9c397fcf2a959d5ec10326a699c53e05319a428e721f1d65a07249574200af3227676725398 WHIRLPOOL 4e584be596ed10b39acf11613be706a374e84c4e42c9e82eda84649be9ed72f64065e286eefe3a40a6b376d9eef2ab0cd86e26935455ad78ecbde8a24ce1d970 +DIST acpica-unix-20160729.tar.gz 1556095 SHA256 bf45e6f96f8b603a618ca09204a3074b60c46365ea262b11d1b06d0b6186c0bd SHA512 37b0439b03e8d811c8b14d0c7c89471989227fb78b462f585c6290431afecc5b258073e568dde8dc982fa959ebce4b4d51589ea997f0066e66d4785ce185ccf2 WHIRLPOOL fa857a7e370e623d0fdc5464ad9bb4ef4bb79b374f86134208a444d102494b24c28d80e562e9328e978d5237423de87f49032783e17e649965269697daaec39f +DIST acpica-unix-20161222.tar.gz 1580428 SHA256 0cfe1b622b8663ff9c46dd23b8c2fe7c7191d8b433cd6decdce6403321b37120 SHA512 ff733d210b3b013970d3f3a0bea45f346ca5cf78dd61b583d30114a69c80e8272af304d14248aa34e775e19bca1c2ddbbed1b4ba5e8ba660b28621a8ca45ae31 WHIRLPOOL da901cefec78fbc5f0e26a610d80bc757c08aee5b640e337c3902deffe3e952f356fe31fcd905e47a71e9a47839bf531e3a3b770d8bb3187babc6c992fe2e926 +DIST acpitests-unix-20121018.tar.gz 1978548 SHA256 67bfbbc9a818da1414a859412f9dd5f0ff1220c1dfdbe3116a3a748cc82c57ac SHA512 4c565b9c3af3122f5acfd802e6467124071f45987db0e5d5b9bf87a2d82e433cd6bd1b6faed71dbe6b01694c0f79b390f220515cf287519588ccae71ebafe798 WHIRLPOOL 8169bfdbdb33458d9f671ee935694eddc470e62e5837a7383c3430905e46ff6546e82c1f7e6d0b4dcee2293b1094ab79509c4985bd43f1d5e777c6818cd01532 +DIST acpitests-unix-20140828.tar.gz 2008060 SHA256 e576c74bf1bf1c9f7348bf9419e05c8acfece7105abcdc052e66670c7af2cf00 SHA512 7c3d36c9c1054a56f9b473cd0204062d7ac93b66e1f4d448575182ac3fb0a819506701306be406dd7b8385d37c6f77d7bc4dadc57f6743203ac1bee36a975be5 WHIRLPOOL d04f1cc65f3512dcba53440c295ba1dd740d337b1e3b5812c7c2717ac066408b18ff085b77db7d5dba6cb5055e2ba13dfb1323f28d7f7cae01bbc9fc34d5f09a +DIST acpitests-unix-20160729.tar.gz 1829061 SHA256 d1e71a554392931a41ab29441249f0139e0251823060a4883a4859fa39087446 SHA512 bf6073092a0dfb208f1d4b13ff3a3c5335be8e1326b1e58acd41def1a402ab0d843600f616019d1dde6593db8c53c6876bd9d489360fe98c6a7bee95d9215600 WHIRLPOOL 4c7bb5b634529137b57753c4ac7d6ff7be8640c735fe71fdc8ad16274366169e6a85efe062243f8814b17abac6cf8c95ab61579d292b2fe40aac6bc03a64a34b +DIST acpitests-unix-20161222.tar.gz 1759278 SHA256 fc57288faeb78ffe7f035556e6759512fdfb0612cc2803b530fd72c9c1cfac75 SHA512 ff0435f40564a94ceb3bc6cfc11ac859a5467b650004238092d7f3e2f7d596e7eb2fb9d3c56f0860c8324d38fcbedf3c6f4bc3f0569f1148462b824c7c025408 WHIRLPOOL 9d2448f7ce66250b58f9d8d6f9c600308adccf7beb85ac70a22b1597bf55ab71dc7d3f056233951bb303172aaf11b3022899987c05b6a35067ccd964afebe445 +EBUILD iasl-20121018.ebuild 3546 SHA256 8015fac3b35e9b4fe5f13dd46c2f421b694e30c33ed41442b5a2e40ee44e0a09 SHA512 2063c817ffd03a7e884738fb93e0860a83a43b1ceedc321bf2257f02d5638e444e49f8b77f2a64c545ff01972daeea9195d33f02e2b409dfae511dbacc8ae057 WHIRLPOOL bf63b93d96f895dbfe71a7181c8d6bfe0ee4777a5862985c62fad1c1c1163c58234bb8cdf0eeefe139b9b5e677ec09bed8b0ee4e966c5634e56a01304949e3c2 +EBUILD iasl-20140828.ebuild 3361 SHA256 814b9fe266937f655b672041b3df003fda736320d807c9ebe0c0dc1400f0ed47 SHA512 2e81b1cec125ca70777b514702f2f3ca4a6246b758404dccc3b999e91c4f7054b5a25be76280245320c662213a58387a09ce2c6ea06d8db00ed3f44a768f1dd5 WHIRLPOOL 5da42b9255c6269db75094f50a81f4696974f34dae9e80ad04d929e8ecbd56e9feaf49560c95c00991844e1c1ac9f653ca5fd2c48ce1d7320c169017bd8dcb21 +EBUILD iasl-20160729.ebuild 3387 SHA256 b85a7f7b95288115a078aafdeb981edf9c4205d360396a6eb5fe762a2b3926e6 SHA512 5ec2719cf0f45344613cb0b5d5fee9e551ada4d44c8e65ef5bc7b241fa49bf910fe711abbf5e1f6a8d136f3aeb182430e8362e519091eac2acc520fc1c93c0ba WHIRLPOOL b1229f7fb5db2caffcb3e9b77c96cc0cc63107c4210c4a9f1193f3125219f88b1614ce60fd3faf7821f104db0b0623c24beabbcb2db26ceaf0f4e6453da28037 +EBUILD iasl-20161222.ebuild 3397 SHA256 4e930636433dbc77705f7a6d528a3338cf205aeb622ff8fa5dd0ad2fffc51b06 SHA512 a4c870fe8f286888c18642889d02873c90b966519902a29036fec7b1b772c0ca5e947317eae9a659d0fcfd50c457ae87bb32d04c8c35077efc573a7c58634430 WHIRLPOOL 0c9be31218da1f8802433c54403389d6f7cac5d9c8a8b44a291d5ca64d274986d73179e9f214b4a7b2e92f9477c7720e3f711e33fef62285c213d84aa9a16fee +MISC ChangeLog 3160 SHA256 fdbfae6139b072fa21085082f9a001733b0954cb727db585e1f22dbf2a5c38ef SHA512 ad83801ace24497b79db786ad5adbfd9d88aee7eb0c160ed8d4eef202a2841d8c3da1e8892bd929d268cd459cdeea22aaa4c0c676cec9184a690aceff434e5e3 WHIRLPOOL 58ed4c33d9132fc4caf8dd8a5bf69742d70f4d76f2f030c6c57ab060b0bdcc16a03d70974e8ad0be3d2d8f90429521e9e692279ba11940bfbb2743899150314c +MISC ChangeLog-2015 9444 SHA256 dbb6aec3cefbec3caad255d7c278893920fb355938dc7ec023af1b1cb631fee5 SHA512 33d7f25acf9c97042b0f60df7b4401867f5125293a800eba4098757b3438e0233f471ee1e5897c9ba2298bdab2f3711fc6b6344fd74ea7158c047292a75bf263 WHIRLPOOL d1eb192abffce94697676c7482e658e4f0cb7297a664e427452115fa070e5ab67a1e3114da0c3aa435dacf47f62410852ed1e07040edab2da09be98e5ee9e673 +MISC metadata.xml 339 SHA256 7968aeca08ab4c39293ba759a9c38bd424aa5793afbec22cee888d9604157de1 SHA512 34d6a14b4bc2051d2a8d4356147c39c357f21f5e87ce7e258a81cadf10684a72a81fbe80ad46c0d808321c40cbd4e93dd0418cde01ae72d396e78fcfaa23297e WHIRLPOOL c9a7f5caf49cd2aab3087a95e80c17b1f80817d748c44745a3a8f88054f7606aae230ee30d70ad9d9114fd2f6f90cb6e151ba97fdd8be118eca992a4b011db21 diff --git a/sys-power/iasl/files/iasl-20120816-locale.patch b/sys-power/iasl/files/iasl-20120816-locale.patch new file mode 100644 index 000000000000..425513342105 --- /dev/null +++ b/sys-power/iasl/files/iasl-20120816-locale.patch @@ -0,0 +1,15 @@ +diff -Nuar acpica-unix-20120816.orig/generate/unix/Makefile.config acpica-unix-20120816/generate/unix/Makefile.config +--- acpica-unix-20120816.orig/generate/unix/Makefile.config 2012-08-16 15:51:15.000000000 +0000 ++++ acpica-unix-20120816/generate/unix/Makefile.config 2012-09-07 18:31:41.887229126 +0000 +@@ -161,9 +161,9 @@ + #YACC= byacc + #YFLAGS += -v -d + # +-YACC= bison ++YACC= LC_ALL=C bison + YFLAGS += -v -d -y + +-LEX= flex ++LEX= LC_ALL=C flex + LFLAGS += -i -s + diff --git a/sys-power/iasl/files/iasl-20140214-nostrip.patch b/sys-power/iasl/files/iasl-20140214-nostrip.patch new file mode 100644 index 000000000000..0bb82df38c3c --- /dev/null +++ b/sys-power/iasl/files/iasl-20140214-nostrip.patch @@ -0,0 +1,11 @@ +--- acpica-unix-20140214/generate/unix/Makefile.config ++++ acpica-unix-20140214/generate/unix/Makefile.config +@@ -52,7 +52,7 @@ + INSTALLFLAGS ?= -f + else + INSTALL = install +-INSTALLFLAGS ?= -m 555 -s ++INSTALLFLAGS ?= -m 555 + endif + + INSTALLPROG = \ diff --git a/sys-power/iasl/files/iasl-20140828-locale.patch b/sys-power/iasl/files/iasl-20140828-locale.patch new file mode 100644 index 000000000000..c8e278f7572a --- /dev/null +++ b/sys-power/iasl/files/iasl-20140828-locale.patch @@ -0,0 +1,17 @@ +--- acpica-unix-20140828/generate/unix/Makefile.config ++++ acpica-unix-20140828/generate/unix/Makefile.config +@@ -225,12 +225,12 @@ + #YACC= byacc + #YFLAGS += + # +-YACC= bison ++YACC= LC_ALL=C bison + YFLAGS += -y + + MACROPROC= m4 + MFLAGS= -P -I$(ASL_COMPILER) + +-LEX= flex ++LEX= LC_ALL=C flex + LFLAGS += -i -s + diff --git a/sys-power/iasl/iasl-20121018.ebuild b/sys-power/iasl/iasl-20121018.ebuild new file mode 100644 index 000000000000..0f20cc66bf6c --- /dev/null +++ b/sys-power/iasl/iasl-20121018.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit toolchain-funcs flag-o-matic eutils + +MY_PN=acpica-unix +MY_P=${MY_PN}-${PV} +MY_TESTS_P=${MY_PN/ca/tests}-${PV} +DESCRIPTION="Intel ACPI Source Language (ASL) compiler" +HOMEPAGE="https://www.acpica.org/downloads/" +SRC_URI="http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz + test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )" + +LICENSE="iASL" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="test" + +DEPEND="sys-devel/bison + sys-devel/flex" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use test && has test ${FEATURES}; then + ewarn 'You have selected USE="test". This will install the test results' + ewarn "into /usr/share/${PF}/, compressed as a tarball." + ewarn 'The tests themselves will only rarely die, but the test results' + ewarn 'are interesting for arch testing. The tests may take quite some' + ewarn 'time to complete.' + fi +} + +src_prepare() { + #epatch "${FILESDIR}/${PN}-20110922-as-needed.patch" + epatch "${FILESDIR}/${PN}-20120816-locale.patch" + # Upstream has changed the buildsystem a lot, not sure if these are still + # needed + #epatch "${FILESDIR}/${PN}-20120816-parallelmake-001.patch" + #epatch "${FILESDIR}/${PN}-20110922-parallelmake-002.patch" + #epatch "${FILESDIR}/${PN}-20110922-parallelmake-003.patch" + + find "${S}" -type f -name 'Makefile*' -print0 | \ + xargs -0 -I '{}' \ + sed -r -e 's:-\<Werror\>::g' -i '{}' \ + || die + + export BITS=64 +} + +src_configure() { + : +} + +src_compile() { + cd acpica/generate/unix + emake BITS=${BITS} +} + +src_test() { + aslts_test + #aapits_test + #The aapits test currently fails, missing include probably. +} + +src_install() { + cd acpica/generate/unix + emake install DESTDIR="${D}" BITS=${BITS} + default_src_install + #local bin + #for bin in $(<"${T}"/binlist) ; do + # dobin "${T}"/${bin} + #done + dodoc "${S}"/changes.txt + newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt + newdoc "${S}"/generate/unix/readme.txt unix-readme.txt + newdoc "${S}"/generate/lint/readme.txt lint-readme.txt + newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt + + if use test && has test ${FEATURES}; then + tb="${T}"/testresults.tar.bz2 + export ASLTSDIR="$(<"${T}"/asltdir)" + ebegin "Creating Test Tarball" + tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed" + eend $? + dodir /usr/share/${PF} + insinto /usr/share/${PF} + doins ${tb} || die "doins testresults.tar.bz2 failed" + fi + +} + +aslts_test() { + export ASL="${S}"/generate/unix/bin${BITS}/iasl \ + acpiexec="${S}"/generate/unix/bin${BITS}/acpiexec \ + ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts + export PATH="${PATH}:${ASLTSDIR}/bin" + echo "$ASLTSDIR" >"${T}"/asltdir + cd "${ASLTSDIR}" + edos2unix $(find . -type 'f') + make install || die "make install aslts test failed" + chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed" + + #The below Do commands runs the tests twice and then dies if the results aren't + #Identical. + Do 1 || die "failed Do 1" + Do 2 || die "failed Do 2" +} + +aapits_test() { + mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed" + cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits" + edos2unix $(find . -type 'f') + chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed" + make || die "make in aapits failed" + cd asl || die "cd asl failed" + make || die "make in asl failed" + cd ../bin + ./aapitsrun || die "aapitsrun failed" +} diff --git a/sys-power/iasl/iasl-20140828.ebuild b/sys-power/iasl/iasl-20140828.ebuild new file mode 100644 index 000000000000..d3b1c1eb1a09 --- /dev/null +++ b/sys-power/iasl/iasl-20140828.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs flag-o-matic eutils + +MY_PN=acpica-unix +MY_P=${MY_PN}-${PV} +MY_TESTS_P=${MY_PN/ca/tests}-${PV} +DESCRIPTION="Intel ACPI Source Language (ASL) compiler" +HOMEPAGE="https://www.acpica.org/downloads/" +SRC_URI="http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz + test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )" + +LICENSE="iASL" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="test" + +DEPEND="sys-devel/bison + sys-devel/flex" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use test && has test ${FEATURES}; then + ewarn 'You have selected USE="test". This will install the test results' + ewarn "into /usr/share/${PF}/, compressed as a tarball." + ewarn 'The tests themselves will only rarely die, but the test results' + ewarn 'are interesting for arch testing. The tests may take quite some' + ewarn 'time to complete.' + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-20140828-locale.patch" \ + "${FILESDIR}/${PN}-20140214-nostrip.patch" + + find "${S}" -type f -name 'Makefile*' -print0 | \ + xargs -0 -I '{}' \ + sed -r -e 's:-\<Werror\>::g' -i '{}' \ + || die + + # BITS is tied to ARCH - please set appropriately if you add new keywords + if [[ $ARCH == @(amd64|amd64-fbsd) ]] ; then + export BITS=64 + else + export BITS=32 + fi +} + +src_configure() { + : +} + +src_compile() { + cd acpica/generate/unix + emake BITS=${BITS} +} + +src_test() { + aslts_test + #aapits_test + #The aapits test currently fails, missing include probably. +} + +src_install() { + cd acpica/generate/unix + emake install DESTDIR="${D}" BITS=${BITS} + default_src_install + #local bin + #for bin in $(<"${T}"/binlist) ; do + # dobin "${T}"/${bin} + #done + dodoc "${S}"/changes.txt + newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt + newdoc "${S}"/generate/unix/readme.txt unix-readme.txt + newdoc "${S}"/generate/lint/readme.txt lint-readme.txt + newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt + + if use test && has test ${FEATURES}; then + tb="${T}"/testresults.tar.bz2 + export ASLTSDIR="$(<"${T}"/asltdir)" + ebegin "Creating Test Tarball" + tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed" + eend $? + dodir /usr/share/${PF} + insinto /usr/share/${PF} + doins ${tb} + fi + +} + +aslts_test() { + export ASL="${S}"/generate/unix/bin/iasl \ + acpiexec="${S}"/generate/unix/bin/acpiexec \ + ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts + export PATH="${PATH}:${ASLTSDIR}/bin" + echo "$ASLTSDIR" >"${T}"/asltdir + cd "${ASLTSDIR}" + edos2unix $(find . -type 'f') + make install || die "make install aslts test failed" + chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed" + + #The below Do commands runs the tests twice and then dies if the results aren't + #Identical. + Do 1 || die "failed Do 1" + Do 2 || die "failed Do 2" +} + +aapits_test() { + mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed" + cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits" + edos2unix $(find . -type 'f') + chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed" + make || die "make in aapits failed" + cd asl || die "cd asl failed" + make || die "make in asl failed" + cd ../bin + ./aapitsrun || die "aapitsrun failed" +} diff --git a/sys-power/iasl/iasl-20160729.ebuild b/sys-power/iasl/iasl-20160729.ebuild new file mode 100644 index 000000000000..9749052dfcab --- /dev/null +++ b/sys-power/iasl/iasl-20160729.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs flag-o-matic eutils + +MY_PN=acpica-unix +MY_P=${MY_PN}-${PV} +MY_TESTS_P=${MY_PN/ca/tests}-${PV} +DESCRIPTION="Intel ACPI Source Language (ASL) compiler" +HOMEPAGE="https://www.acpica.org/downloads/" +SRC_URI="http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz + test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )" + +LICENSE="iASL" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="test" + +DEPEND="sys-devel/bison + sys-devel/flex" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use test && has test ${FEATURES}; then + ewarn 'You have selected USE="test". This will install the test results' + ewarn "into /usr/share/${PF}/, compressed as a tarball." + ewarn 'The tests themselves will only rarely die, but the test results' + ewarn 'are interesting for arch testing. The tests may take quite some' + ewarn 'time to complete.' + fi +} + +PATCHES=( + "${FILESDIR}/${PN}-20140828-locale.patch" + "${FILESDIR}/${PN}-20140214-nostrip.patch" +) + +src_prepare() { + default + + find "${S}" -type f -name 'Makefile*' -print0 | \ + xargs -0 -I '{}' \ + sed -r -e 's:-\<Werror\>::g' -i '{}' \ + || die + + # BITS is tied to ARCH - please set appropriately if you add new keywords + if [[ $ARCH == @(amd64|amd64-fbsd) ]] ; then + export BITS=64 + else + export BITS=32 + fi +} + +src_configure() { + : +} + +src_compile() { + cd generate/unix || die + emake BITS=${BITS} +} + +src_test() { + aslts_test + #aapits_test + #The aapits test currently fails, missing include probably. +} + +src_install() { + cd generate/unix || die + emake install DESTDIR="${D}" BITS=${BITS} + default_src_install + #local bin + #for bin in $(<"${T}"/binlist) ; do + # dobin "${T}"/${bin} + #done + dodoc "${S}"/changes.txt + newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt + newdoc "${S}"/generate/unix/readme.txt unix-readme.txt + newdoc "${S}"/generate/lint/readme.txt lint-readme.txt + newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt + + if use test && has test ${FEATURES}; then + tb="${T}"/testresults.tar.bz2 + export ASLTSDIR="$(<"${T}"/asltdir)" + ebegin "Creating Test Tarball" + tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed" + eend $? + dodir /usr/share/${PF} + insinto /usr/share/${PF} + doins ${tb} + fi + +} + +aslts_test() { + export ASL="${S}"/generate/unix/bin/iasl \ + acpiexec="${S}"/generate/unix/bin/acpiexec \ + ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts + export PATH="${PATH}:${ASLTSDIR}/bin" + echo "$ASLTSDIR" >"${T}"/asltdir + cd "${ASLTSDIR}" || die + edos2unix $(find . -type 'f') + make install || die "make install aslts test failed" + chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed" + + #The below Do commands runs the tests twice and then dies if the results aren't + #Identical. + Do 1 || die "failed Do 1" + Do 2 || die "failed Do 2" +} + +aapits_test() { + mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed" + cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits" + edos2unix $(find . -type 'f') + chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed" + make || die "make in aapits failed" + cd asl || die "cd asl failed" + make || die "make in asl failed" + cd ../bin || die + ./aapitsrun || die "aapitsrun failed" +} diff --git a/sys-power/iasl/iasl-20161222.ebuild b/sys-power/iasl/iasl-20161222.ebuild new file mode 100644 index 000000000000..7bc182a44cec --- /dev/null +++ b/sys-power/iasl/iasl-20161222.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs flag-o-matic eutils + +MY_PN=acpica-unix +MY_P=${MY_PN}-${PV} +MY_TESTS_P=${MY_PN/ca/tests}-${PV} +DESCRIPTION="Intel ACPI Source Language (ASL) compiler" +HOMEPAGE="https://www.acpica.org/downloads/" +SRC_URI="http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz + test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )" + +LICENSE="iASL" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="test" + +DEPEND="sys-devel/bison + sys-devel/flex" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use test && has test ${FEATURES}; then + ewarn 'You have selected USE="test". This will install the test results' + ewarn "into /usr/share/${PF}/, compressed as a tarball." + ewarn 'The tests themselves will only rarely die, but the test results' + ewarn 'are interesting for arch testing. The tests may take quite some' + ewarn 'time to complete.' + fi +} + +PATCHES=( + "${FILESDIR}/${PN}-20140828-locale.patch" + "${FILESDIR}/${PN}-20140214-nostrip.patch" +) + +src_prepare() { + default + + find "${S}" -type f -name 'Makefile*' -print0 | \ + xargs -0 -I '{}' \ + sed -r -e 's:-\<Werror\>::g' -i '{}' \ + || die + + # BITS is tied to ARCH - please set appropriately if you add new keywords + if [[ $ARCH == @(amd64|amd64-fbsd) ]] ; then + export BITS=64 + else + export BITS=32 + fi +} + +src_configure() { + : +} + +src_compile() { + cd generate/unix || die + emake BITS=${BITS} +} + +src_test() { + aslts_test + #The aapits test currently fails, missing include probably. + #aapits_test +} + +src_install() { + cd generate/unix || die + emake install DESTDIR="${D}" BITS=${BITS} + default_src_install + #local bin + #for bin in $(<"${T}"/binlist) ; do + # dobin "${T}"/${bin} + #done + dodoc "${S}"/changes.txt + newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt + newdoc "${S}"/generate/unix/readme.txt unix-readme.txt + newdoc "${S}"/generate/lint/readme.txt lint-readme.txt + newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt + + if use test && has test ${FEATURES}; then + tb="${T}"/testresults.tar.bz2 + export ASLTSDIR="$(<"${T}"/asltdir)" + ebegin "Creating Test Tarball" + tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed" + eend $? + dodir /usr/share/${PF} + insinto /usr/share/${PF} + doins ${tb} + fi + +} + +aslts_test() { + export ASL="${S}"/generate/unix/bin/iasl \ + acpiexec="${S}"/generate/unix/bin/acpiexec \ + ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts + export PATH="${PATH}:${ASLTSDIR}/bin" + echo "$ASLTSDIR" >"${T}"/asltdir + cd "${ASLTSDIR}" || die + edos2unix $(find . -type 'f') + make install || die "make install aslts test failed" + chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed" + + #The below Do commands runs the tests twice and then dies if the results aren't + #Identical. + Do 1 || die "failed Do 1" + Do 2 || die "failed Do 2" +} + +aapits_test() { + mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed" + cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits" + edos2unix $(find . -type 'f') + chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed" + make || die "make in aapits failed" + cd asl || die "cd asl failed" + make || die "make in asl failed" + cd ../bin || die + ./aapitsrun || die "aapitsrun failed" +} diff --git a/sys-power/iasl/metadata.xml b/sys-power/iasl/metadata.xml new file mode 100644 index 000000000000..f56b9a3ecad3 --- /dev/null +++ b/sys-power/iasl/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 type="person"> + <email>robbat2@gentoo.org</email> + </maintainer> + <maintainer type="person"> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> +</pkgmetadata> diff --git a/sys-power/metadata.xml b/sys-power/metadata.xml new file mode 100644 index 000000000000..c4863318d020 --- /dev/null +++ b/sys-power/metadata.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The sys-power category contains software which handles power management, + including CPU frequency scaling tools. + </longdescription> + <longdescription lang="es"> + La categoría sys-power contiene programas que manejan el control del + rendimiento incluyendo herramientas para cambio de frecuencia de algunos + microprocesadores. + </longdescription> + <longdescription lang="de"> + Die Kategorie sys-power enthält Software für das Powermanagement, wie + beispielsweise Programme zur Änderung der CPU-Frequenz. + </longdescription> + <longdescription lang="ja"> + sys-powerカテゴリには電源管理を管理する(例えば、CPU基準化)が含まれます。 + </longdescription> + <longdescription lang="nl"> + De sys-power categorie bevat programma's voor energiebeheer, bijvoorbeeld + voor het aanpassen van de CPU-kloksnelheid. + </longdescription> + <longdescription lang="vi"> + Nhóm sys-power chứa các phần mềm quản lý năng lượng, + bao gồm các công cụ quản lý tần số CPU. + </longdescription> + <longdescription lang="it"> + La categoria sys-power contiene programmi per la gestione del risparmio energetico, + incluso il software per la variazione della frequenza della CPU. + </longdescription> + <longdescription lang="pt"> + A categoria sys-power contém programas que lidam com + gerenciamento de energia, incluindo ferramentas de variação de + freqüência de microprocessadores. + </longdescription> + <longdescription lang="pl"> + Kategoria sys-power zawiera oprogramowanie związane z zarządzaniem + energią, włączając w to programy służące do skalowania częstotliwości + procesora. + </longdescription> +</catmetadata> + diff --git a/sys-power/ncpufreqd/Manifest b/sys-power/ncpufreqd/Manifest new file mode 100644 index 000000000000..c1b0adb2ebef --- /dev/null +++ b/sys-power/ncpufreqd/Manifest @@ -0,0 +1,5 @@ +DIST ncpufreqd-2.4.tar.xz 9552 SHA256 4f388c9b509e7a7c7b38ddcfbb8ee2ebc940027d5401a6acf2d3440f139c6d32 SHA512 9532604ac4245157152a3990e13225aae335e8b1bb22eca2299a30eee76d9305511ac2176fefb469d8aa573f32a3f46adb6b75e799498bc9577e1616cd5fc362 WHIRLPOOL 15674764c5b8a57f1585a6d78fb8b5e45999beba5059b5729291a89dd42799f99f846bf535409a6b96065cb5c3201601704cf042a7841a929395713d522d1cfe +EBUILD ncpufreqd-2.4.ebuild 537 SHA256 a524ac65ad0b173cdfe25dd6445f16e123c1ef172e4f3feac909975389052039 SHA512 7421cae6798937248441bc20af652a8ed4bc2d7c4304d9983f7be24cd6f655824a5f50e5ac3f22286e5b59d8f1d7d3b5927c3e973fd85cfa8cb0cb8497013cd5 WHIRLPOOL ce2f84526764d1f6b180b387d1289c781b58d550afce3aa94e2c26c46f2c08f397eda1c501bf4acb00df1189a593dd2683ec1fe3e2acf34a3be574c34231a7a7 +MISC ChangeLog 2549 SHA256 9e29e106d93393477fba601187fbfe970a70cdd9af16b3b904542b9956b610c3 SHA512 9535fee18499952ead65ac54407d0ae17d22726d52dc38296a5185c0c5b7667067028cca2b5e7bb31cdfcdbb3705a46906c7958bb89b220cde08e24a80da9c57 WHIRLPOOL d2b36dc25dd10827d9e356bc309ad5058c36538a57f8bf66f262f81274b7f1199a682a36b4bee2fdb186c17f3c36eff24c9a72fadd14b63628011718a53550ca +MISC ChangeLog-2015 3654 SHA256 c778718df15dc8406121c46c26074a10a847e0ca330e77712715488315551129 SHA512 c109a1491855549eb5292329135417a0926d9665e2879d1089b0280f682c527c482a62f07d72970ee9cd8a113b1d34e43664d96d1676c31d57e69159b721e601 WHIRLPOOL 9f5eb1928d2682e2d4554b4cafa3e36c5200dc8cadce420f4284dbf29ac342629a73517a4cf4ed67219c96cba895ec52dfd3a8186da95785d3812c4a9277e021 +MISC metadata.xml 253 SHA256 7ac1af08ebeb99f008c56f9cf7bb99c6da77f23ad29b36c6909c1fe2c7b7fa3e SHA512 cde97266361f018b48934b04550e58cd23bd60e220477e80b8d81cdfc44f45351dff088636bde9aaefdc4860baccfab07ccfb4dc4d090475f361a5730a1f4187 WHIRLPOOL 27411c8992d543d1a5d59a22ad0578994c457269efbbed7f27d028aea8833a2e0a32a4b6091d1b130ddf3d8ef4715d3f8ad8cd9da01c0c26849d485e8f9c968c diff --git a/sys-power/ncpufreqd/metadata.xml b/sys-power/ncpufreqd/metadata.xml new file mode 100644 index 000000000000..a1603d3434ab --- /dev/null +++ b/sys-power/ncpufreqd/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-needed --> + <upstream> + <remote-id type="bitbucket">nelchael/ncpufreqd</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/ncpufreqd/ncpufreqd-2.4.ebuild b/sys-power/ncpufreqd/ncpufreqd-2.4.ebuild new file mode 100644 index 000000000000..6d18c11cdc2b --- /dev/null +++ b/sys-power/ncpufreqd/ncpufreqd-2.4.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit cmake-utils + +DESCRIPTION="Daemon controlling CPU speed and temperature" +HOMEPAGE="https://bitbucket.org/nelchael/ncpufreqd" +SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" +LICENSE="ZLIB" + +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="" + +DEPEND="virtual/logger + app-arch/xz-utils" +RDEPEND="${DEPEND}" + +src_install() { + cmake-utils_src_install + + doinitd gentoo-init.d/ncpufreqd + dodoc AUTHORS ChangeLog README +} diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest new file mode 100644 index 000000000000..226efa343eaa --- /dev/null +++ b/sys-power/nut/Manifest @@ -0,0 +1,24 @@ +AUX lighttpd_nut.conf-2.2.0 852 SHA256 4a85bb15d88be7e4874f195e78d9bc1b0b11bbd4c017d2b7440a78f52581184b SHA512 3bdb8cf6823d06ff84fd85f4484be4d842ce4a06722ebe22d7ddd6ea1b78ea08411a7f4a62a31df1b697f5e687f7ee88c8c4872e6a5a05390cef4a46798a7f35 WHIRLPOOL d120055528abc378c2d0566feb21ad8d0ae816d19b2b76ff9fea1faad57dbd8011c6525bffb2e0c7fd15ef98dfa1b3f488600ae58b67a9468e16a8351beacedc +AUX nut-2.2.2-init.d-upsdrv 859 SHA256 715a04dd7a72d88657722475bd198839a7583d63d5ae0cc94d89869fea15cdd0 SHA512 6ca718fcd0019420eabb4b69e3f24334872336be56c07b14c668813bf3d2b82f92903028d7d3142be743ed22d8dc94d7e471d9596710b9dbc1717e2576d3a8f3 WHIRLPOOL 40d5232ad9cc92c785661794956a720fc8b804a33c7af21d1834324f25f86e99693bd8ad2ed20121523febcfb70fbc37b8cf7a20934746309077e3d80c718a3a +AUX nut-2.4.1-no-libdummy.patch 791 SHA256 c9cf34980e79a4b9f07c338d10bc4ef4e90608ee7543cbc483898ee4f3f4f2a4 SHA512 7dff9d2601fb400bc27fd49b18a2b5b4a8e8ab33af84c4a78b7091ac929eb3dc53550aaa88bd2eb5227c13b0e191dda137f5ddd71606748652505f89d540b84a WHIRLPOOL 8e621826d5797e8ffb63e55ff0ac76b25adaa1ac453921bb830ff4fd735f9d266df239884c59904764f87b1c86cd83372584f630030c28d5a5d48e47b7cae8b9 +AUX nut-2.6.2-lowspeed-buffer-size.patch 534 SHA256 77bc0f996d2eb9c3d7d0cf68f5053108df54a6ce6baf2d7b3edfd1f2cfafd41b SHA512 783a754871b55b40d745161c71bca851b5c6c8a72622d0b9ce17ef523e243ed41ff7bfbac33f19d8732b7a361b494fbf9f21669bac3816fe5f71a583e882a385 WHIRLPOOL 0dfcc0db960720a109cfe514be2559a88a500daeeefd304a8f69695607651e94c8387f8821b843bab0ce9eaf33f6d5ec8a09a425c1ed3fe44c6eb4ec3e9ef73b +AUX nut-2.6.3-CVE-2012-2944.patch 736 SHA256 47101a0827cd3cb0eb119a79d58c26b2f065af2f44eaeae5139a85ef8cc83993 SHA512 00ff1cfd5fd60cf671df45f28da0adbfba2d9c2e48f05481abaff70d4a442196e75b8becc8d787cbd6710e7d5df3e09f1894a40cf70e4a1d3f41f32afefdfd3b WHIRLPOOL e9269a42cd940cfdaf85778fa9eaca9908228e52a7141e0a5325e3238ab222a9b26e28efbdd7b51c74b30299b255b196ab0552c3d32e46e7c19b5da1e60aba13 +AUX nut-2.6.5-freeipmi_fru.patch 17326 SHA256 a3907d5d02d097ab0f054fa4082d3472fd929787331a93c7e8c63a6a1fea8f88 SHA512 d24fb32a47585ef55aa2e8e4a301c9f5c6af6182d7c106965b7071b2a34a33c9805c63e43907fb77972c122391d22ee5eda9e8f9000eda6b7ad972415b254820 WHIRLPOOL 91886bfbebd243f2929abaf905965c23ada51ff6538ba299c619c7e6041f53ce29d2f83a7a7a441ea4ec0aada36c1eadcfc2f049a3877af346fbd624d46c2dd6 +AUX nut-2.6.5-init.d-upsd 671 SHA256 ba57cc38fc3a87994fcbd1b8a77aed6f3a6c5780f3eeaf38fc7c4c87efe66409 SHA512 79c36537fb40b8284afb8edc28afa0f98fdf96e8def0382278c6242b4602f1911e29a174825ee676f77aa609b6409ce3483a1d188354956d20be9862c4e78180 WHIRLPOOL 0ba4279414ae6557106f5826dc051fdd091e4e05ecf69a97a8563fbfccfcbf19a49ae374367f97d1bf47d5af05b2e25c83895da6deb51d7257f7e5b36b68e6c7 +AUX nut-2.6.5-init.d-upslog 573 SHA256 4462f84b3701ae8bb2f31cbc79b511f9c097f0cce109a8aa1847eeff7879786f SHA512 06ca7fa8f3fe729b07a919d2a0ecb573b8ac180c447f927504524fca18894e045492458271b9a15898861cb3839b9fb95b2c843e241c7148bc25331ab8360b36 WHIRLPOOL 390602788a4212500c3889716bcdda8d89f5a7a80ffda3f167ad021a17cc6778b52358aa46c4520d48d04e109f8e0b9498492bfe7569c0262f6c0ecbf1ad357a +AUX nut-2.6.5-init.d-upsmon 557 SHA256 d190b77cee00c7469f8f3411ec63b1e12212b97baa0ae117da758cd54819cd7d SHA512 9ccf947b2c5e7a73e96148edb7684f21ae84c4212b980f2ba7b88006dc1e3400b1b9017202b87648f928a3e19f4898094622a6683e0995b72f355ccb394280c3 WHIRLPOOL 4884b6f45904780bb93128c7e995c73f956dc909af9703b1be9e41537bb27ad304192ae999d40a2fb72210cbb67b189f57bde71ac4a0699fcc90fc67060fc757 +AUX nut-2.7.1-fix-scanning.patch 2311 SHA256 32f375e084b8250bbcbbd402517ca720040e1bf5302e0f242c3ea6e0ad62665d SHA512 9695b77af0e2bfbec62f6b2686c6d2c65211a369d671907fcb191e0da7d9765f50587cf193a4fc0fbd12c6d8f4d5beb900dc4bb8dc04133bb1b01f078561de50 WHIRLPOOL 2aef54dd8b0b442f3e1e68b1b3018ea2431042e667e66450c2d737fc60c73de0600a221ac91489533b7758968087264af05ef41d1edda374bbb95aa6b31207fa +AUX nut-2.7.1-snmpusb-order.patch 1417 SHA256 1f2d8bd74cebf61c711130046a8fee99d29fa482d2b1a235816c6348a16acd49 SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19 WHIRLPOOL 0904f346748d16336c57cfb10741aba6a2d0e76f988925e7479dc8ae742b5fcfdd09dce531e5d5743009593fd61e9810b505b24db2f15d8d37c0bebd912abfdb +AUX nut-2.7.2/nut-2.7.2-no-libdummy.patch 535 SHA256 3412955defbf36999896e348569e994e4b89915fcf056e6448348b1209996647 SHA512 a402a70a4cfc922d31203560627ace87f82795aef072d333cb1bfb91a6b67fbc10769e5d68a8d2741ca512b81b5754e9141b68dcb197dbe558ed5556e2de37a1 WHIRLPOOL 0a5c0012c00a5db475e28405b1f60613bc487c1d7df89e5b6505f74cc4534a7bf5b500e5288be6a4bf10543150400d6f10568affe4df4663b508596cf20d4e07 +AUX nut.powerfail.initd 1306 SHA256 8d93892db050eef4d1cc7eeb0f79848529a4a7d084868f18a427735435044483 SHA512 b9aaab526d0996b36a7a6d76a3ee63c1452b0a1bed358e23f6f7f5534e0da7751281428091efc7dba2004706996850ec18318809fdacb94cd8d73ea22bda52ee WHIRLPOOL 3394c702bd322309610446072193ddaf3165b46f828b512082ccf9aa082b01d4440bc3f251ac733223ddbe9259868f8e1372b3bf0fb83f2d5b4999b9f92834f4 +DIST nut-2.6.5.tar.gz 2038832 SHA256 618df71cf1ca6e3700d1d3c282773a2dec85f9f20324c0d3234c824e97feb93f SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8 WHIRLPOOL 2b189f77d18d26303c60f2c084796075b0a50b8aa9cbefc3ba9a83f037450ffc3ecdb289367435e784a6bbe8569f768a97130a1ccdf123e53f13e0cf8813fb9a +DIST nut-2.7.2.tar.gz 2223307 SHA256 4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d SHA512 7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6 WHIRLPOOL 6e7c45ef09fc2e86f0b79787043a9bf9954b5ef57fb16f9d453734680ff947abd8fb6665c5da4dac09850f5ab6a414039aa067803ecdeb2efd8537b8909f1ff9 +DIST nut-2.7.3.tar.gz 2317478 SHA256 ff44d95d06a51559a0a018eef7f8d17911c1002b6352a7d7580ff75acb12126b SHA512 3dd978712dc0fabe7e194dbf6d7bb442c456aa4d45bfc63ede8a3acae23c66811cbcf2705b55a6739129b5f120e6f5865bcb9d19eb9080507a85e2624d5663d6 WHIRLPOOL d9fe0c6545808a7daa25c45bd4f43fba1071cec0fd668d66b7926b6cd7af55e0d8c937bcdbb41e693f977c960c4e2ea95ff40d35b5f68695da5a7d1fc8da7265 +DIST nut-2.7.4.tar.gz 2509831 SHA256 980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a WHIRLPOOL 79b2ad8d2bc1211ba67bb24fec77b61e93b62d3854d5fd908083ff061bcc247abbda8dbf27259d1c38fb6fbeeaf8db65c620b8b3fc4029f14c03b12855925178 +EBUILD nut-2.6.5-r1.ebuild 7233 SHA256 1b1c4d976d01c0a73894d9d6bfc439f09471261855ad95171284ac7a353edd4b SHA512 fc7ef6a8c701374a1e98fb61b2064bddbfb0b9195d7d54ba9a408d76c862b207d0f72f03fd1775e84c3a41ac513a780e0a97420c813b98e541842e55712203ef WHIRLPOOL 53c80d7369d56ce597d9418f865ac7ffa7927133fadeb04da41a3e35bc97856634effd772929b3a548215ca1234803d2018cfa7cc455f00a93391c01f61bb172 +EBUILD nut-2.7.2-r2.ebuild 9349 SHA256 8f5498f20ada809baa4e344811b59647e021da7a4972a2ff3858b9202b6f3079 SHA512 143239b51ff5db0c74b6ee7bb619c9c5c96b9c5bfa2a7883e8d004dbc5fb302462c9304f3131650b7d06fa7a10317881feba15f6279299f963a6e99d6ec81d10 WHIRLPOOL aca11edf3b241a7b87c4e9491c25f31c1bd76e790c193e7ceb7c0dc05ddfb3dfd0a60548c5230066c1140a7ff4fd8a40e6759b2c2608939cbea0e03a8a6b56f0 +EBUILD nut-2.7.3.ebuild 9138 SHA256 c5e0121e42b221fb2dd83b7e06025ff6ee7add86befce7046568cf8f76de7dbb SHA512 3123230597b9fd6ddaf25094409a20628adfb7c2ce704e32a7f082e137c3da37e28009f81d90983f759ea741eadd5672166dff7661cb432ad6ecf26303a3c4ea WHIRLPOOL 19ac6b5c96bb18d080ef26fb02805e290d3bb8893ba9136aa4e07b10d3003f503218ceb9fd89bcef83ed056b4a0f00a4ab93795d7073ba3515d6578f8563ac0b +EBUILD nut-2.7.4.ebuild 9144 SHA256 09151747accea61ad565103b3cc84c0a40b78c09014590d52e1dc6601633508d SHA512 21c6738218cf0160693a3459b9ae62becc6119a9b0cb87bd21eb46094b2feb135bda479acefe250abd6dfc79faa2508101e1113c86fa6ef66ce8d522d26ee924 WHIRLPOOL ad857f304901cbe5248a1ee996e75bf983584bfcf32facaee7a895905fb5a001eb5e4d2d69f085c002d3db147f6cd8217efe138777e84f47039569e1444df5da +MISC ChangeLog 4054 SHA256 553e51884beadfdd2b8cfb3a476e9e522dd5ea2083ce5fcfc10a9b3ae0d51b51 SHA512 57c0386f060afeb78e78e2cabc53f12f67af4813c697654f6bc96b88ec29c57f0101982822c8ecdd8628eaea83a2077a62e592a6e48437cd94568b365f18541d WHIRLPOOL f0b1b9e2f71a9a34058b0c493a156c0b46f8e66e85ac8176eb46be01b6204a3bbf4b1a9f9fa290a8e8b31dae2d55b7e37f7ce45bb9041738d7089ac222ae14e1 +MISC ChangeLog-2015 24865 SHA256 849f81c077afebae42c09e56c7b34cf9bbdd25fd6483c234c2d24ae9cebe4dec SHA512 39cf958b542c47a35aa44a988ea72b49abda6dcaeae43c8fcfc25a7719a2d7f02e6ad8ac90e6312a5de8565a2f7e38ace552fb72e39397ded46fc82e6dfd6142 WHIRLPOOL ff6ed27721775e1ed82ce367c3d27b2e1981eabebb144ef672fc985cbd9da133fc48df9f55233781a40f123b43d0ab4ca3423ba03f9e815f7b5433e10c8f8212 +MISC metadata.xml 5080 SHA256 60a521b82734c8a69443aa536adffab93addce0c43b7bb2c511fadfade5c0fde SHA512 12ea51c0846cf7fb7a086d103ed097e539bd4d80153a5411057c53b64fddd4a7e3db611150bf3770ecef9ca9ca905b79f105106d1b7980e7f91343e724e297e5 WHIRLPOOL 2c8d526020e5c652044f0cb49eee9ac874fd9f52746a597f2fd449e6423083c2dac05cb114e91c9d2d44a2f60a4aff6305ee84f47ea01180c00df8a14eb1fcc8 diff --git a/sys-power/nut/files/lighttpd_nut.conf-2.2.0 b/sys-power/nut/files/lighttpd_nut.conf-2.2.0 new file mode 100644 index 000000000000..434be8c87e61 --- /dev/null +++ b/sys-power/nut/files/lighttpd_nut.conf-2.2.0 @@ -0,0 +1,22 @@ +############################################################################### +# Lighttpd configuration for using NUT under Gentoo Linux. +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +############################################################################### + +# Simple copy this to /etc/lighttpd/ and include it in your lighttpd.conf. +# It will make NUT available at http://$HOST/nut/ + +server.modules += ("mod_cgi") + +# If you want to limit it to some host, uncomment the host check and modify it to your needs. +# $HTTP["host"] == "www2.example.org" { +alias.url += ( "/nut/" => "/usr/share/nut/cgi/" ) +$HTTP["url"] =~ "^/nut/" { + dir-listing.activate = "disable" + cgi.assign = ( ".cgi" => "" ) + index-file.names = ( "upsstats.cgi" ) +} +# } + +# vim: set ft=conf foldmethod=marker et : diff --git a/sys-power/nut/files/nut-2.2.2-init.d-upsdrv b/sys-power/nut/files/nut-2.2.2-init.d-upsdrv new file mode 100644 index 000000000000..9b49ee395568 --- /dev/null +++ b/sys-power/nut/files/nut-2.2.2-init.d-upsdrv @@ -0,0 +1,43 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="stopall startall" + +UPSNAME=${SVCNAME#*.} +msgtext="drivers" +[ "${UPSNAME}" = "${SVCNAME}" ] && UPSNAME='' +[ -n "$UPSNAME" ] && msgtext="driver for $UPSNAME" + +depend() { + before upsd + [ "${UPSNAME}" != '' ] && provide upsdrv +} + +start() { + _dostart "$UPSNAME" "$msgtext" +} +stop() { + _dostop "$UPSNAME" "$msgtext" +} + +startall() { + _dostart "" "$msgtext" +} +stopall() { + _dostop "" "$msgtext" +} + +_dostart() { + ebegin "Starting UPS $msgtext" + /usr/sbin/upsdrvctl start $UPSNAME + eend $? "Failed to start UPS $msgtext!" +} + +_dostop() { + # The pidfile names depend on the actual UPS name + # Not in our control at all + ebegin "Stopping UPS $msgtext" + /usr/sbin/upsdrvctl stop $UPSNAME + eend $? "Failed to stop UPS $msgtext!" +} diff --git a/sys-power/nut/files/nut-2.4.1-no-libdummy.patch b/sys-power/nut/files/nut-2.4.1-no-libdummy.patch new file mode 100644 index 000000000000..31a8e73e54f1 --- /dev/null +++ b/sys-power/nut/files/nut-2.4.1-no-libdummy.patch @@ -0,0 +1,18 @@ +diff -Nuar nut-2.4.1.orig/drivers/Makefile.am nut-2.4.1/drivers/Makefile.am +--- nut-2.4.1.orig/drivers/Makefile.am 2008-07-04 20:12:38.201211819 -0700 ++++ nut-2.4.1/drivers/Makefile.am 2008-07-04 20:12:59.829462787 -0700 +@@ -211,10 +211,12 @@ + upscode2.h victronups.h powerpanel.h powerp-bin.h powerp-txt.h \ + upshandler.h netxml-ups.h mge-xml.h + ++EXTRA_LIBRARIES = ++ + # Define a dummy library so that Automake builds rules for the + # corresponding object files. This library is not actually built, +-EXTRA_LIBRARIES = libdummy.a +-libdummy_a_SOURCES = main.c dstate.c serial.c ++#EXTRA_LIBRARIES += libdummy.a ++#libdummy_a_SOURCES = main.c dstate.c serial.c + + # the nuthalmain library combines the code for main-hal.c and + # dstate-hal.c. It is necessary for Automake-technical reasons, diff --git a/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch b/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch new file mode 100644 index 000000000000..9806d07e53ba --- /dev/null +++ b/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch @@ -0,0 +1,16 @@ +http://bugs.gentoo.org/show_bug.cgi?id=318937 +http://boxster.ghz.cc/projects/nut/changeset/2407 + +Respun from nut-2.4.3-lowspeed-buffer-size.patch + +Index: /trunk/drivers/libhid.c +=================================================================== +--- /trunk/drivers/libhid.c (revision 2336) ++++ /trunk/drivers/libhid.c (revision 2407) +@@ -142,5 +142,5 @@ + int id = pData->ReportID; + int r; +- unsigned char buf[SMALLBUF]; ++ unsigned char buf[8]; /* Maximum size for low-speed USB devices */ + + if (rbuf->ts[id] + age > time(NULL)) { diff --git a/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch b/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch new file mode 100644 index 000000000000..9debd3b9da3f --- /dev/null +++ b/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch @@ -0,0 +1,21 @@ +Origin: http://trac.networkupstools.org/projects/nut/changeset/3633 +Description: Fix CVE-2012-2944: upsd can be remotely crashed + +Index: nut-2.6.3/common/parseconf.c +=================================================================== +--- nut-2.6.3.orig/common/parseconf.c 2011-10-04 02:06:25.000000000 -0500 ++++ nut-2.6.3/common/parseconf.c 2012-05-30 13:29:41.000000000 -0500 +@@ -171,6 +171,13 @@ + + wbuflen = strlen(ctx->wordbuf); + ++ /* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */ ++ if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) { ++ fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n", ++ ctx->ch); ++ return; ++ } ++ + if (ctx->wordlen_limit != 0) { + if (wbuflen >= ctx->wordlen_limit) { + diff --git a/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch b/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch new file mode 100644 index 000000000000..96ac91d0a48c --- /dev/null +++ b/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch @@ -0,0 +1,448 @@ +Update to 1.2.x ipmi_fru declarations. + +Starting with the 1.2.1 release, all of the ipmi_fru_parse* declarations (both +lowercase & uppercase) were renamed to ipmi_fru*. This is a simple search & +replace of all instances. Upstream should probably have a backwards compatible +version that supports both variants of the names. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar nut-2.6.5.orig/drivers/nut-libfreeipmi.c nut-2.6.5/drivers/nut-libfreeipmi.c +--- nut-2.6.5.orig/drivers/nut-libfreeipmi.c 2012-07-31 17:38:59.000000000 +0000 ++++ nut-2.6.5/drivers/nut-libfreeipmi.c 2013-08-12 17:55:03.132363518 +0000 +@@ -57,7 +57,7 @@ + + /* FreeIPMI contexts and configuration*/ + ipmi_ctx_t ipmi_ctx = NULL; +-ipmi_fru_parse_ctx_t fru_parse_ctx = NULL; ++ipmi_fru_ctx_t fru_parse_ctx = NULL; + ipmi_monitoring_ctx_t mon_ctx = NULL; + struct ipmi_monitoring_ipmi_config ipmi_config; + /* SDR management API has changed with 1.1.X and later */ +@@ -78,7 +78,7 @@ + + /* Support functions */ + static const char* libfreeipmi_getfield (uint8_t language_code, +- ipmi_fru_parse_field_t *field); ++ ipmi_fru_field_t *field); + + static void libfreeipmi_cleanup(); + +@@ -97,7 +97,7 @@ + int nut_ipmi_open(int ipmi_id, IPMIDevice_t *ipmi_dev) + { + int ret = -1; +- uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1]; ++ uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1]; + unsigned int area_type = 0; + unsigned int area_length = 0; + +@@ -134,26 +134,26 @@ + upsdebugx(1, "FreeIPMI initialized..."); + + /* Parse FRU information */ +- if (!(fru_parse_ctx = ipmi_fru_parse_ctx_create (ipmi_ctx))) ++ if (!(fru_parse_ctx = ipmi_fru_ctx_create (ipmi_ctx))) + { + libfreeipmi_cleanup(); +- fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_ctx_create()"); ++ fatal_with_errno(EXIT_FAILURE, "ipmi_fru_ctx_create()"); + } + + /* lots of motherboards calculate checksums incorrectly */ +- if (ipmi_fru_parse_ctx_set_flags (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) ++ if (ipmi_fru_ctx_set_flags (fru_parse_ctx, IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) + { + libfreeipmi_cleanup(); +- fatalx(EXIT_FAILURE, "ipmi_fru_parse_ctx_set_flags: %s\n", +- ipmi_fru_parse_ctx_strerror (ipmi_fru_parse_ctx_errnum (fru_parse_ctx))); ++ fatalx(EXIT_FAILURE, "ipmi_fru_ctx_set_flags: %s\n", ++ ipmi_fru_ctx_strerror (ipmi_fru_ctx_errnum (fru_parse_ctx))); + } + + /* Now open the requested (local) PSU */ +- if (ipmi_fru_parse_open_device_id (fru_parse_ctx, ipmi_id) < 0) ++ if (ipmi_fru_open_device_id (fru_parse_ctx, ipmi_id) < 0) + { + libfreeipmi_cleanup(); +- fatalx(EXIT_FAILURE, "ipmi_fru_parse_open_device_id: %s\n", +- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); ++ fatalx(EXIT_FAILURE, "ipmi_fru_open_device_id: %s\n", ++ ipmi_fru_ctx_errormsg (fru_parse_ctx)); + } + + /* Set IPMI identifier */ +@@ -164,19 +164,19 @@ + /* clear fields */ + area_type = 0; + area_length = 0; +- memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1); ++ memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1); + + /* parse FRU buffer */ +- if (ipmi_fru_parse_read_data_area (fru_parse_ctx, ++ if (ipmi_fru_read_data_area (fru_parse_ctx, + &area_type, + &area_length, + areabuf, +- IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0) ++ IPMI_FRU_AREA_SIZE_MAX) < 0) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, +- "ipmi_fru_parse_open_device_id: %s\n", +- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); ++ "ipmi_fru_open_device_id: %s\n", ++ ipmi_fru_ctx_errormsg (fru_parse_ctx)); + } + + if (area_length) +@@ -184,7 +184,7 @@ + switch (area_type) + { + /* get generic board information */ +- case IPMI_FRU_PARSE_AREA_TYPE_BOARD_INFO_AREA: ++ case IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA: + + if(libfreeipmi_get_board_info (areabuf, area_length, + ipmi_dev) < 0) +@@ -193,7 +193,7 @@ + } + break; + /* get specific PSU information */ +- case IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION: ++ case IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION: + + if(libfreeipmi_get_psu_info (areabuf, area_length, ipmi_dev) < 0) + { +@@ -205,13 +205,13 @@ + break; + } + } +- } while ((ret = ipmi_fru_parse_next (fru_parse_ctx)) == 1); ++ } while ((ret = ipmi_fru_next (fru_parse_ctx)) == 1); + + /* check for errors */ + if (ret < 0) { + libfreeipmi_cleanup(); +- fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_next: %s", +- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); ++ fatal_with_errno(EXIT_FAILURE, "ipmi_fru_next: %s", ++ ipmi_fru_ctx_errormsg (fru_parse_ctx)); + } + else { + /* Get all related sensors information */ +@@ -232,25 +232,25 @@ + } + + static const char* libfreeipmi_getfield (uint8_t language_code, +- ipmi_fru_parse_field_t *field) ++ ipmi_fru_field_t *field) + { +- static char strbuf[IPMI_FRU_PARSE_AREA_STRING_MAX + 1]; +- unsigned int strbuflen = IPMI_FRU_PARSE_AREA_STRING_MAX; ++ static char strbuf[IPMI_FRU_AREA_STRING_MAX + 1]; ++ unsigned int strbuflen = IPMI_FRU_AREA_STRING_MAX; + + if (!field->type_length_field_length) + return NULL; + +- memset (strbuf, '\0', IPMI_FRU_PARSE_AREA_STRING_MAX + 1); ++ memset (strbuf, '\0', IPMI_FRU_AREA_STRING_MAX + 1); + +- if (ipmi_fru_parse_type_length_field_to_string (fru_parse_ctx, ++ if (ipmi_fru_type_length_field_to_string (fru_parse_ctx, + field->type_length_field, + field->type_length_field_length, + language_code, + strbuf, + &strbuflen) < 0) + { +- upsdebugx (2, "ipmi_fru_parse_type_length_field_to_string: %s", +- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); ++ upsdebugx (2, "ipmi_fru_type_length_field_to_string: %s", ++ ipmi_fru_ctx_errormsg (fru_parse_ctx)); + return NULL; + } + +@@ -280,8 +280,8 @@ + { + /* cleanup */ + if (fru_parse_ctx) { +- ipmi_fru_parse_close_device_id (fru_parse_ctx); +- ipmi_fru_parse_ctx_destroy (fru_parse_ctx); ++ ipmi_fru_close_device_id (fru_parse_ctx); ++ ipmi_fru_ctx_destroy (fru_parse_ctx); + } + + #ifdef HAVE_FREEIPMI_11X_12X +@@ -342,7 +342,7 @@ + + upsdebugx(1, "entering libfreeipmi_get_psu_info()"); + +- if (ipmi_fru_parse_multirecord_power_supply_information (fru_parse_ctx, ++ if (ipmi_fru_multirecord_power_supply_information (fru_parse_ctx, + areabuf, + area_length, + &overall_capacity, +@@ -368,8 +368,8 @@ + &total_combined_wattage, + &predictive_fail_tachometer_lower_threshold) < 0) + { +- fatalx(EXIT_FAILURE, "ipmi_fru_parse_multirecord_power_supply_information: %s", +- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); ++ fatalx(EXIT_FAILURE, "ipmi_fru_multirecord_power_supply_information: %s", ++ ipmi_fru_ctx_errormsg (fru_parse_ctx)); + } + + ipmi_dev->overall_capacity = overall_capacity; +@@ -392,12 +392,12 @@ + { + uint8_t language_code; + uint32_t mfg_date_time; +- ipmi_fru_parse_field_t board_manufacturer; +- ipmi_fru_parse_field_t board_product_name; +- ipmi_fru_parse_field_t board_serial_number; +- ipmi_fru_parse_field_t board_part_number; +- ipmi_fru_parse_field_t board_fru_file_id; +- ipmi_fru_parse_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS]; ++ ipmi_fru_field_t board_manufacturer; ++ ipmi_fru_field_t board_product_name; ++ ipmi_fru_field_t board_serial_number; ++ ipmi_fru_field_t board_part_number; ++ ipmi_fru_field_t board_fru_file_id; ++ ipmi_fru_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS]; + const char *string = NULL; + time_t timetmp; + struct tm mfg_date_time_tm; +@@ -406,15 +406,15 @@ + upsdebugx(1, "entering libfreeipmi_get_board_info()"); + + /* clear fields */ +- memset (&board_manufacturer, '\0', sizeof (ipmi_fru_parse_field_t)); +- memset (&board_product_name, '\0', sizeof (ipmi_fru_parse_field_t)); +- memset (&board_serial_number, '\0', sizeof (ipmi_fru_parse_field_t)); +- memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_parse_field_t)); ++ memset (&board_manufacturer, '\0', sizeof (ipmi_fru_field_t)); ++ memset (&board_product_name, '\0', sizeof (ipmi_fru_field_t)); ++ memset (&board_serial_number, '\0', sizeof (ipmi_fru_field_t)); ++ memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_field_t)); + memset (&board_custom_fields[0], '\0', +- sizeof (ipmi_fru_parse_field_t) * IPMI_FRU_CUSTOM_FIELDS); ++ sizeof (ipmi_fru_field_t) * IPMI_FRU_CUSTOM_FIELDS); + + /* parse FRU buffer */ +- if (ipmi_fru_parse_board_info_area (fru_parse_ctx, ++ if (ipmi_fru_board_info_area (fru_parse_ctx, + areabuf, + area_length, + &language_code, +@@ -428,8 +428,8 @@ + IPMI_FRU_CUSTOM_FIELDS) < 0) + { + libfreeipmi_cleanup(); +- fatalx(EXIT_FAILURE, "ipmi_fru_parse_board_info_area: %s", +- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); ++ fatalx(EXIT_FAILURE, "ipmi_fru_board_info_area: %s", ++ ipmi_fru_ctx_errormsg (fru_parse_ctx)); + } + + +diff -Nuar nut-2.6.5.orig/m4/nut_check_libfreeipmi.m4 nut-2.6.5/m4/nut_check_libfreeipmi.m4 +--- nut-2.6.5.orig/m4/nut_check_libfreeipmi.m4 2012-07-31 17:38:56.000000000 +0000 ++++ nut-2.6.5/m4/nut_check_libfreeipmi.m4 2013-08-12 17:55:03.132363518 +0000 +@@ -66,7 +66,7 @@ + dnl when version cannot be tested (prior to 1.0.5, with no pkg-config) + dnl we have to check for some specific functions + AC_SEARCH_LIBS([ipmi_ctx_find_inband], [freeipmi], [], [nut_have_freeipmi=no]) +- AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [], [nut_have_freeipmi=no]) ++ AC_SEARCH_LIBS([ipmi_fru_ctx_create], [freeipmi], [], [nut_have_freeipmi=no]) + + AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [nut_have_freeipmi_monitoring=yes], [nut_have_freeipmi_monitoring=no]) + AC_SEARCH_LIBS([ipmi_monitoring_sensor_read_record_id], [ipmimonitoring], [], [nut_have_freeipmi_monitoring=no]) +diff -Nuar nut-2.6.5.orig/tools/nut-scanner/scan_ipmi.c nut-2.6.5/tools/nut-scanner/scan_ipmi.c +--- nut-2.6.5.orig/tools/nut-scanner/scan_ipmi.c 2012-07-31 17:38:58.000000000 +0000 ++++ nut-2.6.5/tools/nut-scanner/scan_ipmi.c 2013-08-12 17:55:03.132363518 +0000 +@@ -34,24 +34,24 @@ + static lt_dlhandle dl_handle = NULL; + static const char *dl_error = NULL; + +-static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx); +-static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx); ++static int (*nut_ipmi_fru_close_device_id) (ipmi_fru_ctx_t ctx); ++static void (*nut_ipmi_fru_ctx_destroy) (ipmi_fru_ctx_t ctx); + #ifdef HAVE_FREEIPMI_11X_12X + static void (*nut_ipmi_sdr_ctx_destroy) (ipmi_sdr_ctx_t ctx); + #else /* HAVE_FREEIPMI_11X_12X */ + static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx); + static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx); + #endif /* HAVE_FREEIPMI_11X_12X */ +-static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx); +-static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags); +-static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id); +-static char * (*nut_ipmi_fru_parse_ctx_errormsg) (ipmi_fru_parse_ctx_t ctx); +-static int (*nut_ipmi_fru_parse_read_data_area) (ipmi_fru_parse_ctx_t ctx, ++static ipmi_fru_ctx_t (*nut_ipmi_fru_ctx_create) (ipmi_ctx_t ipmi_ctx); ++static int (*nut_ipmi_fru_ctx_set_flags) (ipmi_fru_ctx_t ctx, unsigned int flags); ++static int (*nut_ipmi_fru_open_device_id) (ipmi_fru_ctx_t ctx, uint8_t fru_device_id); ++static char * (*nut_ipmi_fru_ctx_errormsg) (ipmi_fru_ctx_t ctx); ++static int (*nut_ipmi_fru_read_data_area) (ipmi_fru_ctx_t ctx, + unsigned int *area_type, + unsigned int *area_length, + void *areabuf, + unsigned int areabuflen); +-static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx); ++static int (*nut_ipmi_fru_next) (ipmi_fru_ctx_t ctx); + static ipmi_ctx_t (*nut_ipmi_ctx_create) (void); + static int (*nut_ipmi_ctx_find_inband) (ipmi_ctx_t ctx, + ipmi_driver_type_t *driver_type, +@@ -92,12 +92,12 @@ + /* Clear any existing error */ + lt_dlerror(); + +- *(void **) (&nut_ipmi_fru_parse_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_close_device_id"); ++ *(void **) (&nut_ipmi_fru_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_close_device_id"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +- *(void **) (&nut_ipmi_fru_parse_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_destroy"); ++ *(void **) (&nut_ipmi_fru_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_ctx_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } +@@ -122,32 +122,32 @@ + } + #endif /* HAVE_FREEIPMI_11X_12X */ + +- *(void **) (&nut_ipmi_fru_parse_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_create"); ++ *(void **) (&nut_ipmi_fru_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_ctx_create"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +- *(void **) (&nut_ipmi_fru_parse_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_set_flags"); ++ *(void **) (&nut_ipmi_fru_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_ctx_set_flags"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +- *(void **) (&nut_ipmi_fru_parse_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_open_device_id"); ++ *(void **) (&nut_ipmi_fru_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_open_device_id"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +- *(void **) (&nut_ipmi_fru_parse_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_errormsg"); ++ *(void **) (&nut_ipmi_fru_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_ctx_errormsg"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +- *(void **) (&nut_ipmi_fru_parse_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_parse_read_data_area"); ++ *(void **) (&nut_ipmi_fru_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_read_data_area"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +- *(void **) (&nut_ipmi_fru_parse_next) = lt_dlsym(dl_handle, "ipmi_fru_parse_next"); ++ *(void **) (&nut_ipmi_fru_next) = lt_dlsym(dl_handle, "ipmi_fru_next"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } +@@ -188,17 +188,17 @@ + + /* Cleanup IPMI contexts */ + #ifdef HAVE_FREEIPMI_11X_12X +-static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx, ++static void nut_freeipmi_cleanup(ipmi_fru_ctx_t fru_parse_ctx, + ipmi_sdr_ctx_t sdr_ctx) + #else /* HAVE_FREEIPMI_11X_12X */ +-static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx, ++static void nut_freeipmi_cleanup(ipmi_fru_ctx_t fru_parse_ctx, + ipmi_sdr_cache_ctx_t sdr_cache_ctx, + ipmi_sdr_parse_ctx_t sdr_parse_ctx) + #endif /* HAVE_FREEIPMI_11X_12X */ + { + if (fru_parse_ctx) { +- (*nut_ipmi_fru_parse_close_device_id) (fru_parse_ctx); +- (*nut_ipmi_fru_parse_ctx_destroy) (fru_parse_ctx); ++ (*nut_ipmi_fru_close_device_id) (fru_parse_ctx); ++ (*nut_ipmi_fru_ctx_destroy) (fru_parse_ctx); + } + + #ifdef HAVE_FREEIPMI_11X_12X +@@ -226,8 +226,8 @@ + int ret = -1; + unsigned int area_type = 0; + unsigned int area_length = 0; +- uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1]; +- ipmi_fru_parse_ctx_t fru_parse_ctx = NULL; ++ uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1]; ++ ipmi_fru_ctx_t fru_parse_ctx = NULL; + #ifdef HAVE_FREEIPMI_11X_12X + ipmi_sdr_ctx_t sdr_ctx = NULL; + #else /* HAVE_FREEIPMI_11X_12X */ +@@ -236,14 +236,14 @@ + #endif /* HAVE_FREEIPMI_11X_12X */ + + /* Parse FRU information */ +- if (!(fru_parse_ctx = (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx))) ++ if (!(fru_parse_ctx = (*nut_ipmi_fru_ctx_create) (ipmi_ctx))) + { +- fprintf(stderr, "ipmi_fru_parse_ctx_create()\n"); ++ fprintf(stderr, "ipmi_fru_ctx_create()\n"); + return 0; + } + + /* lots of motherboards calculate checksums incorrectly */ +- if ((*nut_ipmi_fru_parse_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) ++ if ((*nut_ipmi_fru_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) + { + #ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +@@ -253,7 +253,7 @@ + return 0; + } + +- if ((*nut_ipmi_fru_parse_open_device_id) (fru_parse_ctx, ipmi_id) < 0) ++ if ((*nut_ipmi_fru_open_device_id) (fru_parse_ctx, ipmi_id) < 0) + { + #ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +@@ -268,14 +268,14 @@ + /* clear fields */ + area_type = 0; + area_length = 0; +- memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1); ++ memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1); + + /* parse FRU buffer */ +- if ((*nut_ipmi_fru_parse_read_data_area) (fru_parse_ctx, ++ if ((*nut_ipmi_fru_read_data_area) (fru_parse_ctx, + &area_type, + &area_length, + areabuf, +- IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0) ++ IPMI_FRU_AREA_SIZE_MAX) < 0) + { + #ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +@@ -287,7 +287,7 @@ + + if (area_length) + { +- if (area_type == IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION) ++ if (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION) + { + /* Found a POWER_SUPPLY record */ + #ifdef HAVE_FREEIPMI_11X_12X +@@ -298,7 +298,7 @@ + return 1; + } + } +- } while ((ret = (*nut_ipmi_fru_parse_next) (fru_parse_ctx)) == 1); ++ } while ((ret = (*nut_ipmi_fru_next) (fru_parse_ctx)) == 1); + + /* No need for further errors checking */ + #ifdef HAVE_FREEIPMI_11X_12X diff --git a/sys-power/nut/files/nut-2.6.5-init.d-upsd b/sys-power/nut/files/nut-2.6.5-init.d-upsd new file mode 100644 index 000000000000..c4debd306601 --- /dev/null +++ b/sys-power/nut/files/nut-2.6.5-init.d-upsd @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +pidfile=/var/lib/nut/upsd.pid +bin=/usr/sbin/upsd + +depend() { + use net + before upsmon + after upsdrv +} + +start() { + ebegin "Starting upsd" + # clean up first + pkill -u root,nut -x ${bin} + sleep 1 + rm -f ${pidfile} + # now start up + start-stop-daemon --start --quiet --exec ${bin} + eend $? +} + +stop() { + ebegin "Stopping upsd" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} + +reload() { + ebegin "Reloading upsd" + start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile} + eend $? +} diff --git a/sys-power/nut/files/nut-2.6.5-init.d-upslog b/sys-power/nut/files/nut-2.6.5-init.d-upslog new file mode 100644 index 000000000000..01a9d47036c5 --- /dev/null +++ b/sys-power/nut/files/nut-2.6.5-init.d-upslog @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +pidfile=/var/run/upslog.pid +bin=/usr/bin/upslog + +depend() { + use upsdrv + after upsdrv +} + +start() { + ebegin "Starting upslog" + start-stop-daemon --start --quiet --exec ${bin} + eend $? +} + +stop() { + ebegin "Stopping upslog" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} +reload() { + ebegin "Reloading upslog" + start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile} + eend $? +} diff --git a/sys-power/nut/files/nut-2.6.5-init.d-upsmon b/sys-power/nut/files/nut-2.6.5-init.d-upsmon new file mode 100644 index 000000000000..3aafe1676d6e --- /dev/null +++ b/sys-power/nut/files/nut-2.6.5-init.d-upsmon @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +pidfile=/var/run/upsmon.pid +bin=/usr/sbin/upsmon + +depend() { + use net +} + +start() { + ebegin "Starting upsmon" + start-stop-daemon --start --quiet --exec ${bin} + eend $? +} + +stop() { + ebegin "Stopping upsmon" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} +reload() { + ebegin "Reloading upsmon" + start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile} + eend $? +} diff --git a/sys-power/nut/files/nut-2.7.1-fix-scanning.patch b/sys-power/nut/files/nut-2.7.1-fix-scanning.patch new file mode 100644 index 000000000000..6ef5e681ba96 --- /dev/null +++ b/sys-power/nut/files/nut-2.7.1-fix-scanning.patch @@ -0,0 +1,72 @@ +Search for correct libusb in testing. + +There may be many libusb libraries on a system, and we need to iterate until we +find the correct one. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-scanner/scan_usb.c nut-2.7.1/tools/nut-scanner/scan_usb.c +--- nut-2.7.1.orig/tools/nut-scanner/scan_usb.c 2014-01-04 18:38:22.496816444 -0800 ++++ nut-2.7.1/tools/nut-scanner/scan_usb.c 2014-01-04 19:05:04.598647935 -0800 +@@ -28,7 +28,7 @@ + #include <ltdl.h> + + /* dynamic link library stuff */ +-static char * libname = "libusb"; ++static char * libname = "libusb-0.1"; + static lt_dlhandle dl_handle = NULL; + static const char *dl_error = NULL; + static int (*nut_usb_close)(usb_dev_handle *dev); +@@ -41,6 +41,8 @@ + static usb_dev_handle * (*nut_usb_open)(struct usb_device *dev); + static int (*nut_usb_find_devices)(void); + ++int nutscan_test_usb_library(const char*,void*); ++ + /* return 0 on error */ + int nutscan_load_usb_library() + { +@@ -58,6 +60,22 @@ + return 0; + } + ++ int ret = lt_dlforeachfile(NULL, nutscan_test_usb_library, libname); ++ if(ret == 0) { ++ dl_handle = (void *)1; ++ lt_dlexit(); ++ } ++ ++ return ret; ++} ++ ++int nutscan_test_usb_library(const char *filename, void* data) { ++ char prefix[64]; ++ char *libname = (char*) data; ++ sprintf(prefix, "/%s", libname); ++ if(strstr(filename, prefix) == NULL) ++ return 0; ++ +- dl_handle = lt_dlopenext(libname); ++ dl_handle = lt_dlopenext(filename); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; +@@ -100,16 +118,15 @@ + goto err; + } + + *(void **)(&nut_usb_find_devices) = lt_dlsym(dl_handle,"usb_find_devices"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + ++ fprintf(stderr, "Loaded USB library (%s from %s) : USB search enabled.\n", libname, filename); + return 1; + err: +- fprintf(stderr, "Cannot load USB library (%s) : %s. USB search disabled.\n", libname, dl_error); +- dl_handle = (void *)1; +- lt_dlexit(); ++ fprintf(stderr, "Cannot load USB library (%s from %s) : %s. USB search disabled.\n", libname, filename, dl_error); + return 0; + } + /* end of dynamic link library stuff */ diff --git a/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch b/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch new file mode 100644 index 000000000000..e62b6571d2ce --- /dev/null +++ b/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch @@ -0,0 +1,37 @@ +The code that generates the SNMP and USB headers to compile against does not +have a deterministic order, leading to different results at times. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-snmpinfo.py nut-2.7.1/tools/nut-snmpinfo.py +--- nut-2.7.1.orig/tools/nut-snmpinfo.py 2014-01-04 19:08:19.117150636 -0800 ++++ nut-2.7.1/tools/nut-snmpinfo.py 2013-07-26 12:41:11.000000000 -0700 +@@ -78,7 +78,9 @@ + output_file.write( "/* SNMP IDs device table */\n" ) + output_file.write( "static snmp_device_id_t snmp_device_table[] = {\n" ) + +-for filename in glob.glob('../drivers/*-mib.c'): ++mibs = glob.glob('../drivers/*-mib.c') ++mibs.sort() ++for filename in mibs: + list_of_line = open(filename,'r').read().split(';') + for line in list_of_line: + if "mib2nut_info_t" in line: +diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-usbinfo.pl nut-2.7.1/tools/nut-usbinfo.pl +--- nut-2.7.1.orig/tools/nut-usbinfo.pl 2014-01-04 19:12:45.595949760 -0800 ++++ nut-2.7.1/tools/nut-usbinfo.pl 2013-11-17 11:27:38.000000000 -0800 +@@ -75,7 +75,12 @@ + + ################# MAIN ################# + +-find(\&find_usbdevs,$scanPath); ++find({ ++ wanted => \&find_usbdevs, ++ follow => 1, ++ preprocess => sub { return sort @_ }, ++ }, ++ $scanPath); + &gen_usb_files; + + ################# SUB METHOD ################# + diff --git a/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch b/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch new file mode 100644 index 000000000000..ca0d8be028f5 --- /dev/null +++ b/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch @@ -0,0 +1,13 @@ +diff --git a/drivers/Makefile.am b/drivers/Makefile.am +index 99614ca..42b3611 100644 +--- a/drivers/Makefile.am ++++ b/drivers/Makefile.am +@@ -267,5 +267,6 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ + + # Define a dummy library so that Automake builds rules for the + # corresponding object files. This library is not actually built, +-EXTRA_LIBRARIES = libdummy.a +-libdummy_a_SOURCES = main.c dstate.c serial.c ++EXTRA_LIBRARIES = ++#EXTRA_LIBRARIES = libdummy.a ++#libdummy_a_SOURCES = main.c dstate.c serial.c diff --git a/sys-power/nut/files/nut.powerfail.initd b/sys-power/nut/files/nut.powerfail.initd new file mode 100644 index 000000000000..fd26b4f76aec --- /dev/null +++ b/sys-power/nut/files/nut.powerfail.initd @@ -0,0 +1,48 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description='Signal the UPS to kill power in a power failure condition' + +depend() { + # This is only for baselayout2 + if [ -f /etc/init.d/sysfs ]; then + keyword -jail -lxc -openvz -prefix -uml -vserver -xenu -timeout + need mount-ro + fi +} + +start() { + if [ ! -f /etc/init.d/sysfs ]; then + eerror "The $SVCNAME init-script is written for baselayout-2!" + eerror "Please do not use it with baselayout-1!". + return 1 + fi + local UPS_CTL UPS_POWERDOWN + + if [ -f /etc/killpower -o -f /etc/nut/killpower ]; then + UPS_CTL=/sbin/upsdrvctl + UPS_POWERDOWN="${UPS_CTL} shutdown" + elif [ -f /etc/apcupsd/powerfail ]; then + UPS_CTL=/sbin/apcupsd + UPS_POWERDOWN="${UPS_CTL} --killpower" + else + ewarn "UPS powerfail script scheduled, but no poweroff commands found." + return 0 + fi + + if [ -f "${UPS_CTL}" -a -x "${UPS_CTL}" ]; then + ebegin 'Signaling UPS to kill power' + ${UPS_POWERDOWN} + eend $? + + ebegin 'Halt system and wait for the UPS to kill our power' + /sbin/halt -id + # If the sleep gets hit, something is wrong... + # do NOT restart the system. + while [ 1 ]; do sleep 60; done + else + ewarn "UPS powerfail script scheduled, and flags found, but ${UPS_CTL} missing." + fi +} + diff --git a/sys-power/nut/metadata.xml b/sys-power/nut/metadata.xml new file mode 100644 index 000000000000..bfe6c7469998 --- /dev/null +++ b/sys-power/nut/metadata.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <maintainer type="person"> + <email>prometheanfire@gentoo.org</email> + </maintainer> + <use> + <flag name="ipmi">Support IPMI-based UPSes.</flag> + <flag name="ups_drivers_al175">Driver for Eltek UPS models with AL175 alarm module</flag> + <flag name="ups_drivers_bcmxcp">Driver for UPSes supporting the serial BCM/XCP protocol</flag> + <flag name="ups_drivers_belkin">Driver for Belkin serial UPS equipment</flag> + <flag name="ups_drivers_belkinunv">Driver for Belkin "Universal UPS" and compatible</flag> + <flag name="ups_drivers_bestfcom">Driver for Best Power Fortress/Ferrups</flag> + <flag name="ups_drivers_bestfortress">Driver for old Best Fortress UPS equipment</flag> + <flag name="ups_drivers_bestuferrups">Driver for Best Power Micro-Ferrups</flag> + <flag name="ups_drivers_bestups">Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment</flag> + <flag name="ups_drivers_dummy-ups">Driver for multi-purpose UPS emulation</flag> + <flag name="ups_drivers_etapro">Driver for ETA UPS equipment</flag> + <flag name="ups_drivers_everups">Driver for Ever UPS models</flag> + <flag name="ups_drivers_gamatronic">Driver for Gamatronic UPS equipment</flag> + <flag name="ups_drivers_genericups">Driver for contact-closure UPS equipment</flag> + <flag name="ups_drivers_isbmex">Driver for ISBMEX UPS equipment</flag> + <flag name="ups_drivers_liebert">Driver for Liebert contact-closure UPS equipment</flag> + <flag name="ups_drivers_liebert-esp2">Driver for Liebert UPS, using the ESP-II serial protocol</flag> + <flag name="ups_drivers_masterguard">Driver for Masterguard UPS equipment</flag> + <flag name="ups_drivers_metasys">Driver for Meta System UPS equipment</flag> + <flag name="ups_drivers_mge-utalk">Driver for MGE UPS SYSTEMS UTalk protocol equipment</flag> + <flag name="ups_drivers_microdowell">Driver for Microdowell Enterprise UPS series</flag> + <flag name="ups_drivers_mge-shut">Driver for SHUT Protocol UPS equipment</flag> + <flag name="ups_drivers_oldmge-shut">Driver for SHUT Protocol UPS equipment (older implementation)</flag> + <flag name="ups_drivers_oneac">Driver for Oneac UPS equipment</flag> + <flag name="ups_drivers_optiups">Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment</flag> + <flag name="ups_drivers_powercom">UPS driver for serial Powercom/Trust/Advice UPS equipment</flag> + <flag name="ups_drivers_rhino">Driver for Brazilian Microsol RHINO UPS equipment</flag> + <flag name="ups_drivers_safenet">Driver for SafeNet compatible UPS equipment</flag> + <flag name="ups_drivers_solis">Driver for Brazilian Microsol SOLIS UPS equipment</flag> + <flag name="ups_drivers_tripplite">Driver for Tripp-Lite SmartPro UPS equipment</flag> + <flag name="ups_drivers_tripplitesu">Driver for Tripp-Lite SmartOnline (SU) UPS equipment</flag> + <flag name="ups_drivers_upscode2">Driver for UPScode II compatible UPS equipment</flag> + <flag name="ups_drivers_victronups">Driver for IMV/Victron UPS unit Match, Match Lite, NetUps</flag> + <flag name="ups_drivers_powerpanel">Driver for PowerPanel Plus compatible UPS equipment</flag> + <flag name="ups_drivers_blazer_ser">Driver for Megatec/Q1 protocol serial based UPS equipment</flag> + <flag name="ups_drivers_clone">Fake driver to clone outlets for device grouping</flag> + <flag name="ups_drivers_clone-outlet">Fake driver to clone outlets for device grouping</flag> + <flag name="ups_drivers_ivtscd">driver for the IVT Solar Controller Device</flag> + <flag name="ups_drivers_apcsmart">Driver for American Power Conversion Smart Protocol UPS equipment</flag> + <flag name="ups_drivers_apcsmart-old">Driver for American Power Conversion Smart Protocol UPS equipment</flag> + <flag name="ups_drivers_apcupsd-ups">Driver for apcupsd client access</flag> + <flag name="ups_drivers_riello_ser">Driver for Riello UPS Protocol UPS equipment</flag> + <flag name="ups_drivers_nutdrv_qx">Driver for Q* protocol serial and USB based UPS equipment</flag> + <flag name="ups_drivers_usbhid-ups">Driver for USB/HID UPS equipment</flag> + <flag name="ups_drivers_bcmxcp_usb">Experimental driver for UPSes supporting the BCM/XCP protocol over USB</flag> + <flag name="ups_drivers_tripplite_usb">Driver for older Tripp Lite USB UPSes (not PDC HID)</flag> + <flag name="ups_drivers_blazer_usb">Driver for Megatec/Q1 protocol USB based UPS equipment</flag> + <flag name="ups_drivers_richcomm_usb">Driver UPS equipment using Richcomm dry-contact to USB solution</flag> + <flag name="ups_drivers_riello_usb">Driver for Riello UPS Protocol UPS equipment via USB</flag> + <flag name="ups_drivers_netxml-ups">Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP Protocol) equipment</flag> + <flag name="ups_drivers_snmp-ups">Multi-MIB Driver for SNMP UPS equipment</flag> + <flag name="ups_drivers_nut-ipmipsu">Driver for IPMI Power Supply Units (PSU)</flag> + </use> +</pkgmetadata> diff --git a/sys-power/nut/nut-2.6.5-r1.ebuild b/sys-power/nut/nut-2.6.5-r1.ebuild new file mode 100644 index 000000000000..02735da8d6b6 --- /dev/null +++ b/sys-power/nut/nut-2.6.5-r1.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd + +MY_P=${P/_/-} + +DESCRIPTION="Network-UPS Tools" +HOMEPAGE="http://www.networkupstools.org/" +# Nut mirrors are presently broken +SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz + http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd" +IUSE="avahi cgi ipmi snmp usb selinux ssl tcpd xml" + +CDEPEND="avahi? ( net-dns/avahi ) + cgi? ( >=media-libs/gd-2[png] ) + snmp? ( net-analyzer/net-snmp ) + usb? ( virtual/libusb:0 ) + ssl? ( >=dev-libs/openssl-1 ) + tcpd? ( sys-apps/tcp-wrappers ) + xml? ( >=net-libs/neon-0.25.0 ) + ipmi? ( sys-libs/freeipmi ) + virtual/udev" +DEPEND="$CDEPEND + >=sys-apps/sed-4 + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nut ) +" + +S=${WORKDIR}/${MY_P} + +# public files should be 644 root:root +NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" +# private files should be 640 root:nut - readable by nut, writeable by root, +NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" +# public files should be 644 root:root, only installed if USE=cgi +NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" + +pkg_setup() { + enewgroup nut 84 + enewuser nut 84 -1 /var/lib/nut nut,uucp + # As of udev-104, NUT must be in uucp and NOT in tty. + gpasswd -d nut tty 2>/dev/null + gpasswd -a nut uucp 2>/dev/null + # in some cases on old systems it wasn't in the nut group either! + gpasswd -a nut nut 2>/dev/null + warningmsg ewarn +} + +src_prepare() { + ht_fix_file configure.in + + epatch "${FILESDIR}"/${PN}-2.4.1-no-libdummy.patch + epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch + #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch + epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch + + sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ + -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \ + -i configure.in || die + + sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ + -i scripts/udev/Makefile.am || die + + rm -f ltmain.sh m4/lt* m4/libtool.m4 + + sed -i \ + -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ + lib/libupsclient{.pc,-config}.in || die #361685 + + eautoreconf +} + +src_configure() { + local myconf + + if [ -n "${NUT_DRIVERS}" ]; then + myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}" + fi + + use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" + + # TODO: USE flag for sys-power/powerman + econf \ + --sysconfdir=/etc/nut \ + --datarootdir=/usr/share/nut \ + --datadir=/usr/share/nut \ + --disable-static \ + --with-statepath=/var/lib/nut \ + --with-drvpath=/$(get_libdir)/nut \ + --with-htmlpath=/usr/share/nut/html \ + --with-user=nut \ + --with-group=nut \ + --with-logfacility=LOG_DAEMON \ + --with-dev \ + --with-serial \ + --without-hal \ + --without-powerman \ + $(use_with avahi) \ + $(use_with cgi) \ + $(use_with ipmi) \ + $(use_with ipmi freeipmi) \ + $(use_with snmp) \ + $(use_with ssl) \ + $(use_with tcpd wrap) \ + $(use_with usb) \ + $(use_with xml neon) \ + $(systemd_with_unitdir) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die + + find "${D}" -name '*.la' -exec rm -f {} + + + dodir /sbin + dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl + # This needs to exist for the scripts + dosym /$(get_libdir)/nut/upsdrvctl /usr/sbin/upsdrvctl + + if use cgi; then + elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." + elog "copy them to your web server's ScriptPath to activate (this is a" + elog "change from the old location)." + elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." + fi + + # this must be done after all of the install phases + for i in "${D}"/etc/nut/*.sample ; do + mv "${i}" "${i/.sample/}" + done + + dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die + + newdoc lib/README README.lib || die + newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die + + docinto cables + dodoc docs/cables/* || die + + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die + newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die + newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die + + keepdir /var/lib/nut + + einfo "Setting up permissions on files and directories" + fperms 0700 /var/lib/nut + fowners nut:nut /var/lib/nut + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0640 ${NUT_PRIVATE_FILES} + eval fowners root:nut ${NUT_PRIVATE_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0644 ${NUT_PUBLIC_FILES} + eval fowners root:root ${NUT_PUBLIC_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval fperms 0644 ${NUT_CGI_FILES} + eval fowners root:root ${NUT_CGI_FILES} + fi + + # this is installed for 2.4 and fbsd guys + if ! has_version virtual/udev; then + einfo "Installing non-udev hotplug support" + insinto /etc/hotplug/usb + insopts -m 755 + doins scripts/hotplug/nut-usbups.hotplug + fi + + dobashcomp "${S}"/scripts/misc/nut.bash_completion +} + +pkg_postinst() { + # this is to ensure that everybody that installed old versions still has + # correct permissions + + chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null + chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + fi + + warningmsg elog +} + +warningmsg() { + msgfunc="$1" + [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" + ${msgfunc} "Please note that NUT now runs under the 'nut' user." + ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." + ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" + ${msgfunc} "hotplug rules that are installed, and alter them suitably." + ${msgfunc} '' + ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." + ${msgfunc} '' + ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." + ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" + ${msgfunc} "have a service per UPS:" + ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" + ${msgfunc} '' + ${msgfunc} 'If you want apcupsd to power off your UPS when it' + ${msgfunc} 'shuts down your system in a power failure, you must' + ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' + ${msgfunc} '' + ${msgfunc} 'rc-update add nut.powerfail shutdown' + ${msgfunc} '' + +} diff --git a/sys-power/nut/nut-2.7.2-r2.ebuild b/sys-power/nut/nut-2.7.2-r2.ebuild new file mode 100644 index 000000000000..8f9e94b92e46 --- /dev/null +++ b/sys-power/nut/nut-2.7.2-r2.ebuild @@ -0,0 +1,274 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs + +MY_P=${P/_/-} + +DESCRIPTION="Network-UPS Tools" +HOMEPAGE="http://www.networkupstools.org/" +# Nut mirrors are presently broken +SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz + http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd" + +IUSE="avahi cgi ipmi snmp +usb selinux ssl tcpd xml" +CDEPEND="avahi? ( net-dns/avahi ) + cgi? ( >=media-libs/gd-2[png] ) + snmp? ( net-analyzer/net-snmp ) + usb? ( virtual/libusb:0 ) + ssl? ( >=dev-libs/openssl-1 ) + tcpd? ( sys-apps/tcp-wrappers ) + xml? ( >=net-libs/neon-0.25.0 ) + ipmi? ( sys-libs/freeipmi ) + virtual/udev" +DEPEND="$CDEPEND + >=sys-apps/sed-4 + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nut ) +" + +S=${WORKDIR}/${MY_P} + +# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package +SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx" +SNMP_DRIVERLIST="snmp-ups" +USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx" +USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST} +#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx" +NEONXML_DRIVERLIST="netxml-ups" +IPMI_DRIVERLIST="nut-ipmipsu" +# Now we build from it: +for name in ${SERIAL_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" +done +for name in ${USB_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )" +done +for name in ${NEONXML_DRIVERLIST}; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )" +done +for name in ${SNMP_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )" +done +for name in ${IPMI_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )" +done +IUSE="${IUSE} ${IUSE_UPS_DRIVERS}" + +# public files should be 644 root:root +NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" +# private files should be 640 root:nut - readable by nut, writeable by root, +NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" +# public files should be 644 root:root, only installed if USE=cgi +NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" + +pkg_setup() { + enewgroup nut 84 + enewuser nut 84 -1 /var/lib/nut nut,uucp + # As of udev-104, NUT must be in uucp and NOT in tty. + gpasswd -d nut tty 2>/dev/null + gpasswd -a nut uucp 2>/dev/null + # in some cases on old systems it wasn't in the nut group either! + gpasswd -a nut nut 2>/dev/null + warningmsg ewarn +} + +src_prepare() { + #ht_fix_file configure.in + + epatch "${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch" + epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch + #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch + #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch + epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch + epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch + + sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ + -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \ + -i configure.ac || die + + sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ + -i scripts/udev/Makefile.am || die + + rm -f ltmain.sh m4/lt* m4/libtool.m4 + + sed -i \ + -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ + lib/libupsclient{.pc,-config}.in || die #361685 + + # This file appears twice in the install list, and if both install rules + # trigger simultaneously during parallel-make, it fails. + sed -i \ + -e '/nodist_sysconf_DATA/s,upsmon.conf.sample,,g' \ + conf/Makefile.am || die + + eautoreconf +} + +src_configure() { + local myconf + append-flags -fno-lto + tc-export CC + tc-export CXX + tc-export AR + + local UPS_DRIVERS="" + for u in $USE ; do + u2=${u#ups_drivers_} + [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}" + done + UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }" + myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}" + + use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" + + # TODO: USE flag for sys-power/powerman + econf \ + --sysconfdir=/etc/nut \ + --datarootdir=/usr/share/nut \ + --datadir=/usr/share/nut \ + --disable-static \ + --with-statepath=/var/lib/nut \ + --with-drvpath=/$(get_libdir)/nut \ + --with-htmlpath=/usr/share/nut/html \ + --with-user=nut \ + --with-group=nut \ + --with-logfacility=LOG_DAEMON \ + --with-dev \ + --with-serial \ + --without-powerman \ + $(use_with avahi) \ + $(use_with cgi) \ + $(use_with ipmi) \ + $(use_with ipmi freeipmi) \ + $(use_with snmp) \ + $(use_with ssl) \ + $(use_with tcpd wrap) \ + $(use_with usb) \ + $(use_with xml neon) \ + $(systemd_with_unitdir) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die + + find "${D}" -name '*.la' -exec rm -f {} + + + dodir /sbin + dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl + + if use cgi; then + elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." + elog "copy them to your web server's ScriptPath to activate (this is a" + elog "change from the old location)." + elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." + fi + + # this must be done after all of the install phases + for i in "${D}"/etc/nut/*.sample ; do + mv "${i}" "${i/.sample/}" + done + + dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die + + newdoc lib/README README.lib || die + newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die + + docinto cables + dodoc docs/cables/* || die + + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die + newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die + newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die + + keepdir /var/lib/nut + + einfo "Setting up permissions on files and directories" + fperms 0700 /var/lib/nut + fowners nut:nut /var/lib/nut + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0640 ${NUT_PRIVATE_FILES} + eval fowners root:nut ${NUT_PRIVATE_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0644 ${NUT_PUBLIC_FILES} + eval fowners root:root ${NUT_PUBLIC_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval fperms 0644 ${NUT_CGI_FILES} + eval fowners root:root ${NUT_CGI_FILES} + fi + + # this is installed for 2.4 and fbsd guys + if ! has_version virtual/udev; then + einfo "Installing non-udev hotplug support" + insinto /etc/hotplug/usb + insopts -m 755 + doins scripts/hotplug/nut-usbups.hotplug + fi + + dobashcomp "${S}"/scripts/misc/nut.bash_completion +} + +pkg_postinst() { + # this is to ensure that everybody that installed old versions still has + # correct permissions + + chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null + chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + fi + + warningmsg elog +} + +warningmsg() { + msgfunc="$1" + [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" + ${msgfunc} "Please note that NUT now runs under the 'nut' user." + ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." + ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" + ${msgfunc} "hotplug rules that are installed, and alter them suitably." + ${msgfunc} '' + ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." + ${msgfunc} '' + ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." + ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" + ${msgfunc} "have a service per UPS:" + ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" + ${msgfunc} '' + ${msgfunc} 'If you want apcupsd to power off your UPS when it' + ${msgfunc} 'shuts down your system in a power failure, you must' + ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' + ${msgfunc} '' + ${msgfunc} 'rc-update add nut.powerfail shutdown' + ${msgfunc} '' + +} diff --git a/sys-power/nut/nut-2.7.3.ebuild b/sys-power/nut/nut-2.7.3.ebuild new file mode 100644 index 000000000000..55dd831f344f --- /dev/null +++ b/sys-power/nut/nut-2.7.3.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs + +MY_P=${P/_/-} + +DESCRIPTION="Network-UPS Tools" +HOMEPAGE="http://www.networkupstools.org/" +# Nut mirrors are presently broken +SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz + http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ppc ppc64 x86 ~x86-fbsd" + +IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf" +CDEPEND=" + cgi? ( >=media-libs/gd-2[png] ) + snmp? ( net-analyzer/net-snmp ) + usb? ( virtual/libusb:0 ) + ssl? ( >=dev-libs/openssl-1 ) + tcpd? ( sys-apps/tcp-wrappers ) + xml? ( >=net-libs/neon-0.25.0 ) + ipmi? ( sys-libs/freeipmi ) + zeroconf? ( net-dns/avahi ) + virtual/udev" +DEPEND="$CDEPEND + >=sys-apps/sed-4 + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nut ) +" + +S=${WORKDIR}/${MY_P} + +# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package +SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx" +SNMP_DRIVERLIST="snmp-ups" +USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx" +USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST} +#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx" +NEONXML_DRIVERLIST="netxml-ups" +IPMI_DRIVERLIST="nut-ipmipsu" +# Now we build from it: +for name in ${SERIAL_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" +done +for name in ${USB_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )" +done +for name in ${NEONXML_DRIVERLIST}; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )" +done +for name in ${SNMP_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )" +done +for name in ${IPMI_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )" +done +IUSE="${IUSE} ${IUSE_UPS_DRIVERS}" + +# public files should be 644 root:root +NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" +# private files should be 640 root:nut - readable by nut, writeable by root, +NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" +# public files should be 644 root:root, only installed if USE=cgi +NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" + +pkg_setup() { + enewgroup nut 84 + enewuser nut 84 -1 /var/lib/nut nut,uucp + # As of udev-104, NUT must be in uucp and NOT in tty. + gpasswd -d nut tty 2>/dev/null + gpasswd -a nut uucp 2>/dev/null + # in some cases on old systems it wasn't in the nut group either! + gpasswd -a nut nut 2>/dev/null + warningmsg ewarn +} + +src_prepare() { + #ht_fix_file configure.in + + epatch "${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch" + epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch + #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch + #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch + epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch + epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch + + sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ + -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \ + -i configure.ac || die + + sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ + -i scripts/udev/Makefile.am || die + + rm -f ltmain.sh m4/lt* m4/libtool.m4 + + sed -i \ + -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ + lib/libupsclient{.pc,-config}.in || die #361685 + + eautoreconf +} + +src_configure() { + local myconf + append-flags -fno-lto + tc-export CC + tc-export CXX + tc-export AR + + local UPS_DRIVERS="" + for u in $USE ; do + u2=${u#ups_drivers_} + [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}" + done + UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }" + myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}" + + use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" + + # TODO: USE flag for sys-power/powerman + econf \ + --sysconfdir=/etc/nut \ + --datarootdir=/usr/share/nut \ + --datadir=/usr/share/nut \ + --disable-static \ + --with-statepath=/var/lib/nut \ + --with-drvpath=/$(get_libdir)/nut \ + --with-htmlpath=/usr/share/nut/html \ + --with-user=nut \ + --with-group=nut \ + --with-logfacility=LOG_DAEMON \ + --with-dev \ + --with-serial \ + --without-powerman \ + $(use_with cgi) \ + $(use_with ipmi) \ + $(use_with ipmi freeipmi) \ + $(use_with snmp) \ + $(use_with ssl) \ + $(use_with tcpd wrap) \ + $(use_with usb) \ + $(use_with xml neon) \ + $(use_with zeroconf avahi) \ + $(systemd_with_unitdir) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die + + find "${D}" -name '*.la' -exec rm -f {} + + + dodir /sbin + dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl + + if use cgi; then + elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." + elog "copy them to your web server's ScriptPath to activate (this is a" + elog "change from the old location)." + elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." + fi + + # this must be done after all of the install phases + for i in "${D}"/etc/nut/*.sample ; do + mv "${i}" "${i/.sample/}" + done + + dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die + + newdoc lib/README README.lib || die + newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die + + docinto cables + dodoc docs/cables/* || die + + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die + newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die + newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die + + keepdir /var/lib/nut + + einfo "Setting up permissions on files and directories" + fperms 0700 /var/lib/nut + fowners nut:nut /var/lib/nut + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0640 ${NUT_PRIVATE_FILES} + eval fowners root:nut ${NUT_PRIVATE_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0644 ${NUT_PUBLIC_FILES} + eval fowners root:root ${NUT_PUBLIC_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval fperms 0644 ${NUT_CGI_FILES} + eval fowners root:root ${NUT_CGI_FILES} + fi + + # this is installed for 2.4 and fbsd guys + if ! has_version virtual/udev; then + einfo "Installing non-udev hotplug support" + insinto /etc/hotplug/usb + insopts -m 755 + doins scripts/hotplug/nut-usbups.hotplug + fi + + dobashcomp "${S}"/scripts/misc/nut.bash_completion +} + +pkg_postinst() { + # this is to ensure that everybody that installed old versions still has + # correct permissions + + chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null + chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + fi + + warningmsg elog +} + +warningmsg() { + msgfunc="$1" + [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" + ${msgfunc} "Please note that NUT now runs under the 'nut' user." + ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." + ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" + ${msgfunc} "hotplug rules that are installed, and alter them suitably." + ${msgfunc} '' + ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." + ${msgfunc} '' + ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." + ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" + ${msgfunc} "have a service per UPS:" + ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" + ${msgfunc} '' + ${msgfunc} 'If you want apcupsd to power off your UPS when it' + ${msgfunc} 'shuts down your system in a power failure, you must' + ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' + ${msgfunc} '' + ${msgfunc} 'rc-update add nut.powerfail shutdown' + ${msgfunc} '' + +} diff --git a/sys-power/nut/nut-2.7.4.ebuild b/sys-power/nut/nut-2.7.4.ebuild new file mode 100644 index 000000000000..a767415e64b7 --- /dev/null +++ b/sys-power/nut/nut-2.7.4.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs + +MY_P=${P/_/-} + +DESCRIPTION="Network-UPS Tools" +HOMEPAGE="http://www.networkupstools.org/" +# Nut mirrors are presently broken +SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz + http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd" + +IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf" +CDEPEND=" + cgi? ( >=media-libs/gd-2[png] ) + snmp? ( net-analyzer/net-snmp ) + usb? ( virtual/libusb:0 ) + ssl? ( >=dev-libs/openssl-1 ) + tcpd? ( sys-apps/tcp-wrappers ) + xml? ( >=net-libs/neon-0.25.0 ) + ipmi? ( sys-libs/freeipmi ) + zeroconf? ( net-dns/avahi ) + virtual/udev" +DEPEND="$CDEPEND + >=sys-apps/sed-4 + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nut ) +" + +S=${WORKDIR}/${MY_P} + +# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package +SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx" +SNMP_DRIVERLIST="snmp-ups" +USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx" +USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST} +#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx" +NEONXML_DRIVERLIST="netxml-ups" +IPMI_DRIVERLIST="nut-ipmipsu" +# Now we build from it: +for name in ${SERIAL_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" +done +for name in ${USB_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )" +done +for name in ${NEONXML_DRIVERLIST}; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )" +done +for name in ${SNMP_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )" +done +for name in ${IPMI_DRIVERLIST} ; do + IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" + REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )" +done +IUSE="${IUSE} ${IUSE_UPS_DRIVERS}" + +# public files should be 644 root:root +NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" +# private files should be 640 root:nut - readable by nut, writeable by root, +NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" +# public files should be 644 root:root, only installed if USE=cgi +NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" + +pkg_setup() { + enewgroup nut 84 + enewuser nut 84 -1 /var/lib/nut nut,uucp + # As of udev-104, NUT must be in uucp and NOT in tty. + gpasswd -d nut tty 2>/dev/null + gpasswd -a nut uucp 2>/dev/null + # in some cases on old systems it wasn't in the nut group either! + gpasswd -a nut nut 2>/dev/null + warningmsg ewarn +} + +src_prepare() { + #ht_fix_file configure.in + + epatch "${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch" + epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch + #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch + #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch + #epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch + epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch + + sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ + -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \ + -i configure.ac || die + + sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ + -i scripts/udev/Makefile.am || die + + rm -f ltmain.sh m4/lt* m4/libtool.m4 + + sed -i \ + -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ + lib/libupsclient{.pc,-config}.in || die #361685 + + eautoreconf +} + +src_configure() { + local myconf + append-flags -fno-lto + tc-export CC + tc-export CXX + tc-export AR + + local UPS_DRIVERS="" + for u in $USE ; do + u2=${u#ups_drivers_} + [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}" + done + UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }" + myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}" + + use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" + + # TODO: USE flag for sys-power/powerman + econf \ + --sysconfdir=/etc/nut \ + --datarootdir=/usr/share/nut \ + --datadir=/usr/share/nut \ + --disable-static \ + --with-statepath=/var/lib/nut \ + --with-drvpath=/$(get_libdir)/nut \ + --with-htmlpath=/usr/share/nut/html \ + --with-user=nut \ + --with-group=nut \ + --with-logfacility=LOG_DAEMON \ + --with-dev \ + --with-serial \ + --without-powerman \ + $(use_with cgi) \ + $(use_with ipmi) \ + $(use_with ipmi freeipmi) \ + $(use_with snmp) \ + $(use_with ssl) \ + $(use_with tcpd wrap) \ + $(use_with usb) \ + $(use_with xml neon) \ + $(use_with zeroconf avahi) \ + $(systemd_with_unitdir) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die + + find "${D}" -name '*.la' -exec rm -f {} + + + dodir /sbin + dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl + + if use cgi; then + elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." + elog "copy them to your web server's ScriptPath to activate (this is a" + elog "change from the old location)." + elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." + fi + + # this must be done after all of the install phases + for i in "${D}"/etc/nut/*.sample ; do + mv "${i}" "${i/.sample/}" + done + + dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die + + newdoc lib/README README.lib || die + newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die + + docinto cables + dodoc docs/cables/* || die + + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die + newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die + newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die + newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die + + keepdir /var/lib/nut + + einfo "Setting up permissions on files and directories" + fperms 0700 /var/lib/nut + fowners nut:nut /var/lib/nut + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0640 ${NUT_PRIVATE_FILES} + eval fowners root:nut ${NUT_PRIVATE_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + eval fperms 0644 ${NUT_PUBLIC_FILES} + eval fowners root:root ${NUT_PUBLIC_FILES} + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval fperms 0644 ${NUT_CGI_FILES} + eval fowners root:root ${NUT_CGI_FILES} + fi + + # this is installed for 2.4 and fbsd guys + if ! has_version virtual/udev; then + einfo "Installing non-udev hotplug support" + insinto /etc/hotplug/usb + insopts -m 755 + doins scripts/hotplug/nut-usbups.hotplug + fi + + dobashcomp "${S}"/scripts/misc/nut.bash_completion +} + +pkg_postinst() { + # this is to ensure that everybody that installed old versions still has + # correct permissions + + chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null + chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null + + # Do not remove eval here, because the variables contain shell expansions. + if use cgi; then + eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null + fi + + warningmsg elog +} + +warningmsg() { + msgfunc="$1" + [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" + ${msgfunc} "Please note that NUT now runs under the 'nut' user." + ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." + ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" + ${msgfunc} "hotplug rules that are installed, and alter them suitably." + ${msgfunc} '' + ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." + ${msgfunc} '' + ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." + ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" + ${msgfunc} "have a service per UPS:" + ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" + ${msgfunc} '' + ${msgfunc} 'If you want apcupsd to power off your UPS when it' + ${msgfunc} 'shuts down your system in a power failure, you must' + ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' + ${msgfunc} '' + ${msgfunc} 'rc-update add nut.powerfail shutdown' + ${msgfunc} '' + +} diff --git a/sys-power/nvclock/Manifest b/sys-power/nvclock/Manifest new file mode 100644 index 000000000000..6a2c7fec3f5d --- /dev/null +++ b/sys-power/nvclock/Manifest @@ -0,0 +1,11 @@ +AUX nvclock-0.8_p20110102-buffers.patch 5181 SHA256 aecb2ecc04601dcd941fb60e83190b3b4e4b8ab656c35788d57baf1cbad95d34 SHA512 bca744826c3b3d12e4e694d692d58cc6b1004c6198ea65af765dacce717e523e0ae4f48fc7b95cadd377160e4c41a311ca901c0a269d0781705fb25ce2919924 WHIRLPOOL ef200a59c2fba56e78f2dd1b02d61bf1aa4bb8e1dd47130bc1eb86c0fb3e68762e5391e60b51062b848efc71aea0a9a35c024c87fbf28418834a7bd3c705b5a1 +AUX nvclock-0.8_p20110102-desktop.patch 544 SHA256 b1e91daa971459d9719a44f0a392044919fd1034ea85a81c8088571f9896ccb0 SHA512 4816780a6fc1770853d547de3f4e7b1533086b69ac380e99df47ba23dff696f1bd9644de9fac25ed82cb86284f2af28323245249d9372a6064499cdfc84618c2 WHIRLPOOL c890094e0ecdb87c1a824e159ea2b0dfe60f119d1091c8ada4b63e72dfba4b26762c69e55921622edcb4364138dc103e7384788db414113118bae7aa1c61bbfd +AUX nvclock-0.8_p20110102-r1-make.patch 2788 SHA256 b9e3345d5163e5e207477028f7cf07da3aa91d018124c9ccbac2cfae5171c7d0 SHA512 fa1b6591efd950d90501a72ecd1232fdac878cd6126eb15528526a90f4b99c7fe4348a6382a0c111b5af849f678b0a59b143a8ea74653e6d78114887c632a0a6 WHIRLPOOL 792de5a1837ceb9b913375bf4da47a918e5525f4cbf7928ad82a4eb60196f7106d85f15ee72e59f08d9a2a662fb3109f5be5c8524adda6f2174d63988ea4958b +AUX nvclock-0.8_p20110102-usleep.patch 295 SHA256 4c7b942abc0679a3b45b1c355a00ebd1d8ef1f469c7dcdb2e454daedef029eef SHA512 6681f08788d79b0534734cc09fef5df3686c5fe6664f5e7bd634ee8e45a3e49821201895f221cd42e7cab2be88330febd57f069a24e09da4c60ef2b1fd6ee206 WHIRLPOOL 82545c5bca32ea19e3f5f8100d9401a2e6d5f08e24880cf12f497b09768371a6f1238891587a38f66d2cee6982a1b23bd12db0ec846ebf8350c7e788bbf551e4 +AUX nvclock_confd 360 SHA256 2bbf36faa3b78425471275f70c4d8abdff4720dc854152e4ad7b2da68810bdca SHA512 9a5ebc91fe1346677b982d178099d577ad285b104c38720a975fc6b25190ec86e00ffbc165e7409b8aba5d8d9c1d336508579deb573c5ba7495b84fa28900519 WHIRLPOOL d1f80835454b52e9afa8fcdc96dd9e4b04401124669257c562d3eb3ecb5da446e55ecaa78076fc828c08a36c7f7407ddeeb8633aae86fd2669263cdd9c45189e +AUX nvclock_initd 145 SHA256 26040fce86a0c409e4f714691f560bc69442919ca19dc29f97d374833712b08f SHA512 348601da9728e2d726504bf23da944859813e52999ef1c716561523d6de61c1726be89b3f57e1a27d4ab641eda19b4dddc6eb8588a0ae1f64b4b418cc14876b1 WHIRLPOOL d3da9e48b36ff89ba275ada91a58e3a40391da6880b1fe5048702faf690577da15e8333c809bab84c694a7c220bb06bc249f4ad6d41f9ba9a95feb248009e6cb +DIST nvclock-0.8_p20110102.tar.bz2 285043 SHA256 d2a753908ef665caa996b71efd3081501e4b0fb45fa827add685cbc85d5d3745 SHA512 01bf7faed83acdf2390e1f410b2f8b697ff647b15562a6960a99666ec5121b532cbf4380137c9ee24221ccafff641bcdef4748dcad7ac92fb25fa15e735dd140 WHIRLPOOL e0d42a293add54b2d74e94fb54e0b20d29041b741476c63dc29a28ce10efc717a68d7bc82f4fb38f57a998526db4510d0b419e2617261765c8b38bb45ba24c43 +EBUILD nvclock-0.8_p20110102-r2.ebuild 1297 SHA256 99347b0e022a0c334c520d862907758bfcfc5bfa17d391481cb76a260f2d15f5 SHA512 58622a82b4c6a4f062fe092d7afca7af3da3da406c95bd01e9808175248e35a7347268794546727926f5621e1b0c9ec2a62f8b3f5c50da85a311793aa9bda203 WHIRLPOOL fbc18e5895c6203d2eea42410e92f00da698133161225c70fdbfea6793e0e0ef017b9bcf8a27e0292f9dad328f4b5207ba127e39c1b4d805c4bc73ef212d1280 +MISC ChangeLog 2556 SHA256 f0219b47d179962215d69ce1994c27a9eeb3c218bb5cc42dc83d168a4bf62903 SHA512 0fbfdbacb991d094b4d77e33a53f64701e4ed519459ccb824694102df900ce86b373e3c76d9994d374b6bbb49ffdc4addb89ceb84f2781f30810cc54a072c13b WHIRLPOOL eb94db80b628a4c0f8a51ba4aa132f2e410be4ce4cda5f07576b5a8e378d0aaeacf320255dc972b6e10605b4a2f3249d793acbebe4edf2d06a3c35242c506cc6 +MISC ChangeLog-2015 10698 SHA256 95c5ac720a4561ac1485fb1e5b05c9d2ca8bfc4e74a326e00429e81e52533096 SHA512 afcae2b47de0df5ce11f1547e331add2c1d708dbc4f279b5b7701be1aba16209a9db2c3c5f6b9e1fcfaed799d0f8c51dfeaa722eaed7d0b8dddefb021d9cd432 WHIRLPOOL 119755f6890c617dbc371695ecb071d6d791a9a13396c4fa72f66e51ccda81a1c83b493d9fbf48b030c3e0cf667ece055aa81c106a087c09c1ab029a81438b3a +MISC metadata.xml 399 SHA256 b5d6112ba1fb0b245c5e6f1100c4b2ff8e957c23a59acda66b60e212591518a9 SHA512 df14f8340f688857210010d6843e0a86d706ba3bb9edbe015ad42e36fb7eb6c8606e2ea9d5dbfea7c4f7ad3f0e94c78d7b8c2b7b2a29af88d5c161162f8befcb WHIRLPOOL d5449a065a00ec59f2bcc2f920394729fb87ad5fb46b25ccaf6eda0aeb8921c7c05a127c90d101ff1564718085808ca076257a9291dae78b202790b90ddb0c6b diff --git a/sys-power/nvclock/files/nvclock-0.8_p20110102-buffers.patch b/sys-power/nvclock/files/nvclock-0.8_p20110102-buffers.patch new file mode 100644 index 000000000000..f64cb9b8456d --- /dev/null +++ b/sys-power/nvclock/files/nvclock-0.8_p20110102-buffers.patch @@ -0,0 +1,202 @@ +https://bugs.gentoo.org/364667 + +clean up random buffer overflows in the code + +--- a/src/backend/back_linux.c ++++ b/src/backend/back_linux.c +@@ -42,7 +42,9 @@ static int probe_devices(); + static int check_driver() + { + FILE *proc; +- char buffer[80]; ++ char *buffer = NULL; ++ size_t len; ++ int ret = 0; + + proc = fopen("/proc/modules", "r"); + +@@ -50,9 +52,9 @@ static int check_driver() + if(proc == NULL) + return 0; + +- while(fgets(buffer, 80, proc) != NULL) ++ while(getline(&buffer, &len, proc) != -1) + { +- char name[80]; ++ char name[100]; + int size; + int used; + +@@ -64,26 +66,23 @@ static int check_driver() + { + if(strcmp(name, "NVdriver") == 0) + { +- fclose(proc); + if(used) +- return 1; +- +- return 0; ++ ret = 1; ++ break; + } + + if(strcmp(name, "nvidia") == 0) + { +- fclose(proc); + if(used) +- return 2; +- +- return 0; ++ ret = 2; ++ break; + } + } + } ++ free(buffer); + fclose(proc); + +- return 0; ++ return ret; + } + + int init_nvclock() +@@ -114,7 +113,8 @@ static int probe_devices() + { + int dev, irq, reg_addr, i=0; + unsigned short devbusfn; +- char buf[256]; ++ char *buf = NULL; ++ size_t len; + FILE *proc; + + proc = fopen("/proc/bus/pci/devices", "r"); +@@ -124,7 +124,7 @@ static int probe_devices() + return 0; + } + +- while(fgets(buf, sizeof(buf)-1, proc)) ++ while(getline(&buf, &len, proc) != -1) + { + if(sscanf(buf,"%hx %x %x %x",&devbusfn, &dev, &irq, ®_addr) != 4) continue; + +@@ -181,6 +181,7 @@ static int probe_devices() + i++; + } + } ++ free(buf); + fclose(proc); + + if(i==0) +--- a/src/backend/config.c ++++ b/src/backend/config.c +@@ -286,8 +286,9 @@ int open_config() + { + if(mkdir(nvclock.path, 0755)) + { +- char buf[80]; +- sprintf(buf, "Can't create '%s'. Do you have sufficient permissions?\n", nvclock.path); ++ char buf[1024]; ++ snprintf(buf, sizeof(buf), "Can't create path (do you have sufficient permissions?): %s", nvclock.path); ++ buf[sizeof(buf) - 1] = '\0'; + set_error_str(buf); + return 0; + } +@@ -297,8 +298,9 @@ int open_config() + /* Check if .nvclock really is a directory. For some users it was a file and this led to a segfault. */ + if(!S_ISDIR(stat_buf.st_mode)) + { +- char buf[80]; +- sprintf(buf, "Can't open '%s'. Is it really a directory?\n", nvclock.path); ++ char buf[1024]; ++ snprintf(buf, sizeof(buf), "Can't open path (Is it really a directory?): %s", nvclock.path); ++ buf[sizeof(buf) - 1] = '\0'; + set_error_str(buf); + return 0; + } +--- a/src/backend/error.c ++++ b/src/backend/error.c +@@ -41,23 +41,19 @@ void set_error_str(const char *str) + } + + +-char *get_error(char *buf, int size) ++const char *get_error(void) + { + switch(nvclock.nv_errno) + { + case NV_ERR_NO_DEVICES_FOUND: +- strcpy(buf, "No nvidia cards found in your system!"); +- break; ++ return "No nvidia cards found in your system!"; + case NV_ERR_NO_DRIVERS_FOUND: +- strcpy(buf, "You don't have enough permissions to run NVClock! Retry as root or install the Nvidia drivers."); +- break; ++ return "You don't have enough permissions to run NVClock! Retry as root or install the Nvidia drivers."; + case NV_ERR_NOT_ENOUGH_PERMISSIONS: +- strcpy(buf, "You don't have enough permissions to run NVClock! Retry as root."); +- break; ++ return "You don't have enough permissions to run NVClock! Retry as root."; + case NV_ERR_OTHER: +- strcpy(buf, nvclock.nv_err_str); +- break; ++ return nvclock.nv_err_str; + } + +- return buf; ++ return "unknown"; + } +--- a/src/backend/nvclock.h ++++ b/src/backend/nvclock.h +@@ -335,7 +335,7 @@ cfg_entry* lookup_entry(cfg_entry **cfg, char *section, char *name); + void destroy(cfg_entry **cfg); + + /* error handling */ +-char *get_error(char *buf, int size); ++const char *get_error(void); + void set_error(int code); + void set_error_str(const char *err); + +--- a/src/gtk/main.c ++++ b/src/gtk/main.c +@@ -264,8 +264,7 @@ int main (int argc, char *argv[]) + */ + if(!init_nvclock()) + { +- char buf[80]; +- GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", get_error(buf, 80)); ++ GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", get_error()); + gtk_dialog_run(GTK_DIALOG(dialog)); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(dialog)); + gtk_widget_destroy(dialog); +--- a/src/nvclock.c ++++ b/src/nvclock.c +@@ -604,8 +604,7 @@ int main(int argc, char *argv[]) + + if(!init_nvclock()) + { +- char buf[80]; +- fprintf(stderr, "Error: %s\n", get_error(buf, 80)); ++ fprintf(stderr, "Error: %s\n", get_error()); + return 0; + } + +@@ -851,8 +850,7 @@ int main(int argc, char *argv[]) + { + if(!set_card(i)) + { +- char buf[80]; +- fprintf(stderr, "Error: %s\n", get_error(buf, 80)); ++ fprintf(stderr, "Error: %s\n", get_error()); + return 0; + } + +@@ -887,8 +885,7 @@ int main(int argc, char *argv[]) + /* set the card object to the requested card */ + if(!set_card(card_number)) + { +- char buf[80]; +- fprintf(stderr, "Error: %s\n", get_error(buf, 80)); ++ fprintf(stderr, "Error: %s\n", get_error()); + return 0; + } + diff --git a/sys-power/nvclock/files/nvclock-0.8_p20110102-desktop.patch b/sys-power/nvclock/files/nvclock-0.8_p20110102-desktop.patch new file mode 100644 index 000000000000..034208ff817a --- /dev/null +++ b/sys-power/nvclock/files/nvclock-0.8_p20110102-desktop.patch @@ -0,0 +1,18 @@ +fix qa warning: + +/usr/share/applications/nvclock.desktop: error: (will be fatal in the future): +value "nvclock.png" for key "Icon" in group "Desktop Entry" is an icon name +with an extension, but there should be no extension as described in the Icon +Theme Specification if the value is not an absolute path + +--- a/nvclock.desktop ++++ b/nvclock.desktop +@@ -3,7 +3,7 @@ Encoding=UTF-8 + Name=NVCLOCK + Comment=Overclock and Monitor NVIDIA cards + Exec=nvclock_gtk +-Icon=nvclock.png ++Icon=nvclock + Terminal=false + Type=Application + Categories=System; diff --git a/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch b/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch new file mode 100644 index 000000000000..e45e2a6aa341 --- /dev/null +++ b/sys-power/nvclock/files/nvclock-0.8_p20110102-r1-make.patch @@ -0,0 +1,94 @@ +- Fix building with --as-needed +- Fix parallel make by defining two new targets +- Fix one spelling error +- Respect CFLAGS, LDFLAGS +- Link GTK frontend against -lX11 since it uses XOpenDisplay all the time + +--- a/configure.in ++++ b/configure.in +@@ -141,7 +141,7 @@ + if [test "$HAVE_NVCONTROL" = "yes"]; then + echo "- NV-CONTROL support enabled" + else +- echo "- NV-CONROL support disabled" ++ echo "- NV-CONTROL support disabled" + fi + if [test "$HAVE_GTK2" = "yes"]; then + echo "- GTK2 GUI enabled" +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -16,7 +16,7 @@ + ifeq ($(HAVE_NVCONTROL), yes) + DEPS=$(libbackend) $(libnvcontrol) + INCLUDES=@X11_CFLAGS@ -I./backend -I./nvcontrol -I.. +- LIBS=@X11_LIBS@ -L./backend -lbackend -L./nvcontrol -lnvcontrol ++ LIBS=-L./backend -lbackend -L./nvcontrol -lnvcontrol @X11_LIBS@ + else + DEPS=$(libbackend) + INCLUDES=-I./backend -I./nvcontrol -I.. +@@ -30,12 +30,17 @@ + + all: all-recursive nvclock smartdimmer + ++$(libbackend): ++ $(MAKE) -C backend ++ ++$(libnvcontrol): ++ $(MAKE) -C nvcontrol + + nvclock: $(DEPS) $(LIB) nvclock.c +- $(CC) $(CFLAGS) -o nvclock $(nvclock_SOURCES) $(INCLUDES) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o nvclock $(nvclock_SOURCES) $(INCLUDES) $(LIBS) + + smartdimmer: $(DEPS) $(LIB) smartdimmer.c +- $(CC) $(CFLAGS) -o smartdimmer $(smartdimmer_SOURCES) $(INCLUDES) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o smartdimmer $(smartdimmer_SOURCES) $(INCLUDES) $(LIBS) + + + clean: clean-recursive clean-app +--- a/src/gtk/Makefile.in ++++ b/src/gtk/Makefile.in +@@ -27,6 +27,7 @@ + LIBS=@GTK_LIBS@ -L../backend -lbackend + OBJECTS=banner.o hw.o main.o settings.o + endif ++LIBS += -lX11 + + + .PHONY: clean distclean install +@@ -33,7 +33,7 @@ + all: $(PROGRAM) + + nvclock_gtk: $(DEPS) $(OBJECTS) +- $(CC) $(CFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS) + + clean: + rm -f nvclock_gtk *.core *.o *.exe +--- a/src/qt/Makefile.in ++++ b/src/qt/Makefile.in +@@ -31,7 +31,7 @@ + all: $(PROGRAM) + + nvclock_qt: $(DEPS) qt_nvclock.moc qt_xfree.moc $(OBJECTS) +- $(CXX) $(CXXFLAGS) -o nvclock_qt $(CXXFLAGS) $(OBJECTS) $(LIBS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o nvclock_qt $(OBJECTS) $(LIBS) + + clean: + rm -f nvclock_qt *.core *.moc *.o +--- a/src/backend/Makefile.in ++++ b/src/backend/Makefile.in +@@ -1,11 +1,11 @@ +-CC=@CC@ -O0 ++CC=@CC@ + AR=ar + RANLIB=@RANLIB@ + + system=@system@ + HAVE_NVCONTROL=@HAVE_NVCONTROL@ + OBJECTS=backend.o bios.o config.o error.o nv30.o nv40.o nv50.o info.o overclock.o utils.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o +-CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol ++CFLAGS=@CFLAGS@ @X11_CFLAGS@ -I../.. -I../nvcontrol + + ifeq ($(system), FreeBSD) + OBJECTS+=back_bsd.o diff --git a/sys-power/nvclock/files/nvclock-0.8_p20110102-usleep.patch b/sys-power/nvclock/files/nvclock-0.8_p20110102-usleep.patch new file mode 100644 index 000000000000..93c3f288864b --- /dev/null +++ b/sys-power/nvclock/files/nvclock-0.8_p20110102-usleep.patch @@ -0,0 +1,14 @@ +fix warning: +libc_wrapper.c:54: warning: implicit declaration of function usleep + +--- a/src/backend/libc_wrapper.c ++++ b/src/backend/libc_wrapper.c +@@ -27,6 +27,8 @@ + ++#define _BSD_SOURCE + #include <stdio.h> + #include "xfree.h" ++#include "config.h" + + #ifdef HAVE_UNISTD_H + #include <unistd.h> diff --git a/sys-power/nvclock/files/nvclock_confd b/sys-power/nvclock/files/nvclock_confd new file mode 100644 index 000000000000..ff7f15bdd746 --- /dev/null +++ b/sys-power/nvclock/files/nvclock_confd @@ -0,0 +1,9 @@ +# Config file for /etc/init.d/nvclock + +# Set the core clock speed after -n and the memory clock speed after -m +# Check your current speeds by running 'nvclock -s' at the command line +# so you don't overclock too much and burn out the card +# Test out your overclocking before adding this to the bootup! + +CLOCKOPTS="-s" +#CLOCKOPTS="-n <corespeed> -m <memspeed>" diff --git a/sys-power/nvclock/files/nvclock_initd b/sys-power/nvclock/files/nvclock_initd new file mode 100644 index 000000000000..8abf9f01ae9b --- /dev/null +++ b/sys-power/nvclock/files/nvclock_initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +depend() { + need xdm +} + +start() { + ebegin "Setting nvidia card overclock speed" + nvclock ${CLOCKOPTS} >/dev/null + eend $? +} + diff --git a/sys-power/nvclock/metadata.xml b/sys-power/nvclock/metadata.xml new file mode 100644 index 000000000000..e699d8b4b7b4 --- /dev/null +++ b/sys-power/nvclock/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>bircoph@gentoo.org</email> + <name>Andrew Savchenko</name> +</maintainer> +<use> + <flag name="gtk">Install the GTK+ based graphical interface</flag> + <flag name="nvcontrol">Add NVCONTROL support for OpenGL options</flag> +</use> +</pkgmetadata> diff --git a/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild b/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild new file mode 100644 index 000000000000..e915905982f9 --- /dev/null +++ b/sys-power/nvclock/nvclock-0.8_p20110102-r2.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit autotools eutils + +DESCRIPTION="NVIDIA Overclocking Utility" +HOMEPAGE="http://www.linuxhardware.org/nvclock/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="gtk nvcontrol" + +RDEPEND=" + gtk? ( + x11-libs/gtk+:2 + x11-libs/libX11 + ) + nvcontrol? ( x11-libs/libX11 x11-libs/libXext ) +" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-r1-make.patch \ + "${FILESDIR}"/${P}-usleep.patch \ + "${FILESDIR}"/${P}-desktop.patch \ + "${FILESDIR}"/${P}-buffers.patch + eautoreconf +} + +src_configure() { + sed -i \ + -e "/^AR=ar/s:=.*:=$(tc-getAR):" \ + src/*/Makefile.in || die + + # Qt support would mean Qt 3. + econf \ + --docdir=/usr/share/doc/${PF} \ + --disable-qt \ + $(use_enable gtk) \ + $(use_enable nvcontrol) +} + +src_compile() { + emake -C src/ nvclock smartdimmer + use gtk && emake -C src/gtk/ +} + +src_install() { + mkdir -p "${D}"/usr/bin || die + + default + + newinitd "${FILESDIR}"/nvclock_initd nvclock + newconfd "${FILESDIR}"/nvclock_confd nvclock +} + +pkg_postinst() { + elog "To enable card overclocking at startup, edit your /etc/conf.d/nvclock" + elog "accordingly and then run: rc-update add nvclock default" +} diff --git a/sys-power/nvram-reboot/Manifest b/sys-power/nvram-reboot/Manifest new file mode 100644 index 000000000000..147429f78bd1 --- /dev/null +++ b/sys-power/nvram-reboot/Manifest @@ -0,0 +1,5 @@ +DIST reboot-2004.10.03.tar.bz2 425622 SHA256 775dc675849a2eb7f4b01608bb4dfc2c55eab72ac7373c82adda1c4ba296f47f SHA512 b85a7372369f3ba9e36af1b96ccbf31ba1febcc3ebf31a8684332d370ea85428a3bfc4855c7df10f9b92a3c57b704fabbe5069a792cd8aaa1b45511f88c41906 WHIRLPOOL 5aedfcb448831d094268de243cbe533c45baa7d95c449cd4d6662bebe61665058370a1755716d2376f5c065e34100d5f6b9d94fcac8aac34b9b5e7195090d5ee +EBUILD nvram-reboot-2004.10.03.ebuild 599 SHA256 ecb0fafcb9a4c460cadb257d72a1bafb347dbd51a53a31927f34c4a51715660d SHA512 74d304061fd0a20876f8bf897d38645cf1ad24a33a32782d3346e6ee19b64c634cfc2ce13326bf90fb5dc4e38080fe624dac8db29fffdb90628fe02490292a79 WHIRLPOOL e2864ae0872b601e122f6ec8133c8b04af030850caebd3fc81be08580b999b10ace7e208b4a5935a972d348d4e14f9215b026d3e82519ef18445431557c3febc +MISC ChangeLog 3076 SHA256 3b5c495a421bda2c9cdbef7befcf64a463c00c49b4ae1896079d59e885a76b96 SHA512 b0afed0beca1c110886ca7fdd7eddc1c4b6c0aa7742447dd2e7e14d46be4d2e870a1d7545f91e6898107110a0ca4991ebca8bdb17dd42c06a538228518906f01 WHIRLPOOL d878a4d43355c494fd7243808c6f251c0217b3218e3ce8e276e3cae532f086b94d486ac7ddc5dfe9152318a2cb059d1338f8e47d615b9bdcc319d8affe9f895b +MISC ChangeLog-2015 840 SHA256 2b3b1a45ed11d36202969da00792ccdb219a5e9bc96253015c20ce5bc941615c SHA512 efb211720c2ec849158e7d74120ffdb76c86bb3d4b83be1b4edbdaa64198edd1b080281c2c400d9dc38015bbc037ff94d742a249fc9e388ae41986a303e1b2e8 WHIRLPOOL 6ac71b0b368d5e3a5e483b656a4c74a27ca07f1b8631fbf88f7d86fc9b18f1e1da5bee751b068a24b8c234027caeb0487909d6c6b073bf1ee3e5cafb51ade886 +MISC metadata.xml 332 SHA256 355dceaf4f6713b4ba803f8bdd348ad077ce2b6178cee7af0a558950d9e78348 SHA512 948648cf4b193094ffe04b679d159ea2acf4a42d5005792889b782d56fc96cccdd87ba2b92ed5eade664a379107a1ee3a2a197c6dd69b531c395ebdf38229ebb WHIRLPOOL 652ae11b8c43da2bac9d3df288c7338943d7f13c06cb63bf7580fb6582455b36d94054cfe119274c5cc5e205b4bf52a92b21a3665e735892ad57d2f3047f65ea diff --git a/sys-power/nvram-reboot/metadata.xml b/sys-power/nvram-reboot/metadata.xml new file mode 100644 index 000000000000..0b3a391b3d5d --- /dev/null +++ b/sys-power/nvram-reboot/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 type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +<upstream> + <remote-id type="sourceforge">nvram-wakeup</remote-id> +</upstream> +</pkgmetadata> diff --git a/sys-power/nvram-reboot/nvram-reboot-2004.10.03.ebuild b/sys-power/nvram-reboot/nvram-reboot-2004.10.03.ebuild new file mode 100644 index 000000000000..8d3bff58e842 --- /dev/null +++ b/sys-power/nvram-reboot/nvram-reboot-2004.10.03.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit mount-boot + +MY_P="${P/nvram-/}" +DESCRIPTION="PowerOff Boot-Images for nvram-wakeup (not needed for GRUB)" +HOMEPAGE="https://sourceforge.net/projects/nvram-wakeup/" +SRC_URI="mirror://sourceforge/nvram-wakeup/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="" + +S="${WORKDIR}/${MY_P}" + +src_install() { + insinto /boot/nvram-wakeup + doins apm-poweroff.bin bzImage.2.4.20.poweroff dioden-poweroff \ + || die "doins" + dodoc *.patch *.diff *.txt config.* +} diff --git a/sys-power/nvram-wakeup/Manifest b/sys-power/nvram-wakeup/Manifest new file mode 100644 index 000000000000..a5183c3d3115 --- /dev/null +++ b/sys-power/nvram-wakeup/Manifest @@ -0,0 +1,8 @@ +AUX nvram-wakeup-0.97-nonls.patch 450 SHA256 0ed4f1121e767360fe0efe91438bf4b1e68003ad281ca9f7aa62367eb2a17a1a SHA512 014c0d04d0b6a765a9ea1a42bdd11d5bc8f2d6c580f1a7d08c90b4622b6958a129add4c3be7c79e05e529e1dc38fffffe4c14d90a266fee252df71ac508121f1 WHIRLPOOL 1a9a5722a49fc20a54470ecb35e79b26b6421a555aabdde7ce0b804210326cfa5b62362b6c1063981799781839212ac324f1a12eda19a23c08d29d4502a9f14d +DIST nvram-wakup-1.0.tar.gz 1068875 SHA256 831af412fdf8c75a31e470398a08da97266b2dd064daaf94e45833bd4428349b SHA512 f9f350323cfb65a33903edc5938c3503c60f4259acbc347d76aece65307d97e971e3350724e6d4a4870175db1baf1d3f1803b6536f0529371aae1f9fc6ee56c0 WHIRLPOOL 8b336e459ee6a1cdb58ed3a9bdf06084544f04eb3ff5b78184c3d57fc8a5d7dfbc57067a1e19342ad7402fd7dbeccb76d3020bd4b65fd49d9806a34f920cea93 +DIST nvram-wakup-1.1.tar.gz 1070097 SHA256 b5f6a86ec7ad1c25d22f7dd0bf3261c2766e6302f0f6f80a963ceb3eb3b74811 SHA512 a47c6831e004e25f43adbc25aa46aca457602c681693621e3acda12f1f775aa1c5fa30ec9a09d71945ef2de8a2dbe97f9c1c7e09b1ae3464c368c9b8fc0f11e0 WHIRLPOOL 468f3be815aa3e4cee60f66f5cc48aebfb3aa1343fc7ee7ab899fd72c12b9fb2595dbb7ed04bf65734d9d363e766b26bf19e307049424b997fbd2ca36bb72801 +EBUILD nvram-wakeup-1.0.ebuild 2045 SHA256 6ff7e0c5a33939edcc58d11f83d7fc0f25d456900ee6001e9cb6bae3a5a339f2 SHA512 475d0c60da5e481a918d0f444a519bccdb1912269734cf952ced1cfd3313fdb7c20d620cd5011af1aecf93096ccabdf782bd9042af552e1ca22a84f75f743b5a WHIRLPOOL 445e02e9accada63016e6af1fd3a693172439fdb376911e886fb2ee46c7860a2ffe7c15c8d2764cc5c3591e162dc3e806939264fe6024183376afc1ffb22c0a9 +EBUILD nvram-wakeup-1.1.ebuild 2169 SHA256 412266e515f9cebce7a80e90b483e41a5eded7260f2cac218d20a84c35b5dfd0 SHA512 52490df6c07880eb444f2100a10a05572838de030243322cfec3b78b7e15ee89a439df8de1cfdbb510afc3b0c59881d877ae1986b36743b37c00dac4ca605c74 WHIRLPOOL 7d40258543d15c4eb8935588569bcd88baec17463e0dd0a1c3a39b436dc8dc4ea85e005848aca3eab153db7cabe929e8d34e554dfda4d1145a90f0ff4d48eb0a +MISC ChangeLog 3178 SHA256 abb9d3646a1b0d65a3571129cb1e1f665002b247b0aae9f452fb74794ba6c9d5 SHA512 447001003ec582701090585c77111042e5e86b7c3e16a7d1a81861dd18797eb25ba95e6466741b1a1ef9f05eda8f7a5d8394d40c7c2f8b63d067dc58539225b0 WHIRLPOOL e10d7f816e4ea2c492b0f6d9a00f0597e07cb968cc76330af5bd656ca2e922ccd52e4dd6967ab5a4582e21910edc9b20138ed0a128705979cc32f0375a077428 +MISC ChangeLog-2015 2601 SHA256 2e3a9f15890d06636664128f63e82e8362a65c9c9ca3f444596ef8e733298896 SHA512 bc4a01dbedc9d043f172fa5df734a6ff433abc95b074ed2ca5d5c47fa03e40592fb6ce1e249d4cefe83d0492125914a4c2360cb7d79a23f386430b61bb488c58 WHIRLPOOL ee59bb38e8c8705af8603cc4f3eec5c4604403ba325aa7c84abcdfb9d971b56f2bf808d3a04f4baa8765a2009592e2d9ae6f692ed4a37c2a27ece5b5aaf3aaaa +MISC metadata.xml 332 SHA256 355dceaf4f6713b4ba803f8bdd348ad077ce2b6178cee7af0a558950d9e78348 SHA512 948648cf4b193094ffe04b679d159ea2acf4a42d5005792889b782d56fc96cccdd87ba2b92ed5eade664a379107a1ee3a2a197c6dd69b531c395ebdf38229ebb WHIRLPOOL 652ae11b8c43da2bac9d3df288c7338943d7f13c06cb63bf7580fb6582455b36d94054cfe119274c5cc5e205b4bf52a92b21a3665e735892ad57d2f3047f65ea diff --git a/sys-power/nvram-wakeup/files/nvram-wakeup-0.97-nonls.patch b/sys-power/nvram-wakeup/files/nvram-wakeup-0.97-nonls.patch new file mode 100644 index 000000000000..108d02eddd29 --- /dev/null +++ b/sys-power/nvram-wakeup/files/nvram-wakeup-0.97-nonls.patch @@ -0,0 +1,18 @@ +--- nvram-wakeup-0.97/Makefile ++++ nvram-wakeup-0.97/Makefile +@@ -41,3 +41,3 @@ + +-all: $(BINS) $(GTTXT) ++all: $(BINS) + size $(BINS) +@@ -88,3 +88,2 @@ + @$(INSTALL) -vd $(DOCDIR) +- @$(INSTALL) -vd $(GTTXTDIR) + @$(INSTALL) -vm 755 $(PROG_SH) $(BINDIR) +@@ -94,3 +93,2 @@ + @$(INSTALL) -vm 644 $(DOC) $(DOCDIR) +- @$(INSTALL) -vm 755 $(GTTXT) $(GTTXTDIR) + +@@ -110,2 +108 @@ + cd $(DOCDIR); rm -f $(DOC) +- cd $(GTTXTDIR); rm -f $(GTTXT) diff --git a/sys-power/nvram-wakeup/metadata.xml b/sys-power/nvram-wakeup/metadata.xml new file mode 100644 index 000000000000..0b3a391b3d5d --- /dev/null +++ b/sys-power/nvram-wakeup/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 type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +<upstream> + <remote-id type="sourceforge">nvram-wakeup</remote-id> +</upstream> +</pkgmetadata> diff --git a/sys-power/nvram-wakeup/nvram-wakeup-1.0.ebuild b/sys-power/nvram-wakeup/nvram-wakeup-1.0.ebuild new file mode 100644 index 000000000000..a935e9529727 --- /dev/null +++ b/sys-power/nvram-wakeup/nvram-wakeup-1.0.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit flag-o-matic eutils + +MY_P=${P%_p*} +[[ ${PV} == *_p* ]] && REV=${P#*_p} || unset REV +MY_P=${MY_P/e} +DESCRIPTION="read and write the WakeUp time in the BIOS" +HOMEPAGE="https://sourceforge.net/projects/nvram-wakeup" +SRC_URI="mirror://sourceforge/nvram-wakeup/${MY_P}.tar.gz + ${REV+http://nvram-wakeup.svn.sourceforge.net/viewvc/*checkout*/nvram-wakeup/trunk/nvram-wakeup/nvram-wakeup-mb.c?revision=${REV}}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="nls" +[[ -n ${REV} ]] && RESTRICT="mirror" #168114 + +DEPEND="nls? ( sys-devel/gettext )" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${MY_P}.tar.gz + if [[ -n ${REV} ]] ; then + cp "${DISTDIR}"/nvram-wakeup-mb.c?revision=${REV} "${S}"/nvram-wakeup-mb.c || die + fi + cd "${S}" + use nls || epatch "${FILESDIR}"/${PN}-0.97-nonls.patch + # Need to be careful with CFLAGS since this could eat your bios + strip-flags + sed -i \ + -e '/^CFLAGS/s:= -O2 :+= $(CPPFLAGS) :' \ + Makefile || die "setting CFLAGS" +} + +src_install() { + emake \ + prefix="${D}"/usr \ + MANDIR="${D}"/usr/share/man \ + DOCDIR="${D}"/usr/share/doc/${PF} \ + install || die + + dodoc "${D}"/usr/bin/vdrshutdown + rm -f "${D}"/usr/bin/vdrshutdown + dodoc set_timer + + rm -f "${D}"/usr/sbin/time + rm -f "${D}"/usr/share/man/man*/time.8* + + prepalldocs +} + +pkg_postinst() { + echo + ewarn "WARNING:" + ewarn "This program writes into the NVRAM (used by BIOS to store the CMOS" + ewarn "settings). This is DANGEROUS. Do it at your own risk. Neither the" + ewarn "author of this program (nvram-wakeup) nor anyone else can be made" + ewarn "responsible to any damage made by this program in any way." + ewarn "(The worst case happened to me is that on reboot the BIOS noticed the" + ewarn "illegal contents of the nvram and set everything to default values." + ewarn "But this doesn't mean that you can't destroy even your whole computer.)" + echo + ewarn " YOU HAVE BEEN WARNED, HAVE A NICE DAY" + echo +} diff --git a/sys-power/nvram-wakeup/nvram-wakeup-1.1.ebuild b/sys-power/nvram-wakeup/nvram-wakeup-1.1.ebuild new file mode 100644 index 000000000000..d4e1e1f8623c --- /dev/null +++ b/sys-power/nvram-wakeup/nvram-wakeup-1.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit flag-o-matic eutils + +MY_P=${P%_p*} +[[ ${PV} == *_p* ]] && REV=${P#*_p} || unset REV +MY_P=${MY_P/e} +DESCRIPTION="read and write the WakeUp time in the BIOS" +HOMEPAGE="https://sourceforge.net/projects/nvram-wakeup" +SRC_URI="mirror://sourceforge/nvram-wakeup/${MY_P}.tar.gz + ${REV+http://nvram-wakeup.svn.sourceforge.net/viewvc/*checkout*/nvram-wakeup/trunk/nvram-wakeup/nvram-wakeup-mb.c?revision=${REV}}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="nls" +[[ -n ${REV} ]] && RESTRICT="mirror" #168114 + +DEPEND="nls? ( sys-devel/gettext )" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${MY_P}.tar.gz + if [[ -n ${REV} ]] ; then + cp "${DISTDIR}"/nvram-wakeup-mb.c?revision=${REV} "${S}"/nvram-wakeup-mb.c || die + fi +} + +src_prepare() { + use nls || epatch "${FILESDIR}"/${PN}-0.97-nonls.patch + # Need to be careful with CFLAGS since this could eat your bios + strip-flags + # GTTXT mode fix: https://sourceforge.net/tracker/?func=detail&aid=3599718&group_id=35022&atid=412757 + sed -i \ + -e '/^CFLAGS/s:= -O2 :+= $(CPPFLAGS) :' \ + -e '/GTTXT/s:755:644:' \ + Makefile || die +} + +src_install() { + emake \ + prefix="${D}"/usr \ + MANDIR="${D}"/usr/share/man \ + DOCDIR="${D}"/usr/share/doc/${PF} \ + install + + dodoc "${D}"/usr/bin/vdrshutdown + rm "${D}"/usr/bin/vdrshutdown || die + dodoc set_timer + + rm "${D}"/usr/sbin/time || die + rm "${D}"/usr/share/man/man*/time.8* || die +} + +pkg_postinst() { + echo + ewarn "WARNING:" + ewarn "This program writes into the NVRAM (used by BIOS to store the CMOS" + ewarn "settings). This is DANGEROUS. Do it at your own risk. Neither the" + ewarn "author of this program (nvram-wakeup) nor anyone else can be made" + ewarn "responsible to any damage made by this program in any way." + ewarn "(The worst case happened to me is that on reboot the BIOS noticed the" + ewarn "illegal contents of the nvram and set everything to default values." + ewarn "But this doesn't mean that you can't destroy even your whole computer.)" + echo + ewarn " YOU HAVE BEEN WARNED, HAVE A NICE DAY" + echo +} diff --git a/sys-power/phc-intel/Manifest b/sys-power/phc-intel/Manifest new file mode 100644 index 000000000000..6da608e0d176 --- /dev/null +++ b/sys-power/phc-intel/Manifest @@ -0,0 +1,30 @@ +AUX phc-intel-0.3.2-rev12-trailing-space-misc.patch 33960 SHA256 77191cb8fa415a8f9349de9f2ff0b8f072e8c16ae326c354c214e0be3a1cde8c SHA512 13f0b0da6eafefacfd617edaf5ff3d05dc0b5de3884ddd05459fcbc6ebde7f3c3671f8ce0be426bcc304460447a900e3948e6acc838c515f43f033cf6ffc08d0 WHIRLPOOL 0f46385ccdfe0a06cedf01f3d21e3e042412d757bbf89ae40780bc49252cbcd6839d6523a999231ff7eb4ec8138fed97f4c221e30698d8ed40f6056f98c4d7a7 +AUX phc-intel-0.3.2-rev14-trailing-space-3.13.patch 1557 SHA256 f1449476c332e3c23b0bf4f12be8b9e324ad875eaa4eb4d65b43d746c0650006 SHA512 92a37dca6d703015db43f730d728bc39eaa43378b41a1cef8e2a3adb332c949bec78889099c8af24c4da835fd426b766291dd5d84d8567192853f5839c401036 WHIRLPOOL 0e72b5a4b8f5eb2f20505c2075a9311272178c87e564a85acbb76300a90b19a39d4dea9a9496b246dc507ec08fc557fea2c99a0f1ea7c3c0b2362011812c533a +AUX phc-intel-0.3.2-rev14-trailing-space-3.14.patch 1557 SHA256 3f35feb053376fb2c223eb7087ccaadfdd92bd328bde0c62aed7719898337b0c SHA512 444864f1c13d0039861e9baafb8d4e8a2c304fadd9af6f18c499f29d371557ddbb9f7194dc952029c818fce81022d0a0c31faec698c213ba4cc69739b62827e0 WHIRLPOOL c79dffab3375c098223718121f87bf8b5a5d2fed2945219bc2082b4aeb344652a552b956dd3c9371fbd39a40a95611d9a9e0386b2e294f8dfe2b2192f90b8abf +AUX phc-intel-0.3.2-rev15-trailing-space-3.15.patch 1561 SHA256 a46c52cc8f3ca07a620382c9fc15b25411c55afcfc96f04c91475f2f01448f9e SHA512 1d9c34a5ff3a7853de5d3fc893e21c7ecc4351b29eae4d5e81eccc596f1492556110bb25f68654b32e4af912cf6aa5ca64d988d838ee63f16d3729a8b3782746 WHIRLPOOL b7b0e4cb623627cff6c1732e215f5e530f269c498cf4908eb4ca83538785497363a7bd2372f78fd80c6191edcd0241d4bca2f744debf3687a342b4193622ec3c +AUX phc-intel-0.3.2-rev15-trailing-space-3.5.patch 1456 SHA256 5cdd09065aeb907833cbfa0dc0e141bc5c77f4f6fa463d698e7c49da31164d4a SHA512 d8da3d7d53ec13cdd3b21e3ebb4aeec3502f2e75571eeaea39a59b4825b3be6043b275fb89bbdae4778e415c22cc80639af04674fd3975f498a6adc926b39ce8 WHIRLPOOL 1c63ba4c805c4dc429859232b0d6488f1502f286f085fb8ae03287123992e8d7805a14f17ebd79a687a9c8f5978e5f57e4f3be2b6a2e7394fb54ffa5346bd7c4 +AUX phc-intel-0.3.2-rev16-trailing-space-3.16.patch 1557 SHA256 d76cea5337e2e257adf93f59f309fce4f326b353250ad0054000e4344e9c8957 SHA512 4c044603bc1617f9fa8a33d4270ec6f9c9a32422599513d9d60033d572e14280d383e223e57367db59d46b91e22de0ebcf24955b663b119dc7388fe2a3c708c0 WHIRLPOOL a7b3ec4264c69e9f74fc490d0da53d80ee1ea4c23f6d35ad9a1ca8cc86b10c63750390132b1612963c820cb4bea4aea1c4b9f6df54b33864f91b182ae5bdcbf4 +AUX phc-intel-0.3.2-rev21-trailing-space-3.10.patch 1531 SHA256 9d8f6720199b7de56672a8d8074d7d6946a66fb2bda769f051be6e00f619fd18 SHA512 145a6a2eee51afd273e8e22112a16840f98daa8bd6a725e8b42cdb2ed28a9ddcff820fe81a198f261646c762908e5874d44d65e0878bfccfc60911e786f50d38 WHIRLPOOL 504b801a4d326f15496ffd6629ed8fcad0ab18ea94a994a7ba1e8987aeca706baf6438a2f473c9baccb3ad34b06f4640a9f2e01355a15f826150b61cc048f8da +AUX phc-intel-0.3.2-rev21-trailing-space-3.11.patch 1561 SHA256 27451ee463480be2d447791e1ca9a4f1ef5697f02d921941dfbb25ba263e3f83 SHA512 b02815bf365f3c49f367f934a79e0097536aeda1827639da5d159368214dadee7f97786a98e65448d6e971ec1f32bc359704ccb5e4cef60753c861758edd14e7 WHIRLPOOL b7acaf7fbd32c28b07fdc6d82897d7bdc7c21126d9f261a33590d63aa49afb076cec4f49a283bbbd7d9c7a861295f09f460c491e73430a13e10b79b67425a547 +AUX phc-intel-0.3.2-rev21-trailing-space-3.12.patch 1553 SHA256 f6521939db256d78abf62d6b56531ec60d59a9a77ed71fff1ccb994a6c84def7 SHA512 1cd0241e5b6a0020e27467534d6430aca11ec86c88160c0fae1367cbc9f40998887fead04c7993487721172795e0aaad40da21a44a34e68d31dbaaa2f6930a47 WHIRLPOOL 7ae4520deac02c5d41b836a7727ed79fbf94e4f564fb2890ccff2f930fc7c022b4e2ce98ca30e1d99f47b0e759a63c06935aca65fc1e82994c63216344e2838b +AUX phc-intel-0.3.2-rev21-trailing-space-3.13.patch 1553 SHA256 77df13817f77eaeaf8efb32935121f35961ed3b7517f7c2240ed9caf4f61faa2 SHA512 d00b71b4f4a7447b65de1eefee944230543280411b53c15ba5d8531144fb1014f76c87dc6c8a52c63ac6cf0272bbde8c11a3f76508e9e52310431026960c392c WHIRLPOOL 348ec94f7dd06642281ef60ee24d24d9d3d2880581c0291763a77c4a932f13aa55e1620d73d65d46468ec9271487c135dd3f2bd13940b7b14448bbf0c5d0a9b0 +AUX phc-intel-0.3.2-rev21-trailing-space-3.14.patch 1553 SHA256 829f3a11d1c2c761a57b7c1a924354a2c2613bae62f82b0701c569d628f24442 SHA512 eaa575d4e674c1719430f190ccb2c3e3a6f245da93b8f55b9c4055c8dec0cbfd38bf300dc1df2a815e151b88feebb87824275822c173c5a7f938a5d4f998aa5b WHIRLPOOL b5e0d27389b56e56f892122de06527e0ebd8f45c80a8de30a6c458f8185d844d18558a0f55b0ff59ba59e236f131a51728179168be911817084debf709d1ade0 +AUX phc-intel-0.3.2-rev21-trailing-space-3.15.patch 1553 SHA256 1b50a3d389415fae2c4b2b7b584bafdcecbf427425a1bd7afaefff76fc0f32ec SHA512 636be9bc0382bd0e6019da100c169a81c57fe9b0cde80d3eee2e23fc591a2c943c84a68d398fae979769a52349071528185f2fdb7278c607de5d6bdffa210bd9 WHIRLPOOL 959396b942db6b4f53300113ba28c5c9e78363c6f3c3d089ec58b5e0a6c6325a03371e0cd8fbdab600e81976115b9f49d980f9fdeef85467f4f1ccbaaf6ba2d4 +AUX phc-intel-0.3.2-rev21-trailing-space-3.4.patch 1452 SHA256 7010fbc59dcc95ef935fc53cc5a3c8cc7b7f9bdd5c785ab555f0e20ee71e3540 SHA512 5abc31866fb8600eb8e5a05009e9929921fffab92a37c56de5498fdba66480c627dbcca4e6d660efef167829befa66e352cd853738755cc92276f07f66503572 WHIRLPOOL 0d28cb304b8ce2ab250ed58fe8ea36674f6e6f3101ebfe8acc1248b5e4d972bdf6531ff400c33bca0fb8b7988667c8d50da7e71d94e4d03cb744ff5b2d52f46a +AUX phc-intel-0.3.2-rev21-trailing-space-3.7.patch 1533 SHA256 404c84ffd1f2b1c8cfa3fa1bf4568ccd9976c88a75ae3dff6bb7b89c9f6e6b62 SHA512 5d1a94a666de155a18f18b10017aedbf6ef9b11177835ec7e3c0debd3b833e843f1714c5c36545679140093a0a202cfedeee2539ab7e9d936e5410ac69a1c696 WHIRLPOOL 84431eeca6dcf16b758c3a1656fd0fed32acdd739de295ed0e6c392bb1a9dc7310099fd827814286cd043aaef90dd33ff8019aa5a180fa2234d5d1f707f70b05 +AUX phc-intel-0.3.2-rev21-trailing-space-3.9.patch 1533 SHA256 e18dcd9349c32ff002594f2e1fc7bee6ceca83498f0ebc2e9cdf4ef05debb7db SHA512 99bf0b47d7b0f0484041bda605a38b4cff6faf6369e1627ce640ce8ac4fe29e7390ff5825f5c5fedc90803bb39cfaf75ce8a38942aee4c8e3ed6c3eddd4a72ae WHIRLPOOL 94d6be3ea63e0e3fb72d137231d12d8f387d5e028fb0cb31ba6f304885f7992dc63bd85b30397cf9e5228f10286b28b37a926b9667d10b1cdcd854d2ac3d21c1 +AUX phc-intel-0.3.2-rev21-trailing-space-4.1.patch 1551 SHA256 b2c3b15e3384058c5805cd47952127d5f33550389573a597483e666d7a8624f9 SHA512 20282756a1c95fd61a26a7f6fb21f666479811a5d7667f1b9f4bcd1cd77e24d649e65363ccdd7fa15196bd70eb29ffc395b6bace0e4ac6d6803c9eea786296a1 WHIRLPOOL 2efd124cd2d9bcea2e0ccdf7caf77e78fa191c895e382ac7d590ae5f649f9a79436efaefe4134a5c092d514832d708ef2058c72e7ba98cc911fe22585e23c1bb +AUX phc-intel-0.3.2-rev21-trailing-space-4.3.patch 1536 SHA256 86538ee659762564b5c1bcbcd58b8e56b5c85db2e54e81845c97b93662ab875b SHA512 18efe8c2bbc2a21c4d6ebab26ef0f2247500b00e43460b23b4fa0dbe7a23ae074a1cea99f979e2a3edfdf79a50367dff002b108243c56252720a04dfe08e91d5 WHIRLPOOL 6aceef95718683e0c0efc6d50bf38abaa348628aec0fafd9c04328886d13782edda27fe9796b8e40683b4255fd103d4f5f7df83f773b3c9a5919e7a275ea0f12 +AUX phc-intel-0.3.2-rev21-trailing-space-4.5.patch 1536 SHA256 49ffeb55aaf2bc20d50402285ad6396724e2d056c861674412bdc3229e246004 SHA512 2762691445574f0c676b558b34cb71ac377d31c2cb82ac63dab77a094dc70d86331dc5090eb33a0a6863754f484ce291bc82a5d0ad6ac6090181cf05b852b3e6 WHIRLPOOL 1db7aa96dbd7d640dc9391165a3f8c8b97451aeeef0e20f8064094b8b6a45faa1ef071ac9a47866de4f914acb23613b358f00ed4889507da1930459a604a78b7 +AUX phc-intel-0.3.2-rev21-trailing-space-4.6.patch 1536 SHA256 5ecb57a3d95510fdfde4e87e58ed2c684d840a174c67aebd9ea84d39881e6449 SHA512 99eb956a8643339baaf9432800e6bbb0fe2f2652db1311f640de8b6c9bf0146f4864a674dba9d2ab66cb4ae8c2e2b04f8bf53f3ed6a9958d8556ea8bd5ff0884 WHIRLPOOL 8a9fb1a0db31099e1be9fe6b5cda5bffa81c70483d0066659051eee9d5d9bd959d67f023dcff841b3558a8288b569110fdf12b1dfb6d65f3e94c03b534025239 +DIST phc-intel-pack-rev15.1.tar.bz2 97762 SHA256 5154295f2cfc0e263510d71041a2d1d9a0d2e7a0c67730c9f80ba1011bbde8a4 SHA512 e0163f315343bb34dde57cb806d99b6ea6586b54827142a49532d862cbe02689d581e221ebd6466d1992107e4d98456989402ba4172e85b9e9f24405f27d28f1 WHIRLPOOL 5c02326541d0773cff668919d0d4809f3b79fd3bff6149c62d136760d440e5338b2a9e00a236f25bcb6dead4a65f74e4f1d3763a38bb996ddef315664758b621 +DIST phc-intel-pack-rev16.tar.bz2 100320 SHA256 545de96d22aee47cfe5b6292a0f55797cbc18aa03ca050831d8ff964be1896ca SHA512 bfe502e67f68ec7b4dbae77f0e2b57876928c6d5047697842c397a1d622978c270b85d0c5f83d22ca74a48942da60ab2b78e405ba866f55ee937f5b530f5165e WHIRLPOOL 0a693ee1a31047c7f3ba404ec7906045a54c94b48963da1274f24ee9f8f9ddb0f8fcc6e8c5a9b096594bd3b26f32de9058e60ca21d429d2c9bb7993944b32f6e +DIST phc-intel-pack-rev17.tar.bz2 100565 SHA256 97e8659423ff9ce5e7f77e5e4049b100677a37b05a341d294aba286de1bbaeb9 SHA512 0db84ae3e366ff95577ee89b2e1cb22778fdba76783aa2606b6b5925e46c6e5daf80a7365eba6f3f806a017daa98d7b20828c644a3967f180c612e7c92a94871 WHIRLPOOL 795c73daeda3b42306560d799cd7d180e9f0888dc11ec36b2236a1ee000754780c0f299ebaec0ca4e1a73ca1326f0957d46823fb7500db28bd8b0946b24ec522 +DIST phc-intel-pack-rev21.tar.bz2 111951 SHA256 714fc70ce4cbf5c90e1a9966b19985b375a6ce5e99e90861f7d5addc18b57c95 SHA512 4aaa7beffe107d31bd9006f658b9a280ef0ace3d81ac88ef281b958803ac9e551ed4a33d5f25c0ec28d3d80349cfd4f81bcfcf708767dae133b4389b6d2348a0 WHIRLPOOL d84a094184bdcda7b4fc527732ee588bd65973dbbe58caf70101698ce7781ba6070a82b10d152041f616e6e40023f8a870913cfa89c009cb2f73e6d4bb9143bc +EBUILD phc-intel-0.3.2.12.15.1.ebuild 2069 SHA256 0e515e9bc823ccaca5931b8540519a6b19596bc4d85ba302899b32723031b160 SHA512 63d7dee5b53db37b2e495a5309c17c81fb2a5958002cfc45a07d6df5c3e3e8de43b403704fd8e776fcf96c2bc5b2aa0400d67581f4eabd11f1eda76b91216455 WHIRLPOOL 2d0a0a1b313365a46bf05b72e832a6fdf46adea86e8fd06f27c0908db730de7951d7cd2c955ced2d3b7870f6451a439a5f13812dfb030f32b9ad72ac099b4ce5 +EBUILD phc-intel-0.3.2.12.16.ebuild 2188 SHA256 5aef5616ffe7c03e742241b6f98fe4574be7e601fdb79bf4bde1e56643bc68d4 SHA512 7259ab5d65568f81666ae0c8988697e499b419f95ea7425ab220d7913c6a05c48b070962b3e2961435e4ffc5eb849c6d015c4151f0634d5d0895d10820adf75f WHIRLPOOL 5aa365cee718d0edee6815df930cdd14a9da70287630700648da39bf9b85bcf8b690bb1dc87aee1da6fd33858fc4fdfce1a529e31bcadc723e2db94f63230b20 +EBUILD phc-intel-0.3.2.12.17.ebuild 2187 SHA256 b5cee23e2e16882cc4c3ca87ebe68dae61d8a9c784670965fc86dfb39f64d51d SHA512 6d756387a159a905cbd73d4705e2e64cb8ae7f6ca94f78b1f46e744668b7dc4fc7e2d49fd207ed7acfe1989c3f907478b537b3b34f574c847159055a9be525be WHIRLPOOL 5e3796d74228fa48c5ea1b555c669ab7bbc22f341884882257bb13347fd5abf3a5adaf5da2f8b0867e60bdb6d750365166cbf481968ecee9d86c5ffa0e9768ba +EBUILD phc-intel-0.3.2.12.21.ebuild 1848 SHA256 7a1588e6f60e324314f66a3eee6f63820bbb6e77d06ad83625bd6bafc764b461 SHA512 60af2a13ee4f98c12031a19052665c5991f0c4d107255c453c9031e11b7a2777a92d414667ec71b2f0cd8d6406b1c0708cc85d4bc35bb7e1d766900f750482ea WHIRLPOOL b553576358de376d320d4bcb4ff26a8a447f34fe7aa182fee4763f577f821e13e76b7bdf8f5807d5b01b959b24b0e4a57b29d60724baf5b2bec3affe5f43d1fa +MISC ChangeLog 3622 SHA256 42c216eb7d0980046612be530cb82c9ff8fe7de848c6dbfba2106deac1e749df SHA512 79142a57e924b5d5285329d24e810b3db8f254466cb50aea27a7634c741b959efecd46e3f667ecbd2788458a44177d70e8a992e428e9c68db79604d08e3540ae WHIRLPOOL 439c2eae53637ae1c8dee3a07b3f307cc8a761ec29e48b813380106a95651591a016c07415e58912364fe6e6bc962ada87062a3b7ce6653b3ba1d891109ab55e +MISC ChangeLog-2015 6593 SHA256 582778d47c836fd4f64f40aa4368668487b60a8643acb0598bfe3af00f6c408c SHA512 e478229497ce526050209eb34cbf0a7e7b40f12dac881061cc31a96076f0ef2a14595a873545de33c28b58e6760d2d62979321b6a0241e34762ff594e1b5a55d WHIRLPOOL e492c4085ba299eb82b5d8ec5c02843f91af98e9aec6c22e3489f6c71017a474931b12f3c19179258c383767d5a90e65aa3245dfb42c3ddb1c52c185966da493 +MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch new file mode 100644 index 000000000000..d20fb73a4fd6 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch @@ -0,0 +1,1179 @@ +Remove trailing white spaces from /proc output. + +Signed-off-by: Michael Weber <xmw@gentoo.org> +--- phc-intel-pack-rev11/inc/2.6.27/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.27/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -757,12 +769,477 @@ ++@@ -757,12 +769,482 @@ + data->resume = 1; + + return 0; +@@ -156,6 +156,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -185,6 +186,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -211,6 +213,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -239,6 +242,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -270,6 +274,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.27.57/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.27.57/linux-phc-0.3.2.patch +@@ -74,7 +74,7 @@ + + return 0; + } +-@@ -758,12 +770,477 @@ ++@@ -758,12 +770,482 @@ + data->resume = 1; + + return 0; +@@ -157,6 +157,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -186,6 +187,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -212,6 +214,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -240,6 +243,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -271,6 +275,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.28/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.28/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -758,12 +770,477 @@ ++@@ -758,12 +770,482 @@ + data->resume = 1; + + return 0; +@@ -156,6 +156,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -185,6 +186,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -211,6 +213,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -239,6 +242,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -270,6 +274,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.29/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.29/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -778,12 +790,477 @@ ++@@ -778,12 +790,482 @@ + data->resume = 1; + + return 0; +@@ -156,6 +156,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -185,6 +186,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -211,6 +213,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -239,6 +242,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -270,6 +274,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.29.2/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.29.2/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -790,12 +802,477 @@ ++@@ -790,12 +802,482 @@ + data->resume = 1; + + return 0; +@@ -156,6 +156,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -185,6 +186,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -211,6 +213,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -239,6 +242,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -270,6 +274,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.30/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.30/linux-phc-0.3.2.patch +@@ -72,7 +72,7 @@ + + return 0; + } +-@@ -797,12 +809,474 @@ ++@@ -797,12 +809,479 @@ + data->resume = 1; + + return 0; +@@ -152,6 +152,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -181,6 +182,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -207,6 +209,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -235,6 +238,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -266,6 +270,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.31/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.31/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -793,12 +805,474 @@ ++@@ -793,12 +805,479 @@ + data->resume = 1; + + return 0; +@@ -153,6 +153,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -182,6 +183,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -208,6 +210,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -236,6 +239,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -267,6 +271,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.32/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.32/linux-phc-0.3.2.patch +@@ -72,7 +72,7 @@ + + return 0; + } +-@@ -756,12 +768,474 @@ ++@@ -756,12 +768,479 @@ + data->resume = 1; + + return 0; +@@ -153,6 +153,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -182,6 +183,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -208,6 +210,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -236,6 +239,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -267,6 +271,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.32.27/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.32.27/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -757,12 +769,474 @@ ++@@ -757,12 +769,479 @@ + data->resume = 1; + + return 0; +@@ -154,6 +154,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -183,6 +184,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -209,6 +211,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -237,6 +240,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -268,6 +272,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.33/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.33/linux-phc-0.3.2.patch +@@ -72,7 +72,7 @@ + + return 0; + } +-@@ -758,12 +770,474 @@ ++@@ -758,12 +770,479 @@ + data->resume = 1; + + return 0; +@@ -153,6 +153,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -182,6 +183,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -208,6 +210,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -236,6 +239,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -267,6 +271,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.33.8/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.33.8/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -759,12 +771,474 @@ ++@@ -759,12 +771,479 @@ + data->resume = 1; + + return 0; +@@ -154,6 +154,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -183,6 +184,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -209,6 +211,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -237,6 +240,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -268,6 +272,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.34/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.34/linux-phc-0.3.2.patch +@@ -72,7 +72,7 @@ + + return 0; + } +-@@ -759,12 +771,474 @@ ++@@ -759,12 +771,479 @@ + data->resume = 1; + + return 0; +@@ -153,6 +153,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -182,6 +183,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -208,6 +210,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -236,6 +239,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -267,6 +271,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.34.9/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.34.9/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -760,12 +772,474 @@ ++@@ -760,12 +772,479 @@ + data->resume = 1; + + return 0; +@@ -154,6 +154,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -183,6 +184,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -209,6 +211,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -237,6 +240,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -268,6 +272,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.35/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.35/linux-phc-0.3.2.patch +@@ -72,7 +72,7 @@ + + return 0; + } +-@@ -719,12 +731,474 @@ ++@@ -719,12 +731,479 @@ + data->resume = 1; + + return 0; +@@ -153,6 +153,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -182,6 +183,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -208,6 +210,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -236,6 +239,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -267,6 +271,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.35.10/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.35.10/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -720,12 +732,474 @@ ++@@ -720,12 +732,479 @@ + data->resume = 1; + + return 0; +@@ -154,6 +154,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -183,6 +184,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -209,6 +211,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -237,6 +240,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -268,6 +272,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.36/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.36/linux-phc-0.3.2.patch +@@ -72,7 +72,7 @@ + + return 0; + } +-@@ -716,12 +728,474 @@ ++@@ -716,12 +728,479 @@ + data->resume = 1; + + return 0; +@@ -153,6 +153,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -182,6 +183,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -208,6 +210,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -236,6 +239,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -267,6 +271,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.36.2/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.36.2/linux-phc-0.3.2.patch +@@ -73,7 +73,7 @@ + + return 0; + } +-@@ -717,12 +729,474 @@ ++@@ -717,12 +729,479 @@ + data->resume = 1; + + return 0; +@@ -154,6 +154,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -183,6 +184,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -209,6 +211,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -237,6 +240,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -268,6 +272,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/2.6.37/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/2.6.37/linux-phc-0.3.2.patch +@@ -71,7 +71,7 @@ + } + + return 0; +-@@ -717,12 +729,474 @@ ++@@ -717,12 +729,479 @@ + data->resume = 1; + + return 0; +@@ -152,6 +152,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -181,6 +182,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -207,6 +209,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -235,6 +238,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -266,6 +270,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/3.10/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/3.10/linux-phc-0.3.2.patch +@@ -120,7 +120,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -963,10 +965,484 @@ ++@@ -963,10 +965,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -198,6 +198,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -227,6 +228,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -253,6 +255,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -281,6 +284,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -312,6 +316,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/3.11/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/3.11/linux-phc-0.3.2.patch +@@ -122,7 +122,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -986,10 +987,485 @@ ++@@ -986,10 +987,490 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -200,6 +200,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -229,6 +230,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -255,6 +257,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -283,6 +286,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -314,6 +318,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/3.7.5/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/3.7.5/linux-phc-0.3.2.patch +@@ -120,7 +120,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -966,10 +968,484 @@ ++@@ -966,10 +968,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -198,6 +198,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -227,6 +228,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -253,6 +255,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -281,6 +284,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -312,6 +316,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +--- phc-intel-pack-rev11/inc/3.9/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev11/inc/3.9/linux-phc-0.3.2.patch +@@ -120,7 +120,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -970,10 +972,484 @@ ++@@ -970,10 +972,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -198,6 +198,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -227,6 +228,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -253,6 +255,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -281,6 +284,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -312,6 +316,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +Remove trailing white spaces from /proc output. + +Signed-off-by: Michael Weber <xmw@gentoo.org> +--- phc-intel-pack-rev12/inc/3.12/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev12/inc/3.12/linux-phc-0.3.2.patch +@@ -97,7 +97,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -982,6 +983,480 @@ ++@@ -982,6 +983,485 @@ + } + } + +@@ -173,6 +173,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -202,6 +203,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -228,6 +230,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -256,6 +259,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -287,6 +291,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch new file mode 100644 index 000000000000..4e1e4dfc8543 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev14/inc/3.13/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev14/inc/3.13/linux-phc-0.3.2.patch +@@ -197,7 +197,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -956,6 +1050,480 @@ ++@@ -956,6 +1050,485 @@ + } + } + +@@ -273,6 +273,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -302,6 +303,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -328,6 +330,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -356,6 +359,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -387,6 +391,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch new file mode 100644 index 000000000000..19c1b546fb7d --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev14/inc/3.14/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev14/inc/3.14/linux-phc-0.3.2.patch +@@ -198,7 +198,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -929,6 +1022,481 @@ ++@@ -929,6 +1022,486 @@ + } + } + +@@ -274,6 +274,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -303,6 +304,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -329,6 +331,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -357,6 +360,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -388,6 +392,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch new file mode 100644 index 000000000000..e1db916f7192 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev15.1/inc/3.15/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev15.1/inc/3.15/linux-phc-0.3.2.patch +@@ -198,7 +198,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -929,6 +1022,481 @@ ++@@ -929,6 +1022,486 @@ + } + } + +@@ -274,6 +274,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -303,6 +304,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -329,6 +331,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -357,6 +360,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -388,6 +392,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch new file mode 100644 index 000000000000..01bf10bba48b --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev15.1/inc/3.5/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev15.1/inc/3.5/linux-phc-0.3.2.patch +@@ -55,7 +55,7 @@ + kfree(data->freq_table); + kfree(data); + } +-@@ -716,8 +728,470 @@ ++@@ -716,8 +728,475 @@ + return 0; + } + +@@ -134,6 +134,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -163,6 +164,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -189,6 +191,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -217,6 +220,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -248,6 +252,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch new file mode 100644 index 000000000000..1934d9cde11a --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev16/inc/3.16/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev16/inc/3.16/linux-phc-0.3.2.patch +@@ -195,7 +195,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -928,6 +1019,481 @@ ++@@ -928,6 +1019,486 @@ + } + } + +@@ -271,6 +271,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -300,6 +301,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -326,6 +328,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -354,6 +357,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -385,6 +389,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.10.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.10.patch new file mode 100644 index 000000000000..16fffd1833da --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.10.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.10/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.10/linux-phc-0.3.2.patch +@@ -120,7 +120,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -963,10 +965,484 @@ ++@@ -963,10 +965,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -198,6 +198,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -227,6 +228,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -253,6 +255,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -281,6 +284,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -312,6 +316,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.11.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.11.patch new file mode 100644 index 000000000000..13d9df5eba2b --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.11.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.11/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.11/linux-phc-0.3.2.patch +@@ -122,7 +122,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -986,10 +987,485 @@ ++@@ -986,10 +987,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -200,6 +200,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -229,6 +230,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -255,6 +257,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -283,6 +286,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -314,6 +318,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.12.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.12.patch new file mode 100644 index 000000000000..4031d34523a2 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.12.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.12/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.12/linux-phc-0.3.2.patch +@@ -97,7 +97,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -982,6 +983,480 @@ ++@@ -982,6 +983,485 @@ + } + } + +@@ -173,6 +173,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -202,6 +203,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -228,6 +230,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -256,6 +259,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -287,6 +291,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.13.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.13.patch new file mode 100644 index 000000000000..78db83fb478d --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.13.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.13/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.13/linux-phc-0.3.2.patch +@@ -97,7 +97,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -956,6 +957,480 @@ ++@@ -956,6 +957,485 @@ + } + } + +@@ -173,6 +173,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -202,6 +203,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -228,6 +230,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -256,6 +259,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -287,6 +291,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.14.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.14.patch new file mode 100644 index 000000000000..3c8e75a6a534 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.14.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.14/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.14/linux-phc-0.3.2.patch +@@ -98,7 +98,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -929,6 +929,481 @@ ++@@ -929,6 +929,486 @@ + } + } + +@@ -174,6 +174,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -203,6 +204,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -229,6 +231,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -257,6 +260,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -288,6 +292,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.15.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.15.patch new file mode 100644 index 000000000000..d15916a1fbea --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.15.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.15/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.15/linux-phc-0.3.2.patch +@@ -98,7 +98,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -929,6 +929,481 @@ ++@@ -929,6 +929,486 @@ + } + } + +@@ -174,6 +174,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -203,6 +204,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -229,6 +231,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -257,6 +260,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -288,6 +292,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.4.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.4.patch new file mode 100644 index 000000000000..345fa6c73ab8 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.4.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.4/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.4/linux-phc-0.3.2.patch +@@ -55,7 +55,7 @@ + kfree(data->freq_table); + kfree(data); + } +-@@ -716,8 +728,470 @@ ++@@ -716,8 +728,475 @@ + return 0; + } + +@@ -134,6 +134,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -163,6 +164,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -189,6 +191,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -217,6 +220,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -248,6 +252,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.7.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.7.patch new file mode 100644 index 000000000000..003941fd729d --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.7.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.7.5/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.7.5/linux-phc-0.3.2.patch +@@ -120,7 +120,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -966,10 +968,484 @@ ++@@ -966,10 +968,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -198,6 +198,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -227,6 +228,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -253,6 +255,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -281,6 +284,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -312,6 +316,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.9.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.9.patch new file mode 100644 index 000000000000..2532e37b40bc --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-3.9.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/3.9.6/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/3.9.6/linux-phc-0.3.2.patch +@@ -120,7 +120,7 @@ + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { + msrs = msrs_alloc(); + +-@@ -970,10 +972,484 @@ ++@@ -970,10 +972,489 @@ + msrs_free(msrs); + msrs = NULL; + } +@@ -198,6 +198,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -227,6 +228,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -253,6 +255,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -281,6 +284,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -312,6 +316,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.1.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.1.patch new file mode 100644 index 000000000000..ddc65b4d34f1 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.1.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/4.1/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/4.1/linux-phc-0.3.2.patch +@@ -95,7 +95,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -928,6 +925,481 @@ ++@@ -928,6 +925,486 @@ + } + } + +@@ -171,6 +171,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -200,6 +201,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -226,6 +228,7 @@ + + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -254,6 +257,7 @@ + + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -285,6 +289,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.3.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.3.patch new file mode 100644 index 000000000000..103ad0b38b19 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.3.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/4.3/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/4.3/linux-phc-0.3.2.patch +@@ -97,7 +97,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -941,6 +937,492 @@ ++@@ -941,6 +937,497 @@ + } + } + +@@ -169,6 +169,7 @@ + + vid = extract_vid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -197,6 +198,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -222,6 +224,7 @@ + + fid = extract_fid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -252,6 +255,7 @@ + + vid = extract_vid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -285,6 +289,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.5.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.5.patch new file mode 100644 index 000000000000..928edc616f7b --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.5.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/4.5/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/4.5/linux-phc-0.3.2.patch +@@ -96,7 +96,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -935,6 +932,491 @@ ++@@ -935,6 +932,496 @@ + } + } + +@@ -168,6 +168,7 @@ + + vid = extract_vid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -196,6 +197,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -221,6 +223,7 @@ + + fid = extract_fid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -251,6 +254,7 @@ + + vid = extract_vid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -284,6 +288,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.6.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.6.patch new file mode 100644 index 000000000000..efb4baf088e7 --- /dev/null +++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev21-trailing-space-4.6.patch @@ -0,0 +1,51 @@ +--- phc-intel-pack-rev21/inc/4.6/linux-phc-0.3.2.patch ++++ phc-intel-pack-rev21/inc/4.6/linux-phc-0.3.2.patch +@@ -97,7 +97,7 @@ + static void __init acpi_cpufreq_boost_init(void) + { + if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { +-@@ -917,6 +914,491 @@ ++@@ -917,6 +914,496 @@ + } + } + +@@ -169,6 +169,7 @@ + + vid = extract_vid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -197,6 +198,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u ", vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -222,6 +224,7 @@ + + fid = extract_fid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u ", fid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -252,6 +255,7 @@ + + vid = extract_vid_from_control(perf->states[freq_table[i].driver_data].control); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; +@@ -285,6 +289,7 @@ + + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + + count += sprintf(&buf[count], "%u:%u ", fid, vid); + + } +++ if (count) count--; + + count += sprintf(&buf[count], "\n"); + + + + return count; diff --git a/sys-power/phc-intel/metadata.xml b/sys-power/phc-intel/metadata.xml new file mode 100644 index 000000000000..a535b8852829 --- /dev/null +++ b/sys-power/phc-intel/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 type="person"> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild new file mode 100644 index 000000000000..d304743498ac --- /dev/null +++ b/sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit linux-info linux-mod eutils + +DESCRIPTION="Processor Hardware Control for Intel CPUs" +HOMEPAGE="http://www.linux-phc.org/ + http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267" +#no automatic filenames here, sorry +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=161 -> phc-intel-pack-rev15.1.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +CONFIG_CHECK="~!X86_ACPI_CPUFREQ" +ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel." + +MODULE_NAMES="phc-intel(misc:)" +BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1" +BUILD_TARGETS="all" + +S=${WORKDIR}/${A/.tar.bz2} + +pkg_setup() { + if kernel_is lt 2 6 27 ; then + eerror "Your kernel version is no longer supported by this version of ${PN}." + eerror "Please use a previous version of ${PN} or a newer kernel." + die + fi + if kernel_is gt 3 15 ; then + eerror "Your kernel version is not yet supported by this version of ${PN}." + eerror "Please use a newer version of ${PN} or an older kernel." + die + fi + linux-mod_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/phc-intel-0.3.2-rev12-trailing-space-misc.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.5.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.13.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.14.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.15.patch + + sed -e '/^all:/s:prepare::' \ + -i Makefile || die + + local my_sub=arch/x86/kernel/cpu + if kernel_is gt 2 6 39 ; then + my_sub=drivers + fi + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die + if kernel_is lt 3 12 ; then + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die + fi + + if kernel_is lt 3 0 ; then + epatch inc/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/linux-phc-0.3.2.patch + else + epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch + fi + + mv acpi-cpufreq.c phc-intel.c || die +} diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild new file mode 100644 index 000000000000..1a5be9e0ac5c --- /dev/null +++ b/sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit linux-info linux-mod eutils + +DESCRIPTION="Processor Hardware Control for Intel CPUs" +HOMEPAGE="http://www.linux-phc.org/ + http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267" +#no automatic filenames here, sorry +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=162 -> phc-intel-pack-rev16.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +CONFIG_CHECK="~!X86_ACPI_CPUFREQ" +ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel." + +MODULE_NAMES="phc-intel(misc:)" +BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1" +BUILD_TARGETS="all" + +S=${WORKDIR}/${A/.tar.bz2} + +pkg_setup() { + if kernel_is lt 2 6 27 ; then + eerror "Your kernel version is no longer supported by this version of ${PN}." + eerror "Please use a previous version of ${PN} or a newer kernel." + die + fi + if kernel_is gt 3 19 ; then + eerror "Your kernel version is not yet tested with this version of ${PN}." + eerror "It might not build or expose runtime problems." + fi + linux-mod_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/phc-intel-0.3.2-rev12-trailing-space-misc.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.5.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.13.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.14.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.15.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev16-trailing-space-3.16.patch + + sed -e '/^all:/s:prepare::' \ + -i Makefile || die + + local my_sub=arch/x86/kernel/cpu + if kernel_is gt 2 6 39 ; then + my_sub=drivers + fi + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die + if kernel_is lt 3 12 ; then + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die + fi + + if kernel_is lt 3 0 ; then + epatch inc/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/linux-phc-0.3.2.patch + elif kernel_is lt 3 17 ; then + epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch + else + epatch inc/3.16/linux-phc-0.3.2.patch + fi + + mv acpi-cpufreq.c phc-intel.c || die +} diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild new file mode 100644 index 000000000000..32dd3dbe46a7 --- /dev/null +++ b/sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit linux-info linux-mod eutils + +DESCRIPTION="Processor Hardware Control for Intel CPUs" +HOMEPAGE="http://www.linux-phc.org/ + http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267" +#no automatic filenames here, sorry +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=166 -> phc-intel-pack-rev17.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +CONFIG_CHECK="~!X86_ACPI_CPUFREQ" +ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel." + +MODULE_NAMES="phc-intel(misc:)" +BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1" +BUILD_TARGETS="all" + +S=${WORKDIR}/${A/.tar.bz2} + +pkg_setup() { + if kernel_is lt 2 6 27 ; then + eerror "Your kernel version is no longer supported by this version of ${PN}." + eerror "Please use a previous version of ${PN} or a newer kernel." + die + fi + if kernel_is gt 4 0 ; then + eerror "Your kernel version is not yet tested with this version of ${PN}." + eerror "It might not build or expose runtime problems." + fi + linux-mod_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/phc-intel-0.3.2-rev12-trailing-space-misc.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.5.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.13.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.14.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.15.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev16-trailing-space-3.16.patch + + sed -e '/^all:/s:prepare::' \ + -i Makefile || die + + local my_sub=arch/x86/kernel/cpu + if kernel_is gt 2 6 39 ; then + my_sub=drivers + fi + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die + if kernel_is lt 3 12 ; then + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die + fi + + if kernel_is lt 3 0 ; then + epatch inc/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/linux-phc-0.3.2.patch + elif kernel_is lt 3 17 ; then + epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch + else + epatch inc/3.16/linux-phc-0.3.2.patch + fi + + mv acpi-cpufreq.c phc-intel.c || die +} diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.21.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.21.ebuild new file mode 100644 index 000000000000..8c856060bc7b --- /dev/null +++ b/sys-power/phc-intel/phc-intel-0.3.2.12.21.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit linux-info linux-mod eutils + +DESCRIPTION="Processor Hardware Control for Intel CPUs" +HOMEPAGE="http://www.linux-phc.org/ + http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267" +#no automatic filenames here, sorry +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=170 -> phc-intel-pack-rev21.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +CONFIG_CHECK="~!X86_ACPI_CPUFREQ" +ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel." + +MODULE_NAMES="phc-intel(misc:)" +BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1" +BUILD_TARGETS="all" + +S=${WORKDIR}/${A/.tar.bz2} + +pkg_setup() { + if kernel_is lt 3 1 ; then + eerror "Your kernel version is no longer supported by this version of ${PN}." + eerror "Please use a previous version of ${PN} or a newer kernel." + die + fi + if kernel_is gt 4 6 ; then + eerror "Your kernel version is not yet tested with this version of ${PN}." + eerror "It might not build or expose runtime problems." + fi + linux-mod_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/phc-intel-0.3.2-rev21-trailing-space-3.{4,7,9,10,11,12,13,14,15}.patch \ + "${FILESDIR}"/phc-intel-0.3.2-rev21-trailing-space-4.{1,3,5,6}.patch + + sed -e '/^all:/s:prepare::' \ + -i Makefile || die + + local my_sub=arch/x86/kernel/cpu + if kernel_is gt 2 6 39 ; then + my_sub=drivers + fi + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die + if kernel_is lt 3 12 ; then + cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die + fi + + if kernel_is lt 4 7 ; then + epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch + else + epatch inc/4.6/linux-phc-0.3.2.patch + fi + + mv acpi-cpufreq.c phc-intel.c || die +} diff --git a/sys-power/phc-k8/Manifest b/sys-power/phc-k8/Manifest new file mode 100644 index 000000000000..3e46e0373941 --- /dev/null +++ b/sys-power/phc-k8/Manifest @@ -0,0 +1,7 @@ +DIST phc-k8-0.4.3.tar.gz 23324 SHA256 b72b02f77afb0cc32f04c2abbc88e1a23241eb1e3a2e9ed3159045f18087d859 SHA512 b4f649c5b795527ea40931a5e07470ad764957197ed68a59d604437c56b4df43e857b2aa0f0c849005ebc004fc67d0254cdb913c2c1875a5dde339f9bd08b10c WHIRLPOOL 97c81368c30d055d37bd17ed8c5f4ac21e2c8d95b86597c7792ea8d90f1ea0d4516c05698cd97b412d94eea8ef3d3747124f05625d0c160621023e8ce3dfb96b +DIST phc-k8-0.4.4.tar.gz 24535 SHA256 19744a7ae94f19c1327e3e5542522f9ab5f978e4466f1973b7518e1a83e91edd SHA512 208cd814fbaa55257368b02636196110db3f7338bdab9738c0401a29b082eb6214063cc1e5f60925b9f86084f55f0e0bb260af9bdf8350692fafded8c27aa3bb WHIRLPOOL f183e3d6b7112f49e8a0fe5688185d0be6a7fbe2142c2e0ef83acc785d7b1c6e5a2e184f77d21fb92dd025694d355c25c75c463db5424b0f0645f0a9333547a8 +EBUILD phc-k8-0.4.3.ebuild 1047 SHA256 ec4071f71aa6fa5bec344f0f5c1b5d0d7690e4f867cdd37319beda2b27c04818 SHA512 733c5f7506ccd22ea239376035fdd877cd565a6b5272dd5275323dae7a66db9f6f94c8894c0825b8fdf09b5856e8b5d5eafc0f4d8f180184821c6b67ebabde44 WHIRLPOOL bdb0cbf43abd85b214e6a878e43bd243569d7ed2acae78619aa07cf618381945055324415eaa01857c152b65e4e9de6df729922cf44a41dce438f49896765de5 +EBUILD phc-k8-0.4.4.ebuild 1090 SHA256 fd34b7795a9ffabe70558aabc59917e4fa9a5532a2b7626e9641ebf91d39a223 SHA512 21e698c49d57c3dce79f01c3c929fff08a0a1339b281e251a7bb9fd4a929692db7e8ec08ee8eddc0b0db6344b33b7d44096065945ad4316545a946b4885bdc93 WHIRLPOOL 4262954fcadeb640ae9591713523daf8dfcc5c883fdb16fbd6729053bfd0ac56b680eeb4e0281a12fa8f2267c1b2914a1d0630d03ea2e566ea6d87cb45cebb75 +MISC ChangeLog 2224 SHA256 1ae4d13037a38da23008e3ba7244a7affdd17462b84a6e2e12148c64d0e88005 SHA512 8ffceeaed1874ec4b62480a8714802d4ecb36c2f7e313022a1c19f6d9f0a55048b577bc6171807de6b5c296503a60dfed933d676d29d8f9c89047cbc1ae05ef7 WHIRLPOOL 47236eb2c3de4d62f8bbb725c82100597e5598245f7a32f453b3a458e2932d229908689416fdf2ee370f4cf0876638d499f789cc3985cb5fed4aaae19f1939f3 +MISC ChangeLog-2015 807 SHA256 b595906bd0fb65687a775c88e41302eda1a144ae5be260d6ab4e18a03a74bd82 SHA512 c7b0ee6e333d7c923e25f5873e34cbdb2d584fbef092df867bdaf6d7e9d1002f2f9353d41ced6f921bcc09f79c8b8877dc17e69a956029cbc45535909160bda4 WHIRLPOOL 72fa1e1e5437fbf0077fe54ebc21bc7eea8e980d116b152f6c7b3fb45ce7ef95168e5275b150e8401a776b8894e36046f2e7dc009ae61ec41c23c76009716f72 +MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f diff --git a/sys-power/phc-k8/metadata.xml b/sys-power/phc-k8/metadata.xml new file mode 100644 index 000000000000..a535b8852829 --- /dev/null +++ b/sys-power/phc-k8/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 type="person"> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +</pkgmetadata> diff --git a/sys-power/phc-k8/phc-k8-0.4.3.ebuild b/sys-power/phc-k8/phc-k8-0.4.3.ebuild new file mode 100644 index 000000000000..a45455b1bf11 --- /dev/null +++ b/sys-power/phc-k8/phc-k8-0.4.3.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit linux-info linux-mod + +DESCRIPTION="Processor Hardware Control for AMD K8 CPUs" +HOMEPAGE="http://www.linux-phc.org/" +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=107 -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +S=${WORKDIR}/${PN}_v${PV} + +pkg_pretend() { + if kernel_is gt 3 0 0 ; then + eerror "This version is not compartible with linux 3.x (bug 376441)" + eerror "Please use >=sys-power/phc-k8-0.4.4 !" + einfo ; einfo ; einfo + die "wrong kernel version" + fi +} + +pkg_setup() { + CONFIG_CHECK="~!X86_POWERNOW_K8" + ERROR_X86_POWERNOW_K8="CONFIG_X86_POWERNOW_K8 should be configured to Module, to +a) include needed symbol cpufreq_get_measured_perf and +b) enable the replacemant of powernow-k8 with phc-k8." + + MODULE_NAMES="phc-k8(misc:)" + BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1" + BUILD_TARGETS="all" +} + +src_install() { + linux-mod_src_install + dodoc Changelog README || die +} diff --git a/sys-power/phc-k8/phc-k8-0.4.4.ebuild b/sys-power/phc-k8/phc-k8-0.4.4.ebuild new file mode 100644 index 000000000000..d4b3296d3b30 --- /dev/null +++ b/sys-power/phc-k8/phc-k8-0.4.4.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit linux-info linux-mod + +DESCRIPTION="Processor Hardware Control for AMD K8 CPUs" +HOMEPAGE="http://www.linux-phc.org/" +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=124 -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +S=${WORKDIR}/${PN}_v${PV} + +pkg_setup() { + CONFIG_CHECK="~!X86_POWERNOW_K8" + ERROR_X86_POWERNOW_K8="CONFIG_X86_POWERNOW_K8 should be configured to Module, to +a) include needed symbol cpufreq_get_measured_perf and +b) enable the replacemant of powernow-k8 with phc-k8." + + MODULE_NAMES="phc-k8(misc:)" + BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1" + BUILD_TARGETS="all" + + linux-mod_pkg_setup +} + +src_prepare() { + sed -e '/error Only support for 2.6 series kernels/d' \ + -i Makefile || die + + if kernel_is gt 2 6 32 ; then + #use mperf.{c,h,ko) from kerel + sed -e '/^MODULES/s:mperf.ko::' \ + -e '/^obj-m/s:mperf.o::' \ + -i Makefile || die + fi +} + +src_install() { + linux-mod_src_install + dodoc Changelog README +} diff --git a/sys-power/phctool/Manifest b/sys-power/phctool/Manifest new file mode 100644 index 000000000000..d5addc0995dc --- /dev/null +++ b/sys-power/phctool/Manifest @@ -0,0 +1,10 @@ +AUX phctool-0.5.2.2_all_paths_tool_no_sudo.patch 534 SHA256 dcc9a6b1549994ba3471d7cf5eab02af8fc9ec24818626fff6b08d638267bc7d SHA512 344da8cf2f6533650e731e2297ec15bba09c859de342f920300be82fbac4d82ad9786c28dbc3504ab36a6909c2588eacdffb41c86dd2c0462ad8c44d5bca6a5d WHIRLPOOL 48a02139b85aec1855439c42e37130e728ec33d74eaec764d56acb2c0075bcadc0d5c4b24ddb8d6ccd82a9bd16dbe6a946c7edf2294f5e7ce2d6166a51faad50 +AUX phctool-0.5.2.2_all_paths_tool_sudo.patch 547 SHA256 38d617e165846cc349aefd7b658a42fb12a3aa6eba626258b225479572d616e2 SHA512 ab21747a1ef55bff373871ec33b8edd98bd565f9a81b8d2e32248c0ccbeea9f454236f691714e06409e9524b5108c636112460d8839e1aee3879eca6430189f4 WHIRLPOOL d450f7a48eef00035850fc966c61f5166e02c86aae981d81b01a3e1c7c4e7860465af091661e58126468c479329a649d19acafc39c49248e2f72620e3d0cb139 +AUX phctool-0.5.2.2_all_paths_tray.patch 1043 SHA256 9f70b06ca68190829b128273bf64101600100628fa2519fecec7a57368f84ac8 SHA512 92585e64d70e3a8daf8dfa7f950edc2dfd50b50e39169ea68e0eea53a17779855e9f912452f6d82965add041a6d35d746a13d17749010aa8671b55c386e86aa2 WHIRLPOOL 34b14fd2f22feb59bf407c2c2dd2b14acae438e4a8147ab0dd51e0343d3c26ed6200a0d8fe091cf4273fc9901b598638b91f834304e77d9647afa483474d2053 +AUX phctool-0.5.2.2_gui_kernel_2.6.38.patch 879 SHA256 069ea00f62aab1d1c61652d6d095412f72e9506971998ce103d454d7d91cde57 SHA512 9a45ee7a506e5520fa155336915fed2e149d5c7f033024d13391bf750424e47ed43c6a7820e599b45aaed5b5fbf466409fdeff505857087c124f0862259c22a1 WHIRLPOOL 53d4cff55a762bea6e8c485d87973beb6fb9780c7381e6a60fc62a14f8fa9555aba6f61a6af9bc24c9cf36ea18085a2b1281d90e23d0e460af229701160d9b10 +AUX phctool-0.5.2.2_kernel_2.6.36.patch 3527 SHA256 bfd1e0c5c1a061562c6ca01d6bc8ebc2b2fb04e2e796d23fc13daba8eb48e235 SHA512 61407bb85f8d552ee6aa448e473e627a55a23b882fdaf5c99808b8ba6f71418f0d9e9142d5e3931d184994ff983a6d222843d5b6590d9eee8965a8bfefe5a930 WHIRLPOOL 495d91cbfc4713de673af368071a1a89776f9333a11bf378e5efae37fc07054c9a896dc30fdd0a04a62269e8aca4433990450361d99e4d890ddda657331e9023 +DIST phctool-0.5.2.2.tar.gz 941587 SHA256 ef60b13a74e7a123008a93d02759e99537a58c40091774a7e70e3e1d5960fa4a SHA512 50beafb8d96b070563f4fcef93f1a07285b4347a05df70aee06aeac9b7c80642d8f967321b499d733c1734d36c7ebda6379094f5eb9a5bee648d7aa1f6c23053 WHIRLPOOL 09f463d327a29890eae838c90dcfdaeca27b5e506d2f9bf476c0d452b5ef08edb979a0dc716f7118028cfc1af2167897eb565ff70de39b9884769c70844a3c62 +EBUILD phctool-0.5.2.2-r3.ebuild 2094 SHA256 195fe72eb7c4ea91dee60b3d1dd1a7b45af7a0936929c64851e65ea60f0fa142 SHA512 68dab3a399da8023536ef56267ab7c384671d4be41d791d9e766aa6a8da5e8ea5797fc8e42e055bb57ace9c1279eefd0e525fcb30c8681546a47f1c8b9545fa5 WHIRLPOOL b4e5ac2b84a48eadd165c8a74868f8ca8bceeb287b333fac2ffcf6cc4e1419b6dc39558fe217363c544e630947cfbf9b59f5b7614f147341355c5bf84bb6dc93 +MISC ChangeLog 2499 SHA256 e0fb91ad4625259203081516011f0ce070763933b48dad0db9952416369e2399 SHA512 c004cc413d6b4e7498d3a17fd135d6edfa2315edc73801d3855e1f54655faa0290aaaf290763416e24fa60a60cabe4d83175a834e8b72edda188dad7891118cf WHIRLPOOL 028cbcd39a9789e82fe2c659eac1d1e396c5a93a759a19889e6591cc6640e1af21d75f7c6346e9b7d69789a60c9948b03221d7ffd1f30f30a82755f6fa85b68d +MISC ChangeLog-2015 1537 SHA256 c6d13834424c43bd71176804c866b181131ee74231a03976f20247c7eb49d6bd SHA512 15a13125d2271935de60aa481340404fa7db888a989ea29e69238b365a7b17c1ffd135e0c8b6421504be9d6b13513cb46e777445c9bb2f4ee5a7ea5f972e9208 WHIRLPOOL 6c09f5c8d42361f2dbf0bebb1f6bfaac545e98a3585dfc63791ad8f823a98bc335c47c7ba409bda530c8befa81bd28b2697f9acae24807e6fb5224911726524a +MISC metadata.xml 331 SHA256 a5ee536034f3a7742a62796d039ef566a5bd80a5715636ea692d20a77625009e SHA512 29e807bda7452cd13c7f6ed65d0f6fa7ed467fe7ba3408d8fb394909e02e7b68507e3122dcddbd54d715843d63741c16ed3fce5562610aa17d41cb98efc8cdba WHIRLPOOL 2f8cce0642fa4d5e7d48a5f032e77d73c71b60def954fbf2c020aab9b12355b39e389bcebb3f776c0ef046d5cd7e6cdb302b13f3960f0181fde9b2efa180196a diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch new file mode 100644 index 000000000000..316e538abe0d --- /dev/null +++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch @@ -0,0 +1,17 @@ +--- a/phctool.sh 2007-10-27 22:32:35.000000000 +0200 ++++ b/phctool.sh 2009-09-05 23:20:18.000000000 +0200 +@@ -1,10 +1,7 @@ + #!/bin/sh +-#this shellscript is just a wrapper to subphctool.sh +-#but necessary to run phctool with sudo even from the tray icon +-PROGPATH=`dirname "$0"` +-cd $PROGPATH +-if test -e /usr/bin/gksu +- then gksu ./subphctool.sh $1 +- else sudo ./subphctool.sh $1 +-fi ++#this shellscript is just a wrapper to phctool.py ++#but necessary to run phctool from another directory ++ ++cd /usr/share/phctool ++./phctool.py $1 diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch new file mode 100644 index 000000000000..11b64c3bab07 --- /dev/null +++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch @@ -0,0 +1,18 @@ +--- a/phctool.sh 2007-10-27 22:32:35.000000000 +0200 ++++ b/phctool.sh 2009-09-05 23:20:18.000000000 +0200 +@@ -1,10 +1,7 @@ + #!/bin/sh +-#this shellscript is just a wrapper to subphctool.sh +-#but necessary to run phctool with sudo even from the tray icon +-PROGPATH=`dirname "$0"` +-cd $PROGPATH +-if test -e /usr/bin/gksu +- then gksu ./subphctool.sh $1 +- else sudo ./subphctool.sh $1 +-fi ++#this shellscript is just a wrapper to subphctool.py ++#but necessary to run phctool from another directory ++ ++cd /usr/share/phctool ++sudo ./subphctool.sh $1 + diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch new file mode 100644 index 000000000000..1d2053a9c4b7 --- /dev/null +++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch @@ -0,0 +1,32 @@ +--- a/phctray.sh 2007-09-08 08:29:31.000000000 +0200 ++++ b/phctray.sh 2009-09-05 23:16:54.000000000 +0200 +@@ -2,6 +2,5 @@ + #this shellscript is just a wrapper to phctray.py + #but necessary to run phctray from another directory + +-PROGPATH=`dirname "$0"` +-cd $PROGPATH ++cd /usr/share/phctool + ./phctray.py +--- a/phctray.py 2009-09-08 12:17:11.000000000 +0200 ++++ b/phctray.py 2009-09-08 12:17:33.000000000 +0200 +@@ -61,7 +61,7 @@ + t.show_all() + + ##call phctool without GUI to set stored values +-cmd=[sys.path[0]+"/phctool.sh","background"] ##command ++cmd=["/usr/bin/phctool","background"] ##command + subprocess.Popen(cmd, shell=False) ##call the affinated programm + + gtk.main() +--- a/phctray.py 2009-09-08 12:22:28.000000000 +0200 ++++ b/phctray.py 2009-09-08 12:23:44.000000000 +0200 +@@ -11,7 +11,7 @@ + return; + + def run_phctool( *args ): +- cmd=[sys.path[0]+"/phctool.sh"] ##command ++ cmd=["/usr/bin/phctool"] ##command + subprocess.Popen(cmd, shell=False) ##call the affinated programm + + def applet_face_click( window, event, *data ): diff --git a/sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch b/sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch new file mode 100644 index 000000000000..db33396e3d17 --- /dev/null +++ b/sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch @@ -0,0 +1,21 @@ +--- phctool/inc/libs/cpuinfo.py ++++ phctool/inc/libs/cpuinfo.py +@@ -1,6 +1,7 @@ + #cpuinfo.py + #This is a function library to get + #informations about CPUs and its PHC data ++#Modified by Fabio Veronese fveronese85*at*gmail.com 22 Mar 2011 + + + import os, string +@@ -30,6 +31,10 @@ + if os.path.exists('/proc/acpi/processor/CPU'+cpunr): + ##remember ACPI Pathname + self.data[cpunr]['acpi']['acpiname']='/proc/acpi/processor/CPU'+cpunr ++ elif os.path.exists('/sys/devices/system/cpu/cpu'+cpunr+'/thermal_throttle'): ++ ##here some throttling infos for 2.6.38 and maybe laters ++ #self.data[cpunr]['acpi']['acpiname']='/sys/devices/system/cpu/cpu'+cpunr+'/thermal_throttle' ++ self.data[cpunr]['acpi']['acpiname']='' + else: + self.data[cpunr]['acpi']['exist']=False + # For some reason we have to fallback on the old function... diff --git a/sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch b/sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch new file mode 100644 index 000000000000..c3a2432aea2d --- /dev/null +++ b/sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch @@ -0,0 +1,79 @@ +--- phctool/inc/libs/cpuinfo.py ++++ phctool/inc/libs/cpuinfo.py +@@ -14,33 +14,49 @@ + + + def _get_acpi_cpus(self): +- ##count number of CPUs on this system using acpi proc interface +- ##since we need acpi this i a good way to count CPUs +- ##we also will remember the Directory-Name because on single CPU +- ##systems the Dir may be named CPU while on Multicores they are indexed (CPU0, CPU1) .. +- directory="/proc/acpi/processor/" +- for f in os.listdir(directory): ##iterate the directory +- pathname = os.path.join(directory, f) ## +- if os.path.isdir(pathname): ##is the object we found really a (sub-)directory? +- ##We open the info-file to get the ID to this CPU, +- ##i don't know if this really could happen but the ID may differ from +- ##from the Path iterator (maybe one CPU is supported and another isn't) +- if os.path.exists(pathname+'/info'): +- file = open(pathname+'/info', 'r'); +- for line in file: +- if string.find(line,":"): +- content = line.split(":"); +- if len(content)>1: +- info_ident=content[0].strip(); +- info_value=content[1].strip(); +- if info_ident == "processor id": +- cpunr=info_value +- self.data[cpunr]={} +- self.data[cpunr]['acpi']={} +- self.data[cpunr]['acpi']['exist']=True +- self.data[cpunr]['acpi']['acpiname']=f ##remember ACPI Pathname +- else: +- self.data[cpunr]['acpi']['exist']=False ++ # We need to ignore /proc/acpi/processor as it's becoming deprecated ++ # A good solution might be a look in online cpus, but it doesn't mean they are surely ACPI-supported ++ if os.path.exists('/sys/devices/system/cpu/online'): ++ file = open('/sys/devices/system/cpu/online', 'r'); ++ for line in file: ++ if string.find(line,"-"): ++ content = line.split("-"); ++ for val in content: ++ cpunr=val.strip(); ++ self.data[cpunr]={} ++ self.data[cpunr]['acpi']={} ++ self.data[cpunr]['acpi']['exist']=True ++ # This sounds useful just for throttling, which is managed better by other stuff... I'll keep just for compatibility ++ if os.path.exists('/proc/acpi/processor/CPU'+cpunr): ++ ##remember ACPI Pathname ++ self.data[cpunr]['acpi']['acpiname']='/proc/acpi/processor/CPU'+cpunr ++ else: ++ self.data[cpunr]['acpi']['exist']=False ++ # For some reason we have to fallback on the old function... ++ else: ++ directory="/proc/acpi/processor/" ++ for f in os.listdir(directory): ##iterate the directory ++ pathname = os.path.join(directory, f) ## ++ if os.path.isdir(pathname): ##is the object we found really a (sub-)directory? ++ ##We open the info-file to get the ID to this CPU, ++ ##i don't know if this really could happen but the ID may differ from ++ ##from the Path iterator (maybe one CPU is supported and another isn't) ++ if os.path.exists(pathname+'/info'): ++ file = open(pathname+'/info', 'r'); ++ for line in file: ++ if string.find(line,":"): ++ content = line.split(":"); ++ if len(content)>1: ++ info_ident=content[0].strip(); ++ info_value=content[1].strip(); ++ if info_ident == "processor id": ++ cpunr=info_value ++ self.data[cpunr]={} ++ self.data[cpunr]['acpi']={} ++ self.data[cpunr]['acpi']['exist']=True ++ self.data[cpunr]['acpi']['acpiname']=f ##remember ACPI Pathname ++ else: ++ self.data[cpunr]['acpi']['exist']=False + + + def _get_cpuinfos(self): diff --git a/sys-power/phctool/metadata.xml b/sys-power/phctool/metadata.xml new file mode 100644 index 000000000000..9148655f78bf --- /dev/null +++ b/sys-power/phctool/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 type="person"> +<email>xmw@gentoo.org</email> +<name>Michael Weber</name> +</maintainer> +<use> + <flag name="sudo">Enable support for sudo to run gui from non-root user</flag> +</use> +</pkgmetadata> diff --git a/sys-power/phctool/phctool-0.5.2.2-r3.ebuild b/sys-power/phctool/phctool-0.5.2.2-r3.ebuild new file mode 100644 index 000000000000..c33953a060fe --- /dev/null +++ b/sys-power/phctool/phctool-0.5.2.2-r3.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit python-single-r1 user + +DESCRIPTION="Processor Hardware Control userland configuration tool" +HOMEPAGE="http://www.linux-phc.org/" +SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=50 -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc sudo" + +DEPEND="${PYTHON_DEPS} + dev-python/egg-python[${PYTHON_USEDEP}] + dev-python/pygtk:2[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + sudo? ( app-admin/sudo )" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${PV%.*}-${PV##*.}/${PN}" + +pkg_setup() { + MY_PROGDIR="/usr/share/${PN}" + if use sudo ; then + MY_GROUPNAME="phcusers" + enewgroup ${MY_GROUPNAME} + fi + python-single-r1_pkg_setup +} + +src_prepare() { + eapply "${FILESDIR}"/${P}_all_paths_tray.patch + if use sudo ; then + eapply "${FILESDIR}"/${P}_all_paths_tool_sudo.patch + else + eapply "${FILESDIR}"/${P}_all_paths_tool_no_sudo.patch + fi + eapply "${FILESDIR}"/${P}_kernel_2.6.36.patch + eapply "${FILESDIR}"/${P}_gui_kernel_2.6.38.patch + eapply_user + find . -name "*.pyc" -delete || die + python_fix_shebang . +} + +src_install() { + newbin phctool.sh phctool + newbin phctray.sh phctray + + exeinto ${MY_PROGDIR} + doexe phc{tool,tray}.py subphctool.sh + python_moduleinto ${MY_PROGDIR} + python_domodule inc + + if use sudo ; then + fowners -R ":${MY_GROUPNAME}" "${MY_PROGDIR}" + fperms g+rX "${MY_PROGDIR}" + dodir /etc/sudoers.d + echo "#%${MY_GROUPNAME} ALL=(root) NOPASSWD:${MY_PROGDIR}/subphctool.sh" \ + > "${ED}"/etc/sudoers.d/${PN} || die + fperms a-w,o-r /etc/sudoers.d/${PN} + fi + + dodoc CHANGELOG + if use doc; then + docinto html + dodoc -r doc/docfiles doc/index.htm + fi +} + +pkg_postinst() { + if use sudo; then + einfo "You have to add a line to /etc/sudoers to get access to" + einfo "/sys/devices/system/cpu/cpu1/cpufreq/phc_controls from the phctool/phctray" + einfo "Please check and uncomment the content of /etc/sudoers.d/${PN}" + else + einfo "Group not automatically added. Please run phctool as root." + fi +} diff --git a/sys-power/pm-quirks/Manifest b/sys-power/pm-quirks/Manifest new file mode 100644 index 000000000000..63baa9208c03 --- /dev/null +++ b/sys-power/pm-quirks/Manifest @@ -0,0 +1,5 @@ +DIST pm-quirks-20100619.tar.gz 10033 SHA256 14a50518928c27417cdc8bcbabb32b3d986931de105149aa248d8883e56c61ec SHA512 e20244fb72475945e08010d7ec19db2c017c1a04fa01d3d08c03d704d7f07f9c087bac6a5a44242cc8ed6cec5db47bc06a8862dd0f74088a565d37b6d7b95afc WHIRLPOOL b85974c70c6942dd994ad8d141b64731c825d606b02ae04af729a9142bb98e61792b76445c9f1b2ccb2027d403a3f6830c5f1f1598947015a3e48a7e86ade4c0 +EBUILD pm-quirks-20100619.ebuild 490 SHA256 c7a6e1d162c1e36c25fd0dc92db3fc48755f1a77fa5fe81e8904c01da9b66f54 SHA512 928fedaf4d947b95d94e749a97f0bede786f9df0c50609c7131043c7924fe42bf299e96f16ebb5839d3d3ebdfff29e38f5d1a6478c0f89048defd31ed8a8dda4 WHIRLPOOL 39a2b22ca7845ffc382d8f2976646937840f17ae9cddc43d478951065bc9a0cd6aa2916653892af2bfd0170c07604cc4282552dc342083eb84150d78b44766c9 +MISC ChangeLog 3395 SHA256 1f316ef263538cba51ed12294128d9ef3e35578e7b0a7dac89430c1e4bace4a2 SHA512 0af096c4abc4d943b2fd06068e174239a46b6fd458d4c09138809c736dad00f9c3bfe5704a955eb6c45e2f9f952179c98c3810f05b762fdaf617f1e81f8c5b9e WHIRLPOOL 2179447f1c19bc375f2d3c0b6b3b677bfd9b65b8e5177da97380d471c1f6eecbe9b0a84ff27a7f8b93aa3ed483c26bd67889fa9007f37d203419a5a5176d39a7 +MISC ChangeLog-2015 1688 SHA256 bf6ada735d506ebfd34fc5e02d82c2f05acf9cc45eb3b5272865eb99b48c9caa SHA512 a9a4ee99d9b3fbb3cd98276913733079c03aa63b77a701088896c9eef2f4b096bcf02ec645f9a25b86aab5f4ec78086711e7c6146cdeb3f8d46cd4ba659ed85d WHIRLPOOL 1be0654676237dcd62a1d1d79f9b829491f5b9df08033fb55090161fd370f64177d1a4fb45df804a7ded9f63b3b61bdbbf82b8e046e6f9eb4741c4040e8fd45a +MISC metadata.xml 270 SHA256 d03f2548f8506e220358fc6d54a26ea7b07f66febe45457a2c82b501506a2427 SHA512 92c366ec57074ced42e6f9960f97d1cd1a022dba7450b51f3617a6a5e00c755496dfa84aa4ac259f4b00c676366b1eaa3ec30eeb9bcb0bf41253d1910005db2f WHIRLPOOL c1e0be867affa74e84315ab780163cc2843e4d66f305811b6ab2051525ba8f2995218f51b31799f97b4f26cbd684c67923d0c5e50efbf812d1bfdc3a1859bc12 diff --git a/sys-power/pm-quirks/metadata.xml b/sys-power/pm-quirks/metadata.xml new file mode 100644 index 000000000000..f843557871de --- /dev/null +++ b/sys-power/pm-quirks/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 type="project"> + <email>freedesktop-bugs@gentoo.org</email> + <name>Gentoo Freedesktop Project</name> + </maintainer> +</pkgmetadata> diff --git a/sys-power/pm-quirks/pm-quirks-20100619.ebuild b/sys-power/pm-quirks/pm-quirks-20100619.ebuild new file mode 100644 index 000000000000..13908084a814 --- /dev/null +++ b/sys-power/pm-quirks/pm-quirks-20100619.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=3 +inherit multilib + +DESCRIPTION="Video Quirks database for pm-utils" +HOMEPAGE="https://pm-utils.freedesktop.org/" +SRC_URI="https://pm-utils.freedesktop.org/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86" +IUSE="" + +S=${WORKDIR} + +src_install() { + insinto /usr/$(get_libdir)/pm-utils + doins -r video-quirks || die +} diff --git a/sys-power/pm-utils/Manifest b/sys-power/pm-utils/Manifest new file mode 100644 index 000000000000..c8667a263b90 --- /dev/null +++ b/sys-power/pm-utils/Manifest @@ -0,0 +1,22 @@ +AUX 1.4.1-bluetooth-sync.patch 1504 SHA256 2af763812d609f384c818635028791c875e3e56a1fa387e80b7f1ca5afc3c4e3 SHA512 35e02607280b4cd166fbbb1dfc44ef33d20debe1e564db9d532af74a773cc4f8cc3ee3be149318cbbc0f9cc451b5001a499609dd962ff42c0a7c3305215ef831 WHIRLPOOL ca8cd0a50962f100fd956254771a243d4433a6a518a3c8d925ee78f1b527888b0d3d37e71981779dd7b424f9771d5a418d8d2e82ee96ac3fcf401c574f644bcb +AUX 1.4.1-disable-sata-alpm.patch 578 SHA256 93fb45b92af2772975155f4c0dfc8d8c596dc4d0e67668313658aef19bf118f2 SHA512 ae2ed5c0170c3c54592819b39b3901f88c795b285decdffc1c505d3f05b2f68f9c5f9ff074157d7b176daa674cd63cda05faf11cd8f03a91a6010f3de1acf683 WHIRLPOOL 7e4a9ce758c7e40a9be37c37513c102c55b25fb10e1a1017c315169aed3215919329300bfdb5c5e5f0d2ddadbc6d54ac9e057edcfb2a0a070666a0784b49f033 +AUX 1.4.1-echo-n.patch 1602 SHA256 7a6581179a08bf3c7db051beb31d9d4b93c1726af1acbf9e7a66d178a418fb4e SHA512 a3ea6ac65b5a75b2af43c3c4ba36c2cab50ad7d4f916ff2750426ae87853d110253d157b365884615f0daa58b51fd41fb45d3dbc182b8d53f55e1f04e968f62b WHIRLPOOL 30e259a68492c157b0c212f4e7311a913531dc322e5c7faf6541f2dd4f3c7960b0241ba6e38ad5c8e15557b6c2eed7ebd5088aeb89709d7c3a85f9dcf0a7d777 +AUX 1.4.1-fix-alpm-typo.patch 1052 SHA256 340135cc9b8cfd538564c4e839922401011f0bd374dafde0b00252b4939f1726 SHA512 9858ad0400e420387c458349e375cf7d9c9fd40f54cc329595eda9458adf830cdd5033dc4c0408aae9fb010852face5c82df04a2ef1dce536d451e50372a2555 WHIRLPOOL 5ab4ec6412f0dfa9841269149e8e2d206781f713352fbd476428585020de519713edb4848e5e9b7f148cb38f2a990b89482e971dc4079fd41634b61d5e1af003 +AUX 1.4.1-fix-intel-audio-powersave-hook.patch 1412 SHA256 16d5355d1c5cff6316fef11768673434394582c67039c79e8b86aafe2d2f7797 SHA512 5c5cc0e810c9a189de5d3b603cac1c5adb69058f2033daad3558463d1a0f65c039e19132da54da373929fe8e652ae06e28edad2ea9ce17a2f73527e494eecaff WHIRLPOOL aa0f8191cd4697a3fe314c248624282284e6ef540add5998de11d1e910c1516103c3061490ce6b8750ac929891f4ce5b757532aee0f2d8e233fc83ec4d60410e +AUX 1.4.1-ignore-led-failure.patch 269 SHA256 0d2262a68a2abdbcca99b310d39399fa11afc6e04bd6540d03502b902454e873 SHA512 7429d2adad4caa53a787456a223ae2b280b81285bebf3f952597a8e56ec818c61502721d95095ac58e9846769f70ab377cd1ea5bede7c4f9620a7ff0c4b9f0d3 WHIRLPOOL cb78388793c69fd2eb98dce7f4ada8d214723f85d786e8d081211e9d70af7ab6ae4a5d06449e0960133409c70cba563aa9ce3bc20617b37e7c0e39db0bd38eda +AUX 1.4.1-inhibit-on-right-status.patch 568 SHA256 160a61d0517d8df086f98b935db2ddf174084ca18510be6939762f1bdf4e28bc SHA512 79e835bf1ba214e6fc5c4ea3d8861f61d83c583311d170215265cf1f7180dacd74b380ee4e14c36ed75cc9777f8f02004167c263fb2bf8a871538732f5adf3e9 WHIRLPOOL 71e18b41e827cfc224b8eb170ef7023b02c2c7df5e375a871f041074e66093efcaa55e5c5c8ec5b08804218bcf11d91a0dbb44173025955e10ba0577762db145 +AUX 1.4.1-logging-append.patch 485 SHA256 955f80e12212988abd63f78e98d74ad894c0b84ca11355fc9554edae209e1abf SHA512 215f3ca6a01fc22fa2065a7d3be02a95e0cef15fb4c04121b1dec673a98318e78799a81545474535f8ec6d48309809af855b79cc122db2010193d24647c71b71 WHIRLPOOL 916d99a6255af11c3e96f175d0ddb915fe492d612016ff3ebe4c4b8f0f52fc4ab2c444b4a2ac3d64433e07b2f5e335f603b28ca2feda902152ff544bf9f4678c +AUX 1.4.1-run-hook-logging.patch 461 SHA256 f320b0d77631a7a382dd4ed0796555f571dfd2705d6bc79587eec4cb99d5e9a9 SHA512 f6c136229527033765203344f7cb08959c289bb011a74ac44afc0e32a6a7e3983ea8dcbc5b0929a7ea23101a56ebceb79425614f88c131c9fe13b3885f008458 WHIRLPOOL cde40f7cbbbe6dab4b0b189abff1acecae3539ea4b0090c053aaa455a379eac862e848ba92dc809f5ae5bbc29fe0784bce31c67989fde69b2289e5d34448a4e0 +AUX 1.4.1-suspend-hybrid.patch 1096 SHA256 3d1d499fc62f9aba84d99950501496d444a3357db3fb27dd5e78d886cd0add12 SHA512 57fe2b4c55a6b946eccfba1701d9d21d9e9e3e8937b37be3a9d0984664e32dfb368373b3f6556382de0f72e3ea38dd710f4e6efc0ce8fca959e35c745243acc3 WHIRLPOOL 3fd03ee02267db0c4a24d7243a28e5e8017ee3f0936a2ffa2ce4c60c3e72ff47ab379f02cb7f95e45af081b12c7185605ca44fb9d1ff39ec80a0801a0811047a +AUX 1.4.1-uswsusp-hibernate-mode.patch 385 SHA256 c2495e09767a5d2ca3299e0e98f38d20abde06e3d700bf32f51a166d3e14b73d SHA512 b558aef41b93ffc528e18d80a82db99bef3afc19955a112437adb1dcae2342272f45d14de758ae07f496bf3f36b479b3439959ad2731ab76f75d60f55134e3b0 WHIRLPOOL 8ec555e2f1482db36ccbc1dba8073a4da645ac4185eb1af7bdce3fce96c9c71d5e5d296c8d50aa9322f03adaf9cf1a9eeaa8901d64dc94578fa74d4947681606 +AUX 1.4.1-xfs_buffer_arguments.patch 956 SHA256 f22e2ffe0ed6e0ef7e18ce48509eb3a1b4ea84facef73f30ce015c8bbf399fbf SHA512 5e3a3394f941833446b6d2ee0f0d0fb570e1bafc1ebbff218bdd67dc8f15b2f7e919e2b45157c761e924e32811c28a7b0eacd1a571bccdb4ceaa6f029f99c0f8 WHIRLPOOL b8ddd5d2934ca5a5e6d216603a44173be311a19ca49f95c7c3af2007a520e8ead984d77b54d82d8150a927e02bba555cfbb4085b13b180b2c46b3e2c98930b37 +AUX pm-utils.logrotate 157 SHA256 5109125cf5af3658f417a4e41e62eb45c722b3d74ef5d9b589ae6cf795b5cfe9 SHA512 70e9ef36928258e046f37d3369aad28c1222c1ca58956b57ba35a6476762228cd7b3a68bbf434c4b4936db3b4a921a50025e6da885632d7696f4f4c800310707 WHIRLPOOL 0383cf7db5111a0204662300894ac85191bf2fca1a1474b1e874ced0d8333dc23aa1dab4eff6b1f0566a22ab22c336b352eea418790f5360b11503f94e7d2128 +AUX power.d/pci_devices 1391 SHA256 cec8e843d992a01c98d51255674f86ec78ee2034f76bde917eb718c2b72d67e3 SHA512 62ec8d6b6704690304ab31612c6141a6f0362cde0a18c884606d1513afebad2acddb82268471bf57bd5a641604a6f196446c8da8d899ccc3e09c008db18df7b2 WHIRLPOOL ef807e96a8382ac569d2f577499ef33874217050870b2b28b99cdc77408eea1032b8818274158f3406a5c0a1bcff559a64544de6617a9520cd66614fa849e588 +AUX power.d/usb_bluetooth 1121 SHA256 f2f06d4a7179edf51a0022ca0f6d61b5013ace1f94944c8fac75f075d11c9e69 SHA512 b96abfdb8745f320ac3f1f368d1095195c68b0a56270aea4c5ad61e913ddc1641c5b5e1aadc6225d78f88956c4ffb2a396e031de02b9ecced09fac09765701bf WHIRLPOOL 6c82f5b5e2f844fea3a55a2ca7506e31862f3b1a21915d1a7c0b59b9860f0507c1c8c74b27d3e7acd8d5b5c79bb37fdd1abef554e4beef88c41e759bc6091306 +AUX sleep.d/50unload_alx 316 SHA256 7325ffde4b6cbb70eecfeafb301df4a053fe1db11cd3314275cdb3ca3af38a04 SHA512 64e7f77088a6157c90024d26ae6afde40abffc17d8ec2775e6a4ed17fac6c6fc1787c9f1b02cd0f4cd9e18dd74502f84e894006875b7dcacc39e509b3e0d86b0 WHIRLPOOL a5bc946803a0bedd84ff60938dcf98dd25b76374a8d9772475ff15d3d4807f51ef4b65b2ffad401e08a9b0b2b946a540155c5a0fc7ca884eeac85c90f79bbf60 +DIST pm-utils-1.4.1.tar.gz 208687 SHA256 8ed899032866d88b2933a1d34cc75e8ae42dcde20e1cc21836baaae3d4370c0b SHA512 5bc9479fe75f120aee136befeb24c8d7d85f61410b551177ed61fd1b4ea9cce7989796b067e357ea93b44b4ae9f66311687066f188236c5efdfd3750695a8017 WHIRLPOOL 7bf4752d96af776c90eb2d0319d615be157c8289551c72edb0c7fed05aeebbdc729f405d5ff04de401f4c12bfb8801e8b80242c3ba28e7b973442e51bf2374a3 +EBUILD pm-utils-1.4.1-r6.ebuild 2910 SHA256 a91a7590f474be52927c8f667f8f9f419455441087c2131b105270d879bc9868 SHA512 89762dd49c51124d4100f248ab39307f5916dcb0454439e9007abe601053b14cd8ff54c9381678af72cf9db9d462b242171475554577cb6395efdb600b37aa7f WHIRLPOOL 7e41398747864ad876d92680ddff784352ade9120044d3f94b676c85a8393a23bae3378856715e88fb32676f38627a285ce821ed6fdafa200bdac7014947a1e0 +EBUILD pm-utils-1.4.1-r7.ebuild 2954 SHA256 aa35ee2ae35ad2a1638facea105b2c0d4e0ea2200dd9069462d467a6f26b4de4 SHA512 a934a5594cc531db8e25f8a9e386abefbd1d84547d8773680309a8d06668b14d63a9155a6a03b168bffde665d6c958e191f1df9d6634e33443c87bb6a6e3bbbc WHIRLPOOL 4ac7f33761d44f9f876244940812092e4cf2b9fa79f5fbafd9838066f236e0aa90a3bedf83d4e5abe29dfc857b128a955f47aabbe626618d09c739830e9539ff +MISC ChangeLog 4292 SHA256 185360d74f62fe130105c2249d562cadbe063d3bdf1fe3da59ac405be26cfddb SHA512 005bb97e59b4325fb0545272dc17db77b2a2a6fc365c1d15677eee7476a468d87c9ae4d979cf2a26cfd1c939c41af1558726c5a6df84aa9fffad6b1fda2db0c8 WHIRLPOOL 4236e3322f93b7c53261e6cbe14d4d5a0530fb79cfcea697b9080ffbfd9d79673057bc1a355349984dc5cd40d48608a140ab1fe1e7c6027a5f9aee6233a222e0 +MISC ChangeLog-2015 12697 SHA256 c71bc84336a631c39228a45700a3f44aff6b6a6f7ecbc261f618c9671f0e2229 SHA512 004fe1880eae437af246124ee41259f2f7c18fa01e165b0ccee906e2b7c2045307dd120295cc2be8cd1785ac52a45cabe73a6a3ed0b3b111266b8a523d420e72 WHIRLPOOL 9e2ef7230b4dda9508fc5657368f9a6b83d68f9d0391dffa08c20c18febe82e08af904e63aee8961b389bdaa4c73c0bf4dca90309c4d683809ac2499f34d1ad2 +MISC metadata.xml 321 SHA256 a2d02d6ed75f6dd8f896ea4ba6be0015ddc0aeb6827bced520acf70b2162e8eb SHA512 8bbd7192ac92567bef9234c1725dd9abd12fbb2809d961d0f6690f05b9477e0d07ef6056a516b1eddb1c533c6b80560c9924d74f1e2fe57f682ca1e622354563 WHIRLPOOL e5e9ea74b111b1e6a4bb3f2045532f5899788e3a1fbe731c76e7a22628967b5685a3420bb84a69cd5d4e785f4e50888d2b7011367179bcb554a13815748f23cd diff --git a/sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch b/sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch new file mode 100644 index 000000000000..b41f32cf9165 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch @@ -0,0 +1,43 @@ +From 640b53438c20818b3e344343b58b1f1765606a85 Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martin.pitt@ubuntu.com> +Date: Mon, 31 Jan 2011 15:30:01 +0100 +Subject: [PATCH] 49bluetooth: Wait for btusb module to get unused + +The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't +synchronous, i. e. it doesn't wait until the module usage count actually drops +to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some +models/older kernels you need to do that to fix suspend problems), as at that +point the module is still in use. + +On my system (ThinkPad X201) the module takes between 0.3 and 0.5 seconds to +unload, so use 100 ms wait steps with a timeout of 2 seconds. + +Bug: https://bugs.freedesktop.org//show_bug.cgi?id=33759 +Bug-Ubuntu: https://launchpad.net/bugs/698331 +--- + pm/sleep.d/49bluetooth | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth +index d46ba49..0dc1909 100755 +--- a/pm/sleep.d/49bluetooth ++++ b/pm/sleep.d/49bluetooth +@@ -12,6 +12,15 @@ suspend_bluetooth() + if grep -q enabled /proc/acpi/ibm/bluetooth; then + savestate ibm_bluetooth enable + echo disable > /proc/acpi/ibm/bluetooth ++ ++ # wait for up to 2 seconds for the module to actually get ++ # unused ++ TIMEOUT=20 ++ while [ $TIMEOUT -ge 0 ]; do ++ [ `cat /sys/module/btusb/refcnt` = 0 ] && break ++ TIMEOUT=$((TIMEOUT-1)) ++ sleep 0.1 ++ done + else + savestate ibm_bluetooth disable + fi +-- +1.7.2.3 + diff --git a/sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch b/sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch new file mode 100644 index 000000000000..e3e3819b82eb --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch @@ -0,0 +1,24 @@ +Description: Disable SATA link power management by default, as it still causes disk errors and corruptions on many hardware. +Author: Martin Pitt <martin.pitt@ubuntu.com> +Bug-Ubuntu: https://launchpad.net/bugs/539467 + +--- pm/power.d/sata_alpm ++++ pm/power.d/sata_alpm +@@ -2,7 +2,7 @@ + + . "${PM_FUNCTIONS}" + +-SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true} ++SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false} + + help() { + cat <<EOF +@@ -16,7 +16,7 @@ + + This hook has 1 parameter: + SATA_ALPM_ENABLE = whether to use SATA ALPM on battery. +-Defaults to "true". ++Defaults to "false". + + EOF + } diff --git a/sys-power/pm-utils/files/1.4.1-echo-n.patch b/sys-power/pm-utils/files/1.4.1-echo-n.patch new file mode 100644 index 000000000000..354ccb6a7e65 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-echo-n.patch @@ -0,0 +1,51 @@ +From ffce4bc35a34b6b543e2ae2828a3096a19ebb1ae Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev <tetromino@gentoo.org> +Date: Tue, 28 Jul 2015 22:24:56 -0400 +Subject: [PATCH] Avoid -n in "echo -n foo > /sys/bar" + +It's not portable and not needed. + +https://bugs.freedesktop.org/show_bug.cgi?id=91497 + +[ Rebased on top of Gentoo's -r6 patchset. ] +--- + pm/pm-functions.in | 8 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/pm/pm-functions.in b/pm/pm-functions.in +index c82be30..a68f955 100644 +--- a/pm/pm-functions.in ++++ b/pm/pm-functions.in +@@ -296,13 +296,13 @@ + if [ -z "$SUSPEND_MODULE" ]; then + if grep -q mem /sys/power/state; then + SUSPEND_MODULE="kernel" +- do_suspend() { echo -n "mem" >/sys/power/state; } ++ do_suspend() { echo "mem" >/sys/power/state; } + elif [ -c /dev/pmu ] && pm-pmu --check; then + SUSPEND_MODULE="kernel" + do_suspend() { pm-pmu --suspend; } + elif grep -q standby /sys/power/state; then + SUSPEND_MODULE="kernel" +- do_suspend() { echo -n "standby" >/sys/power/state; } ++ do_suspend() { echo "standby" >/sys/power/state; } + fi + fi + +@@ -317,10 +317,10 @@ + HIBERNATE_MODE_SAVE=$(cat /sys/power/disk) && \ + HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE##*[}" && \ + HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE%%]*}" && \ +- echo -n "${HIBERNATE_MODE}" > /sys/power/disk +- echo -n "disk" > /sys/power/state ++ echo "${HIBERNATE_MODE}" > /sys/power/disk ++ echo "disk" > /sys/power/state + RET=$? +- echo -n "$HIBERNATE_MODE_SAVE" > /sys/power/disk ++ echo "$HIBERNATE_MODE_SAVE" > /sys/power/disk + return "$RET" + } + fi +-- +2.4.6 + diff --git a/sys-power/pm-utils/files/1.4.1-fix-alpm-typo.patch b/sys-power/pm-utils/files/1.4.1-fix-alpm-typo.patch new file mode 100644 index 000000000000..799369159ff2 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-fix-alpm-typo.patch @@ -0,0 +1,29 @@ +From 93d46b88f415c1931b017856e3162c192bfba07c Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martin.pitt@ubuntu.com> +Date: Wed, 11 Jan 2012 15:39:53 +0100 +Subject: [PATCH 3/3] Fix typo in sata_alpm +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ALPM → APLM + +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44676 +Bug-Ubuntu: https://launchpad.net/bugs/900930 +--- + pm/power.d/sata_alpm | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pm/power.d/sata_alpm b/pm/power.d/sata_alpm +index 5ede307..400e1e7 100644 +--- a/pm/power.d/sata_alpm ++++ b/pm/power.d/sata_alpm +@@ -28,7 +28,7 @@ set_sata_alpm() { + [ "${kv%-*}" \< "2.6.33" ] && exit $NA # avoid fs corruption + for f in /sys/class/scsi_host/host*; do + [ -w "$f/link_power_management_policy" ] || continue +- printf "Setting SATA APLM on %s to %s..." "${f##*/}" "$1" ++ printf "Setting SATA ALPM on %s to %s..." "${f##*/}" "$1" + echo "$1" > "$f/link_power_management_policy" && echo Done. || \ + echo Failed. + done diff --git a/sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch b/sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch new file mode 100644 index 000000000000..2d884da1e7b6 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch @@ -0,0 +1,40 @@ +From: Florian Kriener <florian@kriener.org> +To: submit@bugs.debian.org +Subject: [pm-utils] wrong path in intel-audio-powersave (and a small bug) +Date: Sat, 25 Sep 2010 11:27:30 +0200 + +In the script intel-audio-powersave is this loop + +for dev in /sys/module/snd_*/parameters/power_save; do + [ -w "$dev/parameters/power_save" ] || continue + printf "Setting power savings for $s to %d..." "$dev##*/" "$1" + echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed. +done + +I think it should be + +for dev in /sys/module/snd_*; do + [ -w "$dev/parameters/power_save" ] || continue + printf "Setting power savings for %s to %d..." "${dev##*/}" "$1" + echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed. +done + + +This fixes the two bugs. + +diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave +index 36675a8..da63e40 100644 +--- a/pm/power.d/intel-audio-powersave ++++ b/pm/power.d/intel-audio-powersave +@@ -20,9 +20,9 @@ EOF + + audio_powersave() { + [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA +- for dev in /sys/module/snd_*/parameters/power_save; do ++ for dev in /sys/module/snd_*; do + [ -w "$dev/parameters/power_save" ] || continue +- printf "Setting power savings for $s to %d..." "$dev##*/" "$1" ++ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1" + echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed. + done + } diff --git a/sys-power/pm-utils/files/1.4.1-ignore-led-failure.patch b/sys-power/pm-utils/files/1.4.1-ignore-led-failure.patch new file mode 100644 index 000000000000..7b8e4f2da1d1 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-ignore-led-failure.patch @@ -0,0 +1,14 @@ +Description: LED operation should not block S3/S4 +Author: Adam Lee <adam8157@gmail.com> + +Some Lenovo Thinkpad models don't have a suspend LED, this should not +block S3/S4. + +--- pm/sleep.d/95led ++++ pm/sleep.d/95led +@@ -14,3 +14,5 @@ + *) exit $NA + ;; + esac ++ ++exit 0 diff --git a/sys-power/pm-utils/files/1.4.1-inhibit-on-right-status.patch b/sys-power/pm-utils/files/1.4.1-inhibit-on-right-status.patch new file mode 100644 index 000000000000..250ae0872fbd --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-inhibit-on-right-status.patch @@ -0,0 +1,20 @@ +Description: Do not use the exit status of log rather the exit status of the hook. + +http://bugs.freedesktop.org/show_bug.cgi?id=32210 +http://bugs.gentoo.org/360673 + +--- pm/pm-functions.in ++++ pm/pm-functions.in +@@ -197,9 +197,11 @@ + # rest of args passed to hook unchanged. + log "Running hook $*:" + hook_ok "$1" && "$@" ++ # log() changes the return value, so save it for later ++ local status=$? + log "" + log -n "$*: " +- hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit ++ hook_exit_status $status && LAST_HOOK="${1##*/}" || inhibit + } + + if profiling; then diff --git a/sys-power/pm-utils/files/1.4.1-logging-append.patch b/sys-power/pm-utils/files/1.4.1-logging-append.patch new file mode 100644 index 000000000000..7a5d682b122d --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-logging-append.patch @@ -0,0 +1,17 @@ +Author: James Westby <james.westby@ubuntu.com> +Description: Do not clear the log file on each operation, but instead append to it. + This makes debugging of several suspends much easier. +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25255 +Bug-Ubuntu: https://launchpad.net/bugs/410352 + +--- pm/pm-functions.in ++++ pm/pm-functions.in +@@ -271,7 +271,7 @@ + return 1 + fi + export LOGGING=true +- exec > "$1" 2>&1 ++ exec >> "$1" 2>&1 + } + + check_suspend() { [ -n "$SUSPEND_MODULE" ]; } diff --git a/sys-power/pm-utils/files/1.4.1-run-hook-logging.patch b/sys-power/pm-utils/files/1.4.1-run-hook-logging.patch new file mode 100644 index 000000000000..19ac4064d791 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-run-hook-logging.patch @@ -0,0 +1,17 @@ +Description: In suspend log, put empty line after running the hook, not in between. +Author: Dominique Brazziel <dbrazziel@snet.net> +Bug-Debian: http://bugs.debian.org/661168 + +--- pm/pm-functions.in ++++ pm/pm-functions.in +@@ -199,9 +199,9 @@ + hook_ok "$1" && "$@" + # log() changes the return value, so save it for later + local status=$? +- log "" + log -n "$*: " + hook_exit_status $status && LAST_HOOK="${1##*/}" || inhibit ++ log "" + } + + if profiling; then diff --git a/sys-power/pm-utils/files/1.4.1-suspend-hybrid.patch b/sys-power/pm-utils/files/1.4.1-suspend-hybrid.patch new file mode 100644 index 000000000000..8d92002733f3 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-suspend-hybrid.patch @@ -0,0 +1,36 @@ +Description: Add support for in-kernel suspend to both +Author: Bojan Smojver <bojan@rexursive.com> +Author: Jaroslav Škarvada <jskarvad@redhat.com> +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=52572 +Bug-Ubuntu: https://launchpad.net/bugs/1172692 + +--- pm/pm-functions.in ++++ pm/pm-functions.in +@@ -336,8 +336,28 @@ + { + [ -n "${HIBERNATE_MODE}" ] && \ + grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \ ++ HIBERNATE_MODE_SAVE=$(cat /sys/power/disk) && \ ++ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE##*[}" && \ ++ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE%%]*}" && \ + echo -n "${HIBERNATE_MODE}" > /sys/power/disk + echo -n "disk" > /sys/power/state ++ RET=$? ++ echo -n "$HIBERNATE_MODE_SAVE" > /sys/power/disk ++ return "$RET" ++ } ++fi ++ ++# for kernels that support suspend to both (i.e. hybrid suspend) ++# since kernel 3.6 ++if [ -z "$SUSPEND_HYBRID_MODULE" ] && \ ++ [ -f /sys/power/disk ] && \ ++ grep -q disk /sys/power/state && \ ++ grep -q suspend /sys/power/disk; then ++ SUSPEND_HYBRID_MODULE="kernel" ++ do_suspend_hybrid() ++ { ++ HIBERNATE_MODE="suspend" ++ do_hibernate + } + fi diff --git a/sys-power/pm-utils/files/1.4.1-uswsusp-hibernate-mode.patch b/sys-power/pm-utils/files/1.4.1-uswsusp-hibernate-mode.patch new file mode 100644 index 000000000000..8c970698d5bb --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-uswsusp-hibernate-mode.patch @@ -0,0 +1,19 @@ +Description: Check HIBERNATE_MODE in uswsusp module +Author: Vadim Solomin <vadic052@gmail.com> +Bug-Debian: http://bugs.debian.org/589553 + +--- pm/module.d/uswsusp ++++ pm/module.d/uswsusp +@@ -87,7 +87,11 @@ + HIBERNATE_MODULE="uswsusp" + do_hibernate() + { +- s2disk ++ if [ -n "$HIBERNATE_MODE" ]; then ++ s2disk -P "shutdown method=$HIBERNATE_MODE" ++ else ++ s2disk ++ fi + } + fi + diff --git a/sys-power/pm-utils/files/1.4.1-xfs_buffer_arguments.patch b/sys-power/pm-utils/files/1.4.1-xfs_buffer_arguments.patch new file mode 100644 index 000000000000..3eee91166f88 --- /dev/null +++ b/sys-power/pm-utils/files/1.4.1-xfs_buffer_arguments.patch @@ -0,0 +1,31 @@ +From fdc626dadfd985e823f4e828f2a542c945aea219 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@st.com> +Date: Tue, 10 Jan 2012 11:21:02 +0100 +Subject: [PATCH 2/2] pm/power.d/xfs_buffer: Fix wrong argument ordering + +Write the values in the correct order. + +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44620 +Bug-Ubuntu: https://launchpad.net/bugs/645974 + +Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com> +--- + pm/power.d/xfs_buffer | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/pm/power.d/xfs_buffer b/pm/power.d/xfs_buffer +index d21e845..9f06f6e 100644 +--- a/pm/power.d/xfs_buffer ++++ b/pm/power.d/xfs_buffer +@@ -59,7 +59,7 @@ xfs_ac() { + xfs_battery() { + state_exists xfs_buffer_default || \ + read_values |savestate xfs_buffer_default +- write_values "$XFS_AGE_BUFFER" "$XFS_BUFD" "$XFS_SYNCD" ++ write_values "$XFS_AGE_BUFFER" "$XFS_SYNCD" "$XFS_BUFD" + } + + case $1 in +-- +1.7.7.3 + diff --git a/sys-power/pm-utils/files/pm-utils.logrotate b/sys-power/pm-utils/files/pm-utils.logrotate new file mode 100644 index 000000000000..85de40035092 --- /dev/null +++ b/sys-power/pm-utils/files/pm-utils.logrotate @@ -0,0 +1,8 @@ +/var/log/pm-suspend.log /var/log/pm-powersave.log { + monthly + rotate 4 + delaycompress + compress + notifempty + missingok +} diff --git a/sys-power/pm-utils/files/power.d/pci_devices b/sys-power/pm-utils/files/power.d/pci_devices new file mode 100644 index 000000000000..c06b706d82a7 --- /dev/null +++ b/sys-power/pm-utils/files/power.d/pci_devices @@ -0,0 +1,61 @@ +#!/bin/sh + +# +# This script adjusts the power control of a set of PCI devices that +# prove beneficial to enable power savings +# + +PCI_DEVICES_PM_ENABLE="${PCI_DEVICES_PM_ENABLE:-true}" + +set_pci_device() +{ + for dev in /sys/bus/pci/devices/* ; do + if [ -e $dev/class -a -e $dev/power/control ]; then + id=`basename $dev` + case `cat $dev/class` in + 0x020000) # ethernet + echo "Setting Ethernet device $id to $1" + echo $1 > $dev/power/control + ;; + 0x028000) # wireless + echo "Setting Wireless device $id to $1" + echo $1 > $dev/power/control + ;; + 0x040300) # audio + echo "Setting Audio device $id to $1" + echo $1 > $dev/power/control + ;; + 0x060000) # host bridge + echo "Setting Host Bridge $id to $1" + echo $1 > $dev/power/control + ;; + 0x080500) # SD card reader + echo "Setting SD card reader device $id to $1" + echo $1 > $dev/power/control + ;; + 0x088000|0x088001) # card reader + echo "Setting card reader device $id to $1" + echo $1 > $dev/power/control + ;; + 0x0c0000|0x0c0010) # firewire + echo "Setting FireWire device $id to $1" + echo $1 > $dev/power/control + ;; + esac + fi + done +} + +case "$1" in + true) # powersaving on + [ "$PCI_DEVICES_PM_ENABLE" = true ] && set_pci_device "auto" + ;; + false) # powersaving off + [ "$PCI_DEVICES_PM_ENABLE" = true ] && set_pci_device "on" + ;; + *) + exit 254 + ;; +esac + +exit 0 diff --git a/sys-power/pm-utils/files/power.d/usb_bluetooth b/sys-power/pm-utils/files/power.d/usb_bluetooth new file mode 100644 index 000000000000..615d19e95631 --- /dev/null +++ b/sys-power/pm-utils/files/power.d/usb_bluetooth @@ -0,0 +1,45 @@ +#!/bin/sh + +# +# This script adjusts the USB bluetooth device settings via the USB +# power control. This simply sets this to "auto" for power saving and to "on" +# for non-power saving. This has been shown to save about 1W on some +# systems. +# +# According to http://www.usb.org/developers/defined_class +# USB wireless bluetooth devices have baseclass 0xe0, subclass 0x01, +# protocol 0x01 +# + +USB_BLUETOOTH_PM_ENABLE="${USB_BLUETOOTH_PM_ENABLE:-true}" + +set_usb_bluetooth() +{ + for dev in /sys/bus/usb/devices/* ; do + if [ -e $dev/bDeviceClass -a \ + -e $dev/bDeviceSubClass -a \ + -e $dev/bDeviceProtocol -a \ + -e $dev/power/control ]; then + if [ x`cat $dev/bDeviceClass` = xe0 -a \ + x`cat $dev/bDeviceSubClass` = x01 -a \ + x`cat $dev/bDeviceProtocol` = x01 ]; then + echo Setting $dev to $1 + echo $1 > $dev/power/control + fi + fi + done +} + +case "$1" in + true) # powersaving on + [ "$USB_BLUETOOTH_PM_ENABLE" = true ] && set_usb_bluetooth "auto" + ;; + false) # powersaving off + [ "$USB_BLUETOOTH_PM_ENABLE" = true ] && set_usb_bluetooth "on" + ;; + *) + exit 254 + ;; +esac + +exit 0 diff --git a/sys-power/pm-utils/files/sleep.d/50unload_alx b/sys-power/pm-utils/files/sleep.d/50unload_alx new file mode 100644 index 000000000000..6d352c50f7c0 --- /dev/null +++ b/sys-power/pm-utils/files/sleep.d/50unload_alx @@ -0,0 +1,18 @@ +#!/bin/sh + +# 50unload_alx: unload the alx module during suspend (LP #1173952) + +[ -d /sys/module/alx ] || exit 0 + +. "${PM_FUNCTIONS}" + +case "$1" in + suspend) + echo "Unloading alx kernel module ..." + modunload alx && echo Done. || echo Failed. + ;; + resume) + echo "Reloading alx kernel module ..." + ;; +esac +exit 0 diff --git a/sys-power/pm-utils/metadata.xml b/sys-power/pm-utils/metadata.xml new file mode 100644 index 000000000000..26e2876f1a74 --- /dev/null +++ b/sys-power/pm-utils/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 type="project"> + <email>freedesktop-bugs@gentoo.org</email> + </maintainer> + <use> + <flag name="ntp">Install support for <pkg>net-misc/ntp</pkg></flag> + </use> +</pkgmetadata> diff --git a/sys-power/pm-utils/pm-utils-1.4.1-r6.ebuild b/sys-power/pm-utils/pm-utils-1.4.1-r6.ebuild new file mode 100644 index 000000000000..f7ada2b2e566 --- /dev/null +++ b/sys-power/pm-utils/pm-utils-1.4.1-r6.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils multilib + +DESCRIPTION="Suspend and hibernation utilities" +HOMEPAGE="https://pm-utils.freedesktop.org/" +SRC_URI="https://pm-utils.freedesktop.org/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sparc x86" +IUSE="alsa debug ntp video_cards_intel video_cards_radeon" + +vbetool="!video_cards_intel? ( sys-apps/vbetool )" +RDEPEND="!<app-laptop/laptop-mode-tools-1.55-r1 + !sys-power/powermgmt-base[-pm-utils(+)] + sys-apps/dbus + >=sys-apps/util-linux-2.13 + sys-power/pm-quirks + alsa? ( media-sound/alsa-utils ) + ntp? ( || ( net-misc/ntp net-misc/openntpd ) ) + amd64? ( ${vbetool} ) + x86? ( ${vbetool} ) + video_cards_radeon? ( app-laptop/radeontool )" +DEPEND="${RDEPEND}" + +DOCS="AUTHORS ChangeLog NEWS pm/HOWTO* README* TODO" + +src_prepare() { + local ignore="01grub" + use ntp || ignore+=" 90clock" + + use debug && echo 'PM_DEBUG="true"' > "${T}"/gentoo + echo "HOOK_BLACKLIST=\"${ignore}\"" >> "${T}"/gentoo + + epatch \ + "${FILESDIR}"/${PV}-bluetooth-sync.patch \ + "${FILESDIR}"/${PV}-disable-sata-alpm.patch \ + "${FILESDIR}"/${PV}-fix-intel-audio-powersave-hook.patch \ + "${FILESDIR}"/${PV}-logging-append.patch \ + "${FILESDIR}"/${PV}-fix-alpm-typo.patch \ + "${FILESDIR}"/${PV}-inhibit-on-right-status.patch \ + "${FILESDIR}"/${PV}-ignore-led-failure.patch \ + "${FILESDIR}"/${PV}-run-hook-logging.patch \ + "${FILESDIR}"/${PV}-suspend-hybrid.patch \ + "${FILESDIR}"/${PV}-uswsusp-hibernate-mode.patch \ + "${FILESDIR}"/${PV}-xfs_buffer_arguments.patch +} + +src_configure() { + econf --disable-doc +} + +src_install() { + default + doman man/*.{1,8} + + # Remove duplicate documentation install + rm -r "${ED}"/usr/share/doc/${PN} + + insinto /etc/pm/config.d + doins "${T}"/gentoo + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} #408091 + + exeinto /usr/$(get_libdir)/${PN}/sleep.d + doexe "${FILESDIR}"/sleep.d/50unload_alx + + exeinto /usr/$(get_libdir)/${PN}/power.d + doexe "${FILESDIR}"/power.d/{pci_devices,usb_bluetooth} + + # No longer required with current networkmanager (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/sleep.d/55NetworkManager + + # No longer required with current kernels (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/sleep.d/49bluetooth + + # Punt HAL related file wrt #401257 (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/hal-cd-polling + + # Punt hooks which have shown to not reduce, or even increase power usage + # (rm -f from debian rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/{journal-commit,readahead} + + # Remove hooks which are not stable enough yet (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/harddrive + + # Change to executable (chmod +x from debian/rules) + fperms +x /usr/$(get_libdir)/${PN}/defaults +} diff --git a/sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild b/sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild new file mode 100644 index 000000000000..774ad3b31331 --- /dev/null +++ b/sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils multilib + +DESCRIPTION="Suspend and hibernation utilities" +HOMEPAGE="https://pm-utils.freedesktop.org/" +SRC_URI="https://pm-utils.freedesktop.org/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86" +IUSE="alsa debug ntp video_cards_intel video_cards_radeon" + +vbetool="!video_cards_intel? ( sys-apps/vbetool )" +RDEPEND="!<app-laptop/laptop-mode-tools-1.55-r1 + !sys-power/powermgmt-base[-pm-utils(+)] + sys-apps/dbus + >=sys-apps/util-linux-2.13 + sys-power/pm-quirks + alsa? ( media-sound/alsa-utils ) + ntp? ( || ( net-misc/ntp net-misc/openntpd ) ) + amd64? ( ${vbetool} ) + x86? ( ${vbetool} ) + video_cards_radeon? ( app-laptop/radeontool )" +DEPEND="${RDEPEND}" + +DOCS="AUTHORS ChangeLog NEWS pm/HOWTO* README* TODO" + +src_prepare() { + local ignore="01grub" + use ntp || ignore+=" 90clock" + + use debug && echo 'PM_DEBUG="true"' > "${T}"/gentoo + echo "HOOK_BLACKLIST=\"${ignore}\"" >> "${T}"/gentoo + + epatch \ + "${FILESDIR}"/${PV}-bluetooth-sync.patch \ + "${FILESDIR}"/${PV}-disable-sata-alpm.patch \ + "${FILESDIR}"/${PV}-fix-intel-audio-powersave-hook.patch \ + "${FILESDIR}"/${PV}-logging-append.patch \ + "${FILESDIR}"/${PV}-fix-alpm-typo.patch \ + "${FILESDIR}"/${PV}-inhibit-on-right-status.patch \ + "${FILESDIR}"/${PV}-ignore-led-failure.patch \ + "${FILESDIR}"/${PV}-run-hook-logging.patch \ + "${FILESDIR}"/${PV}-suspend-hybrid.patch \ + "${FILESDIR}"/${PV}-uswsusp-hibernate-mode.patch \ + "${FILESDIR}"/${PV}-xfs_buffer_arguments.patch \ + "${FILESDIR}"/${PV}-echo-n.patch +} + +src_configure() { + econf --disable-doc +} + +src_install() { + default + doman man/*.{1,8} + + # Remove duplicate documentation install + rm -r "${ED}"/usr/share/doc/${PN} + + insinto /etc/pm/config.d + doins "${T}"/gentoo + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} #408091 + + exeinto /usr/$(get_libdir)/${PN}/sleep.d + doexe "${FILESDIR}"/sleep.d/50unload_alx + + exeinto /usr/$(get_libdir)/${PN}/power.d + doexe "${FILESDIR}"/power.d/{pci_devices,usb_bluetooth} + + # No longer required with current networkmanager (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/sleep.d/55NetworkManager + + # No longer required with current kernels (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/sleep.d/49bluetooth + + # Punt HAL related file wrt #401257 (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/hal-cd-polling + + # Punt hooks which have shown to not reduce, or even increase power usage + # (rm -f from debian rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/{journal-commit,readahead} + + # Remove hooks which are not stable enough yet (rm -f from debian/rules) + rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/harddrive + + # Change to executable (chmod +x from debian/rules) + fperms +x /usr/$(get_libdir)/${PN}/defaults +} diff --git a/sys-power/pmtools/Manifest b/sys-power/pmtools/Manifest new file mode 100644 index 000000000000..0a41bbe80df6 --- /dev/null +++ b/sys-power/pmtools/Manifest @@ -0,0 +1,13 @@ +AUX pmtools-20071116-64bit.patch 674 SHA256 4c2087bf707eeac438b9d4ef0934de5531b2ab3d1e1f28fb0fddac2ac0940516 SHA512 6683f2e1c06275af9ac789a22005662ae3a9e84f5333ebd6fcc7a524d9298b2e87e4b259d0e2c2edb236821b5221180ffd2de3128fa98e4ef8dd668b7f305290 WHIRLPOOL 978f1be14e7ef0fe394a5c79cce74b07eda26a7422a8beca4e97faf2c77fe7b9d4d38771e15074cf028e6f3988bfd9c88e536002d5335a83263fbada74e49c70 +AUX pmtools-20071116-acpixtract-pmtools.patch 1909 SHA256 90d0b281563a3389ff90d2bcd3cea7492876c395c80e7050fe14a8f1f244d235 SHA512 f78c199761f5ca82433bc8cb02fcdeba9b88d58e3d2f853fecdda2682929ccbf8d25df460ae4d78dcba97ff025ce3ddd7819978f65cf68862694d8c5b93b1017 WHIRLPOOL b61969888740fd373298c6a13ac210551df90484fcc2b2feceaa8e3e52199e19058b32b5fd0eae86044746f219e0e9b1325e8cba114287d63dcb7cd165f8bcb3 +AUX pmtools-20100123-acpixtract-pmtools.patch 1822 SHA256 742d457f572fa30029f28998640ee6a4f8bc38ff12cebefd0063247bcd3bac8c SHA512 82d86c85ab481c1aca191c67e825c0a0bd3467b7ef9b92dadbb3fa58e1cc131b10f6e88431c83ca7289c96a304c8a1d65f798280a9fe3300f1b1f998baa7b2ee WHIRLPOOL c3e29eea56880d6475920b1b5fe7a4a14a48966e0f56cee25836b49f78d281f2f9a19b0d8a16ab977178341aee7cd53fd9aeac00335a441905c18edaf3f00b63 +AUX pmtools-20100123-madt.patch 1191 SHA256 eb01a911c3b4261a1d80478c88b48c1c11bde01cd1de1f4b8dc97c9fd6163bf0 SHA512 3984c4a26248a2b152009ab3703e3fd894abd8a12716aaa7f4913b8a8d922c2a60e7e987e401a0c93c56398b63c36013bcbf7b9c51d1c119f6aa7e67e2657594 WHIRLPOOL 1b9dac67d6452cd9415bbbe671681c5449aff461597cd10702c9ef518df274f63700ec738df2fbb8a43efd233d397f3f8b6c55407413557ae76fca2ff19f6c7b +AUX pmtools-20101124-cflags-ldflags.patch 1743 SHA256 030dcbd4a327e9088f8f121e1e5a880d0564e6e28ec406a6cab23601690c8823 SHA512 63342f0f1f630eeb74dbe45eddd92b4be4794b34d93f691442bb6a761798d25967d93c73389ef0abace8a285efb91677493996948a34e981959782f493963dc0 WHIRLPOOL 89e50d41a33fbffbbad44a5a1f6a70dd90524bc9790878fb30b41c89c8c7c5f7a888f56b419fd0e8c780318a39978c870d574f734d561da820758d7bf5921609 +DIST pmtools-20071116.tar.gz 51566 SHA256 91751774976e39f6237efd0326eb35196a9346220b92ad35894a33283e872748 SHA512 119bc23c1e692591cf4f10c9a81da80de975091aa7c5d8df40b337ea127a94ac95e94eedf9676166cdc92a594ad9bb3918011056fadeca86f6808135ca26ae8b WHIRLPOOL fcb849fc37373d80798468cb461e7cfa43fce4ef42effeee2fac811cc6229de4c86630441b6477c4129cb2ccb5eed3c60ff8914f998c6831f1e20e27d04072b7 +DIST pmtools-20110323.tar.gz 62002 SHA256 192ee6623ecb96cdcf20c73d8b93eadce003a343b3bab10f08a950ef3667a77a SHA512 81108c011b45c58c02013a3653c2d00bc2a9a9d80bf85438a193a4fed04a3fd2890d9cd4d64ab455e3e9c1613d35a6be59698395d9a27ca0a858e3935439bafd WHIRLPOOL 047828586a2e28af69be39b77b6a95766d7ac8040bf434d8e5d1064d3abe50e318c9ce352ae580f0c29a486208e4697d99eabddfd10a797b744d05ac6e1b3585 +EBUILD pmtools-20071116.ebuild 1280 SHA256 d1ccee34bb8e088dac4a242d5e3f0ddcdbb9efde1eba30afc43b30ae6bb0657e SHA512 c8865ff1249b9ea9a61a4e92b47ce1562fa048ec424c7659bb285d63e0e1a560b1c3576db2f07aa39db223df69d1182c07f351db905bcf285a6ed4f380b90163 WHIRLPOOL 13c2439ab76edef74f183daca516ffb2f950be84f04f82977f6d55ca51b64755deb4bdaf0352b02d7823e9535a17c365d4a335270bfd5a08caf55f2d3ffe9dc0 +EBUILD pmtools-20110323-r1.ebuild 1319 SHA256 1bbeffa97794d7068e509ebc030213c8a49a044e0d00f7e6cdbb660ff9f7e1e7 SHA512 34be174a0d6ecf3230bc4817777f84e3d299691d106e2d4fb934670b89f1f2b04fbb8a429a37b809e5fa68a8194082da2ce571841601d2132dd690a933dade3b WHIRLPOOL 2b0df22223ae4a3ae090fa35fc971c0e31181b890aa70ed4ca4e4fea2c8bbe22033644ded5f7a016c179f20e985d55f2b4f9ac77b417a7f6d637e58f8de53d15 +EBUILD pmtools-20110323.ebuild 1513 SHA256 72d6b3b79b5898202576eafda47d41d9b53ce8c25bf45f967cc526c1cabfc36b SHA512 0b9204f0add25d778ecc00249ab94caa864a10e136a35f6cb3e8737732c355f3ddb1d2536f5ce5c400510b521e037b663cc782049337a986895e47c9d274b389 WHIRLPOOL 7599d0d1b5584e9fe7c1bdc7765b70ee2a6f1b898b7c6c593826184276f4dc21f6182b993bc0f75e869f9feb86423afbc06583f1a8392bffb986d8cb1e2bdd11 +MISC ChangeLog 3506 SHA256 e0d48e7183257580fd40c6a9b7d1059a6ac9e86da6d67ecb0a181cdde8af5a9a SHA512 18cd3633794459c9ef20051b8e7eaed4210cd4d6aa20a5596c66d5bb60ad86feb9c5f7174312e722bd450500928123e2b7d9ca8139ff8c84e7a3ca816b900748 WHIRLPOOL db7aff594a87261a87f2fd32fc1d160e77cc7f1d83fb431ba9f42f3e4821427a68273cc4260cb5ea655ce00caee4c4461f2d22253281fab6710292d4ac687ecd +MISC ChangeLog-2015 5247 SHA256 209c69860ba8af73c161e85cba7b139fe2ef3e7fae358136d4c9b10fa3e8ac41 SHA512 cd9f3fb4103dd8d5ebb49b77864a53bc1948bc7bd9e7064800f6c1a0cdf7d68d20506fc4d6042e8a4c3968c994be23d2bec1586080ce6ece80a49ef04db2a784 WHIRLPOOL 3cc4874339bf2ea99d00f5cad4b1734fa67b41dc4ec0c9e11aca1ce48ee12da472df463a6773b3e342ce4b51b4f206f698b89935823e751f95d8a8ec2b178de6 +MISC metadata.xml 643 SHA256 29edec12cac5cc822089d9130feb50998e8ea4da32391c43de062556bc1f7d8a SHA512 b5d35fb4bc2ad9062c9d089447521adcd717dd4b88ac54a49b56cc9a334ad9c6020ea66d5c0aaeb575b25143d1714f15e0b83025fe8859fd9f010091409a48f2 WHIRLPOOL 556ebaacc778e0cfd5a6387c0bb3f383897633d6b9e73fa58bdd2a9fa2d2173884fd49fe2f44b599bcea5dee713e8b2e75741dbbbd91264b170ce73f7a520f86 diff --git a/sys-power/pmtools/files/pmtools-20071116-64bit.patch b/sys-power/pmtools/files/pmtools-20071116-64bit.patch new file mode 100644 index 000000000000..756ac8412abe --- /dev/null +++ b/sys-power/pmtools/files/pmtools-20071116-64bit.patch @@ -0,0 +1,20 @@ +--- madt/madt.c.orig ++++ madt/madt.c +@@ -46,7 +46,7 @@ + { + size_t retval; + +- if (verbose) printf("reading %d byte entry header\n", sizeof(acpi_table_entry_header)); ++ if (verbose) printf("reading %ld byte entry header\n", sizeof(acpi_table_entry_header)); + retval = fread((void *)entry_header, sizeof(acpi_table_entry_header), 1, stdin); + return retval; + } +@@ -64,7 +64,7 @@ + + bytes_read = csum = 0; + +- if (verbose) printf("reading %d madt header\n", sizeof(struct acpi_table_madt)); ++ if (verbose) printf("reading %ld madt header\n", sizeof(struct acpi_table_madt)); + + retval = fread((void *)buffer, sizeof(struct acpi_table_madt), 1, stdin); + if (retval != 1) { diff --git a/sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch b/sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch new file mode 100644 index 000000000000..1e733663f3ed --- /dev/null +++ b/sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch @@ -0,0 +1,42 @@ +diff -Nuar --exclude '*.orig' --exclude '*.rej' pmtools-20071116.orig/acpixtract/acpixtract.c pmtools-20071116/acpixtract/acpixtract.c +--- pmtools-20071116.orig/acpixtract/acpixtract.c 2007-11-16 10:45:44.000000000 -0800 ++++ pmtools-20071116/acpixtract/acpixtract.c 2008-06-06 18:28:34.203106692 -0700 +@@ -199,7 +199,7 @@ + void) + { + +- printf ("Usage: acpixtract [option] <InputFile>\n"); ++ printf ("Usage: acpixtract-pmtools [option] <InputFile>\n"); + printf ("\nExtract binary ACPI tables from text acpidump output\n"); + printf ("Default invocation extracts all DSDTs and SSDTs\n"); + printf ("Version %8.8X\n\n", VERSION); +diff -Nuar --exclude '*.orig' --exclude '*.rej' pmtools-20071116.orig/madt/README pmtools-20071116/madt/README +--- pmtools-20071116.orig/madt/README 2007-11-16 10:39:50.000000000 -0800 ++++ pmtools-20071116/madt/README 2008-06-06 18:30:18.101885794 -0700 +@@ -2,7 +2,7 @@ + Hacked out of Linux kernel code to do the same. + + # ./acpidmp > acpidump.txt +-$ acpixtract -a acpidump.txt ++$ acpixtract-pmtools -a acpidump.txt + $ madt < APIC.dat + + ACPI: APIC (v001 INTEL D845EBT2 0x20021021 MSFT 0x00000097) @ 0x(nil) +diff -Nuar --exclude '*.orig' --exclude '*.rej' pmtools-20071116.orig/README pmtools-20071116/README +--- pmtools-20071116.orig/README 2007-11-16 10:54:27.000000000 -0800 ++++ pmtools-20071116/README 2008-06-06 18:29:53.513505961 -0700 +@@ -24,11 +24,11 @@ + and it is why the output doesn't change when different + kernels are booted. + +-./acpidump/acpixtract +--------------------- ++./acpidump/acpixtract-pmtools ++----------------------------- + Convert ASCII acpidump output to raw binary tables: + +- $ acpixtract/acpixtract -a acpidump.txt ++ $ acpixtract/acpixtract-pmtools -a acpidump.txt + Acpi table [DSDT] - 15974 bytes written to DSDT.dat + Acpi table [FACS] - 64 bytes written to FACS.dat + Acpi table [FACP] - 116 bytes written to FACP.dat diff --git a/sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch b/sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch new file mode 100644 index 000000000000..feca654687b3 --- /dev/null +++ b/sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch @@ -0,0 +1,42 @@ +diff -Nuar pmtools-20100123.orig/acpixtract/acpixtract.c pmtools-20100123/acpixtract/acpixtract.c +--- pmtools-20100123.orig/acpixtract/acpixtract.c 2010-01-23 19:31:07.000000000 +0100 ++++ pmtools-20100123/acpixtract/acpixtract.c 2010-03-07 14:44:32.451141841 +0100 +@@ -199,7 +199,7 @@ + void) + { + +- printf ("Usage: acpixtract [option] <InputFile>\n"); ++ printf ("Usage: acpixtract-pmtools [option] <InputFile>\n"); + printf ("\nExtract binary ACPI tables from text acpidump output\n"); + printf ("Default invocation extracts all DSDTs and SSDTs\n"); + printf ("Version %8.8X\n\n", VERSION); +diff -Nuar pmtools-20100123.orig/madt/README pmtools-20100123/madt/README +--- pmtools-20100123.orig/madt/README 2005-11-11 18:07:04.000000000 +0100 ++++ pmtools-20100123/madt/README 2010-03-07 14:45:31.818052302 +0100 +@@ -1,7 +1,7 @@ + User utility to parse the ACPI MADT + Hacked out of Linux kernel code to do the same. + +-# ./acpidmp | ./acpixtract APIC | ./madt ++# ./acpidmp | ./acpixtract-pmtools APIC | ./madt + + ACPI: APIC (v001 INTEL D845EBT2 0x20021021 MSFT 0x00000097) @ 0x(nil) + ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) +diff -Nuar pmtools-20100123.orig/README pmtools-20100123/README +--- pmtools-20100123.orig/README 2010-01-23 19:31:52.000000000 +0100 ++++ pmtools-20100123/README 2010-03-07 14:47:18.286017297 +0100 +@@ -17,11 +17,11 @@ + + # ./acpidump > acpidump.out + +-./acpidump/acpixtract +--------------------- ++./acpidump/acpixtract-pmtools ++----------------------------- + Convert ASCII acpidump output to raw binary tables: + +- $ acpixtract/acpixtract -a acpidump.out ++ $ acpixtract/acpixtract-pmtools -a acpidump.out + Acpi table [DSDT] - 15974 bytes written to DSDT.dat + Acpi table [FACS] - 64 bytes written to FACS.dat + Acpi table [FACP] - 116 bytes written to FACP.dat diff --git a/sys-power/pmtools/files/pmtools-20100123-madt.patch b/sys-power/pmtools/files/pmtools-20100123-madt.patch new file mode 100644 index 000000000000..49aca9f4c76c --- /dev/null +++ b/sys-power/pmtools/files/pmtools-20100123-madt.patch @@ -0,0 +1,39 @@ +diff -Nuar pmtools-20100123.orig/madt/madt.c pmtools-20100123/madt/madt.c +--- pmtools-20100123.orig/madt/madt.c 2005-11-11 18:07:04.000000000 +0100 ++++ pmtools-20100123/madt/madt.c 2010-03-07 14:39:31.657017114 +0100 +@@ -26,8 +26,6 @@ + + #define printk printf + +-#include "./tables.c" +- + //#define INPUT_FILE "madt.dat" + //#include <sys/types.h> + //#include <sys/stat.h> +@@ -37,6 +35,8 @@ + #include <stdio.h> // fread + #include <stdlib.h> // malloc + ++#include "./tables.c" ++ + int verbose = 0; + /* + /* read standard input +diff -Nuar pmtools-20100123.orig/madt/Makefile pmtools-20100123/madt/Makefile +--- pmtools-20100123.orig/madt/Makefile 2005-11-11 18:07:04.000000000 +0100 ++++ pmtools-20100123/madt/Makefile 2010-03-07 14:34:17.486002917 +0100 +@@ -1,3 +1,5 @@ ++all: madt ++ + test: madt + ./madt < APIC + madt: madt.c acpi.h tables.c +diff -Nuar pmtools-20100123.orig/Makefile pmtools-20100123/Makefile +--- pmtools-20100123.orig/Makefile 2010-01-23 19:18:18.000000000 +0100 ++++ pmtools-20100123/Makefile 2010-03-07 14:33:01.729955480 +0100 +@@ -1,4 +1,4 @@ +-DIRS = acpidump acpixtract turbostat ++DIRS = acpidump acpixtract madt turbostat + + all: + for i in $(DIRS); do $(MAKE) -C $$i $@; done diff --git a/sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch b/sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch new file mode 100644 index 000000000000..0ae69e8c46d4 --- /dev/null +++ b/sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch @@ -0,0 +1,48 @@ +diff -Nuar pmtools-20100123.orig/acpidump/Makefile pmtools-20100123/acpidump/Makefile +--- pmtools-20100123.orig/acpidump/Makefile 2006-11-30 13:41:15.000000000 +0100 ++++ pmtools-20100123/acpidump/Makefile 2010-03-07 14:19:12.337141824 +0100 +@@ -1,11 +1,11 @@ + PROG= acpidump + SRCS= acpidump.c + KERNEL_INCLUDE := ../include +-CFLAGS += -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Os -s -D_LINUX -DDEFINE_ALTERNATE_TYPES -I$(KERNEL_INCLUDE) ++CFLAGS += -Wall -Wstrict-prototypes -Wdeclaration-after-statement -D_LINUX -DDEFINE_ALTERNATE_TYPES -I$(KERNEL_INCLUDE) + + all: acpidump + $(PROG) : $(SRCS) +- $(CC) $(CFLAGS) $(SRCS) -o $(PROG) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG) + + CLEANFILES= $(PROG) + +diff -Nuar pmtools-20100123.orig/acpixtract/Makefile pmtools-20100123/acpixtract/Makefile +--- pmtools-20100123.orig/acpixtract/Makefile 2006-11-30 13:45:06.000000000 +0100 ++++ pmtools-20100123/acpixtract/Makefile 2010-03-07 14:19:12.337141824 +0100 +@@ -6,7 +6,7 @@ + all: $(PROG) + + $(PROG) : $(SRCS) +- $(CC) $(CFLAGS) $(SRCS) -o $(PROG) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG) + + CLEANFILES= $(PROG) + +diff -Nuar pmtools-20100123.orig/madt/Makefile pmtools-20100123/madt/Makefile +--- pmtools-20100123.orig/madt/Makefile 2005-11-11 18:07:04.000000000 +0100 ++++ pmtools-20100123/madt/Makefile 2010-03-07 14:22:15.199017246 +0100 +@@ -1,6 +1,6 @@ + test: madt + ./madt < APIC + madt: madt.c acpi.h tables.c +- cc -o madt madt.c ++ $(CC) $(CFLAGS) $(LDFLAGS) madt.c -o madt + clean: + rm madt +--- pmtools-20101124.orig/turbostat/Makefile.old 2010-11-27 22:13:00.405571001 +0100 ++++ pmtools-20101124/turbostat/Makefile 2010-11-27 22:16:39.070571001 +0100 +@@ -1,3 +1,5 @@ ++all : turbostat ++ + turbostat : turbostat.c + + clean : diff --git a/sys-power/pmtools/metadata.xml b/sys-power/pmtools/metadata.xml new file mode 100644 index 000000000000..e3e4f41feaaa --- /dev/null +++ b/sys-power/pmtools/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + </maintainer> + <maintainer type="person"> + <email>prometheanfire@gentoo.org</email> + </maintainer> + <longdescription>This package really just provides acpidump and associated tools +for extracting ACPI tables to edit/reload buggy BIOS tables (works with iasl). +Useful for all ACPI-based systems (not just mobile/laptop systems). +</longdescription> + <upstream> + <remote-id type="github">anyc/pmtools</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/pmtools/pmtools-20071116.ebuild b/sys-power/pmtools/pmtools-20071116.ebuild new file mode 100644 index 000000000000..9453c5d8037f --- /dev/null +++ b/sys-power/pmtools/pmtools-20071116.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="ACPI disassembler tools, including acpidump" +HOMEPAGE="http://www.lesswatts.org/projects/acpi/utilities.php" +SRC_URI="http://www.lesswatts.org/patches/linux_acpi/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" +DEPEND="" +RDEPEND="${DEPEND} + dev-lang/perl + >=sys-power/iasl-20060512" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-20071116-acpixtract-pmtools.patch + + sed -i.orig -e '/^CFLAGS/s, -s , ,' \ + -i.orig -e "s:-Os::g" \ + acpidump/Makefile || die "sed failed" + + strip-unsupported-flags +} + +src_compile() { + # respect user's LDFLAGS + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install() { + # acpidump access the ACPI data via /dev/mem or EFI firmware in /sys + dosbin acpidump/acpidump + # the other tools only process data + newbin acpixtract/acpixtract acpixtract-pmtools + dobin madt/madt + + dodoc README + docinto madt + dodoc madt/README madt/example.APIC* +} + +pkg_postinst() { + ewarn "Please note that acpixtract is now named acpixtract-pmtools to avoid" + ewarn "conflicts with the new tool of the same name from the iasl package." +} diff --git a/sys-power/pmtools/pmtools-20110323-r1.ebuild b/sys-power/pmtools/pmtools-20110323-r1.ebuild new file mode 100644 index 000000000000..705fa4ffcf16 --- /dev/null +++ b/sys-power/pmtools/pmtools-20110323-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Collection of tools for ACPI and power management" +HOMEPAGE="https://github.com/anyc/pmtools/" +SRC_URI="https://github.com/anyc/pmtools/tarball/${PV} -> ${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="doc" +DEPEND="" +RDEPEND="${DEPEND} + dev-lang/perl + >=sys-power/iasl-20090521" + +S="${WORKDIR}/pmtools" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-20100123-acpixtract-pmtools.patch + epatch "${FILESDIR}"/${PN}-20100123-madt.patch + epatch "${FILESDIR}"/${PN}-20071116-64bit.patch + epatch "${FILESDIR}"/${PN}-20101124-cflags-ldflags.patch + + # update version info + sed -i -e "s|20060324|20110323|" acpixtract/acpixtract.c + + strip-unsupported-flags +} + +src_compile() { + # respect user's LDFLAGS + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install() { + dosbin acpidump/acpidump + newbin acpixtract/acpixtract acpixtract-pmtools + dobin madt/madt + + dodoc README + docinto madt + dodoc madt/README + use doc && dodoc madt/APIC* +} + +pkg_postinst() { + ewarn "Please note that acpixtract is now named acpixtract-pmtools to avoid" + ewarn "conflicts with the new tool of the same name from the iasl package." +} diff --git a/sys-power/pmtools/pmtools-20110323.ebuild b/sys-power/pmtools/pmtools-20110323.ebuild new file mode 100644 index 000000000000..13799c368ab1 --- /dev/null +++ b/sys-power/pmtools/pmtools-20110323.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="ACPI disassembler tools, including acpidump" +HOMEPAGE="https://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/" +SRC_URI="https://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" +DEPEND="" +RDEPEND="${DEPEND} + dev-lang/perl + >=sys-power/iasl-20090521" + +S="${WORKDIR}/pmtools" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-20100123-acpixtract-pmtools.patch + epatch "${FILESDIR}"/${PN}-20100123-madt.patch + epatch "${FILESDIR}"/${PN}-20071116-64bit.patch + epatch "${FILESDIR}"/${PN}-20101124-cflags-ldflags.patch + + # update version info + sed -i -e "s|20060324|20110323|" acpixtract/acpixtract.c + + strip-unsupported-flags +} + +src_compile() { + # respect user's LDFLAGS + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install() { + # acpidump access the ACPI data via /dev/mem or EFI firmware in /sys + dosbin acpidump/acpidump + # the other tools only process data + newbin acpixtract/acpixtract acpixtract-pmtools + dobin madt/madt + dosbin turbostat/turbostat + doman turbostat/turbostat.8 + + dodoc README + docinto madt + dodoc madt/README + use doc && dodoc madt/APIC* +} + +pkg_postinst() { + ewarn "Please note that acpixtract is now named acpixtract-pmtools to avoid" + ewarn "conflicts with the new tool of the same name from the iasl package." +} diff --git a/sys-power/powermgmt-base/Manifest b/sys-power/powermgmt-base/Manifest new file mode 100644 index 000000000000..85a82a3255b5 --- /dev/null +++ b/sys-power/powermgmt-base/Manifest @@ -0,0 +1,5 @@ +DIST powermgmt-base_1.31.tar.gz 10015 SHA256 cfa68cbb381f9eeef2c4e4f50abd864e951aaa58f6ca647d8b60360cd1d22024 SHA512 deae8b227e079a73fdd3f9a6be83bdc76400d457c17d3a0881ace1fddc8785ee401beddbafad93dbf3a09b5effe5ca7c998eae69a0740a083a9e8a65c2f0af40 WHIRLPOOL f9aecd8396454462213cffb2e08c4569a2a5b9d5a513de44b473a2ebcd755cc1c4713ae51bd75ebc7ff80c069e0b28f639e981de0ab2b92eab01a3e466b57bc2 +EBUILD powermgmt-base-1.31.ebuild 1021 SHA256 add349f788db9080dea4e44cdd064f32b217bbdc2b781ecc5d06fd77e742aa77 SHA512 84d5e7223aac70cb0dc9572db8e4d3ab770f05e45876f7535c374f9b40400701b5dcafcdc11c432474c5f0d11471406c525a74dbce5821a2d2105ed804efbb80 WHIRLPOOL 2c66429c6f14fd55db626b16f25743058e623f8153c13512f7fe41db782f745607944f15759148c3c864d545aa136bc9c975547ec847c9cf7c38ed67ef98e864 +MISC ChangeLog 2542 SHA256 70d0770c066ccbe840aa3bfc1ae88b10ecd8689c267e48ef0a493a3fdc9ccee9 SHA512 48f070de591a95e96fb476fc5ed3074d4b56aa0313de07ee9577f3bb643b4820bcf3a4a4e7f9df1bc1c26ccf2099b8f8a4042eaeef5110b3a07f9d783fb9d1a7 WHIRLPOOL c85c69b25b577db6457836386ea0c7a0de216d567a0a310e5f341a4d5f13bbad1b7fb31754ed904dcd2b246c0d9c40126e4f1a903fd8db03eb329e9d3e92ea56 +MISC ChangeLog-2015 3581 SHA256 e9351167223c826c9558f362387c879f9556aad6c4457a8104e03f7a489e798a SHA512 fcbdf8375328438b5348545863f1f314e57f6f569fef34321416ca8d241fa4b1a79f374d7ae1004d04209096ac44acc3680dab83a59a084c4959f885bc1f3e9c WHIRLPOOL 3c5a8d8fa2d2de53c4658195f6cdd86244e34b82f05f9a76fb664eb641a961a4ef6473b066e8c54e2bb7b07abd11beefb161af2c106de6f6197ba262c0420914 +MISC metadata.xml 281 SHA256 b75d014e867bb1f4bfc39392311b5ebc72a6fe26e99c31ef1b0404c001675fc8 SHA512 ed5b52d81e30aadc840b8e7c834a1af4b9805c24c5598e34ccb41189f245ea52a389de7846043a60815411333efcf7281b680b20aeebb3d2ba4358a7716b1730 WHIRLPOOL 607746f0de434c36a55b50ec4ad4480b032e33e8f0d6344bdb64daf3fd88b03768a443df86fd8d78fcd38c20229fb2ea702a7415f604bb4b52522de9ab141df9 diff --git a/sys-power/powermgmt-base/metadata.xml b/sys-power/powermgmt-base/metadata.xml new file mode 100644 index 000000000000..7e5225dfb557 --- /dev/null +++ b/sys-power/powermgmt-base/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-needed --> +<use> + <flag name="pm-utils">Adds support for on_ac_power through <pkg>sys-power/pm-utils</pkg></flag> + </use> +</pkgmetadata> diff --git a/sys-power/powermgmt-base/powermgmt-base-1.31.ebuild b/sys-power/powermgmt-base/powermgmt-base-1.31.ebuild new file mode 100644 index 000000000000..3fa5d4ee9619 --- /dev/null +++ b/sys-power/powermgmt-base/powermgmt-base-1.31.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit toolchain-funcs + +DESCRIPTION="Script to test whether computer is running on AC power" +HOMEPAGE="http://packages.debian.org/testing/utils/powermgmt-base" +SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ia64 ppc ppc64 x86" +IUSE="+pm-utils" + +RDEPEND="!pm-utils? ( virtual/awk ) + sys-apps/grep + virtual/modutils + pm-utils? ( >=sys-power/pm-utils-1.4.1 )" + +S=${WORKDIR}/${PN} + +src_prepare() { + sed -i \ + -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' \ + src/Makefile || die +} + +src_compile() { + tc-export CC + emake CFLAGS="${CFLAGS} -Wall -Wstrict-prototypes -DLINUX" +} + +src_install() { + dodir /sbin + emake DESTDIR="${D}" install + + doman man/{acpi,apm}_available.1 + + if ! use pm-utils; then + doman man/on_ac_power.1 + else + rm -f "${D}"/sbin/on_ac_power + fi + + newdoc debian/powermgmt-base.README.Debian README + dodoc debian/changelog +} diff --git a/sys-power/powernowd/Manifest b/sys-power/powernowd/Manifest new file mode 100644 index 000000000000..52805c493f45 --- /dev/null +++ b/sys-power/powernowd/Manifest @@ -0,0 +1,9 @@ +AUX powernowd-1.00-buf.patch 212 SHA256 5d89bc4c7ef1aa2d0887645d8afa3ecb3270ae217b2ef46928469c5f2fc377ce SHA512 bc1dda6c31bbfd6e10b1790ca2e483ad065cb3626d6a95e1ce041349268b73cd2c58cc2d54556be1fc0e22e38c97ad032d5af129e2527808bfde14a179470fc5 WHIRLPOOL e90458aaa82e95384f6a3c2b0bc1ba5836db73304f3bdf0d85da793c5d20c2fdc1eafdc22273e3f2e50a20ecba87a10834d0cd6215df755d58e97232c495c055 +AUX powernowd.confd 977 SHA256 e92fb5d82ac80b8a5c831c3e48e05802bf90acd9aaf4aeaa1e69807acc46091d SHA512 60acec973b04cc1701ef15149eac6d7cef0c7d0e8f8467a165313b23f7f697090357a954ecda2efcefcfae88b119c3fe60751018f5aa6e35213c46789c226083 WHIRLPOOL f9095c3eca8c9e8d68839222eb7ea4e36ebea64c9775845f6fe96c541876c0a3cc74ee7fb7216e8e581e88d4dcc31f52738081f036ecbdd7267c5af173a1d635 +AUX powernowd.initd 398 SHA256 428d2ba9893fa80d3fb9b2d04fbe5afa5b7c9afdfb420dd8e7015c5960d64871 SHA512 b50273414b5804ac9a16016f76d7f66f6cfc39034da01ef5a43fe3584b8d0c03990f091f46097ae84ad0485444521fe07ebe469c502588af90bbbf2780e1e23b WHIRLPOOL ba4c2df6bcaac6c3f0abb34ea8079fe515c4e82479b398d1bfb538ba67b887c02ee492c60907f22248531fd4236e3d9f1028665d671c306c8a5b1fd741362a5f +AUX powernowd.service 121 SHA256 d52afffa25458e2e238209e5f7b3a5ddccc19c83350f650d7c5feb348e7e6b2b SHA512 c6593dbf90c9174c62eff6a19ed24885f7c190a51c4812f6988b51de6512d4d9728be3d2ae576f13fff42f3b90853750c8805a9ee6a28677a9f7508e0cca1886 WHIRLPOOL 8f2b88fd3593c4ab77b30dc6a70cd6c49a64be5a6aef00e9ef399c96b260e4f7ae92877bcc94eda5a29c0e7644391fa91f657d3dfe74e414713ece5ce42a528a +DIST powernowd-1.00.tar.gz 19651 SHA256 af7381d2def69aaf7a07e883bebc37141d1b5ca1bb959bfd4bf7015767b6c46d SHA512 b4285de6b330927568ac44789ae4fda0cb431fc5f15abc5d275c03b5bfaec8627f453abbe78561971cce1eba895f73ed6f382be8a034fc2cf5d1a55010d30cf3 WHIRLPOOL 038597f30b63adaa1a28cb10cb0e9c9dc2fdceca0f6392a1b14314aecb4271eb32de4dba0cbbe40d9acea5d5feb8a62fb70c4d596dc26d76fcfbc0c3fec089f5 +EBUILD powernowd-1.00-r3.ebuild 862 SHA256 0e097bcf07aae962edcda5256ddba228f6176c89cc0b2fe3e6747d228636e020 SHA512 b9ccf7e3a2fb5870ef32aea6bf1d407dc880e2f8789dcb63a31835671a42bd263f540d10a0e6c47d6f40104ea58e37034fd8b4c7439e1b98f487a877a415ff9f WHIRLPOOL 0d09ecfd0eb6a3e9296cffae7dd842b85ac51bae86e861458edd31a52523c857aca5386743258fdccf4cb504f91ce90d6f1a5f9909ddb0d7cab9d1f68aaa13f2 +MISC ChangeLog 2430 SHA256 1c867cd03f18242aee778496c070214cc2c25ebc91ddf0471248622e44550235 SHA512 0e1514caac47722fffcfb36c276ab721886c187c4b466744c771e4c5fc5c4b81ed5b53e331f3e28e1887b58155efec9379d03e20c5c06c5faa32479f6a5b40e3 WHIRLPOOL 5583a075c325ab79b3e1fb25bc250dddf5da9c20fc79ba21af49c0776ecc55f0a1a77eca6557c2539b1bd6cb257d19ccf0d8f030fc9582e9bfdd1655fc27a4b4 +MISC ChangeLog-2015 4562 SHA256 0f8082fbeb2978f9bc9ed86e705146273b89618f647febc1de21ea139fc75f5a SHA512 045fa191c277c2a383eb780ad2b6d581c9b67a72dc60358afe91695f81a99e3c11f53563d2292b9e948cd7318d92102ebcf5fd3da422377d605291effd64201e WHIRLPOOL 88f325ae90a0bf4a1a0b2e5d026c37acbb40d61d4390dc83cbbee3b08eb177698e8b6624639f5f04dd46eafdfc185a256fced656ecbc325af913132b8a18f685 +MISC metadata.xml 295 SHA256 510b6d0d81023c8b1617f6d8bb2a47eca5ca82be5674eacff5edeb5261d143d4 SHA512 50c540eedd60cea6d630f7b76292f028ea7b80efe3d298d8572cf420927018a11a106a78059ba5f1dc3dbc77a7c3a0c1a66be937fd839ed9337e722591d571d2 WHIRLPOOL 47dfa05314edd48fdd847a84718479dbef29f9dda0899732635e0f4bae21963fd24074030cb3b785135091ce512ac594ebffad5fb38146b0f4408af5edbc7f57 diff --git a/sys-power/powernowd/files/powernowd-1.00-buf.patch b/sys-power/powernowd/files/powernowd-1.00-buf.patch new file mode 100644 index 000000000000..56f048296ec7 --- /dev/null +++ b/sys-power/powernowd/files/powernowd-1.00-buf.patch @@ -0,0 +1,11 @@ +--- a/powernowd.c ++++ b/powernowd.c +@@ -107,7 +107,7 @@ typedef struct cpuinfo { + cpuinfo_t **all_cpus; + + /* idea stolen from procps */ +-static char buf[1024]; ++static char buf[2048]; + + enum function { + SINE, diff --git a/sys-power/powernowd/files/powernowd.confd b/sys-power/powernowd/files/powernowd.confd new file mode 100644 index 000000000000..e374a59777bc --- /dev/null +++ b/sys-power/powernowd/files/powernowd.confd @@ -0,0 +1,24 @@ +#PowerNow Daemon v0.97, (c) 2003-2005 John Clemens +#Daemon to control the speed and voltage of cpus. +# +#This is a simple client to the CPUFreq driver, and uses +#linux kernel v2.5 sysfs interface. You need a supported +#cpu, and a kernel that supports sysfs to run this daemon. +# +#Available Options: +# -h Print this help message +# -d Don't detach from terminal (default is to +# detach and run in the background) +# -v Increase output verbosity, can be used more than once. +# -q Quiet mode, only emergency output. +# -n Include 'nice'd processes in calculations +# -m # Modes of operation, can be 0, 1, 2, or 3: +# 0 = SINE, 1 = AGGRESSIVE (default), +# 2 = PASSIVE, 3 = LEAPS +# -s # Frequency step in kHz (default = 100000) +# -p # Polling frequency in msecs (default = 1000) +# -c # Specify number of threads per power-managed core +# -u # CPU usage upper limit percentage [0 .. 100, default 80] +# -l # CPU usage lower limit percentage [0 .. 100, default 20] + +POWERNOWD_OPTS="" diff --git a/sys-power/powernowd/files/powernowd.initd b/sys-power/powernowd/files/powernowd.initd new file mode 100644 index 000000000000..73f44c1048a7 --- /dev/null +++ b/sys-power/powernowd/files/powernowd.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount + use logger +} + +start() { + ebegin "Starting powernowd" + start-stop-daemon --start --exec /usr/sbin/powernowd -- ${POWERNOWD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping powernowd" + start-stop-daemon --stop --exec /usr/sbin/powernowd + eend $? +} diff --git a/sys-power/powernowd/files/powernowd.service b/sys-power/powernowd/files/powernowd.service new file mode 100644 index 000000000000..326e6fd28581 --- /dev/null +++ b/sys-power/powernowd/files/powernowd.service @@ -0,0 +1,8 @@ +[Unit] +Description=PowerNow! Daemon + +[Service] +ExecStart=/usr/sbin/powernowd -d -q + +[Install] +WantedBy=multi-user.target diff --git a/sys-power/powernowd/metadata.xml b/sys-power/powernowd/metadata.xml new file mode 100644 index 000000000000..221a755312d1 --- /dev/null +++ b/sys-power/powernowd/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 type="person"> + <email>jer@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">clemej/powernowd</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/powernowd/powernowd-1.00-r3.ebuild b/sys-power/powernowd/powernowd-1.00-r3.ebuild new file mode 100644 index 000000000000..8386fa869f51 --- /dev/null +++ b/sys-power/powernowd/powernowd-1.00-r3.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils linux-info systemd toolchain-funcs + +DESCRIPTION="Daemon to control the speed and voltage of CPUs" +HOMEPAGE="http://www.deater.net/john/powernowd.html https://github.com/clemej/powernowd" +SRC_URI="http://www.deater.net/john/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86" + +pkg_setup() { + CONFIG_CHECK="~CPU_FREQ" + WARNING_CPU_FREQ="Powernowd needs CPU_FREQ turned on!" + linux-info_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-buf.patch + rm -f Makefile + tc-export CC +} + +src_compile() { + emake powernowd +} + +src_install() { + dosbin powernowd + dodoc README + + newconfd "${FILESDIR}"/powernowd.confd powernowd + newinitd "${FILESDIR}"/powernowd.initd powernowd + systemd_dounit "${FILESDIR}"/${PN}.service +} diff --git a/sys-power/powerstat/Manifest b/sys-power/powerstat/Manifest new file mode 100644 index 000000000000..f20d521b90ef --- /dev/null +++ b/sys-power/powerstat/Manifest @@ -0,0 +1,4 @@ +DIST powerstat-0.02.11.tar.gz 57173 SHA256 198c472962cb14e5fcda18c0ef252bb57bdef743a84b10ad95f8a4aa2c7e17fb SHA512 ec1a00c0496997410d8a5d07e572d37ce1d7eee0fc37a6d9fdbcd9bf8bebe74cbde1f53d9b55d9bae48e8e1bc44ff61f29fed195d69499a8eed8007b67eacbe6 WHIRLPOOL cc1c2d7b050247cdaa9f765758f8a05b1ac37ef604f35977d8205d16def64c5f69026d4f044ba0a090ff8846e306ca3733b7617ddf0e5849a59527f38ada70bc +EBUILD powerstat-0.02.11.ebuild 459 SHA256 1d661a688a675a0f81df5dda0d625161bbd8027dc3c99debf62771592e91eea4 SHA512 2ef250750c3f9cd1c655ea2cae92c8f89b2fd20d5d8cd08c711faad2eba26c9df196f86818b02da103bbee13e96e22d4aff0bd0e60ef3227a6c60cf787492461 WHIRLPOOL d858e6775af2e2900afabf8d2949c288a7ed4de8348b7e665780fc63c21f83de7d6888a7501fcf93b2897e98b34ad496b12ad5c370bd8a759d8daf85dca6767b +EBUILD powerstat-9999.ebuild 488 SHA256 1268486d29780e5f0ccebf3d1ab2247f520fc273a5e0e28e354800867baa34af SHA512 04f9b7e14c48f66315145485819fa09091fe0fb0d81559258be8f89dab1a52642f93689fdb0805dea30c36dba282128a9f0b0a3fd413e9fc4a464d676ee265f0 WHIRLPOOL a9aa2abcf1c90773cb053cafff383568fc194097bfc4536c0c908a510fe0c4382d212d4de6238cba7a48eb99e9703b8f9d981c4c37f58ddcddf0532aecd32c7c +MISC metadata.xml 858 SHA256 fe624ade73b7720d6c0a940ae63787a9a56eb300d5025f5cb987c5cfc7722b9f SHA512 59311c93c878c4dd09141428ccfb72fa030b72538978ddd2b44c505c0e083a5a0dfe017c865dfaff27fdd3edf3abb9a78fd938e2e0d32ff92fa121ad27a84f1f WHIRLPOOL 4fbe692917cbd5eae42ecbaa0778dae450494a9654981b35a0a17f0c5f3f3201cc49a67cb7d7d43836f01c05f97a1d6d7e3bff065fa00b4f607e8da41ad6fa81 diff --git a/sys-power/powerstat/metadata.xml b/sys-power/powerstat/metadata.xml new file mode 100644 index 000000000000..7e75f57b5d80 --- /dev/null +++ b/sys-power/powerstat/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>spiderx@spiderx.dp.ua</email> + <name>Vladimir Pavljuchenkov</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Powerstat measures the power consumption of a machine using the battery + stats or the Intel RAPL interface. The output is like vmstat but also + shows power consumption statistics. At the end of a run, powerstat will + calculate the average, standard deviation and min/max of the gathered data. + </longdescription> + <upstream> + <remote-id type="launchpad">powerstat</remote-id> + <remote-id type="github">ColinIanKing/powerstat</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/powerstat/powerstat-0.02.11.ebuild b/sys-power/powerstat/powerstat-0.02.11.ebuild new file mode 100644 index 000000000000..4a5df3b62e40 --- /dev/null +++ b/sys-power/powerstat/powerstat-0.02.11.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Laptop power measuring tool" +HOMEPAGE="https://launchpad.net/ubuntu/+source/${PN} https://github.com/ColinIanKing/${PN}" +SRC_URI="https://github.com/ColinIanKing/${PN}/archive/V${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +src_compile() { + emake CC=$(tc-getCC) +} diff --git a/sys-power/powerstat/powerstat-9999.ebuild b/sys-power/powerstat/powerstat-9999.ebuild new file mode 100644 index 000000000000..a9c566f33fbd --- /dev/null +++ b/sys-power/powerstat/powerstat-9999.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit git-r3 toolchain-funcs + +DESCRIPTION="Laptop power measuring tool" +EGIT_REPO_URI=( + "git://kernel.ubuntu.com/cking/${PN}.git" + "https://github.com/ColinIanKing/${PN}.git" + ) +HOMEPAGE="https://launchpad.net/ubuntu/+source/${PN} https://github.com/ColinIanKing/${PN}" +SRC_URI="" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="" +IUSE="" + +src_compile() { + emake CC=$(tc-getCC) +} diff --git a/sys-power/powertop/Manifest b/sys-power/powertop/Manifest new file mode 100644 index 000000000000..ab7d2f69bc8e --- /dev/null +++ b/sys-power/powertop/Manifest @@ -0,0 +1,11 @@ +AUX powertop-2.4-tinfo.patch 580 SHA256 fc1c7238d5c386c0f28ff003e998b6657826f8b354d051caa45ff52168d162cb SHA512 51a075ec585a8bc33a8e91f5b808e6f7f8fb63f1b77f879dee75811b61e78ee105887e3a02edcb2ff7cd624216b7139572c81cbe2b54d8e4b06946a730b53a5d WHIRLPOOL 4fbc00dc642376c237746194b5ad46540a12aa2831d342b4c76f030ad6042ffd48b14ccc30009765de4ca733fce3ba8b5bf1dfc3f3922827aeebb7934099422a +DIST powertop-1.13.tar.gz 104675 SHA256 2bc866089496877dd26d2d316ad5763ab8ecb5e28aefba44bc5d355dcdc58d98 SHA512 0c22a903da64798d987492336d57260372e03eab067ad94cf30b7640e9ee05e759a2fe9fa48fbdc35404cd2782b6b29d705e11e68452653b08f7f9df1a52be44 WHIRLPOOL 5ba44b84f49609f67c32563f75e20f6576c21a93fcb1ca99ebfe064475397602aa0f0fb9575e05b5a0290983791e7cf6ebae0139b39158b962e4b51027a6f5aa +DIST powertop-2.6.tar.gz 3024009 SHA256 3024c2b13c8f32cdac0b0ea9359eb5668dc9bd11776cf063481daa878533d1ee SHA512 7c44b9c49f74d0f415d0332b60629940e05cf1c9170a9a7b98427da630c25c0cc9c8ece49e059ec8c665847ff03fa8a341e0cf8f7ca792d889f2c52a39ddbb62 WHIRLPOOL eaa6e05d2fdb3050eb3a37f39fb5d760a8d3d91461b8c6f0ae825138080a0dd8a532e490a71246d62d2e340e3820b402d761a1331a6e7b6bc23db116c98cf0d9 +DIST powertop-2.8.tar.gz 670000 SHA256 a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a SHA512 253d0e15f0972cf8639735c510f4884d49a0da76c31dd2f39603e2297e6c6f0b9fa283c7b3cb04a431c91f8296275c0adaecc4c3e9ea132c0c31064f7f432c80 WHIRLPOOL 87b859b76395d6b1b380c7459b0d918713e94e8fc4ac40fde8b82f2112dec2df3caffb645b082cedd0bba5c232555de26e81fbe8dd3041875c32c864650ef132 +EBUILD powertop-1.13.ebuild 1041 SHA256 690b820d00b40c9e8c7687bf580cf51dd9c49ea7bba372b0521cb255b19c3a23 SHA512 a0d316d28968d685ec14f98628b865afa891dac07b3b9089ca0ad6e1b49a104cc0d4995f6262c02f73430c40c4f7e579bab73c35d71921fd2a26626d7fb392e4 WHIRLPOOL c6bb0323c50ee0ada341f024f9d273c36ad11c59cced46ad28bfd27822180d418d5adfc4bbadffe98c97751ffe9e794701964c8f3aa0c1636972b60d8e416b29 +EBUILD powertop-2.6.ebuild 3443 SHA256 24eb45935c7df15272fd6211bb0629cafd99aee77d3b1539c28bc5e55a348600 SHA512 fc4a9a10a91fad1467e3742400b844bed5186900fefd6dd55fabdf77184d0d650306bfb5d0ea4b0a99c8f4b0461af6692a3aa6da3b08708f6be4fde2401db714 WHIRLPOOL e6e41d41ba4c98375f0825e3a1bdb842e2c85c4734ca7cb967e34aca8fb033ad250eddf13ef9cf5776c96e78b69ff9993e2f870ef78280139c585c474e7d33e8 +EBUILD powertop-2.8.ebuild 3453 SHA256 29fb6283cc8407a5f4e92e55bbdcdec18c23e807faa3cda84fe3354ac1d12b30 SHA512 100f496e93d9512fe693ae4980283aced21409c2f5ecb945fb7ef5e58e0b719d4e9a7510ee0e053a33acce162a702d035e6792f90d48b8a8f8572e3144a5a9c9 WHIRLPOOL a6bf920b30fc7f98b39db612335c2f61c4444b096ad1dbee2c4cffe82640e316c7b28a1be85426b538dd54393c5464f348977a0013bd8d46b66cb1fa3fa7d96b +EBUILD powertop-9999.ebuild 3575 SHA256 456e38f8e982b6accaf0d93994349584b6d7f5ab9b0cd3e5b939f387acbb8f5c SHA512 c4f4fa75a57402806a1eb80183aea4c2dbbdbc0e9add49ccfc216445334674a104308318ff5fa228585cd1754c265a202465752fc043718843af49878937bc3e WHIRLPOOL c3deca052286a4c990fb3675468680362befa3dc1ac5e96a8b61eaf960066e94c534d7b66e02aebc31aa83573be2f2d8f131dc3178eff324645aa0a0148fd08d +MISC ChangeLog 4346 SHA256 bed08acb8e81999500a8feb1050140bdf53896cf46b71bf9154feff6cdb17d95 SHA512 bbbfa57f08f2ee4e6bdda81c03eec4f38514afb1a241481b9eb0360206c665d3f45c272969f9662aa5bbe8a8b56dcfa42d282e451a7e3d870883f9cc6ed1cb95 WHIRLPOOL d620d43167555025637b27030c8b0c1a4604e8d00528ba177ed218a44c2f237d371079a3dd9fcd78f85a9466d7b9e768ba908a0bc856765b811c7ce48bb4627f +MISC ChangeLog-2015 16451 SHA256 92a255227c9c47818ab7838ae5b9e98a89893a9727f55fc7826b615973262800 SHA512 42ce861771ec17adad9d001b89b04179ba400660e57280e5c5716e5ef616066afc2a0fcb2ea7a8f4bbe56ad8f57cb25245d297362b797e787246f94af190692e WHIRLPOOL d203415e477639f33bf1dcb51266fbf6a1406401391025b66ec01915f8832b830bf50eaa3dd44fc2adcde37f393edaafec8db9b80e0a0cde4355ae1718b7b1ab +MISC metadata.xml 253 SHA256 432d4128e29afcfc22a8a4f17bef7358e5c6d73c9f483b5c0fb288516651acf8 SHA512 fad4a58e4c2a6eaa8bbbdc75e3995b5da53c9291f82480e35a9badfc1374bcc484663f2577790a46218be90d3b42bb45620297316c5493bc4a46af0dbd29189e WHIRLPOOL a7420ac555670eaf57905e2207c908a9d6d83188ba157fb5f46f562490c0047c0513f00bce6a12a341dcaa11383470edb987b4bb9d09bc1d1411c6bcfb82bb1c diff --git a/sys-power/powertop/files/powertop-2.4-tinfo.patch b/sys-power/powertop/files/powertop-2.4-tinfo.patch new file mode 100644 index 000000000000..b965d8e06a59 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.4-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -46,7 +46,7 @@ + AC_FUNC_STRTOD + AC_CHECK_FUNCS([fdatasync getpagesize gettimeofday memmove memset mkdir munmap pow realpath regcomp select setlocale socket sqrt strcasecmp strchr strdup strerror strncasecmp strstr strtoul strtoull]) + +-AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], AC_MSG_ERROR([ncurses is required but was not found]), []) ++PKG_CHECK_MODULES(ncurses, ncurses, [LIBS="$LIBS $ncurses_LIBS"], AC_MSG_ERROR([ncurses is required but was not found])) + + has_libpci=0 + PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[ diff --git a/sys-power/powertop/metadata.xml b/sys-power/powertop/metadata.xml new file mode 100644 index 000000000000..1c481a1d6de1 --- /dev/null +++ b/sys-power/powertop/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 type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> +</pkgmetadata> diff --git a/sys-power/powertop/powertop-1.13.ebuild b/sys-power/powertop/powertop-1.13.ebuild new file mode 100644 index 000000000000..2ed77ddd6c55 --- /dev/null +++ b/sys-power/powertop/powertop-1.13.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=3 + +inherit toolchain-funcs eutils + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="http://www.lesswatts.org/projects/powertop/" +SRC_URI="http://www.lesswatts.org/projects/powertop/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux" +IUSE="unicode" + +DEPEND="sys-libs/ncurses[unicode?] + sys-devel/gettext" +RDEPEND="sys-libs/ncurses[unicode?] + virtual/libintl + sys-apps/pciutils" + +src_prepare() { + sed -i '/${CFLAGS}/s:$: ${LDFLAGS}:' Makefile + use unicode || sed -i 's:-lncursesw:-lncurses:' Makefile +} + +src_configure() { + tc-export CC +} + +src_install() { + emake install DESTDIR="${ED}" || die + dodoc Changelog README + gunzip "${ED}"/usr/share/man/man1/powertop.1.gz +} + +pkg_postinst() { + echo + einfo "For PowerTOP to work best, use a Linux kernel with the" + einfo "tickless idle (NO_HZ) feature enabled (version 2.6.21 or later)" + echo +} diff --git a/sys-power/powertop/powertop-2.6.ebuild b/sys-power/powertop/powertop-2.6.ebuild new file mode 100644 index 000000000000..05849a56292b --- /dev/null +++ b/sys-power/powertop/powertop-2.6.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils linux-info autotools +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses:*[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +S="${WORKDIR}/${PN}" + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/powertop-2.4-tinfo.patch + eautoreconf +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + default +} diff --git a/sys-power/powertop/powertop-2.8.ebuild b/sys-power/powertop/powertop-2.8.ebuild new file mode 100644 index 000000000000..d3d8039ade6e --- /dev/null +++ b/sys-power/powertop/powertop-2.8.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils linux-info +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="nls unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses:=[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ_IDLE + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ_IDLE="NO_HZ_IDLE should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + if [[ ${PV} == "9999" ]] ; then + eautoreconf + else + default + fi +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + econf $(use_enable nls) +} diff --git a/sys-power/powertop/powertop-9999.ebuild b/sys-power/powertop/powertop-9999.ebuild new file mode 100644 index 000000000000..8d4d40d26b93 --- /dev/null +++ b/sys-power/powertop/powertop-9999.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils linux-info +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/fenrus75/powertop.git" + inherit git-r3 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="nls unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses:=[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ_IDLE + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ_IDLE="NO_HZ_IDLE should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + default + if [[ ${PV} == "9999" ]] ; then + chmod +x scripts/version || die "Failed to make 'scripts/version' executable" + scripts/version || die "Failed to extract version information" + eautoreconf + fi +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + econf $(use_enable nls) +} diff --git a/sys-power/sispmctl/Manifest b/sys-power/sispmctl/Manifest new file mode 100644 index 000000000000..925d34378d41 --- /dev/null +++ b/sys-power/sispmctl/Manifest @@ -0,0 +1,7 @@ +DIST sispmctl-3.1.tar.gz 251896 SHA256 e9a99cc81ef0a93f3484e5093efd14d93cc967221fcd22c151f0bea32eb91da7 SHA512 2942c8f1c9e4d259667d384b9dca72569fac8c3c775e68f88599eb6f339b63d92c8226a406f998830af24ea9144ed75291bcc652293a870123925fe235c31d03 WHIRLPOOL 8f7ad31eb917456dacd0e09feb94fa04e8e1cdceb25626a0ce36004d117750146d50abd458913d0770cf2b3ef133cda8162a64809592015ae5080957d12aeced +DIST sispmctl-4.0.tar.gz 517985 SHA256 442d9bb9774da7214c222144035ac68ad5d25171040ce2731cfdf49b3365cfd5 SHA512 0fc643b627ccfa10f085b37702933fe9b7c2ef448bcbb32c22cacda57f7f710437c413bd02f510a3acb085f99a513a891e815981ee4ffbe7fed691492a335e96 WHIRLPOOL 40c443dd36aca5d7299ef2fe5478dc26535b3c4f0e325b2f36c49f528b82cbf73ed156fff12eeb1b03d53d6a40f817c513c502c030286c0428a36f05fafa6934 +EBUILD sispmctl-3.1.ebuild 1079 SHA256 75236913f08967149231cb00842f86cbffbd21744c8781011297312ef51bba05 SHA512 a906db46d18589019e909945a53de77e3dffe0afc33e757b60fcfd47f7cb0d036e5dcb239b308d88852bebcf709838b853af3eea1380414f7e6d406a64339dc9 WHIRLPOOL fa963de154520eb8d8a533c6c88e9441b14fa5014e8caa32551890f476b9e51e366089cc24c542b2b734ed1c0b9e43d61cd8f6472f121c2b005f3cdd9dbc1811 +EBUILD sispmctl-4.0.ebuild 1337 SHA256 b67227e9146fd12991117aea1165aa12b7dec34bffa9e292d76e5e1846722ac1 SHA512 076f5117a0063d6d8a982974587d88b9a905153886f31c92f97af206a10ee3e791372d80ccf3bb863684854bc6748f579df83846217c76f4db226dc5a6859e26 WHIRLPOOL 200bcc658415460cc2844a0c624dc5135d53cf5ab2840f642cabc56f96cdcda4c551171fa8531b0791c8d1e9113ffaef1c05e11bccc3aeb0111ea8189396c2b4 +MISC ChangeLog 2608 SHA256 fe4930c1eeca96e0d7d16f3972cc876c897fbf9f347205650ea33048f99565a2 SHA512 32948330acd9dc6e1d419cc1a09fe4e5837efc73d015102d682ce18232e1a85c6c9499e33bd5bcc71f55847da54703bbc88e8f476b80c6582f30e2eda142ad38 WHIRLPOOL f1ade74c8ee8db6cdc67e5a7f674635a32f63a420542b0379f5231b8a03bf95dd14307fd28641e5f5997228d73a0b57fdff112a51a3d344688885abe41448e8f +MISC ChangeLog-2015 1605 SHA256 5a276f66a16064c0125727a343687d127e01bbcded60244bfb5a7e44a524c429 SHA512 3554c30f6cbd1c254f032f0b47313a43bc1bba2c1f035efffb072a7fa5a486cd15ce44808e2532dd946121f576bbe88627eda9197cd6534526f08e1554ae8224 WHIRLPOOL 866c1a2c899915035050197f52cf24d3e3f10e2eb196f15f910af32ae6498e2b8fd4cb2c271f16048e3a4f7019052abe8a7496814ae45c8a59bf9a27f4b194ce +MISC metadata.xml 721 SHA256 050149ca6f590d3153160a821bf619a831771f888c7b55f9df3b1c20ff9ee346 SHA512 d8bb98bb4658dea2454d959b2ead9c15a5efe782d85858f1d0c897b2f9e3d5abe67d3dd427516d03f26fe7cb0041e6e1b9809827ce2e0f44d48e1949d2615f7d WHIRLPOOL 08965d1db4ba891045f8251349e450734d3433850f5c9d35e55e099ffe7f115d94f64ab3f1bae5f5ada6c8a1c5ac9a71cd6ed79d9f99111295b3a80cfb212504 diff --git a/sys-power/sispmctl/metadata.xml b/sys-power/sispmctl/metadata.xml new file mode 100644 index 000000000000..e3dc21f68830 --- /dev/null +++ b/sys-power/sispmctl/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 type="person"> + <email>wschlich@gentoo.org</email> + <name>Wolfram Schlich</name> + <description>Primary maintainer</description> + </maintainer> + <use> + <flag name="gemplug">Install gemplug (management script)</flag> + </use> + <longdescription> +sispmctl is an application enabling the use of the GEMBIRD +SilverShield PowerManager (SiS-PM) device under Linux. +The SiS-PM is an intelligent advanced surge protector with +4 of 6 sockets being manageable from the PC via USB. +</longdescription> + <upstream> + <remote-id type="sourceforge">sispmctl</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/sispmctl/sispmctl-3.1.ebuild b/sys-power/sispmctl/sispmctl-3.1.ebuild new file mode 100644 index 000000000000..f15038bfedab --- /dev/null +++ b/sys-power/sispmctl/sispmctl-3.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit bash-completion-r1 eutils + +DESCRIPTION="GEMBIRD SiS-PM control utility" +HOMEPAGE="http://sispmctl.sourceforge.net/" +SRC_URI="mirror://sourceforge/sispmctl/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="gemplug" + +RDEPEND="virtual/libusb:0 + gemplug? ( sys-process/at )" +DEPEND="${RDEPEND}" + +src_configure() { + econf --enable-webless +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README ChangeLog NEWS + + ## gemplug + if use gemplug; then + sed -i "s|/usr/local/bin/sispmctl|${ROOT:-/}usr/bin/sispmctl|g" extras/gemplug/gemplug + dobin extras/gemplug/gemplug + doman extras/gemplug/gemplug.1 + + insinto /lib/udev/rules.d + doins extras/gemplug/74-sispmctl.rules + + newbashcomp extras/gemplug/gemplug-completion.sh gemplug + + einfo "To be able to use the locking mechanism of gemplug(1)," + einfo "add the users who are designated to run gemplug to the" + einfo "group 'uucp' which has write permissions to /var/lock." + fi +} diff --git a/sys-power/sispmctl/sispmctl-4.0.ebuild b/sys-power/sispmctl/sispmctl-4.0.ebuild new file mode 100644 index 000000000000..9d301d8acaaf --- /dev/null +++ b/sys-power/sispmctl/sispmctl-4.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit bash-completion-r1 eutils user + +DESCRIPTION="GEMBIRD SiS-PM control utility" +HOMEPAGE="http://sispmctl.sourceforge.net/" +SRC_URI="mirror://sourceforge/sispmctl/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="gemplug" + +RDEPEND="virtual/libusb:0 + gemplug? ( sys-process/at )" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewgroup sispmctl +} + +src_configure() { + econf --enable-webless +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README README.md ChangeLog NEWS + + ## install udev rules which make the device files writable + ## by the members of the group sispmctl + insinto /lib/udev/rules.d + doins examples/60-sispmctl.rules + + ## gemplug + if use gemplug; then + sed -i "s|/usr/local/bin/sispmctl|${ROOT:-/}usr/bin/sispmctl|g" extras/gemplug/gemplug + dobin extras/gemplug/gemplug + doman extras/gemplug/gemplug.1 + + newbashcomp extras/gemplug/gemplug-completion.sh gemplug + + dodir /var/lock/gemplug + fperms 2775 /var/lock/gemplug + fowners root:sispmctl /var/lock/gemplug + + einfo "To be able to use the locking mechanism of gemplug(1)," + einfo "add the users who are designated to run gemplug to the" + einfo "group 'sispmctl' which has write permissions to /var/lock/gemplug." + fi +} diff --git a/sys-power/suspend/Manifest b/sys-power/suspend/Manifest new file mode 100644 index 000000000000..4a9a8a104211 --- /dev/null +++ b/sys-power/suspend/Manifest @@ -0,0 +1,6 @@ +DIST suspend-1.0_p20120915.tar.xz 111080 SHA256 4fa7551ec5ce3ed5d7412ad14e01f5fbac3a541db9d94ad6adf20b87d9c32eca SHA512 bb714b4a7c0f5749c4b711a5c38ca5d8cb5078176a75387957123f75cfe8348adc3aa4e96335eb65c14ad1dd2f99fd6dbca3b415525dd39b3c547f9b13b775be WHIRLPOOL 6f5ea4a17572bc1e30d70258a0439b40a29ea67f0251cecec81bdd3dee92e7801645c37dbb868b0f498c093193bd574f361dc015810965c09f53d75cfb391e7f +DIST suspend-1.0_p20150810.patch.xz 6172 SHA256 5a07235c805dd3bb043ccc5ec1c18a3ca195912ea05fd3c007845825ebe3ed78 SHA512 cb186bdb0619ed4852e2ba12d6048f26fa23c7556d7c95713f14a4258fbb014bbec2281edee6478ebf5916600b674d47d8ba53e7644391de933b03e9fd1b96e9 WHIRLPOOL b1d9ba65f02ed4b507a586b5df71b897c147599db51905285cf55037e7c316f0392df432c81c99660abd7616dd60a816c4c2234bac3745eda84f6499cff7bdf4 +EBUILD suspend-1.0_p20150810.ebuild 1286 SHA256 c8ad3647c97d01728836592ec2eb4410511839da4a0dc2bacd916c9a0fa7b8f1 SHA512 0908b597b3e30c527538c54531071076282047b4b4da1c8997aebbb2ae29eb9066fa6bb91e57064e6ae5f3e972f1e0d6c23086a589a8d6b73c62602745c343a0 WHIRLPOOL d62aea733650fe78ba4246cb5b510d6d724820e83d041252c183fdf4bad5582bbcf7d9702c7c089ff2cdc565034bcff8bf482913449aeb719ddd8eec02d92dae +MISC ChangeLog 4223 SHA256 03623697d4fba3746a5b5832e80df0a1b95c3b4a34cb816d429c4d8ad8eaa7cc SHA512 bd20efb63a594a8d5d9f52b490851f0f45a5005c3c72c98f60cf1f9b11d8a110e266d61fbd19509d2895f45216d91166ccaa833e132d7ad55833d0642bf87008 WHIRLPOOL f886bf588523bc7bc5923558a2e2f0b04ff29c5128b40f6e4ce0bca9c05b398c18cb0a628f132cb5250ff601ead7610a9bb4018808ad33d3ea4d120769bb5b99 +MISC ChangeLog-2015 4967 SHA256 aec9353f786f6cb97f8822f87e47b70161e9c23496d956ece1537c00cccdae7c SHA512 f903fb243fee5dbe6b9efdf664f67d6fc69d80db2f7453e237c81abcffe6d3fb69b2c5ecece22c5d32c0efadf31d795ed12d4c6f84a8fd47f619e7bec36f636b WHIRLPOOL bbbb84d8343d73216332b3b1b6c9fe8a5f52daf5c60d1c310d6c3932367594a24520e7fe3d72e6b56392bf3caaa19e633d22392ea9ea9a4f35f053d704e94b26 +MISC metadata.xml 586 SHA256 2660859283c7161fef66bdda8570198f1e9fe7f8638ff4db1e5dd1a0d16f553d SHA512 fea00b4ea8510e8b10482a5956d585b96638a9f530eae8248e83c2cf9316fc5a37769b3eb080d09182ed6d7d34e46c1f3a9939ad28c7a176c35d2dfdecb7f4b4 WHIRLPOOL 763d257fb7b61b1fa5448a8d39ae1f8e71268507af5a4084792170723daee071bcd9c420d569e04c60a29fd49867def0e1f9b4a59cf1ca08b2150bd0ae4dfff5 diff --git a/sys-power/suspend/metadata.xml b/sys-power/suspend/metadata.xml new file mode 100644 index 000000000000..959bb49c8fc6 --- /dev/null +++ b/sys-power/suspend/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> + </maintainer> + <maintainer type="person"> + <email>bircoph@gentoo.org</email> + <name>Andrew Savchenko</name> + </maintainer> + <use> + <flag name="fbsplash">Add support for framebuffer splash</flag> + <flag name="crypt">Allows suspend and resume from encrypted disk</flag> + </use> + <upstream> + <remote-id type="sourceforge">suspend</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/suspend/suspend-1.0_p20150810.ebuild b/sys-power/suspend/suspend-1.0_p20150810.ebuild new file mode 100644 index 000000000000..6d53161ba3bc --- /dev/null +++ b/sys-power/suspend/suspend-1.0_p20150810.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +BASE_PV="1.0_p20120915" + +DESCRIPTION="Userspace Software Suspend and S2Ram" +HOMEPAGE="http://suspend.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~bircoph/distfiles/${PN}-${BASE_PV}.tar.xz + https://dev.gentoo.org/~bircoph/patches/${P}.patch.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="crypt fbsplash +lzo threads" + +RDEPEND=" + dev-libs/libx86 + crypt? ( + >=dev-libs/libgcrypt-1.6.3:0[static-libs] + dev-libs/libgpg-error[static-libs] ) + fbsplash? ( >=media-gfx/splashutils-1.5.4.4-r6 ) + lzo? ( >=dev-libs/lzo-2[static-libs] ) " +DEPEND="${RDEPEND} + >=dev-lang/perl-5.10 + >=sys-apps/pciutils-2.2.4 + virtual/pkgconfig" + +S="${WORKDIR}/${PN}" + +src_prepare() { + epatch "${WORKDIR}/${P}.patch" + eautoreconf +} + +src_configure() { + econf \ + --docdir="/usr/share/doc/${PF}" \ + $(use_enable crypt encrypt) \ + $(use_enable fbsplash) \ + $(use_enable lzo compress) \ + $(use_enable threads) +} + +src_install() { + dodir etc + emake DESTDIR="${D}" install + rm "${D}/usr/share/doc/${PF}"/COPYING* || die +} + +pkg_postinst() { + elog "In order to make this package work with genkernel see:" + elog "https://bugs.gentoo.org/show_bug.cgi?id=156445" +} diff --git a/sys-power/thermald/Manifest b/sys-power/thermald/Manifest new file mode 100644 index 000000000000..c5b5a5ebf170 --- /dev/null +++ b/sys-power/thermald/Manifest @@ -0,0 +1,13 @@ +AUX thermald 374 SHA256 1a4839420ceb57830c2e9e0cf02a7eec95e5578e9bb6eb2d249ce9a1adb285ed SHA512 17f1c2133e47e897c4a5407ef622adfebb8498fce7ea9bf17cfd177269a3d869bdc21c3d2558010e9669ddc53e69e521bb4c1e112c51010168aa3c074c259e02 WHIRLPOOL 6cec3086ae2ea6225ebfcc25f4061744b59edfc9ebfbe94131cb661c7dcf1ca16508840701130a22a82d299c749ae83d8fe668d18de8b5cbbdde09e549a72299 +AUX thermald-1.4.2-terminate-r1.patch 1970 SHA256 0c5487bed104f17a915de38598de05f6259ea65a3dfe59c111daed9ae42ca549 SHA512 74e28bccacdf8b33b48991042a559858390bd551620700222655d33f682afec8445889733c1efda884377cc6d56d75f12d04010a33abecec088c57eb0111f77e WHIRLPOOL 42e073e4a8a3ca2da5b54478412b7a43253a0f2df61e0a8f11a2762f1d4e0435b7d04c4a48805594eee1a54da7e5907395dc539210b8e5f33e98cdb9ced1adc1 +DIST thermald-1.4.2.tar.gz 89080 SHA256 4be5e1105f8b24af17d19357eda97b6edd3d74284c3ee762060d487158997f8b SHA512 373620679df7db242770ae2b5c6e2b9015cfb480539889c43b8f20f52faa139ea307985c8f7369daf14c41d987f7c5af4baecc9dd460ef63556ac982eb4bcd47 WHIRLPOOL 6abde17fc60f30dda58935663084e53cbc26ba8b59bc058b3b6f8fc03af538d6f2e363d578fcbbfb38a02bf3cda0856abcb361fb63fd2e5ce0bc2c63a4d42484 +DIST thermald-1.5.3.tar.gz 335067 SHA256 e20b450ef27a5b5e45474c831663c8f5ecd14c82ace5a4b1e06c442e0a23b53e SHA512 aab4ade4dc50985cd5d45bcce6ea9b75cce22504eb113c86b8733c8be88a701c8812b8b0f3202f084a8128d50ec794ebe1c73312c0a5a5fd1dbc87eedf02df16 WHIRLPOOL 9b48d92fd677c1b327173cac114dd4bc4dbf86c29cc8ab929841342c7e4f7bf651fc03aebb140cce633095230222fac8302931cee8ab2c943beb816e816d9ca0 +DIST thermald-1.5.4.tar.gz 336768 SHA256 42f72fc32c84adcbb2ee6667645c2e1653cdc4f85963e6f72efd83517f7c29f0 SHA512 c23b4aabc59f11fe93074459d8343f587275771268d9c71c871da6bb46d8533a46ab9ac0b495c22771d9064288872abfd3180e3bc92dbe5842cff53046e543d6 WHIRLPOOL 7ad9588218c3b17433061f9a2218efcddc049d9f005177221c2b4bfbec045ca4b2ac2efb2b2b814ff382848390e0624cfcea61fa79c541030abe55e714abcb45 +DIST thermald-1.6.tar.gz 331682 SHA256 c63ae1b031f2b4ce037441e7e9910d05405b540fe6668e156d32c56d5dfa7492 SHA512 ddcd01dcd2f6b5666ffa16ba635734e4c146244b5df7c3f0deb8120f8ee7ebf1f4ee302d49db2b7e9a4950045650922977bd40bf6b38ccea9896f81e06df1d49 WHIRLPOOL 0e246c2e011ef40c07d9194d0bf481349a042dca806a0cf5e3e58a9c211cdac2d18641a87ecebfc78c41ea905683a7ac5f94ba4afeeccfb1ff6bb27e76855c09 +EBUILD thermald-1.4.2-r1.ebuild 920 SHA256 1f9edae494cd0a841b2a91187bf3e62d98f34a222512cf4896cf3ae88a0d016d SHA512 df876af934eaa953c597d720c7c7552cd7d171b6ee9f519405636b104550bc35d4028e5ecead51bdd16afc90cd0bcdfa0c6c8a003d3a54701c950bc8f2ab5bd1 WHIRLPOOL 60fd685ef0a061a335cf00f9c3650cdbe2ae0c39ccbf26167b66eaec4dd518ea8d72228e60e88fd6a38aaf91b0a4aaeb1819b9a153048f7377485ec36504d99a +EBUILD thermald-1.5.3.ebuild 868 SHA256 8ccb875ffde3a223331644eadc3e911c42e4d96bd29d84e9c6d9fef479d8ce52 SHA512 80bb3add8d1323d29a9028df94f47790c54fd9f786d3ca8e3c41b802e5b5d514538afea2960e731dc1ff3184e3e2dd4e5aa474a475e5b8b983e813236ee63047 WHIRLPOOL 0400ca12270cca70416382fcffadc0fda16e5e40424671b1f0989ea1593c08f7b82996b88e79719ba02be4da30463d6ab11fdab8daedc4351345b172d4432deb +EBUILD thermald-1.5.4.ebuild 868 SHA256 cd4b9aa6e69f2ecf0cbb92f4a80f2590cbe836e7a84abe62f6e1b7fa463bb70d SHA512 7d331bf20f8fa2f808045118d79a5cfded63292eee463dbb98a9f37de287405208661d90426166cab44df10d39ab9aee4865209834a8a8eb3860f0886a7b19d9 WHIRLPOOL 78884f8ddc0c031bf33c9be942e8743ef3130d301d0db663af5353f845ec17ee41fc61c00f36bcad6a4a1b477ed8e109f7c6c0467b426a5ed981355c33fea10b +EBUILD thermald-1.6.ebuild 868 SHA256 cd4b9aa6e69f2ecf0cbb92f4a80f2590cbe836e7a84abe62f6e1b7fa463bb70d SHA512 7d331bf20f8fa2f808045118d79a5cfded63292eee463dbb98a9f37de287405208661d90426166cab44df10d39ab9aee4865209834a8a8eb3860f0886a7b19d9 WHIRLPOOL 78884f8ddc0c031bf33c9be942e8743ef3130d301d0db663af5353f845ec17ee41fc61c00f36bcad6a4a1b477ed8e109f7c6c0467b426a5ed981355c33fea10b +MISC ChangeLog 2757 SHA256 c9358f676f48d0f8164d584b78e64b4b24d530aef860068253be2a25425c2e54 SHA512 f73554cfdd3922f33924559de963e533d1ca16feedb75bc249759da0d84c6b592674119667ae8e16a3140aaf41b626a2d24f23d2ec5ccc129de9b0836f1df4f7 WHIRLPOOL 0a5ef948fbf9dd9dab003bdac6c4427ef9f19fe7bae01b520b2f4dd71548ae09039e3b112d48685433ddc33b789474111ee6e045f201aac3b62704ffa07b06a9 +MISC ChangeLog-2015 1021 SHA256 2f484e2c570d92366c3566595af089aaf1886fd15a95f4b432d43c4c1f2b23be SHA512 81682b8e4a5b43f68bf1ddacd7e04f23648f72178d7834cc3066546b2b5dbcb0849d3d7defee14aa6bd10808ecc62e3da703df23d242e6739d05dac5899cddb2 WHIRLPOOL efd4eba3cbc74bb2b43cbfdace7d2177a941237c3b109ca5a1c2db2ac57e65fd376694edf057b521fd9391b82ee5e070665c0a1871a85ab3b67e41bc0b449745 +MISC metadata.xml 643 SHA256 562a5b717d084f29e5a3b6a9de0e7445cebbf38f2067cabae04462b26396b281 SHA512 bad363023e01da0232632d54b2cb65dce89a7c70441f05fc873640a29f6fd4ec4ea30b00f94f723a786de1eef87b94673dad455102bc57a11573346e3a8ae2e8 WHIRLPOOL cbbc0589c56ff2d6ae8995f0ca3549257a94f729c8aede51755ccf585b04b0ce219b727eed35512bea67261b38614adcd391cfe38160ec1cc047891534863657 diff --git a/sys-power/thermald/files/thermald b/sys-power/thermald/files/thermald new file mode 100644 index 000000000000..6d59f77d0bb4 --- /dev/null +++ b/sys-power/thermald/files/thermald @@ -0,0 +1,19 @@ +#!/sbin/openrc-run + +depend() { + need dbus + after logger +} + +start() { + ebegin "Starting thermald" + + start-stop-daemon --start --quiet --name thermald --exec /usr/sbin/thermald -- --dbus-enable + eend $? +} + +stop() { + ebegin "Stopping thermald" + /usr/bin/dbus-send --system --dest=org.freedesktop.thermald /org/freedesktop/thermald org.freedesktop.thermald.Terminate + eend $? +} diff --git a/sys-power/thermald/files/thermald-1.4.2-terminate-r1.patch b/sys-power/thermald/files/thermald-1.4.2-terminate-r1.patch new file mode 100644 index 000000000000..96ba91ffe5ec --- /dev/null +++ b/sys-power/thermald/files/thermald-1.4.2-terminate-r1.patch @@ -0,0 +1,65 @@ +commit 14bf458675a735975c6b9bf7394682e93398a8e0 +Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> +Date: Tue Jul 14 17:46:45 2015 -0700 + + Fix regression in exit via dbus message + + Terminate via dbus terminate message is broken. Fixed this. + Thanks to Yixun Lan <yixun.lan@gmail.com> for finding this. + +diff --git a/src/main.cpp b/src/main.cpp +index 2cf4864..d692cf3 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -50,7 +50,7 @@ + #define TD_DIST_VERSION PACKAGE_VERSION + #endif + +-extern int thd_dbus_server_init(); ++extern int thd_dbus_server_init(void (*exit_handler)(int)); + + // Default log level + static int thd_log_level = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL +@@ -263,7 +263,7 @@ int main(int argc, char *argv[]) { + } + + if (dbus_enable) +- thd_dbus_server_init(); ++ thd_dbus_server_init(sig_int_handler); + + if (!no_daemon) { + printf("Ready to serve requests: Daemonizing.. %d\n", thd_daemonize); +diff --git a/src/thd_dbus_interface.cpp b/src/thd_dbus_interface.cpp +index 021bce2..7926101 100644 +--- a/src/thd_dbus_interface.cpp ++++ b/src/thd_dbus_interface.cpp +@@ -187,8 +187,12 @@ gboolean thd_dbus_interface_get_current_preference(PrefObject *obj, + return TRUE; + } + ++void (*thd_dbus_exit_callback)(int); + gboolean thd_dbus_interface_terminate(PrefObject *obj, GError **error) { + thd_engine->thd_engine_terminate(); ++ if (thd_dbus_exit_callback) ++ thd_dbus_exit_callback(0); ++ + return TRUE; + } + +@@ -561,13 +565,15 @@ gboolean thd_dbus_interface_get_sensor_temperature(PrefObject *obj, int index, + } + + // Setup dbus server +-int thd_dbus_server_init() { ++int thd_dbus_server_init(void (*exit_handler)(int)) { + DBusGConnection *bus; + DBusGProxy *bus_proxy; + GError *error = NULL; + guint result; + PrefObject *value_obj; + ++ thd_dbus_exit_callback = exit_handler; ++ + bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); + if (error != NULL) { + thd_log_error("Couldn't connect to session bus: %s:\n", error->message); diff --git a/sys-power/thermald/metadata.xml b/sys-power/thermald/metadata.xml new file mode 100644 index 000000000000..06e22a1b3827 --- /dev/null +++ b/sys-power/thermald/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <longdescription lang="en"> +Thermald is a Linux user mode daemon to system developers, reducing time to market with +controlled thermal management using P-states, T-states, and the Intel power clamp driver. +The Thermal Daemon uses the existing Linux kernel infrastructure and can be easily enhanced +</longdescription> + <upstream> + <remote-id type="github">01org/thermal_daemon</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/thermald/thermald-1.4.2-r1.ebuild b/sys-power/thermald/thermald-1.4.2-r1.ebuild new file mode 100644 index 000000000000..29cd24743a93 --- /dev/null +++ b/sys-power/thermald/thermald-1.4.2-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 +inherit autotools-utils systemd + +DESCRIPTION="Thermal daemon for Intel architectures" +HOMEPAGE="https://01.org/linux-thermal-daemon" +SRC_URI="https://github.com/01org/thermal_daemon/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" +S=${WORKDIR}/thermal_daemon-${PV} + +CDEPEND="dev-libs/dbus-glib + dev-libs/libxml2" +DEPEND="${CDEPEND} + sys-apps/sed" +RDEPEND="${CDEPEND}" + +DOCS=( thermal_daemon_usage.txt README.txt ) + +PATCHES=( + "${FILESDIR}/${P}-terminate-r1.patch" +) + +src_configure() { + local myeconfargs=( + --with-systemdsystemunitdir=$(systemd_get_unitdir) + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + rm -rf "${D}"/etc/init || die + doinitd "${FILESDIR}"/thermald +} diff --git a/sys-power/thermald/thermald-1.5.3.ebuild b/sys-power/thermald/thermald-1.5.3.ebuild new file mode 100644 index 000000000000..d1751b531f21 --- /dev/null +++ b/sys-power/thermald/thermald-1.5.3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 +inherit autotools-utils systemd + +DESCRIPTION="Thermal daemon for Intel architectures" +HOMEPAGE="https://01.org/linux-thermal-daemon" +SRC_URI="https://github.com/01org/thermal_daemon/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" +S=${WORKDIR}/thermal_daemon-${PV} + +CDEPEND="dev-libs/dbus-glib + dev-libs/libxml2" +DEPEND="${CDEPEND} + sys-apps/sed" +RDEPEND="${CDEPEND}" + +DOCS=( thermal_daemon_usage.txt README.txt ) + +src_configure() { + local myeconfargs=( + --with-systemdsystemunitdir=$(systemd_get_unitdir) + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + rm -rf "${D}"/etc/init || die + doinitd "${FILESDIR}"/thermald +} diff --git a/sys-power/thermald/thermald-1.5.4.ebuild b/sys-power/thermald/thermald-1.5.4.ebuild new file mode 100644 index 000000000000..615c338aa4ac --- /dev/null +++ b/sys-power/thermald/thermald-1.5.4.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 +inherit autotools-utils systemd + +DESCRIPTION="Thermal daemon for Intel architectures" +HOMEPAGE="https://01.org/linux-thermal-daemon" +SRC_URI="https://github.com/01org/thermal_daemon/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" +S=${WORKDIR}/thermal_daemon-${PV} + +CDEPEND="dev-libs/dbus-glib + dev-libs/libxml2" +DEPEND="${CDEPEND} + sys-apps/sed" +RDEPEND="${CDEPEND}" + +DOCS=( thermal_daemon_usage.txt README.txt ) + +src_configure() { + local myeconfargs=( + --with-systemdsystemunitdir=$(systemd_get_unitdir) + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + rm -rf "${D}"/etc/init || die + doinitd "${FILESDIR}"/thermald +} diff --git a/sys-power/thermald/thermald-1.6.ebuild b/sys-power/thermald/thermald-1.6.ebuild new file mode 100644 index 000000000000..615c338aa4ac --- /dev/null +++ b/sys-power/thermald/thermald-1.6.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 +inherit autotools-utils systemd + +DESCRIPTION="Thermal daemon for Intel architectures" +HOMEPAGE="https://01.org/linux-thermal-daemon" +SRC_URI="https://github.com/01org/thermal_daemon/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" +S=${WORKDIR}/thermal_daemon-${PV} + +CDEPEND="dev-libs/dbus-glib + dev-libs/libxml2" +DEPEND="${CDEPEND} + sys-apps/sed" +RDEPEND="${CDEPEND}" + +DOCS=( thermal_daemon_usage.txt README.txt ) + +src_configure() { + local myeconfargs=( + --with-systemdsystemunitdir=$(systemd_get_unitdir) + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + rm -rf "${D}"/etc/init || die + doinitd "${FILESDIR}"/thermald +} diff --git a/sys-power/upower-pm-utils/Manifest b/sys-power/upower-pm-utils/Manifest new file mode 100644 index 000000000000..8235f9e8a18e --- /dev/null +++ b/sys-power/upower-pm-utils/Manifest @@ -0,0 +1,9 @@ +AUX upower-pm-utils-0.9.23-always_use_pm-utils_backend.patch 1477 SHA256 8791a3c7c45be469b931c6db06836af8e470c6f746f9235243acb01ac171d8cd SHA512 83adcdd52739c825b7a280fe3ddac122f9b681a52bfaa1af0a14e7b95fdfa8b6b4a87e290c04af5692537e2a87f6b9770209bd67b869287bdecdbb62b2add0fb WHIRLPOOL eb49f45f86324aa15ee51498fcd26d8e84ea9fb28573bb7a6cf5a8aeb276aea3909e409e5991a01d417b8fd4e1ef3ef9dddd7d670d7d2400269632be4f59e78c +AUX upower-pm-utils-0.9.23-clamp_percentage_for_overfull_batt.patch 3396 SHA256 16c43fbd1a31b88b115392ecb29c449bebe0f8e70530fb965dca49cf0925b131 SHA512 6bb869f1e2c5d93983b20bb65f5fc0803709b690f70b17a78204c98afca41a97b60b1c3cf8f564c931f189bd2db1dab00cd42121f5f022b5e8f0f044faf836d7 WHIRLPOOL 2d0dcf6c5d1246a940db43a38d7c5f429331dc69bd3e40fcac5679f3e2663c5ef1927e9e29fc0fabcf7e21e7693486db0f7b703e8dd36eba4be33d8366861074 +AUX upower-pm-utils-0.9.23-create-dir-runtime.patch 1164 SHA256 6324c148d436e3f898b73b445411f29a7527c65ffedb574ef658c1eaaa1aa4de SHA512 1aaec53df73aa50fabffaddd380800f7ed78caddc02b16834831aa1faa09c795e0def04493f64d852a9b07b9ef4007352e111c5d7cdc1f1b2ed8043c445751f2 WHIRLPOOL 4347f169597c8e144081673d038809a4f0525410aef7e3ff3b713f22dd28e1d7f4bcc69413be2d3c87e7e228dc8da6cfab7b6a3e63feeafafb6e8dc5d4d3a018 +AUX upower-pm-utils-0.9.23-fix-segfault.patch 829 SHA256 c80d1510b3e3d0579ddbec328d2800ab7e112378f9a8ff9ef152d72de50a45c3 SHA512 31a6b5414ddd17cbbcf318da98907d745910e7632ea9a4d4d5c02eaaae87857b5bb88f9ab2f336f7b24637727005fb839f8c9564b82e56ae0065d57b1ce19ad2 WHIRLPOOL 4286fadfbb45b89891ca4aed49b11cde70afa357101f4b9b150d9f68e548af28436fa25a9d8143f7d90daaff0ee22238dd017f10e1e34e58a226553a84724682 +DIST upower-0.9.23.tar.xz 425804 SHA256 433252b0a8e9ab4bed7e17ee3ee5b7cef6d527b1f5401ee32212d82a9682981b SHA512 526ef95e43faf61744ba2bbf80bae23bc5c8672130563a87a7f18f00d85b16e2069814ad70dd66ce6ce698037b522d78579cc2135e2af0c2a636230cfa662c6d WHIRLPOOL 1599739198767ea6c70e133d50302a62a5b0b07c3786057b75636167c80b02d8e0ab6cc4781ac08994b249ffb57875bf186923d441e0b10e73c238b6be5b3538 +EBUILD upower-pm-utils-0.9.23-r2.ebuild 2558 SHA256 97e095d1240a0aa3222d9cf191744740189310b44fe8c0b285ffb40fb8dd9573 SHA512 380b6ef1fd19767149649fb03a360c9a254f00d6ccf247699527fb605625a143a61a3dcd9bc3a100402f590043c36004d382f1b07b95cf6ddeb6ffef577b7799 WHIRLPOOL e79cc44149eb4121be5ff9b903ff34b7ccfd91714d6b61963418788bd799d5fc4c9e8a95d9ce7d0174a1c5d0713faf56e04de83660cf56eb08a1dce53c09493a +MISC ChangeLog 3961 SHA256 ac282e8c537bece6ae91c017357d45de46624f651178a46473ad8fc4f486e834 SHA512 34c3caef91d33d7f4a4b6214dfb756c082a14a898400cfa96511fcb2eb3c90f2189f5e7248ae44dd397d3a611721cd1f6027d5dbd0cd184d543cf505aeed8180 WHIRLPOOL 2d6b02a56532ed52be70b7010858b04f1b7cc14ae27b5593f5b1ce48df5b77509f680cf2139e7782b0a7c17dc30603f379491d470ea7190369ae7bcf0ca69b51 +MISC ChangeLog-2015 2493 SHA256 18376808bf0b6543babb9f815247b395088c3ce5490d579cc6616b736dec3287 SHA512 69480b45fed0cae71a56dc856721b6777488521e19ac921d9ab0d658afbd2937fac33b77d8d94bfd993acff7aa98d1b0ad7058cede4499d6d8c779a63db46042 WHIRLPOOL cb17034999eb336a42ac185d8a0db87807a41f4005ad2c1a036f21e44650131329837f19477415545247ffd3a11f1397122e64ba6ce3893c53665da097d1c44b +MISC metadata.xml 228 SHA256 a3c8fb486cd4bec96195197f2974a236066bd02c05d29ace05a844a43bbfd66e SHA512 4f5e63f918a0f8790db49c5b12173c673f86935f00796a04acfed573f618379b73b05b1869941e11f881fe69d4958f5287ce815fd710eadb6ac9f2680894caae WHIRLPOOL 4690b7b1591c1f8a8b55f8693dbd5172642a2d377c2f12f3b20dca75a6befc9eeac6eeb7e83ba2332b760d64b5c6fd0ac0000b5a40c416eaeec05f49eb6de750 diff --git a/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-always_use_pm-utils_backend.patch b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-always_use_pm-utils_backend.patch new file mode 100644 index 000000000000..b1cb5c7334e0 --- /dev/null +++ b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-always_use_pm-utils_backend.patch @@ -0,0 +1,27 @@ +Description: Always use the pm-utils backend for now + Redirecting the suspend / hibernate request to logind requires systemd + to be running, as logind tries to start the suspend.target / + hibernate.target via the D-Bus interface provided by systemd. + The availability of logind does not necessarily imply that systemd is + available since we made logind D-Bus activatable under sysvinit. + Also, the systemd version currently in unstable (v44) is too old and + doesn't provide that functionality yet. + Ubuntu ships a very basic implementation of that D-Bus inferface in + systemd-shim which can be run under sysvinit. But we don't have that + package in Debian (yet). + For now, it's the safest option to just continue using the old + pm-utils backend always. +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718493 +diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c +index b9f75f5..595a1b2 100644 +--- a/src/linux/up-backend.c ++++ b/src/linux/up-backend.c +@@ -51,7 +51,7 @@ + + #ifdef ENABLE_DEPRECATED + +-#define LOGIND_AVAILABLE() (access("/run/systemd/seats/", F_OK) >= 0) ++#define LOGIND_AVAILABLE() (FALSE) + + #define SD_HIBERNATE_COMMAND "gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.Hibernate 'true'" + #define SD_SUSPEND_COMMAND "gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.Suspend 'true'" diff --git a/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-clamp_percentage_for_overfull_batt.patch b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-clamp_percentage_for_overfull_batt.patch new file mode 100644 index 000000000000..6e643c42de5e --- /dev/null +++ b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-clamp_percentage_for_overfull_batt.patch @@ -0,0 +1,72 @@ +From b8fe9902f3c6c50ca6a23e24fcea99582beebc65 Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinpitt@gnome.org> +Date: Tue, 22 Oct 2013 08:02:51 +0000 +Subject: linux: Clamp percentage for overfull batteries + +Some batteries report energy > energy_full and a percentage ("capacity" +attribute) > 100%. Clamp these within 0 and 100% for both plausibility as well +as to avoid setting an out-of-range property which would then become 0%. + +https://launchpad.net/bugs/1240673 +--- +diff --git a/src/linux/integration-test b/src/linux/integration-test +index 8489bf3..4be1922 100755 +--- a/src/linux/integration-test ++++ b/src/linux/integration-test +@@ -442,6 +442,39 @@ class Tests(unittest.TestCase): + self.assertEqual(self.get_dbus_property('OnLowBattery'), False) + self.stop_daemon() + ++ def test_battery_overfull(self): ++ '''battery which reports a > 100% percentage for a full battery''' ++ ++ self.testbed.add_device('power_supply', 'BAT0', None, ++ ['type', 'Battery', ++ 'present', '1', ++ 'status', 'Full', ++ 'current_now', '1000', ++ 'charge_now', '11000000', ++ 'charge_full', '10000000', ++ 'charge_full_design', '11000000', ++ 'capacity', '110', ++ 'voltage_now', '12000000'], []) ++ ++ self.start_daemon() ++ devs = self.proxy.EnumerateDevices() ++ self.assertEqual(len(devs), 1) ++ bat0_up = devs[0] ++ ++ # should clamp percentage ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Percentage'), 100.0) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'IsPresent'), True) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'State'), ++ UP_DEVICE_STATE_FULLY_CHARGED) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Energy'), 132.0) ++ # should adjust EnergyFull to reality, not what the battery claims ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'EnergyFull'), 132.0) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'EnergyFullDesign'), 132.0) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Voltage'), 12.0) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'PowerSupply'), True) ++ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Type'), 2) ++ self.stop_daemon() ++ + def test_battery_temperature(self): + '''battery which reports temperature''' + +diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c +index 8020277..b953d65 100644 +--- a/src/linux/up-device-supply.c ++++ b/src/linux/up-device-supply.c +@@ -708,6 +708,10 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) + /* get a precise percentage */ + if (sysfs_file_exists (native_path, "capacity")) { + percentage = sysfs_get_double (native_path, "capacity"); ++ if (percentage < 0.0f) ++ percentage = 0.0f; ++ if (percentage > 100.0f) ++ percentage = 100.0f; + /* for devices which provide capacity, but not {energy,charge}_now */ + if (energy < 0.1f && energy_full > 0.0f) + energy = energy_full * percentage / 100; +-- +cgit v0.9.0.2-2-gbebe diff --git a/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-create-dir-runtime.patch b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-create-dir-runtime.patch new file mode 100644 index 000000000000..34340d44ec30 --- /dev/null +++ b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-create-dir-runtime.patch @@ -0,0 +1,34 @@ +From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001 +From: Cosimo Cecchi <cosimo@endlessm.com> +Date: Tue, 25 Feb 2014 09:43:04 +0000 +Subject: Create the history directory at runtime + +In addition to build time - this increases compatibilty with OSTree, +which starts out with an empty /var. + +Signed-off-by: Richard Hughes <richard@hughsie.com> +--- +diff --git a/src/up-history.c b/src/up-history.c +index f9d0fdf..795b093 100644 +--- a/src/up-history.c ++++ b/src/up-history.c +@@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir) + { + g_free (history->priv->dir); + history->priv->dir = g_strdup (dir); ++ g_mkdir_with_parents (dir, 0755); + } + + /** +@@ -887,7 +888,8 @@ up_history_init (UpHistory *history) + history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); + history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); + history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE; +- history->priv->dir = g_build_filename (HISTORY_DIR, NULL); ++ ++ up_history_set_directory (history, HISTORY_DIR); + } + + /** +-- +cgit v0.9.0.2-2-gbebe diff --git a/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-fix-segfault.patch b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-fix-segfault.patch new file mode 100644 index 000000000000..3e8976320777 --- /dev/null +++ b/sys-power/upower-pm-utils/files/upower-pm-utils-0.9.23-fix-segfault.patch @@ -0,0 +1,24 @@ +From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinpitt@gnome.org> +Date: Fri, 08 Nov 2013 13:59:50 +0000 +Subject: lib: Fix segfault on getting property when daemon is not running + +This fixes "upower --version" when the daemon is not running, and thus the +client proxy is NULL. +--- +diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c +index 35d7b5d..17fb02d 100644 +--- a/libupower-glib/up-client.c ++++ b/libupower-glib/up-client.c +@@ -322,6 +322,9 @@ up_client_get_property (GObject *object, + UpClient *client; + client = UP_CLIENT (object); + ++ if (client->priv->proxy == NULL) ++ return; ++ + switch (prop_id) { + case PROP_DAEMON_VERSION: + g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy)); +-- +cgit v0.9.0.2-2-gbebe diff --git a/sys-power/upower-pm-utils/metadata.xml b/sys-power/upower-pm-utils/metadata.xml new file mode 100644 index 000000000000..95e86c12108a --- /dev/null +++ b/sys-power/upower-pm-utils/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>freedesktop-bugs@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-power/upower-pm-utils/upower-pm-utils-0.9.23-r2.ebuild b/sys-power/upower-pm-utils/upower-pm-utils-0.9.23-r2.ebuild new file mode 100644 index 000000000000..6359e7400a38 --- /dev/null +++ b/sys-power/upower-pm-utils/upower-pm-utils-0.9.23-r2.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils systemd + +DESCRIPTION="The upstream upower 0.9 git branch for use with sys-power/pm-utils" +HOMEPAGE="https://upower.freedesktop.org/" +SRC_URI="https://upower.freedesktop.org/releases/upower-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="+introspection ios kernel_FreeBSD kernel_linux" + +COMMON_DEPEND=">=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2.22 + sys-apps/dbus + >=sys-auth/polkit-0.110 + introspection? ( dev-libs/gobject-introspection ) + kernel_linux? ( + virtual/libusb:1 + virtual/libgudev:= + virtual/udev + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-1:= + ) + ) + !sys-power/upower" +RDEPEND="${COMMON_DEPEND} + kernel_linux? ( >=sys-power/pm-utils-1.4.1-r2 )" +DEPEND="${COMMON_DEPEND} + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + dev-util/intltool + >=sys-devel/gettext-0.17 + virtual/pkgconfig" + +QA_MULTILIB_PATHS="usr/lib/upower/.*" + +DOCS="AUTHORS HACKING NEWS README" + +S=${WORKDIR}/upower-${PV} + +src_prepare() { + sed -i -e '/DISABLE_DEPRECATED/d' configure || die + + # https://bugs.freedesktop.org/show_bug.cgi?id=79565 + # https://bugzilla.xfce.org/show_bug.cgi?id=10931 + # Same effect as Debian -no_deprecation_define.patch, they patch .h, we patch .pc + sed -i -e 's|Cflags: |&-DUPOWER_ENABLE_DEPRECATED |' upower-glib.pc.in || die + + # From upstream 0.9 git branch: + epatch \ + "${FILESDIR}"/${P}-create-dir-runtime.patch \ + "${FILESDIR}"/${P}-fix-segfault.patch \ + "${FILESDIR}"/${P}-clamp_percentage_for_overfull_batt.patch + + # From Debian: + epatch "${FILESDIR}"/${P}-always_use_pm-utils_backend.patch +} + +src_configure() { + local backend myconf + + if use kernel_linux; then + backend=linux + myconf="--enable-deprecated" + elif use kernel_FreeBSD; then + backend=freebsd + else + backend=dummy + fi + + econf \ + --libexecdir="${EPREFIX}"/usr/lib/upower \ + --localstatedir="${EPREFIX}"/var \ + $(use_enable introspection) \ + --disable-static \ + ${myconf} \ + --enable-man-pages \ + --disable-tests \ + --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \ + --with-backend=${backend} \ + $(use_with ios idevice) \ + "$(systemd_with_utildir)" \ + "$(systemd_with_unitdir)" +} + +src_install() { + default + + # https://bugs.gentoo.org/487400 + insinto /usr/share/doc/${PF}/html/UPower + doins doc/html/* + dosym /usr/share/doc/${PF}/html/UPower /usr/share/gtk-doc/html/UPower + + keepdir /var/lib/upower #383091 + prune_libtool_files +} diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest new file mode 100644 index 000000000000..f1e917b992f2 --- /dev/null +++ b/sys-power/upower/Manifest @@ -0,0 +1,12 @@ +AUX upower-0.99.4-copy-paste.patch 955 SHA256 30c9e7587bd63f75d50f50f93bf97d9a80fc76f5ce875080487de04b2538beb4 SHA512 9f2718c7fb7ea77d07fe463d3eecae14e40cc2da71c500e2d747c52bbe2f645632cd7ee8289a7f1b8b252b3eb9d5d568ddcd74e00e5fd9985861514895847006 WHIRLPOOL dc6f6b311c7ca1f3e9e428511da0888f10c4e90b058c46432a4727c29332789bd9fda4a53176e52a228be2193b125d009d774450daae3de29167c02c1b83cf00 +AUX upower-0.99.4-timer-stats.patch 1297 SHA256 4e467d2fe9fb09f30614a6160f93a2a2f9521a023459b502fc3103a03ae76feb SHA512 908bcc9fba4cce312010aefe149fa37691dd34c23684c8ee3841bc5d21efd31bc873516c9b4105de065609b9f6196e456653a9e89b35bef3d77da22c0f4cf29b WHIRLPOOL 07ce5f65e60a22680725d2c1a0aeb9b7e6e79b7f2effea8e64cf8fb014a355feb7e84acc4feb1d0b43afa33108a341aebec7e1e6db8209dd0493773168d24617 +DIST upower-0.99.4.tar.xz 426292 SHA256 9ca325a6ccef505529b268ebbbd9becd0ce65a65f6ac7ee31e2e5b17648037b0 SHA512 b3fdee5ccf5f4d0c69e227f543272f6952119132814e27bc8f112716b8d36b5e07741a87bcf02203e80ef910cad9ddffa1adecb338c9a9aaa5e1038b62be07f3 WHIRLPOOL f203682b272e2f9ff7b48a1b4ee359569cbce2314edc599bfc82182e274d95446a8b59228e1dc250db9b823efdd8129cb99022b498f6d7af3b79bbc7ccb42f0f +DIST upower-0.99.5.tar.xz 432344 SHA256 78605664d027c788f6ab63c50950be6e86c6ba5d030c4cf35a6664337d87f3b2 SHA512 2fb06bea69455f538146576665e36c5b91eb18b119fa77e29d383fcb2a86ea58650b82e258f157d03c40147ecb12ea545997199580f0e24847ac6ea04d46e5ea WHIRLPOOL bba93ec4625f2c9e6284d6b22e4391e68411de08bf35b43286003d739d2bf7f57c0e6ad73e6f25bfd8254b73081dc8ff729fe266eeb69cdc9547e2cf856aa646 +DIST upower-0.99.6.tar.xz 432056 SHA256 b194d1f227ed33e76ae29aa5c11acabad334938f2726b8c7903fac07a1335015 SHA512 7e7256491ecb5d3f04abf41f05a761b79761c8868a1aedadfc5085c3b9cf15f6099c1494596e6a24b0951511bc7cac074e93ebb2b84abb9fb7a4374483052d3f WHIRLPOOL 6b35441229c3ebf0dc19dc5800b3642c0298654e3fb552d56c8e9ca5350ab1197382da068b1d0e62ed5ef49afeb83435864f0a1e23dd3a99e4f94b663d198df1 +EBUILD upower-0.99.4-r1.ebuild 2218 SHA256 09dea723ee96813e586e2fced27a224917366e730e2d7798112196d0ef1a5f1b SHA512 8f27db0656fbbb61940e00fe99931e8ef4ad6d3794c119df33536d77d8b50fe0916ff2847f1f81306254e5cb4f1a1b1f019255a9aa85630fde22a7770d71dc2c WHIRLPOOL bf5e498aaacfb9314ae0e0c2af800f04abac73f57c5e3e57b9bc551d9b1589b44808c601b83818b5de68869b97245fdc645ecb4adc6a8eed1b879f6b8d5b9c2b +EBUILD upower-0.99.4.ebuild 1872 SHA256 d68600b864e0d7c7ee7629eac1d98727be9f359f98a33d79a90a6760ad9fd4d9 SHA512 35eb5ccc6cc440604b5f250e75f093992170cccada7f0089082e246f80a3c86380d068258e1ba7d239d135efd055fcfd84be9509404f10736f0731dd718f9891 WHIRLPOOL bb11609659ba2a0a9a6b44c5252263824be9ed898ba688b340f5cd6e18d4007479b60f6b45e99b0f5c401e625c5f1934c802f369784fd6cedd8af42fbb72e9fc +EBUILD upower-0.99.5.ebuild 1948 SHA256 beab6645ed0d4475c53090b4d66875a82a401a45919c05015a847b567beb314c SHA512 206c79a988e8e19c5df8705ad41f8dfe765329f4263014315c7678f1ddbe896da7513b7310dadc0c9f2e61711a99013d91efaea203ec3b359f6a4124b205fe63 WHIRLPOOL c933ee8a7e10cbbe6ea0f9c07c5e68856a18ea6f1227e1f655925a0a02e02c2fdf91e09cd814da9cef50545df3fc60bf4ad064b3415c137bf0e050b6476a86c2 +EBUILD upower-0.99.6.ebuild 1953 SHA256 7250a7b05f57ec8de31cd03a92513d32d85ba289b7c3288a451d9401cd3ce019 SHA512 49677f9bbf9efc4d6cb57ab1f9f085b5acab1986cd0d8955370792641d36ada0ea87a8bd983a13d03e8b91341a031264364669e92e8694eee4db10da555fa4c0 WHIRLPOOL e85a5dcfce1a78615c8e8dd2e51bbac32ffa650b6d7d9935a0f100388e639145c9a4d13057247839e485160e0782d14847fdf9a734ed3983a2fd7924717e13d9 +MISC ChangeLog 4880 SHA256 9c77292cbf3d49e8a6bbfabf047a279c887272e2db3c3996ee6f9f89c73d6945 SHA512 01a96589d0edaa27265b3f40175ba272ad4d1f27eecdbf188798542b390b11a27c83d949858d6e5a3651accbc644e0c688f89b3d977c0dbf9b20097f006b4b6b WHIRLPOOL 3ddc8fba4fd0a74a399e4c7b169eb085142c5060e4247b43616d3056f6b80050f813e8261fbbfcf5f9de9c1090eb30a2a16a706c20ddec886987a5e8cce64a2b +MISC ChangeLog-2015 24340 SHA256 1c57aa39c4ea5fe4b514dba0054a50c2f3b2ea2a4734d3f7efe7a6efbe7919d6 SHA512 2c608907deec333201e1055084f6d84ec96fb84d8091055326fca26c06049e5b8df0c6d03755705bb8c755ce1a246521e2abcc6a1fdac30a01eac25f6c0e8344 WHIRLPOOL 509da1c24ecb175f2cb6a5a8920c50b5739d31967784aa02077680161455e569bcee04ec06cbef1fd6e6b53debb5e71eaaf2028385cb5bd90aec1592f41d7da6 +MISC metadata.xml 228 SHA256 a3c8fb486cd4bec96195197f2974a236066bd02c05d29ace05a844a43bbfd66e SHA512 4f5e63f918a0f8790db49c5b12173c673f86935f00796a04acfed573f618379b73b05b1869941e11f881fe69d4958f5287ce815fd710eadb6ac9f2680894caae WHIRLPOOL 4690b7b1591c1f8a8b55f8693dbd5172642a2d377c2f12f3b20dca75a6befc9eeac6eeb7e83ba2332b760d64b5c6fd0ac0000b5a40c416eaeec05f49eb6de750 diff --git a/sys-power/upower/files/upower-0.99.4-copy-paste.patch b/sys-power/upower/files/upower-0.99.4-copy-paste.patch new file mode 100644 index 000000000000..6afe9b7a9831 --- /dev/null +++ b/sys-power/upower/files/upower-0.99.4-copy-paste.patch @@ -0,0 +1,28 @@ +From 28cee8e2845b094488c337c4ecfa84ada0b6be60 Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martin.pitt@ubuntu.com> +Date: Tue, 23 Feb 2016 09:51:07 +0100 +Subject: daemon: fix get_critical_action() + +Fix copy&paste error from e7e9156f that called the wrong _complete_ function +for up_daemon_get_critical_action(). + +https://bugs.freedesktop.org/show_bug.cgi?id=94262 + +diff --git a/src/up-daemon.c b/src/up-daemon.c +index be14cbe..e95f904 100644 +--- a/src/up-daemon.c ++++ b/src/up-daemon.c +@@ -435,8 +435,8 @@ up_daemon_get_critical_action (UpExportedDaemon *skeleton, + GDBusMethodInvocation *invocation, + UpDaemon *daemon) + { +- up_exported_daemon_complete_get_display_device (skeleton, invocation, +- up_backend_get_critical_action (daemon->priv->backend)); ++ up_exported_daemon_complete_get_critical_action (skeleton, invocation, ++ up_backend_get_critical_action (daemon->priv->backend)); + return TRUE; + } + +-- +cgit v0.10.2 + diff --git a/sys-power/upower/files/upower-0.99.4-timer-stats.patch b/sys-power/upower/files/upower-0.99.4-timer-stats.patch new file mode 100644 index 000000000000..2ac44205459d --- /dev/null +++ b/sys-power/upower/files/upower-0.99.4-timer-stats.patch @@ -0,0 +1,42 @@ +From 798588a480eaae50368bed75fc78f8314523b2a3 Mon Sep 17 00:00:00 2001 +From: Richard Hughes <richard@hughsie.com> +Date: Sun, 23 Apr 2017 20:22:02 +0100 +Subject: Do not spin in a loop when /proc/timer_stats cannot be written + +Only set up the polling once the write has succeeded. + +Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100626 + +diff --git a/src/up-wakeups.c b/src/up-wakeups.c +index 1bc3c7b..99433dd 100644 +--- a/src/up-wakeups.c ++++ b/src/up-wakeups.c +@@ -626,6 +626,13 @@ up_wakeups_timerstats_enable (UpWakeups *wakeups) + + g_debug ("enabling timer stats"); + ++ /* enable timer stats */ ++ file = fopen (UP_WAKEUPS_SOURCE_USERSPACE, "w"); ++ if (file == NULL) ++ return FALSE; ++ fprintf (file, "1\n"); ++ fclose (file); ++ + /* setup polls */ + wakeups->priv->poll_kernel_id = + g_timeout_add_seconds (UP_WAKEUPS_POLL_INTERVAL_KERNEL, +@@ -637,11 +644,6 @@ up_wakeups_timerstats_enable (UpWakeups *wakeups) + (GSourceFunc) up_wakeups_poll_userspace_cb, wakeups); + g_source_set_name_by_id (wakeups->priv->poll_userspace_id, "[upower] up_wakeups_poll_userspace_cb"); + +- file = fopen (UP_WAKEUPS_SOURCE_USERSPACE, "w"); +- if (file == NULL) +- return FALSE; +- fprintf (file, "1\n"); +- fclose (file); + wakeups->priv->polling_enabled = TRUE; + return TRUE; + } +-- +cgit v0.10.2 + diff --git a/sys-power/upower/metadata.xml b/sys-power/upower/metadata.xml new file mode 100644 index 000000000000..95e86c12108a --- /dev/null +++ b/sys-power/upower/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>freedesktop-bugs@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-power/upower/upower-0.99.4-r1.ebuild b/sys-power/upower/upower-0.99.4-r1.ebuild new file mode 100644 index 000000000000..3d9123df0d9e --- /dev/null +++ b/sys-power/upower/upower-0.99.4-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit ltprune systemd + +DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" +HOMEPAGE="https://upower.freedesktop.org/" +SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/3" # based on SONAME of libupower-glib.so +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" + +# gtk-doc files are not available as prebuilt in the tarball +IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux" + +COMMON_DEPS=" + >=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2.34:2 + sys-apps/dbus:= + introspection? ( dev-libs/gobject-introspection:= ) + kernel_linux? ( + virtual/libusb:1 + virtual/libgudev:= + virtual/udev + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-1:= + ) + ) +" +RDEPEND=" + ${COMMON_DEPS} + selinux? ( sec-policy/selinux-devicekit ) +" +DEPEND="${COMMON_DEPS} + doc? ( dev-util/gtk-doc ) + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + dev-util/intltool + >=sys-devel/gettext-0.17 + virtual/pkgconfig +" + +QA_MULTILIB_PATHS="usr/lib/${PN}/.*" + +DOCS="AUTHORS HACKING NEWS README" + +PATCHES=( + # Fix calling the wrong _complete_ function for up_daemon_get_critical_action() + # (from 'master') + "${FILESDIR}"/${P}-copy-paste.patch + + # Do not spin in a loop when /proc/timer_stats cannot be written + # (from 'master') + "${FILESDIR}"/${P}-timer-stats.patch +) + +src_prepare() { + default + sed -i -e '/DISABLE_DEPRECATED/d' configure || die +} + +src_configure() { + local backend myconf + + if use kernel_linux; then + backend=linux + elif use kernel_FreeBSD; then + backend=freebsd + else + backend=dummy + fi + + econf \ + $(use_enable doc gtk-doc) \ + --libexecdir="${EPREFIX}"/usr/lib/${PN} \ + --localstatedir="${EPREFIX}"/var \ + $(use_enable introspection) \ + --disable-static \ + ${myconf} \ + --enable-man-pages \ + --disable-tests \ + --with-backend=${backend} \ + $(use_with ios idevice) \ + --with-systemdutildir="$(systemd_get_utildir)" \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" +} + +src_install() { + default + keepdir /var/lib/upower #383091 + prune_libtool_files +} diff --git a/sys-power/upower/upower-0.99.4.ebuild b/sys-power/upower/upower-0.99.4.ebuild new file mode 100644 index 000000000000..76b2424c8033 --- /dev/null +++ b/sys-power/upower/upower-0.99.4.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils systemd + +DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" +HOMEPAGE="https://upower.freedesktop.org/" +SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/3" # based on SONAME of libupower-glib.so +KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd" + +# gtk-doc files are not available as prebuilt in the tarball +IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux" + +COMMON_DEPS=" + >=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2.34:2 + sys-apps/dbus:= + introspection? ( dev-libs/gobject-introspection:= ) + kernel_linux? ( + virtual/libusb:1 + virtual/libgudev:= + virtual/udev + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-1:= + ) + ) +" +RDEPEND=" + ${COMMON_DEPS} + selinux? ( sec-policy/selinux-devicekit ) +" +DEPEND="${COMMON_DEPS} + doc? ( dev-util/gtk-doc ) + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + dev-util/intltool + >=sys-devel/gettext-0.17 + virtual/pkgconfig +" + +QA_MULTILIB_PATHS="usr/lib/${PN}/.*" + +DOCS="AUTHORS HACKING NEWS README" + +src_prepare() { + sed -i -e '/DISABLE_DEPRECATED/d' configure || die +} + +src_configure() { + local backend myconf + + if use kernel_linux; then + backend=linux + elif use kernel_FreeBSD; then + backend=freebsd + else + backend=dummy + fi + + econf \ + $(use_enable doc gtk-doc) \ + --libexecdir="${EPREFIX}"/usr/lib/${PN} \ + --localstatedir="${EPREFIX}"/var \ + $(use_enable introspection) \ + --disable-static \ + ${myconf} \ + --enable-man-pages \ + --disable-tests \ + --with-backend=${backend} \ + $(use_with ios idevice) \ + "$(systemd_with_utildir)" \ + "$(systemd_with_unitdir)" +} + +src_install() { + default + keepdir /var/lib/upower #383091 + prune_libtool_files +} diff --git a/sys-power/upower/upower-0.99.5.ebuild b/sys-power/upower/upower-0.99.5.ebuild new file mode 100644 index 000000000000..e151571992a2 --- /dev/null +++ b/sys-power/upower/upower-0.99.5.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit ltprune systemd + +DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" +HOMEPAGE="https://upower.freedesktop.org/" +SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/3" # based on SONAME of libupower-glib.so +KEYWORDS="alpha ~amd64 arm ~arm64 ia64 ~mips ppc ppc64 ~sparc ~x86 ~x86-fbsd" + +# gtk-doc files are not available as prebuilt in the tarball +IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux" + +COMMON_DEPS=" + >=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2.34:2 + sys-apps/dbus:= + introspection? ( dev-libs/gobject-introspection:= ) + kernel_linux? ( + virtual/libusb:1 + virtual/libgudev:= + virtual/udev + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-1:= + ) + ) +" +RDEPEND=" + ${COMMON_DEPS} + selinux? ( sec-policy/selinux-devicekit ) +" +DEPEND="${COMMON_DEPS} + doc? ( dev-util/gtk-doc ) + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + dev-util/intltool + >=sys-devel/gettext-0.17 + virtual/pkgconfig +" + +QA_MULTILIB_PATHS="usr/lib/${PN}/.*" + +DOCS=( AUTHORS HACKING NEWS README ) + +src_prepare() { + default + sed -i -e '/DISABLE_DEPRECATED/d' configure || die +} + +src_configure() { + local backend + + if use kernel_linux ; then + backend=linux + elif use kernel_FreeBSD ; then + backend=freebsd + else + backend=dummy + fi + + local myeconfargs=( + --disable-static + --disable-tests + --enable-man-pages + --libexecdir="${EPREFIX%/}"/usr/lib/${PN} + --localstatedir="${EPREFIX%/}"/var + --with-backend=${backend} + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-systemdutildir="$(systemd_get_utildir)" + $(use_enable doc gtk-doc) + $(use_enable introspection) + $(use_with ios idevice) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + keepdir /var/lib/upower #383091 + prune_libtool_files +} diff --git a/sys-power/upower/upower-0.99.6.ebuild b/sys-power/upower/upower-0.99.6.ebuild new file mode 100644 index 000000000000..a884fe3466cc --- /dev/null +++ b/sys-power/upower/upower-0.99.6.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit ltprune systemd + +DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" +HOMEPAGE="https://upower.freedesktop.org/" +SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/3" # based on SONAME of libupower-glib.so +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" + +# gtk-doc files are not available as prebuilt in the tarball +IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux" + +COMMON_DEPS=" + >=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2.34:2 + sys-apps/dbus:= + introspection? ( dev-libs/gobject-introspection:= ) + kernel_linux? ( + virtual/libusb:1 + virtual/libgudev:= + virtual/udev + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-1:= + ) + ) +" +RDEPEND=" + ${COMMON_DEPS} + selinux? ( sec-policy/selinux-devicekit ) +" +DEPEND="${COMMON_DEPS} + doc? ( dev-util/gtk-doc ) + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + dev-util/intltool + >=sys-devel/gettext-0.17 + virtual/pkgconfig +" + +QA_MULTILIB_PATHS="usr/lib/${PN}/.*" + +DOCS=( AUTHORS HACKING NEWS README ) + +src_prepare() { + default + sed -i -e '/DISABLE_DEPRECATED/d' configure || die +} + +src_configure() { + local backend + + if use kernel_linux ; then + backend=linux + elif use kernel_FreeBSD ; then + backend=freebsd + else + backend=dummy + fi + + local myeconfargs=( + --disable-static + --disable-tests + --enable-man-pages + --libexecdir="${EPREFIX%/}"/usr/lib/${PN} + --localstatedir="${EPREFIX%/}"/var + --with-backend=${backend} + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-systemdutildir="$(systemd_get_utildir)" + $(use_enable doc gtk-doc) + $(use_enable introspection) + $(use_with ios idevice) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + keepdir /var/lib/upower #383091 + prune_libtool_files +} |