commit:     1c7f47eda719bb43499bec5dffc3f3e7d3ca95a1
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 29 10:12:28 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Apr 29 11:26:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c7f47ed

games-emulation/gnuboy: Stop using games.eclass

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../gnuboy/files/gnuboy-1.0.3-exec-stack.patch     | 12 ++---
 .../gnuboy/files/gnuboy-1.0.3-linux-headers.patch  | 36 ++++++-------
 games-emulation/gnuboy/gnuboy-1.0.3-r2.ebuild      | 62 ++++++++++++++++++++++
 3 files changed, 86 insertions(+), 24 deletions(-)

diff --git a/games-emulation/gnuboy/files/gnuboy-1.0.3-exec-stack.patch 
b/games-emulation/gnuboy/files/gnuboy-1.0.3-exec-stack.patch
index b8059f915f6..a263ee49599 100644
--- a/games-emulation/gnuboy/files/gnuboy-1.0.3-exec-stack.patch
+++ b/games-emulation/gnuboy/files/gnuboy-1.0.3-exec-stack.patch
@@ -1,5 +1,5 @@
---- asm/i386/cpu.s
-+++ asm/i386/cpu.s
+--- a/asm/i386/cpu.s
++++ b/asm/i386/cpu.s
 @@ -2428,3 +2428,6 @@
  
  
@@ -7,8 +7,8 @@
 +#if defined(__linux__) && defined(__ELF__)
 +.section .note.GNU-stack,"",%progbits
 +#endif
---- asm/i386/lcd.s
-+++ asm/i386/lcd.s
+--- a/asm/i386/lcd.s
++++ b/asm/i386/lcd.s
 @@ -288,3 +288,6 @@
  
  
@@ -16,8 +16,8 @@
 +#if defined(__linux__) && defined(__ELF__)
 +.section .note.GNU-stack,"",%progbits
 +#endif
---- asm/i386/refresh.s
-+++ asm/i386/refresh.s
+--- a/asm/i386/refresh.s
++++ b/asm/i386/refresh.s
 @@ -283,3 +283,6 @@
  
  

diff --git a/games-emulation/gnuboy/files/gnuboy-1.0.3-linux-headers.patch 
b/games-emulation/gnuboy/files/gnuboy-1.0.3-linux-headers.patch
index b0dd24a8e50..543bd2434ee 100644
--- a/games-emulation/gnuboy/files/gnuboy-1.0.3-linux-headers.patch
+++ b/games-emulation/gnuboy/files/gnuboy-1.0.3-linux-headers.patch
@@ -1,7 +1,7 @@
 # -ansi breaks <linux/joystick.h>
 
---- configure.in
-+++ configure.in
+--- a/configure.in
++++ b/configure.in
 @@ -133,7 +133,7 @@
  if test "$enable_warnings" = yes ; then
  case "$CC" in *gcc*)
@@ -11,8 +11,8 @@
  *)
  AC_MSG_RESULT(disabling warnings for non-gcc compiler) ;;
  esac
---- loader.c
-+++ loader.c
+--- a/loader.c
++++ b/loader.c
 @@ -11,7 +11,6 @@
  #include <stdlib.h>
  #include <string.h>
@@ -21,8 +21,8 @@
  
  static int mbc_table[256] =
  {
---- main.c
-+++ main.c
+--- a/main.c
++++ b/main.c
 @@ -8,7 +8,6 @@
  #include <stdlib.h>
  #include <string.h>
@@ -31,8 +31,8 @@
  
  #include <stdarg.h>
  #include <signal.h>
---- path.c
-+++ path.c
+--- a/path.c
++++ b/path.c
 @@ -5,7 +5,6 @@
  #include <stdlib.h>
  #include <string.h>
@@ -41,8 +41,8 @@
  
  #ifdef ALT_PATH_SEP
  #define SEP ';'
---- rckeys.c
-+++ rckeys.c
+--- a/rckeys.c
++++ b/rckeys.c
 @@ -4,7 +4,6 @@
  #include <stdlib.h>
  #include <string.h>
@@ -51,8 +51,8 @@
  
  #include "defs.h"
  #include "rc.h"
---- rcvars.c
-+++ rcvars.c
+--- a/rcvars.c
++++ b/rcvars.c
 @@ -5,7 +5,6 @@
  #include <stdlib.h>
  #include <string.h>
@@ -61,8 +61,8 @@
  
  #include "defs.h"
  #include "rc.h"
---- sys/linux/fbdev.c
-+++ sys/linux/fbdev.c
+--- a/sys/linux/fbdev.c
++++ b/sys/linux/fbdev.c
 @@ -10,7 +10,6 @@
  
  #include <stdlib.h>
@@ -71,8 +71,8 @@
  #include <unistd.h>
  #include <sys/mman.h>
  #include <linux/fb.h>
---- sys/linux/joy.c
-+++ sys/linux/joy.c
+--- a/sys/linux/joy.c
++++ b/sys/linux/joy.c
 @@ -2,7 +2,6 @@
  #include <stdio.h>
  #include <stdlib.h>
@@ -81,8 +81,8 @@
  #include <linux/joystick.h>
  #include <sys/types.h>
  #include <sys/stat.h>
---- sys/oss/oss.c
-+++ sys/oss/oss.c
+--- a/sys/oss/oss.c
++++ b/sys/oss/oss.c
 @@ -2,7 +2,6 @@
  
  #include <stdlib.h>

diff --git a/games-emulation/gnuboy/gnuboy-1.0.3-r2.ebuild 
b/games-emulation/gnuboy/gnuboy-1.0.3-r2.ebuild
new file mode 100644
index 00000000000..3c4e37c0783
--- /dev/null
+++ b/games-emulation/gnuboy/gnuboy-1.0.3-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools
+
+DESCRIPTION="Gameboy emulator with multiple renderers"
+HOMEPAGE="https://sourceforge.net/projects/gnuboy/";
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X sdl"
+
+RDEPEND="
+       sdl? ( media-libs/libsdl )
+       !X? ( media-libs/libsdl )
+       X? ( x11-libs/libXext )
+"
+DEPEND="${RDEPEND}
+       X? (
+               x11-proto/xextproto
+               x11-proto/xproto )
+"
+
+src_prepare() {
+       default
+       eapply \
+               "${FILESDIR}"/${P}-exec-stack.patch \
+               "${FILESDIR}"/${P}-linux-headers.patch \
+               "${FILESDIR}"/${P}-include.patch
+
+       mv configure.in configure.ac || die
+       eautoreconf
+}
+
+src_configure() {
+       local myconf
+
+       if ! use X ; then
+               myconf="--with-sdl"
+       fi
+
+       econf \
+               $(use_with X x) \
+               $(use_with sdl) \
+               $(use_enable x86 asm) \
+               ${myconf} \
+               --disable-arch \
+               --disable-optimize
+}
+
+src_install() {
+       for f in sdlgnuboy xgnuboy
+       do
+               if [[ -f ${f} ]] ; then
+                       dobin ${f}
+               fi
+       done
+       dodoc README docs/{CHANGES,CONFIG,CREDITS,FAQ,HACKING,WHATSNEW}
+}

Reply via email to