media-sound/rcenter: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Thu, 17 Oct 2019 10:11:17 +0000 (12:11 +0200)
committerDavid Seifert <soap@gentoo.org>
Thu, 17 Oct 2019 10:11:17 +0000 (12:11 +0200)
Bug: https://bugs.gentoo.org/697272
Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: David Seifert <soap@gentoo.org>
media-sound/rcenter/files/rcenter-0.6.2-Wimplicit-function-declaration.patch [new file with mode: 0644]
media-sound/rcenter/files/rcenter-0.6.2-makefile.patch
media-sound/rcenter/rcenter-0.6.2.ebuild

diff --git a/media-sound/rcenter/files/rcenter-0.6.2-Wimplicit-function-declaration.patch b/media-sound/rcenter/files/rcenter-0.6.2-Wimplicit-function-declaration.patch
new file mode 100644 (file)
index 0000000..00de497
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/main.c
++++ b/main.c
+@@ -28,6 +28,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <stdio.h>
++#include <stdlib.h>
+ // use the first one of these that exists
+ static char *default_device[] = {"/dev/midi00", "/dev/midi", NULL};
index 2c5fbd761a83ba733554c75f2f38eb81fe2e89cb..aa579b0d925306e1ea509f10fd430f171b68a077 100644 (file)
@@ -1,8 +1,13 @@
-Index: rcenter-0.6.2/Makefile
-===================================================================
---- rcenter-0.6.2.orig/Makefile
-+++ rcenter-0.6.2/Makefile
-@@ -19,9 +19,9 @@ button.o : button.c
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,4 @@
+ ALLFILES = *.c *.h Makefile LICENSE HISTORY README config
+-CC = gcc
+-CFLAGS = -O2
+ BINARIES = rcenter
+ PREFIX= /usr/local
+@@ -19,9 +17,9 @@
  main.o : main.c
  
  rcenter : main.o lowlevel.o handler.o button.o
index d071eadc0d76b776ec288c59888967d6f6075af9..295c65fb14a2602cdac6a66e8dce5b1a18a36001 100644 (file)
@@ -1,11 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit eutils toolchain-funcs
-
-IUSE=""
+inherit toolchain-funcs
 
 DESCRIPTION="Rcenter - A program to control the EMU10K Remote Control"
 HOMEPAGE="http://rooster.stanford.edu/~ben/projects/rcenter.php"
@@ -16,21 +14,22 @@ SLOT="0"
 #-sparc: emu10k1 doesn't get recognized on sparc hardware
 KEYWORDS="amd64 -sparc x86"
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
-       epatch "${FILESDIR}/${P}-makefile.patch"
-}
+PATCHES=(
+       "${FILESDIR}"/${P}-makefile.patch
+       "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch
+)
 
-src_compile() {
-       emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die
+src_configure() {
+       tc-export CC
 }
 
 src_install() {
-       chmod 755 rcenter
        dobin rcenter
-       dodir /usr/share/rcenter
-       cp -R config "${D}"/usr/share/rcenter/
+       fperms 755 /usr/bin/rcenter
+
+       insinto /usr/share/rcenter
+       doins -r config
+
        dodoc HISTORY README
 }
 
@@ -38,7 +37,7 @@ 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 /usr/share/rcenter/config to <user>/.rcenter"
+       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"
 }