commit:     fb210a4ff39348861a9c5345bdea14667d6dca40
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Mon Nov  3 23:29:37 2025 +0000
Commit:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
CommitDate: Thu Nov  6 17:50:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fb210a4f

sys-apps/coolercontrold: add 3.0.2

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>

 sys-apps/coolercontrold/Manifest                   |   2 +
 .../coolercontrold/coolercontrold-3.0.2.ebuild     | 110 +++++++++++++++++++++
 .../files/coolercontrold-3.0.2-liquidctl.patch     |  34 +++++++
 3 files changed, 146 insertions(+)

diff --git a/sys-apps/coolercontrold/Manifest b/sys-apps/coolercontrold/Manifest
index 3324dd053f..c14f814c71 100644
--- a/sys-apps/coolercontrold/Manifest
+++ b/sys-apps/coolercontrold/Manifest
@@ -2,8 +2,10 @@ DIST coolercontrol-2.2.2-dist.tar.xz 997364 BLAKE2B 
bc614c98382f9731df3ecf8922a0
 DIST coolercontrol-2.2.2.tar.bz2 15870398 BLAKE2B 
ee26c65b702f934a2a2bc25b1443a0050596c6b10a7c11c40b4391a84aee2cc8d7d4063b082e9ebf39f002aa413c1a023030aebbf23c4a0fb346fa0e6a0a54a2
 SHA512 
550e323368ecf5131b96544173d36bf05d9e3b2c925d557146f0a3c325b70563fbec19e03918c0398a60749748e3e00d40a25669209009dca37dc2fdec3bbacc
 DIST coolercontrol-3.0.1-dist.tar.xz 1103292 BLAKE2B 
03accc9b4978026e8c8b6a558d83a89b21cec3e0230561e33d0cb5f35cfcca79a2d66394a66d901cb0be05370c646daf74d186780e478a79171dc8ddd36fbbf2
 SHA512 
32379e77ee4245b2a7046cfca9d8e5920fe4545c3fd35e787d03951a38a7ed6d9780ba20dcede92a91aeac578bdd25331d57b5f2e5a0cf080c116cd5750c81f7
 DIST coolercontrol-3.0.1.tar.bz2 38188904 BLAKE2B 
2d6d1e9d84797b85eeaf5cf4b6184db187eeea47c767caf39570576c644ecc65e1df18ea8906ce5a62c956ffc64c650cf7412421e3909edfe166963f1f6ce54e
 SHA512 
b053758772e1a4f69f95c11bb640bc6404ef51b8682982296b413cb48c77f264f17117c7524d4f9ee736af619cd67a985a81f476fe736e86cd85d73cfa7f5a70
+DIST coolercontrol-3.0.2.tar.gz 8937023 BLAKE2B 
447705ef8f4347b3446802aada3d26a51cef97b09027822974ac175c8a8c7f47c30f8bb1a77c34f0efbda21f89e95828a4de7cf43d9eead3601ff25cf9aeb41a
 SHA512 
45448cbbdd480272bf08af5aefc00a4704029831dc0983942a3f08f92a07c823e8c4458a5be247875f6214b8f469eedc5cde83d6815df37d1261fd7b6c534c71
 DIST coolercontrold-2.2.2-crates.tar.xz 35507500 BLAKE2B 
97e6a99d124d7c2546eb4cceafb6cc65870701e9b8a583209a8b67afd0d6773d842b688897259f9b8d42f0c4e71aaa976922f70ff4e928dd0f4865ebc61511ae
 SHA512 
cccd1c4ff007ee5f0db6bf3250dd6408a2928d4536ca3b4395dd0b8ff4ea05ab858f40610b9fd7dff7bd859fbd3689d3bd5d7e2f5d382ad68885434ed23c0aae
 DIST coolercontrold-3.0.1-crates.tar.xz 35903240 BLAKE2B 
de0f1661974e1de5317c7675b7b2c0844ddcce2e31d7fcd0750d4821a55d31749c5140bf5804fca8a3414289b9e0affdb79fad07a50d2948e324f36d0c65cacf
 SHA512 
