summaryrefslogtreecommitdiff
path: root/sys-power/acpilight
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /sys-power/acpilight
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'sys-power/acpilight')
-rw-r--r--sys-power/acpilight/Manifest4
-rw-r--r--sys-power/acpilight/acpilight-1.2-r4.ebuild (renamed from sys-power/acpilight/acpilight-1.2-r1.ebuild)9
-rw-r--r--sys-power/acpilight/files/acpilight.initd17
3 files changed, 21 insertions, 9 deletions
diff --git a/sys-power/acpilight/Manifest b/sys-power/acpilight/Manifest
index e5f0c10023d6..df53abdc8c8e 100644
--- a/sys-power/acpilight/Manifest
+++ b/sys-power/acpilight/Manifest
@@ -1,7 +1,7 @@
AUX acpilight-1.2-fix-log10-of-zero.patch 715 BLAKE2B 33a33f4869a5c3cc27898ca5adea8d79c7b94d497ece5204b38e9ced59f686999ce1b625bf0e7b83447b862c9fb769ab6a8095c0498819c8254cb70cbead6b22 SHA512 786e4c0ab97d240a5fdedbee2adddd90c9aea390f9ad1becb5d61e1f0023d076bb01b0c847f6a68e49cbebee28b218cf7940c9fa087a4865539670fe81ce051e
AUX acpilight.confd 269 BLAKE2B 196245bd083f89d9d975a81aaaf66d0422655cd6a5f575c2cbb898747c92bdb888f8123dbf8ddf34089be2547d39e33508119065ffb97c26f9d1d3915bee8bb2 SHA512 28e513dbcaa30cec4d2f876c244766037eb6e94ff660ff2caf9cb955f40c710ea750cac73eb5e3890b42904227ccbd7f6c3e2595c2496e54d3339d6afdd0ffb0
-AUX acpilight.initd 742 BLAKE2B bc2ad5027cd9e5c9f8d0d55e249117f7f59ad587522d21ea2baf69e45a884df242d46cb3001ef46ef63c1e1f87a18bc5c05d4facf1e9d72d4b596926e9a6b69b SHA512 9fe648ea994eeb9baa294226b55bd6230cb2b28952f651755da622278539fc071527e3aa2425e26687bb8065ef2e372ab93d7090532dbf3208ccac8519f01fca
+AUX acpilight.initd 1183 BLAKE2B 061676f47bfbd07a46c3bf6ab1cbebaca22fe8e5f43afc445ef30ac3b0b5f74a99d0f061c28b2c26b458b3606ffbe8afb6344aca6a4d5a19699b29614445a45c SHA512 623115ef09c5163d1c7301e0bc9a631cf414fc36d78677d12430091775bade6df51bd8d8e4ff597de4cc09f92cf1ab11ea29f8370f3e8e8e608191a044e4a200
DIST acpilight-v1.2.tar.gz 18068 BLAKE2B 469fd12c0a24b152681d73add559733a294f8a0848f46d0d3a1e209dea2ad3b180294677a8d84a82387ec34b00bbfda85a10f447fe22b81a3c51225cdce14051 SHA512 ef634ec0f315fe94dca138f1b9231f320b93340db3365ab9a09cf898fe4691f70573041bcb04563d760f1201000ea3ff11ab5dad3bfffddf3d3070dedb5732d7
-EBUILD acpilight-1.2-r1.ebuild 1493 BLAKE2B 0f0338f8f615905cc32cf86989b8d22444083bb1ed54fffdc26f3643f15ba579e127510ad36ac627e3aeb971fee633fbc8d75d2663c8c85b3d1b9bc0cc3b72cf SHA512 b2ea18b03eca0c055931f3b27ce3a4c37e0e427ce616318b266779895cb600fef96b381899b419319e822cacf15a6b060689f4d0b2620d26f1c1ad0412d7ec63
EBUILD acpilight-1.2-r3.ebuild 1585 BLAKE2B 7ed3f91cb9b9e413e7496fe5d12ed33b96823545003853c32221a1df5b0c0d04d03c9d67d7b4cbee41fcdc6e118bab1226039037c5210e263a10f711a62aa3f2 SHA512 ece73afbc9b63c882de55b37f2236d76869263b40e44d0e963afb1f93608b2e814355cc0f63e043af1dd5223e98e8582d7187712a98cc0fa171ead64465bb52f
+EBUILD acpilight-1.2-r4.ebuild 1587 BLAKE2B 40e360047d44e8590c61ab18d22c85ed98df8ef3717d07248458fa075c3dfacc17e5f7084c9e9cfed39f9402dfd344eb7974921c1c979186ef7d47ffce8f0325 SHA512 54df83c6971da77565294cb19db1e7037cb9f2f431340112385727a989482b5a4bac29be186ddd00316f0587f7d67138021ac9675238c55a830b93ab5b3dfc98
MISC metadata.xml 338 BLAKE2B b78b457b201249e0b1636adbc1ad883254cae74f9212a2acc135a399b78a0987434cdce7c584e1b421b512dc1086c47883b75b5bb4cc79ac17255f6f4a16fe87 SHA512 08d6d838162f11e7c96760d6fdd4f4137359e03ad74e7ef0a8427a6b0df744988a56dbf2c97e3e2bf77156438873b307c2f073bcfd2e6e023e25606baa6ed6aa
diff --git a/sys-power/acpilight/acpilight-1.2-r1.ebuild b/sys-power/acpilight/acpilight-1.2-r4.ebuild
index 71c6d36ea414..6b815fddb262 100644
--- a/sys-power/acpilight/acpilight-1.2-r1.ebuild
+++ b/sys-power/acpilight/acpilight-1.2-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_7 python3_8 )
+PYTHON_COMPAT=( python3_7 python3_8 python3_9 )
inherit python-single-r1 udev
@@ -14,18 +14,21 @@ HOMEPAGE="https://gitlab.com/wavexx/acpilight/"
SRC_URI="https://gitlab.com/wavexx/acpilight/-/archive/v${PV}/${MY_P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="amd64 x86"
+KEYWORDS="~amd64 ~x86"
IUSE=""
S="${WORKDIR}/${MY_P}"
RDEPEND="virtual/udev
acct-group/video
+ !dev-libs/light
${PYTHON_DEPS}
!x11-apps/xbacklight"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DOCS=( README.rst NEWS.rst )
+PATCHES=( "${FILESDIR}/acpilight-1.2-fix-log10-of-zero.patch" )
+
# Disable Makefile that installs by default
src_compile() { :; }
diff --git a/sys-power/acpilight/files/acpilight.initd b/sys-power/acpilight/files/acpilight.initd
index 0de6029867e0..780828246712 100644
--- a/sys-power/acpilight/files/acpilight.initd
+++ b/sys-power/acpilight/files/acpilight.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
state_dir=/var/lib/acpilight
@@ -19,13 +19,22 @@ restore() {
return 0
fi
xbacklight "$(cat "${state_dir}/state")"
- eend $?
+ ewend $? "Could not restore brightness. The state file ${state_dir}/state is invalid or the system cannot apply the value."
}
save() {
+ local newValue
ebegin "Saving brightness level"
- mkdir -p "${state_dir}" && xbacklight -get > "${state_dir}/state"
- eend $?
+ # Save the value here so an error won't record an empty/invalid value
+ newValue=$(xbacklight -get) && \
+ mkdir -p "${state_dir}" && \
+ echo "${newValue}" > "${state_dir}/state"
+ if [ $? -gt 0 ]; then
+ ewarn "Could not save brightness."
+ ewarn "The state file ${state_dir}/state cannot be written to or the system cannot read the brightness value."
+ fi
+ # Don't fail on error
+ eend 0
}
start() {