cyan-skillfish-governor-smu-9999.ebuild 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. # Copyright 2024-2026 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. CRATES="
  5. aho-corasick-1.1.4
  6. anstream-0.6.21
  7. anstream-1.0.0
  8. anstyle-1.0.14
  9. anstyle-parse-0.2.7
  10. anstyle-parse-1.0.0
  11. anstyle-query-1.1.5
  12. anstyle-wincon-3.0.11
  13. anyhow-1.0.102
  14. async-broadcast-0.7.2
  15. async-channel-2.5.0
  16. async-executor-1.14.0
  17. async-fs-2.2.0
  18. async-io-2.6.0
  19. async-lock-3.4.2
  20. async-process-2.5.0
  21. async-recursion-1.1.1
  22. async-signal-0.2.13
  23. async-task-4.7.1
  24. async-trait-0.1.89
  25. atomic-waker-1.1.2
  26. autocfg-1.5.0
  27. bitflags-2.10.0
  28. block-buffer-0.10.4
  29. blocking-1.6.2
  30. cfg-if-1.0.4
  31. cfg_aliases-0.2.1
  32. clap-4.5.60
  33. clap-verbosity-flag-2.2.3
  34. clap_builder-4.5.60
  35. clap_derive-4.5.55
  36. clap_lex-1.1.0
  37. colorchoice-1.0.5
  38. concurrent-queue-2.5.0
  39. cpufeatures-0.2.17
  40. crossbeam-utils-0.8.21
  41. crypto-common-0.1.7
  42. digest-0.10.7
  43. endi-1.1.1
  44. enumflags2-0.7.12
  45. enumflags2_derive-0.7.12
  46. env_filter-1.0.1
  47. env_logger-0.11.10
  48. equivalent-1.0.2
  49. errno-0.3.14
  50. event-listener-5.4.1
  51. event-listener-strategy-0.5.4
  52. fastrand-2.3.0
  53. foldhash-0.1.5
  54. futures-core-0.3.32
  55. futures-io-0.3.32
  56. futures-lite-2.6.1
  57. futures-sink-0.3.32
  58. futures-task-0.3.32
  59. futures-util-0.3.32
  60. generic-array-0.14.7
  61. getrandom-0.2.17
  62. getrandom-0.4.2
  63. hashbrown-0.15.5
  64. hashbrown-0.16.1
  65. heck-0.5.0
  66. hermit-abi-0.5.2
  67. hex-0.4.3
  68. id-arena-2.3.0
  69. indexmap-2.13.0
  70. is_terminal_polyfill-1.70.2
  71. itoa-1.0.18
  72. jiff-0.2.23
  73. jiff-static-0.2.23
  74. leb128fmt-0.1.0
  75. libc-0.2.183
  76. libdrm_amdgpu_sys-0.8.11
  77. linux-raw-sys-0.12.1
  78. log-0.4.29
  79. memchr-2.8.0
  80. memoffset-0.9.1
  81. nix-0.29.0
  82. once_cell-1.21.4
  83. once_cell_polyfill-1.70.2
  84. ordered-stream-0.2.0
  85. parking-2.2.1
  86. pin-project-lite-0.2.17
  87. piper-0.2.5
  88. polling-3.11.0
  89. portable-atomic-1.13.1
  90. portable-atomic-util-0.2.6
  91. ppv-lite86-0.2.21
  92. prettyplease-0.2.37
  93. proc-macro-crate-3.4.0
  94. proc-macro2-1.0.105
  95. quote-1.0.43
  96. r-efi-6.0.0
  97. rand-0.8.5
  98. rand_chacha-0.3.1
  99. rand_core-0.6.4
  100. regex-1.12.3
  101. regex-automata-0.4.14
  102. regex-syntax-0.8.10
  103. rustix-1.1.4
  104. semver-1.0.27
  105. serde-1.0.228
  106. serde_core-1.0.228
  107. serde_derive-1.0.228
  108. serde_json-1.0.149
  109. serde_repr-0.1.20
  110. serde_spanned-1.0.4
  111. sha1-0.10.6
  112. signal-hook-0.3.18
  113. signal-hook-registry-1.4.8
  114. slab-0.4.12
  115. static_assertions-1.1.0
  116. strsim-0.11.1
  117. syn-2.0.114
  118. tempfile-3.27.0
  119. thiserror-1.0.69
  120. thiserror-impl-1.0.69
  121. toml-0.9.11+spec-1.1.0
  122. toml_datetime-0.7.5+spec-1.1.0
  123. toml_edit-0.23.10+spec-1.0.0
  124. toml_parser-1.0.6+spec-1.1.0
  125. toml_writer-1.0.6+spec-1.1.0
  126. tracing-0.1.44
  127. tracing-attributes-0.1.31
  128. tracing-core-0.1.36
  129. typenum-1.19.0
  130. uds_windows-1.2.1
  131. unicode-ident-1.0.22
  132. unicode-xid-0.2.6
  133. utf8parse-0.2.2
  134. version_check-0.9.5
  135. wasi-0.11.1+wasi-snapshot-preview1
  136. wasip2-1.0.2+wasi-0.2.9
  137. wasip3-0.4.0+wasi-0.3.0-rc-2026-01-06
  138. wasm-encoder-0.244.0
  139. wasm-metadata-0.244.0
  140. wasmparser-0.244.0
  141. windows-link-0.2.1
  142. windows-sys-0.52.0
  143. windows-sys-0.59.0
  144. windows-sys-0.61.2
  145. windows-targets-0.52.6
  146. windows_aarch64_gnullvm-0.52.6
  147. windows_aarch64_msvc-0.52.6
  148. windows_i686_gnu-0.52.6
  149. windows_i686_gnullvm-0.52.6
  150. windows_i686_msvc-0.52.6
  151. windows_x86_64_gnu-0.52.6
  152. windows_x86_64_gnullvm-0.52.6
  153. windows_x86_64_msvc-0.52.6
  154. winnow-0.7.14
  155. wit-bindgen-0.51.0
  156. wit-bindgen-core-0.51.0
  157. wit-bindgen-rust-0.51.0
  158. wit-bindgen-rust-macro-0.51.0
  159. wit-component-0.244.0
  160. wit-parser-0.244.0
  161. xdg-home-1.3.0
  162. zbus-4.4.0
  163. zbus_macros-4.4.0
  164. zbus_names-3.0.0
  165. zerocopy-0.8.47
  166. zerocopy-derive-0.8.47
  167. zmij-1.0.21
  168. zvariant-4.2.0
  169. zvariant_derive-4.2.0
  170. zvariant_utils-2.1.0
  171. "
  172. inherit cargo git-r3
  173. DESCRIPTION="Adaptive GPU frequency governor for AMD Cyan Skillfish APU"
  174. HOMEPAGE="https://github.com/filippor/cyan-skillfish-governor"
  175. EGIT_REPO_URI="https://github.com/filippor/cyan-skillfish-governor.git"
  176. EGIT_BRANCH="smu"
  177. SRC_URI="${CARGO_CRATE_URIS}"
  178. LICENSE="MIT"
  179. # Licenses for bundled Rust crate dependencies
  180. LICENSE+=" Apache-2.0 BSD-2 ISC Unicode-DFS-2016 Unlicense ZLIB"
  181. SLOT="0"
  182. KEYWORDS=""
  183. IUSE=""
  184. # libdrm_amdgpu_sys links against libdrm_amdgpu at build and runtime
  185. DEPEND="x11-libs/libdrm[video_cards_amdgpu]"
  186. RDEPEND="
  187. ${DEPEND}
  188. sys-apps/dbus
  189. "
  190. BDEPEND="virtual/rust"
  191. src_unpack() {
  192. git-r3_src_unpack
  193. cargo_src_unpack
  194. }
  195. src_compile() {
  196. cargo_src_compile
  197. }
  198. src_install() {
  199. cargo_src_install
  200. # Default configuration
  201. insinto /etc/cyan-skillfish-governor-smu
  202. newins default-config.toml config.toml
  203. # D-Bus policy allowing any user to contact the governor service
  204. insinto /etc/dbus-1/system.d
  205. doins com.cyan.SkillFishGovernor.conf
  206. # Helper script for toggling performance mode from Steam or the command line
  207. dobin scripts/cyan-skillfish-performance-mode
  208. # OpenRC init script
  209. newinitd "${FILESDIR}/cyan-skillfish-governor-smu.initd" cyan-skillfish-governor-smu
  210. }
  211. pkg_postinst() {
  212. if [[ -z "${REPLACING_VERSIONS}" ]]; then
  213. elog ""
  214. elog "A default configuration has been installed to:"
  215. elog " /etc/cyan-skillfish-governor-smu/config.toml"
  216. elog ""
  217. elog "Edit it to match your GPU's voltage/frequency safe-points before"
  218. elog "starting the service. The built-in defaults are conservative."
  219. elog ""
  220. elog "To start the service:"
  221. elog " rc-service cyan-skillfish-governor-smu start"
  222. elog ""
  223. elog "To enable at boot:"
  224. elog " rc-update add cyan-skillfish-governor-smu default"
  225. elog ""
  226. elog "To enable the D-Bus performance-mode interface, set"
  227. elog " dbus.enabled = true in config.toml, then restart the service."
  228. elog ""
  229. fi
  230. }