media-sound/rcenter: update EAPI 7 -> 8, port to C23, add rudimentary test

Closes: https://bugs.gentoo.org/944365
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40830
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2025-03-01 19:38:39 +04:00
committed by Sam James
parent d3e76c2660
commit 1c1eef61fd
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
Give a type and a name to a function parameter that will continue to be ignored
As NULL is passed as an argument to pthread_create's callback in only place where timerloop
is used, this invention of a name due to C23 does nothing and argument is never used.
https://bugs.gentoo.org/944365
--- a/lowlevel.c
+++ b/lowlevel.c
@@ -44,7 +44,7 @@
static int timerpipe[2];
static int quitpipe[2];
-static void *timerloop()
+static void *timerloop(void * nothing)
{
int n;
int status;

View File

@@ -0,0 +1,49 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="Rcenter - A program to control the EMU10K Remote Control"
HOMEPAGE="http://rooster.stanford.edu/~ben/projects/rcenter.php"
SRC_URI="http://rooster.stanford.edu/~ben/projects/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
#-sparc: emu10k1 doesn't get recognized on sparc hardware
KEYWORDS="~amd64 -sparc ~x86"
PATCHES=(
"${FILESDIR}"/${P}-makefile.patch
"${FILESDIR}"/${P}-Wimplicit-function-declaration.patch
"${FILESDIR}"/${P}-fno-common.patch
"${FILESDIR}"/${P}-pthread-pointer-type.patch
)
src_configure() {
tc-export CC
}
src_test() {
"${S}"/rcenter -h || die
}
src_install() {
dobin rcenter
fperms 755 /usr/bin/rcenter
insinto /usr/share/rcenter
doins -r config
dodoc HISTORY README
}
pkg_postinst() {
elog "Rcenter Installed - However You need to setup the scripts"
elog "for making remote control commands actually work"
elog
elog "The Skel scripts can be copied from ${EROOT}/usr/share/rcenter/config to <user>/.rcenter"
elog "Where <user> is a person who will use rcenter"
elog "Remeber to use emu-config -i to turn on the remote"
}