20ef9498190bf4c34bf81db9a71a878f9725049f9f66d575a869aaf97d881631361a0878aa52702a7ec178ed407b38633f1875c05a8442eb0eb52e0e9b5b08fb
+DIST coolercontrold-3.0.2-vendor.tar.gz 69396637 BLAKE2B 
9eb3217dba48ed3ecabcbd7018cefaeeb238421a8b427f7da3c2c7fcdc22f007b0b7ad321ab6675162f22f26f65d0d738958524af21fcc8b4664ed0c8462a94d
 SHA512 
8b7d7a0e5c7ac74cb37de798cd4a0553e9b01d01af4755f8c1236be456d6d6272ca505625caa7e78669307a7d67fef2fb0c268e0a50508c91186432ce74633c0
 DIST nvml-wrapper-572095f631da93be8d243c73820e581676969897.gh.tar.gz 234938 
BLAKE2B 
91820ff38212c176027ab6fb0552efb1544e539fc0dda29e1f7d82e2cec8dce1ecd6cc499c120049869cde638ecf3918db3f73f86ea73214135e83c4bccbf8b7
 SHA512 
1ead616cd59058e3c2f100cc0dff9b6f4f97aeb70d30ef7d9667eef3e8b272bfae487e1c68e042680c4be8667246b4048cf8124ffe6a7011899cd2b87d8e9ec2
 DIST tower-governor-9cc5a4433fa4f5fc7ffaf82ac277471d056ceef4.gh.tar.gz 31666 
BLAKE2B 
a5e28607537049aa4d2659cd85229205b7541993e3bfa72a414ebb7ee6ef0c8f00d60b3571dda5e1d6d5174768f53618991f9a0bbaa9801648f37f7e72e0ac70
 SHA512 
85e5818b75d26f7a2d61f7100bbbd8d80c15b5fed0fea95bc874b7de7a874c28286e53499e9ab23cbbeb31ec9370053d8a01174aab42ac7c3c49e5cc375bd277
 DIST tower-governor-fd799d86418e58179468953c80ad7094a81a9e37.gh.tar.gz 31787 
BLAKE2B 
452d9423efbb4230bd88dfd58418850d0ccd53d5d7a45ff5f60005f292637c296c4c67d75397a7f4a59af51028b2fa95a2ef69b372c18b1dc02408437e8aac81
 SHA512 
40819f6d2dd7f1471af403e0314d261d043c6fddde12c55b797412d07f0ae6db3cfb640cbe3e2ebfea1be11794ed8ded20c39ca489784a4dbbbfdead3ff2f38c

