summaryrefslogtreecommitdiff
path: root/x11-plugins/gkrellm-cpupower
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /x11-plugins/gkrellm-cpupower
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'x11-plugins/gkrellm-cpupower')
-rw-r--r--x11-plugins/gkrellm-cpupower/Manifest4
-rw-r--r--x11-plugins/gkrellm-cpupower/files/gkrellm-cpupower-0.2-makefile.patch45
-rw-r--r--x11-plugins/gkrellm-cpupower/gkrellm-cpupower-0.2-r2.ebuild47
-rw-r--r--x11-plugins/gkrellm-cpupower/metadata.xml5
4 files changed, 96 insertions, 5 deletions
diff --git a/x11-plugins/gkrellm-cpupower/Manifest b/x11-plugins/gkrellm-cpupower/Manifest
index 4fb20288dffc..1c42a60db562 100644
--- a/x11-plugins/gkrellm-cpupower/Manifest
+++ b/x11-plugins/gkrellm-cpupower/Manifest
@@ -1,3 +1,5 @@
+AUX gkrellm-cpupower-0.2-makefile.patch 1061 BLAKE2B c83d00ce78314139b1f972cfd3167b8d5174e44ade0b97b9592e05fc289b64c793d711827cd615d37deed72ded62e81699e58ffd5aca32e3cb58d888b83f5a74 SHA512 a4143262f07e0bc15c4d8d71b03df7a0ae67ba3817ac227545a1932ab91d981ea76a053ebb0e67871c59b7083740aede2a3a920db9feb807a66d7d2417e9081f
DIST gkrellm2-cpupower-0.2.tar.gz 14274 BLAKE2B 6ad0c0825743b3c37670e5b3f7390f601ee3ffc012cc658b0fbd72c4a195ec680eaef8a5dc8f9b72a17199a293865007fc60877addf7c811d9735116d600f934 SHA512 80cf86548c8329af41462cb5cdd0de67cfab05d8d9a7c3315fcc662e0b5e511ffc1f46d2eb3ccf13b9f1607c35860921658eb74970c241a4c56b74e32e4f779e
EBUILD gkrellm-cpupower-0.2-r1.ebuild 927 BLAKE2B cfdbb89a487eaab3044d65b10a6758f82d1b4e03a773809b1fd8683d5962079625e7c622423a23154c310b3b2f8b1c4c85e00bc5d5be360a4887e3b339c2d73a SHA512 cc2c3506c11816a0b3b859e40dc89436b17cefa274363fbfb1a9f31e0eded98fb5c37a20b092e38084d191d27a6b3c534fb6207d279556bd63621c84465ee118
-MISC metadata.xml 353 BLAKE2B 590e96201b0d7408389373c9de31cb1d82501f425630d7bc5552bc8e398ed121c71fa4f01c8eea3c520de47e39475f42ed7fff127b9f929676b8f7d0f35fd830 SHA512 3c2194db6210c9912ac939fefdb806a2015d77d51b0aa592cddf1c1a0090bd7a063e4591e754dfb35982b736b388ce3f6b26ea5cd09c114801bc39bcbc5eff04
+EBUILD gkrellm-cpupower-0.2-r2.ebuild 1112 BLAKE2B 32087f26f5dec20889cc2857a918e0b3e4cf83449008c27ea664ca4eee1df15d6c1bd8f5da0624b55e679e35bd60629a84747aea997bd9891924ff0693647544 SHA512 f65a3039a940fad60b9f8a45cda77501aab182c85a2e64a865029e96a59351dd665139ac22cd529b7bb57a42ebabe6c6d7d1f6e04f0763de6d60804d616a758e
+MISC metadata.xml 264 BLAKE2B 06a1053b520abbb6b64ea5c6f29e4b5dd9777de179ad2fc2c511eeb9cd522d428d66280b61485f47dc8f2e7a57d4c657c15ff7434280cd890613c4ebe1b801e8 SHA512 59509f805dfc0c4c51cb28c097ecd8b8c24d103821661db7cbabec69d707a1e2911c9b8c7efd54e3059198ee294354055e2b87247ccde7a2cf5a5eded8da3df3
diff --git a/x11-plugins/gkrellm-cpupower/files/gkrellm-cpupower-0.2-makefile.patch b/x11-plugins/gkrellm-cpupower/files/gkrellm-cpupower-0.2-makefile.patch
new file mode 100644
index 000000000000..3ec485c7bb18
--- /dev/null
+++ b/x11-plugins/gkrellm-cpupower/files/gkrellm-cpupower-0.2-makefile.patch
@@ -0,0 +1,45 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,22 +1,29 @@
+ # Makefile for gkrellm cpupower plugin
+
+-GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags`
+-GTK_LIB = `pkg-config gtk+-2.0 --libs`
++PKG_CONFIG ?= pkg-config
+
+-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
++GTK_INCLUDE = $(shell ${PKG_CONFIG} gtk+-2.0 --cflags)
++GTK_LIB = $(shell ${PKG_CONFIG} gtk+-2.0 --libs)
++
++FLAGS = -fPIC $(GTK_INCLUDE)
+ LIBS = $(GTK_LIB)
+
+ LFLAGS = -shared -lcpupower
+
+-CC = gcc $(CFLAGS) $(FLAGS)
++CC = $(CC)
+
+ OBJS = cpupower.o
+
++all: cpupower.so
++
++%.o: %.c
++ $(CC) $(CFLAGS) $(FLAGS) -c -o $@ $<
++
+ cpupower.so: $(OBJS)
+- $(CC) $(OBJS) -o cpupower.so $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(FLAGS) $(OBJS) -o cpupower.so $(LFLAGS) $(LIBS)
+
+ install: cpupower.so
+- install -D -m 755 -s cpupower.so $(DESTDIR)/usr/lib/gkrellm2/plugins/cpupower.so
++ install -D -m 755 cpupower.so $(DESTDIR)/usr/lib/gkrellm2/plugins/cpupower.so
+
+ install-sudo:
+ mkdir -p $(DESTDIR)/etc/sudoers.d
+@@ -25,6 +32,3 @@ install-sudo:
+
+ clean:
+ rm -f *.o core *.so* *.bak *~
+-
+-cpupower.o: cpupower.c
+-
diff --git a/x11-plugins/gkrellm-cpupower/gkrellm-cpupower-0.2-r2.ebuild b/x11-plugins/gkrellm-cpupower/gkrellm-cpupower-0.2-r2.ebuild
new file mode 100644
index 000000000000..a3c27d5e817e
--- /dev/null
+++ b/x11-plugins/gkrellm-cpupower/gkrellm-cpupower-0.2-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit gkrellm-plugin toolchain-funcs
+
+MY_P="${P/gkrellm/gkrellm2}"
+
+DESCRIPTION="A Gkrellm2 plugin for displaying and manipulating CPU frequency"
+HOMEPAGE="https://github.com/sainsaar/gkrellm2-cpupower/"
+SRC_URI="https://github.com/sainsaar/gkrellm2-cpupower/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-admin/gkrellm:2[X]"
+RDEPEND="
+ ${DEPEND}
+ app-admin/sudo
+ sys-power/cpupower"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_compile() {
+ tc-export PKG_CONFIG
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ local PLUGIN_SO=( cpupower$(get_modname) )
+ gkrellm-plugin_src_install
+ emake CC="$(tc-getCC)" DESTDIR="${D}" install-sudo
+}
+
+pkg_postinst() {
+ einfo
+ einfo "For changing the governor and CPU frequencies as a user, create the \"trusted\""
+ einfo "group, and add those users to that group who should be allowed to perform"
+ einfo "these changes."
+ einfo
+}
diff --git a/x11-plugins/gkrellm-cpupower/metadata.xml b/x11-plugins/gkrellm-cpupower/metadata.xml
index 625b14b52b45..8e381cab9236 100644
--- a/x11-plugins/gkrellm-cpupower/metadata.xml
+++ b/x11-plugins/gkrellm-cpupower/metadata.xml
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>polynomial-c@gentoo.org</email>
- <name>Lars Wendler</name>
- </maintainer>
+ <!-- maintainer-needed -->
<upstream>
<remote-id type="github">sainsaar/gkrellm2-cpupower</remote-id>
</upstream>