Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: auto-cpufreq-2.2.0
@ 2024-02-20 20:17 meator
  2024-02-20 20:32 ` [PR PATCH] [Updated] " meator
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: meator @ 2024-02-20 20:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

There is a new pull request by meator against master on the void-packages repository

https://github.com/meator/void-packages auto-cpufreq
https://github.com/void-linux/void-packages/pull/48854

New package: auto-cpufreq-2.2.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

`auto-cpufreq` is doing some weeeeird stuff in `auto_cpufreq/core.py`. I will likely have to patch out a lot of things there.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48854.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-auto-cpufreq-48854.patch --]
[-- Type: text/x-diff, Size: 5912 bytes --]

From 82d6bc0db46b82b986f94292fa09e2c46423de0c Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Tue, 20 Feb 2024 21:14:04 +0100
Subject: [PATCH] New package: auto-cpufreq-2.2.0

---
 srcpkgs/auto-cpufreq/files/auto-cpufreq/run   |  3 ++
 .../disable_poetry_dynamic_versioning.patch   | 25 ++++++++++++++++
 .../patches/fix_icon_n_style_locations.patch  | 15 ++++++++++
 .../patches/fix_other_icon_path.patch         | 13 ++++++++
 srcpkgs/auto-cpufreq/template                 | 30 +++++++++++++++++++
 5 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/auto-cpufreq/files/auto-cpufreq/run
 create mode 100644 srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch
 create mode 100644 srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch
 create mode 100644 srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch
 create mode 100644 srcpkgs/auto-cpufreq/template

diff --git a/srcpkgs/auto-cpufreq/files/auto-cpufreq/run b/srcpkgs/auto-cpufreq/files/auto-cpufreq/run
new file mode 100644
index 0000000000000..e30c3badae655
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/files/auto-cpufreq/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec auto-cpufreq --daemon
diff --git a/srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch b/srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch
new file mode 100644
index 0000000000000..ad7cc733a9446
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch
@@ -0,0 +1,25 @@
+The pyproject.toml already sets the correct version, so the version detection
+system doesn't even have to be replaced.
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -32,18 +32,12 @@
+ poetry = "^1.6.1"
+ 
+ [build-system]
+-requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
+-build-backend = "poetry_dynamic_versioning.backend"
++requires = ["poetry-core>=1.0.0"]
++build-backend = "poetry.core.masonry.api"
+ 
+ [tool.poetry.scripts]
+ auto-cpufreq = "auto_cpufreq.bin.auto_cpufreq:main"
+ auto-cpufreq-gtk = "auto_cpufreq.bin.auto_cpufreq_gtk:main"
+ 
+-# https://github.com/mtkennerly/poetry-dynamic-versioning
+-[tool.poetry-dynamic-versioning]
+-enable = true
+-vcs = "git"
+-format = "v{base}+{commit}"
+-
+ # SideNote
+ # Regarding zip_safe = https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html
diff --git a/srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch b/srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch
new file mode 100644
index 0000000000000..18f4b04e8b7eb
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch
@@ -0,0 +1,15 @@
+This patch is taken from
+https://aur.archlinux.org/cgit/aur.git/tree/001-fix-icon-n-style-locations.patch?h=auto-cpufreq&id=2cb3f7935e7e0252e15d8dbcf1309ab246e143cf
+--- a/auto_cpufreq/gui/app.py
++++ b/auto_cpufreq/gui/app.py
+@@ -20,8 +20,8 @@
+     ICON_FILE = "/snap/auto-cpufreq/current/icon.png"
+     CSS_FILE = "/snap/auto-cpufreq/current/style.css"
+ else:
+-    ICON_FILE = "/usr/local/share/auto-cpufreq/images/icon.png"
+-    CSS_FILE = "/usr/local/share/auto-cpufreq/scripts/style.css"
++    ICON_FILE = "/usr/share/pixmaps/auto-cpufreq.png"
++    CSS_FILE = "/usr/share/auto-cpufreq/scripts/style.css"
+ 
+ HBOX_PADDING = 20
+ PKEXEC_ERROR = "Error executing command as another user: Not authorized\n\nThis incident has been reported.\n"
diff --git a/srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch b/srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch
new file mode 100644
index 0000000000000..a982d60e688bd
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch
@@ -0,0 +1,13 @@
+This patch is taken from
+https://aur.archlinux.org/cgit/aur.git/tree/002-fix-other-icon-path.patch?h=auto-cpufreq&id=2cb3f7935e7e0252e15d8dbcf1309ab246e143cf
+--- a/auto_cpufreq/gui/objects.py
++++ b/auto_cpufreq/gui/objects.py
+@@ -221,7 +221,7 @@
+         self.add_button("Close", Gtk.ResponseType.CLOSE)
+         self.set_default_size(400, 350)
+         img_buffer = GdkPixbuf.Pixbuf.new_from_file_at_scale(
+-                    filename="/usr/local/share/auto-cpufreq/images/icon.png",
++                    filename="/usr/share/pixmaps/auto-cpufreq.png",
+                     width=150,
+                     height=150,
+                     preserve_aspect_ratio=True)
diff --git a/srcpkgs/auto-cpufreq/template b/srcpkgs/auto-cpufreq/template
new file mode 100644
index 0000000000000..4a465df082961
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/template
@@ -0,0 +1,30 @@
+# Template file for 'auto-cpufreq'
+pkgname=auto-cpufreq
+version=2.2.0
+revision=1
+build_style=python3-pep517
+# auto-cpufreq is executed in post_install() to get completions, so masterdir
+# needs part of $depends installed
+_core_deps="python3-click python3-psutil python3-distro python3-requests"
+makedepends="python3-poetry-core $_core_deps"
+depends="$_core_deps python3-gobject gtk+3"
+short_desc="Automatic CPU speed & power optimizer for Linux"
+maintainer="meator <meator.dev@gmail.com>"
+license="LGPL-3.0-only"
+homepage="https://github.com/AdnanHodzic/auto-cpufreq"
+distfiles="https://github.com/AdnanHodzic/auto-cpufreq/archive/refs/tags/v2.2.0.tar.gz"
+checksum=d84d45a1638f5bff72b5ce7c1653886143cdbb4c6b198e63e054b6a18f7ade68
+
+post_install() {
+	vsconf auto-cpufreq.conf-example auto-cpufreq.conf
+	vinstall scripts/auto-cpufreq-gtk.desktop 644 usr/share/applications
+	vinstall images/icon.png 644 usr/share/pixmaps auto-cpufreq.png
+	vinstall scripts/style.css 644 usr/share/auto-cpufreq/scripts
+	vinstall scripts/cpufreqctl.sh 755 usr/share/auto-cpufreq/scripts
+	vsv auto-cpufreq
+
+	for completion in bash fish zsh; do
+		PYTHONPATH=$DESTDIR/$py3_sitelib _AUTO_CPUFREQ_COMPLETE=${completion}_source ${DESTDIR}/usr/bin/auto-cpufreq > auto-cpufreq.$completion
+		vcompletion auto-cpufreq.$completion $completion
+	done
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-05-09 11:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20 20:17 [PR PATCH] New package: auto-cpufreq-2.2.0 meator
2024-02-20 20:32 ` [PR PATCH] [Updated] " meator
2024-02-20 20:48 ` meator
2024-02-20 21:06 ` meator
2024-02-20 21:43 ` meator
2024-02-20 21:53 ` meator
2024-02-20 23:17 ` meator
2024-02-20 23:22 ` meator
2024-02-21  0:17 ` abenson
2024-02-21  5:52 ` [PR REVIEW] " Luciogi
2024-02-21  5:55 ` Luciogi
2024-02-21  7:54 ` meator
2024-02-21  7:56 ` [PR PATCH] [Updated] " meator
2024-02-21  7:57 ` meator
2024-02-21  8:06 ` meator
2024-02-21 11:38 ` [PR REVIEW] " Luciogi
2024-02-21 11:40 ` Luciogi
2024-02-21 18:40 ` meator
2024-05-09 11:15 ` [PR PATCH] [Updated] " meator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).