diff --git a/sys-apps/coolercontrold/coolercontrold-3.0.2.ebuild 
b/sys-apps/coolercontrold/coolercontrold-3.0.2.ebuild
new file mode 100644
index 0000000000..190160b9d8
--- /dev/null
+++ b/sys-apps/coolercontrold/coolercontrold-3.0.2.ebuild
@@ -0,0 +1,110 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+RUST_MIN_VER=1.86
+
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit cargo eapi9-ver optfeature python-single-r1 systemd
+
+DESCRIPTION="Monitor and control your cooling and other devices (daemon)"
+HOMEPAGE="https://gitlab.com/coolercontrol/coolercontrol";
+
+MY_P="coolercontrol-${PV}"
+SRC_URI="
+       
https://gitlab.com/coolercontrol/coolercontrol/-/releases/${PV}/downloads/packages/${MY_P}.tar.gz
+       
https://gitlab.com/coolercontrol/coolercontrol/-/releases/${PV}/downloads/packages/coolercontrold-vendor.tar.gz
+               -> ${P}-vendor.tar.gz
+       ${CARGO_CRATE_URIS}
+"
+S="${WORKDIR}/${MY_P}/${PN}"
+
+LICENSE="GPL-3+"
+# Dependent crate licenses
+LICENSE+="
+       AGPL-3+ Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD GPL-3+
+       ISC MIT UoI-NCSA Unicode-3.0 ZLIB
+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="liquidctl"
+REQUIRED_USE="liquidctl? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+       app-arch/zstd:=
+       liquidctl? (
+               ${PYTHON_DEPS}
+               $(python_gen_cond_dep '
+                       app-misc/liquidctl[${PYTHON_USEDEP}]
+               ')
+       )
+"
+DEPEND="${RDEPEND}"
+
+QA_FLAGS_IGNORED=".*"
+
+PATCHES=(
+       "${FILESDIR}"/coolercontrold-3.0.2-liquidctl.patch
+)
+
+pkg_setup() {
+       rust_pkg_setup
+       use liquidctl && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+       # trickery to avoid double unpacking :/
+       A="${A[@]/${P}-vendor.tar.gz/}" cargo_src_unpack
+       pushd "${S}" >/dev/null || die
+       unpack ${P}-vendor.tar.gz
+       popd >/dev/null || die
+}
+
+src_prepare() {
+       pushd .. >/dev/null || die
+       default
+       popd >/dev/null || die
+
+       if use liquidctl; then
+               # Upstream solution not suitable for Gentoo where multiple 
python targets are available.
+               sed -e "s|@@PYTHON@@|${PYTHON}|" \
+                       -i src/repositories/liquidctl/liqctld_service.rs || die
+       fi
+}
+
+src_configure() {
+       export ZSTD_SYS_USE_PKG_CONFIG=1
+
+       cargo_src_configure
+}
+
+src_install() {
+       cargo_src_install
+
+       einstalldocs
+
+       doinitd ../packaging/openrc/init.d/coolercontrol
+       doconfd ../packaging/openrc/conf.d/coolercontrol
+
+       # Match documentation and systemd name to avoid confusion
+       newinitd ../packaging/openrc/init.d/coolercontrol coolercontrold
+       newconfd ../packaging/openrc/conf.d/coolercontrol coolercontrold
+
+       systemd_dounit ../packaging/systemd/coolercontrold.service
+}
+
+pkg_postinst() {
+       # libdrm[video_cards_amdgpu] dlopen'd, but the feature is not really 
noteworthy enough for optfeature
+       # (more accurate gpu names for amd)
+       optfeature "sensors support" sys-apps/lm-sensors
+
+       if ver_replacing -lt 3.0.0; then
+               elog "coolercontrol-liqctld isn't packaged separately anymore. 
It's behind the liqtctl use flag now."
+       fi
+}

diff --git a/sys-apps/coolercontrold/files/coolercontrold-3.0.2-liquidctl.patch 
b/sys-apps/coolercontrold/files/coolercontrold-3.0.2-liquidctl.patch
new file mode 100644
index 0000000000..205ce391ed
--- /dev/null
+++ b/sys-apps/coolercontrold/files/coolercontrold-3.0.2-liquidctl.patch
@@ -0,0 +1,34 @@
+Patch to make it easy to sed in the configured python interpeter and mention 
the liquidctl use flag in the error message.
+diff --git a/coolercontrold/src/repositories/liquidctl/liqctld_service.rs 
b/coolercontrold/src/repositories/liquidctl/liqctld_service.rs
+index 179745d3..8cfbceb4 100644
+--- a/coolercontrold/src/repositories/liquidctl/liqctld_service.rs
++++ b/coolercontrold/src/repositories/liquidctl/liqctld_service.rs
+@@ -122,7 +122,7 @@ fn create_command() -> (String, &'static str) {
+         info!("Running liqctld inside an AppImage");
+         (format!("{appdir}/usr/bin/python3"), "-I")
+     } else {
+-        ("python3".to_string(), "-q")
++        ("@@PYTHON@@".to_string(), "-q")
+     }
+ }
+ 
+diff --git a/coolercontrold/src/repositories/liquidctl/liquidctl_repo.rs 
b/coolercontrold/src/repositories/liquidctl/liquidctl_repo.rs
+index 230d6391..1dca6180 100644
+--- a/coolercontrold/src/repositories/liquidctl/liquidctl_repo.rs
++++ b/coolercontrold/src/repositories/liquidctl/liquidctl_repo.rs
+@@ -81,10 +81,10 @@ impl LiquidctlRepo {
+         }
+         if let Err(err) = liqctld_service::verify_env().await {
+             let msg = format!(
+-                "Python liquidctl system package not detected. If you want 
liquidctl device \
+-                support, please make sure the liquidctl package is installed 
with your \
+-                distribution's package manager. If not, you may disable 
liquidctl support \
+-                to no longer see this message. {err}"
++                "Python liquidctl system package not detected or liquidctl 
use flag is disabled \
++                for coolercontrold. If you want liquidctl device support, 
please make sure \
++                the liquidctl use flag is enabled for coolercontrold. If not, 
you may disable \
++                liquidctl support to no longer see this message. {err}"
+             );
+             return Err(InitError::PythonEnv { msg }.into());
+         }
+

Reply via email to