public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/cpulimit/, app-admin/cpulimit/files/
@ 2023-04-23 15:48 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2023-04-23 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     0fe5e537a744ac90cacd63babb2a4772da1fdb5a
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Feb  6 16:10:05 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Apr 23 15:47:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fe5e537

app-admin/cpulimit: add 2.8

Migrate to EAPI8, building and compilation fixes.

Closes: https://bugs.gentoo.org/686528
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29452
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 app-admin/cpulimit/Manifest                        |  1 +
 app-admin/cpulimit/cpulimit-2.8.ebuild             | 28 ++++++++++++++++++++++
 .../cpulimit/files/cpulimit-2.8-inline-func.patch  | 11 +++++++++
 .../cpulimit/files/cpulimit-2.8-makefile.patch     | 25 +++++++++++++++++++
 4 files changed, 65 insertions(+)

diff --git a/app-admin/cpulimit/Manifest b/app-admin/cpulimit/Manifest
index a4a54c346ec9..75403fa699be 100644
--- a/app-admin/cpulimit/Manifest
+++ b/app-admin/cpulimit/Manifest
@@ -1 +1,2 @@
 DIST cpulimit-2.4.tar.gz 24669 BLAKE2B e0fe0d6766e76e6e2a68dcdc553039400233daabbb14ce4a9dae46a7b694d2ecd660f4c1d13f417a74b12365c719780c732a03bd91c6384d1e7118d0fce521fb SHA512 008dc3fbdcbd8afd875a2a1ce03d609db595c6e110803140c676d3713ea60f4877a1bb8e7aa0e8b669dce31522ad81e2703f616341a0f4cbc69a6b01865b66d0
+DIST cpulimit-2.8.tar.gz 24860 BLAKE2B 6d4002d2cbc46da9ce102da77b701e6a99c2e7d16e2e7989baa1e07ef335b126a8c717c4779d121aee1e580ebf057a16b4f83c1bc6a29c904a7532debc4c490a SHA512 aeb121739a5dc9f94c6ddb0905ed05eb7d146c9d0e71c34ba46aad798bda2c30b7ccc548338b4c468f9885f09d97a4565c00199c8df6af74dc9b6f23940c540e

diff --git a/app-admin/cpulimit/cpulimit-2.8.ebuild b/app-admin/cpulimit/cpulimit-2.8.ebuild
new file mode 100644
index 000000000000..a3d5dc9d8201
--- /dev/null
+++ b/app-admin/cpulimit/cpulimit-2.8.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2023 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="mirror://sourceforge/limitcpu/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~riscv ~x86"
+
+PATCHES=(
+	"${FILESDIR}/${P}-makefile.patch"
+	"${FILESDIR}/${P}-inline-func.patch"	# Bug #686528
+)
+
+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-2.8-inline-func.patch b/app-admin/cpulimit/files/cpulimit-2.8-inline-func.patch
new file mode 100644
index 000000000000..12b516223a01
--- /dev/null
+++ b/app-admin/cpulimit/files/cpulimit-2.8-inline-func.patch
@@ -0,0 +1,11 @@
+--- a/cpulimit.c	2023-02-06 19:07:19.450894524 +0300
++++ b/cpulimit.c	2023-02-06 19:07:28.834337797 +0300
+@@ -125,7 +125,7 @@
+ 
+ 
+ //return ta-tb in microseconds (no overflow checks!)
+-inline long timediff(const struct timespec *ta,const struct timespec *tb) {
++static long timediff(const struct timespec *ta,const struct timespec *tb) {
+     unsigned long us = (ta->tv_sec-tb->tv_sec)*1000000 + (ta->tv_nsec/1000 - tb->tv_nsec/1000);
+     return us;
+ }

diff --git a/app-admin/cpulimit/files/cpulimit-2.8-makefile.patch b/app-admin/cpulimit/files/cpulimit-2.8-makefile.patch
new file mode 100644
index 000000000000..7daf8a7092ab
--- /dev/null
+++ b/app-admin/cpulimit/files/cpulimit-2.8-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


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

* [gentoo-commits] repo/gentoo:master commit in: app-admin/cpulimit/, app-admin/cpulimit/files/
@ 2024-07-04  5:25 Matthew Thode
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Thode @ 2024-07-04  5:25 UTC (permalink / raw
  To: gentoo-commits

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


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

end of thread, other threads:[~2024-07-04  5:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-23 15:48 [gentoo-commits] repo/gentoo:master commit in: app-admin/cpulimit/, app-admin/cpulimit/files/ Conrad Kostecki
  -- strict thread matches above, loose matches on Subject: below --
2024-07-04  5:25 Matthew Thode

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox