summaryrefslogtreecommitdiff
path: root/sys-power/acpid
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-power/acpid
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-power/acpid')
-rw-r--r--sys-power/acpid/Manifest18
-rw-r--r--sys-power/acpid/acpid-2.0.23.ebuild67
-rw-r--r--sys-power/acpid/acpid-2.0.27.ebuild68
-rw-r--r--sys-power/acpid/acpid-2.0.28.ebuild68
-rw-r--r--sys-power/acpid/files/acpid-1.0.4-default19
-rw-r--r--sys-power/acpid/files/acpid-1.0.6-default.sh59
-rw-r--r--sys-power/acpid/files/acpid-2.0.16-conf.d6
-rw-r--r--sys-power/acpid/files/acpid-2.0.16-init.d20
-rw-r--r--sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch13
-rw-r--r--sys-power/acpid/files/acpid-2.0.25-kde4.patch13
-rw-r--r--sys-power/acpid/files/acpid-2.0.26-init.d19
-rw-r--r--sys-power/acpid/files/systemd/acpid.service10
-rw-r--r--sys-power/acpid/files/systemd/acpid.socket8
-rw-r--r--sys-power/acpid/metadata.xml11
14 files changed, 399 insertions, 0 deletions
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>