commit:     9d1e09b46c3c785874a17976c6b868fa178d8e39
Author:     kernaltrap8 <kernaltrap <AT> gmail <DOT> com>
AuthorDate: Mon Jul  1 23:22:41 2024 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 05:24:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d1e09b4

app-admin/cpulimit: add 3.1

Signed-off-by: kernaltrap8 <kernaltrap <AT> gmail.com>
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 app-admin/cpulimit/Manifest                        |  1 +
 app-admin/cpulimit/cpulimit-3.1.ebuild             | 27 ++++++++++++++++++++++
 .../cpulimit/files/cpulimit-3.1-makefile.patch     | 25 ++++++++++++++++++++
 3 files changed, 53 insertions(+)

diff --git a/app-admin/cpulimit/Manifest b/app-admin/cpulimit/Manifest
index 09487a44a762..43428a8a53d0 100644
--- a/app-admin/cpulimit/Manifest
+++ b/app-admin/cpulimit/Manifest
@@ -1 +1,2 @@
 DIST cpulimit-2.8.tar.gz 24860 BLAKE2B 
6d4002d2cbc46da9ce102da77b701e6a99c2e7d16e2e7989baa1e07ef335b126a8c717c4779d121aee1e580ebf057a16b4f83c1bc6a29c904a7532debc4c490a
 SHA512 
aeb121739a5dc9f94c6ddb0905ed05eb7d146c9d0e71c34ba46aad798bda2c30b7ccc548338b4c468f9885f09d97a4565c00199c8df6af74dc9b6f23940c540e
+DIST cpulimit-3.1.tar.gz 25446 BLAKE2B 
77a7ca7dfbcb49f1db481e937607bfa3e287b944d741409033e0a93d2ec788024c30e4de0dc9270645dbd91a66b88db3ddc8763b41f2117b4176bb0f9c2aed5d
 SHA512 
d4c8a2598535ba1221e2089c21576062eff47fe7e842f021e1db83ebdf7ad98ba7d6b216d4f2a93697d4e0adc54c281d24eded7d67bb83134ce06510e1389cda

diff --git a/app-admin/cpulimit/cpulimit-3.1.ebuild 
b/app-admin/cpulimit/cpulimit-3.1.ebuild
new file mode 100644
index 000000000000..8f369c8795a2
--- /dev/null
+++ b/app-admin/cpulimit/cpulimit-3.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Limits the CPU usage of a process"
+HOMEPAGE="https://cpulimit.sourceforge.net";
+SRC_URI="https://downloads.sourceforge.net/limitcpu/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~riscv ~x86"
+
+PATCHES=(
+       "${FILESDIR}/${P}-makefile.patch"
+)
+
+src_compile() {
+       emake CC=$(tc-getCC)
+}
+
+src_install() {
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+       dodoc CHANGELOG README
+}

diff --git a/app-admin/cpulimit/files/cpulimit-3.1-makefile.patch 
b/app-admin/cpulimit/files/cpulimit-3.1-makefile.patch
new file mode 100644
index 000000000000..7daf8a7092ab
--- /dev/null
+++ b/app-admin/cpulimit/files/cpulimit-3.1-makefile.patch
@@ -0,0 +1,25 @@
+--- a/Makefile 2023-02-06 18:47:21.311693323 +0300
++++ b/Makefile 2023-02-06 18:48:23.392517904 +0300
+@@ -2,6 +2,7 @@
+ PREFIX?=/usr
+ CFLAGS?=-Wall -O2
+ CC?=clang
++DESTDIR=
+ 
+ all: cpulimit
+ 
+@@ -21,10 +22,10 @@
+       $(MAKE) -C test
+ 
+ install: cpulimit
+-      mkdir -p ${PREFIX}/bin
+-      mkdir -p ${PREFIX}/share/man/man1
+-      cp cpulimit ${PREFIX}/bin
+-      cp cpulimit.1 ${PREFIX}/share/man/man1
++      mkdir -p ${DESTDIR}/${PREFIX}/bin
++      mkdir -p ${DESTDIR}/${PREFIX}/share/man/man1
++      cp cpulimit ${DESTDIR}/${PREFIX}/bin
++      cp cpulimit.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 
+ deinstall:
+       rm -f ${PREFIX}/bin/cpulimit

Reply via email to