From 1c1eef61fdb54fa19f25a7fda138bb16d02468f1 Mon Sep 17 00:00:00 2001 From: NHOrus Date: Sat, 1 Mar 2025 19:38:39 +0400 Subject: [PATCH] media-sound/rcenter: update EAPI 7 -> 8, port to C23, add rudimentary test Closes: https://bugs.gentoo.org/944365 Signed-off-by: NHOrus Closes: https://github.com/gentoo/gentoo/pull/40830 Signed-off-by: Sam James --- .../rcenter-0.6.2-pthread-pointer-type.patch | 15 ++++++ media-sound/rcenter/rcenter-0.6.2-r1.ebuild | 49 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 media-sound/rcenter/files/rcenter-0.6.2-pthread-pointer-type.patch create mode 100644 media-sound/rcenter/rcenter-0.6.2-r1.ebuild diff --git a/media-sound/rcenter/files/rcenter-0.6.2-pthread-pointer-type.patch b/media-sound/rcenter/files/rcenter-0.6.2-pthread-pointer-type.patch new file mode 100644 index 0000000000000..6d506b1c07805 --- /dev/null +++ b/media-sound/rcenter/files/rcenter-0.6.2-pthread-pointer-type.patch @@ -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; diff --git a/media-sound/rcenter/rcenter-0.6.2-r1.ebuild b/media-sound/rcenter/rcenter-0.6.2-r1.ebuild new file mode 100644 index 0000000000000..4a523ad92e54e --- /dev/null +++ b/media-sound/rcenter/rcenter-0.6.2-r1.ebuild @@ -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 /.rcenter" + elog "Where is a person who will use rcenter" + elog "Remeber to use emu-config -i to turn on the remote" +}