public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/gngb/, games-emulation/gngb/files/
@ 2018-04-29 11:26 99% Pacho Ramos
  0 siblings, 0 replies; 1+ results
From: Pacho Ramos @ 2018-04-29 11:26 UTC (permalink / raw
  To: gentoo-commits

commit:     ddce7324a0b8d698a544f489b1aa9d234657dfac
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 29 10:01:57 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Apr 29 11:25:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddce7324

games-emulation/gngb: Drop games.eclass, add Debian fixes

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 games-emulation/gngb/Manifest                      |  1 +
 .../gngb/files/gngb-20060309-amd64.patch           | 30 +++++++++
 .../gngb/files/gngb-20060309-gcc34.patch           | 22 +++++++
 .../gngb/files/gngb-20060309-gcc5.patch            | 35 +++++++++++
 .../gngb/files/gngb-20060309-gcc7.patch            | 73 ++++++++++++++++++++++
 .../gngb/files/gngb-20060309-inline.patch          | 24 +++++++
 .../gngb/files/gngb-20060309-joystick.patch        | 56 +++++++++++++++++
 .../gngb/files/gngb-20060309-ovflfix.patch         | 17 +++++
 .../gngb/files/gngb-20060309-qwerty.patch          | 24 +++++++
 games-emulation/gngb/gngb-20060309-r1.ebuild       | 44 +++++++++++++
 10 files changed, 326 insertions(+)

diff --git a/games-emulation/gngb/Manifest b/games-emulation/gngb/Manifest
new file mode 100644
index 00000000000..644d1f023d4
--- /dev/null
+++ b/games-emulation/gngb/Manifest
@@ -0,0 +1 @@
+DIST gngb-20060309.tar.gz 168911 BLAKE2B 9377b107c3318041cf903de1661ec6a43078e1cade77b2899b6412616b2c5c32e217d5efc69fcc5324c75242f880493b1b3e678c5bc0a71a4a3ef2dbfd756b4c SHA512 169fdb94eac439240ff15fc2337908cb40e06259338d03c0193a0cb04acb9ee688832fc3157ec56e4e541a8889c4b1a4e7d0efb035b5829ffb856192b60d259f

diff --git a/games-emulation/gngb/files/gngb-20060309-amd64.patch b/games-emulation/gngb/files/gngb-20060309-amd64.patch
new file mode 100644
index 00000000000..1e63ee00dd2
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-amd64.patch
@@ -0,0 +1,30 @@
+From: Chris Lamb <lamby@debian.org>
+Date: Wed, 16 Aug 2017 22:53:10 +0200
+Subject: reproducible build
+
+Bug-Debian: https://bugs.debian.org/831773
+---
+ configure.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 9b8aeec..145bd73 100644
+--- a/configure.in
++++ b/configure.in
+@@ -90,6 +90,7 @@ fi
+ dnl Arch
+ 
+ case `uname -m` in
++*x86_64) arch_info=x86_64 ;;
+ *686) arch_info=i686 ;;
+ *i586) arch_info=i586 ;;
+ *i486) arch_info=i486 ;;
+@@ -107,7 +108,7 @@ sys_info=`uname -s`
+ AC_MSG_RESULT(System: $sys_info)
+ 
+ case $arch_info in
+-i686|i586|i486|i386) OPT="-O3  -Wno-unused -funroll-loops -fstrength-reduce \
++x86_64|i686|i586|i486|i386) OPT="-O3  -Wno-unused -funroll-loops -fstrength-reduce \
+                           -ffast-math -falign-functions=2 -falign-jumps=2 \
+                           -falign-loops=2 -fomit-frame-pointer -Wall " ;;
+ sun4u)               OPT="-O3  -Wno-unused -funroll-loops -fstrength-reduce \

diff --git a/games-emulation/gngb/files/gngb-20060309-gcc34.patch b/games-emulation/gngb/files/gngb-20060309-gcc34.patch
new file mode 100644
index 00000000000..112569287fd
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-gcc34.patch
@@ -0,0 +1,22 @@
+From: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
+Date: Thu, 10 Aug 2017 19:06:35 +0000
+Subject: FTBFS_with_gcc-3.4_conflicting_types
+
+===================================================================
+---
+ src/save.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/save.c b/src/save.c
+index c7e4395..bf50bdf 100644
+--- a/src/save.c
++++ b/src/save.c
+@@ -404,6 +404,8 @@ int save_load_rt_info(GNGB_FILE * stream,char op) {
+   return 0;
+ }
+ 
++void movie_add_pad(Uint8 pad);
++
+ int save_load_pad_movie(GNGB_FILE * stream,char op) {
+   if (!op) {			/* Write */
+     PAD_SAVE *p=gngb_movie.first_pad;

diff --git a/games-emulation/gngb/files/gngb-20060309-gcc5.patch b/games-emulation/gngb/files/gngb-20060309-gcc5.patch
new file mode 100644
index 00000000000..72dd21a494f
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-gcc5.patch
@@ -0,0 +1,35 @@
+From: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
+Date: Thu, 10 Aug 2017 19:06:36 +0000
+Subject: gngb_fcc5_fix
+
+---
+ src/cpu.c  | 2 +-
+ src/vram.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cpu.c b/src/cpu.c
+index f03a811..57bc209 100644
+--- a/src/cpu.c
++++ b/src/cpu.c
+@@ -2826,7 +2826,7 @@ __inline__ void rom_timer_inc(void) {
+   }
+ }
+ 
+-__inline__ void cpu_run(void) {
++extern __inline__ void cpu_run(void) {
+   static Uint32 divid_cycle;
+   int v=0;
+   Uint8 a;
+diff --git a/src/vram.c b/src/vram.c
+index 206b625..7213b4e 100644
+--- a/src/vram.c
++++ b/src/vram.c
+@@ -242,7 +242,7 @@ void switch_fullscreen(void) {
+   conf.fs^=1;
+ }
+ 
+-__inline__ Uint8 get_nb_spr(void)
++extern __inline__ Uint8 get_nb_spr(void)
+ {
+   Uint8 *sp=oam_space;
+   Sint16 no_tile,x,y,att;

diff --git a/games-emulation/gngb/files/gngb-20060309-gcc7.patch b/games-emulation/gngb/files/gngb-20060309-gcc7.patch
new file mode 100644
index 00000000000..557e69501dc
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-gcc7.patch
@@ -0,0 +1,73 @@
+From: Markus Koschany <apo@debian.org>
+Date: Thu, 10 Aug 2017 19:39:05 +0000
+Subject: gcc7
+
+Bug-Debian: https://bugs.debian.org/853425
+Forwarded: no
+---
+ src/cpu.c    | 10 +++++-----
+ src/memory.c |  2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/cpu.c b/src/cpu.c
+index 57bc209..5209548 100644
+--- a/src/cpu.c
++++ b/src/cpu.c
+@@ -61,7 +61,7 @@ static Uint8 a;
+ #define H (gbcpu->hl.b.h)
+ #define L (gbcpu->hl.b.l)
+ 
+-__inline__ Uint16 get_word(void)
++extern __inline__ Uint16 get_word(void)
+ {
+   //Uint16 v=((Uint16)(mem_read(PC)));
+   Uint16 v1,v2;
+@@ -74,7 +74,7 @@ __inline__ Uint16 get_word(void)
+   //return v;
+ }
+ 
+-__inline__ Uint8 get_byte(void)
++extern __inline__ Uint8 get_byte(void)
+ {
+   //Uint8 t=mem_read(PC);
+   Uint8 t;
+@@ -83,7 +83,7 @@ __inline__ Uint8 get_byte(void)
+   return t;
+ }
+ 
+-__inline__ void push_r(REG *r)
++extern __inline__ void push_r(REG *r)
+ {
+   //mem_write(--SP,(r)->b.h);
+   //mem_write(--SP,(r)->b.l);
+@@ -93,7 +93,7 @@ __inline__ void push_r(REG *r)
+   mem_write_fast(SP,(r)->b.l);
+ }
+ 
+-__inline__ void pop_r(REG *r)
++extern __inline__ void pop_r(REG *r)
+ {
+   //(r)->b.l=mem_read(SP);
+   mem_read_fast(SP,(r)->b.l);
+@@ -176,7 +176,7 @@ __inline__ Uint8 unknown(void){
+ 
+ 
+ 
+-__inline__ Uint8 gbcpu_exec_one(void)
++extern __inline__ Uint8 gbcpu_exec_one(void)
+ {
+ 	static Uint8 opcode;
+ 	if (gbcpu->ei_flag==1) {
+diff --git a/src/memory.c b/src/memory.c
+index 26e42d9..fd06738 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -737,7 +737,7 @@ Uint8 mem_read_default(Uint16 adr)
+   return 0xFF;
+ }
+ 
+-__inline__ void update_gb_pad(void) {
++extern __inline__ void update_gb_pad(void) {
+   gb_pad=0;
+   if (!conf.play_movie) {
+ 

diff --git a/games-emulation/gngb/files/gngb-20060309-inline.patch b/games-emulation/gngb/files/gngb-20060309-inline.patch
new file mode 100644
index 00000000000..d73ed4cb617
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-inline.patch
@@ -0,0 +1,24 @@
+From: Arthur Marble <arthur@info9.net>
+Date: Wed, 16 Aug 2017 23:49:59 +0200
+Subject: clang-ftbfs
+
+Bug-Debian: https://bugs.debian.org/757486
+---
+ src/global.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/global.h b/src/global.h
+index bb46387..6a6d2b3 100644
+--- a/src/global.h
++++ b/src/global.h
+@@ -22,5 +22,10 @@
+ #include <config.h>
+ #include <SDL.h>
+ 
++#ifdef __clang__
++#define __inline__
++#else
++#define __inline__ inline
++#endif
+ 
+ #endif

diff --git a/games-emulation/gngb/files/gngb-20060309-joystick.patch b/games-emulation/gngb/files/gngb-20060309-joystick.patch
new file mode 100644
index 00000000000..ec5003a52c6
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-joystick.patch
@@ -0,0 +1,56 @@
+From: Markus Koschany <apo@debian.org>
+Date: Wed, 16 Aug 2017 23:25:30 +0200
+Subject: joystick axis
+
+Bug-Debian: https://bugs.debian.org/592777
+Forwarded: http://m.peponas.free.fr/gngb/news.html
+Origin: http://m.peponas.free.fr/gngb/download/memory.c.diff
+---
+ src/memory.c | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/src/memory.c b/src/memory.c
+index fd06738..9eaef1f 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -67,7 +67,11 @@ Uint8 ram_mask;
+ MEM_READ_ENTRY mem_read_tab[0x10];
+ MEM_WRITE_ENTRY mem_write_tab[0x10];
+ 
++/* doesn't work for negative joy_?_min */
++/*
+ Sint16 joy_x_min=0;joy_x_max=0;joy_y_min=0;joy_y_max=0;
++*/
++Sint16 joy_x_min=-32767;joy_x_max=32767;joy_y_min=-32767;joy_y_max=32767;
+ 
+ void (*select_rom_page)(Uint16 adr,Uint8 v);
+ void (*select_ram_page)(Uint16 adr,Uint8 v);
+@@ -755,15 +759,28 @@ extern __inline__ void update_gb_pad(void) {
+       Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]];
+       Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]];
+ 
++			/* unnecessary if joy_?_min and joy_?_max are minimum and maximum
++			 * values of Sint16
+       if (joy_x_pos>joy_x_max) joy_x_max=joy_x_pos;
+       if (joy_x_pos<joy_x_min) joy_x_min=joy_x_pos;
+       if (joy_y_pos>joy_y_max) joy_y_max=joy_y_pos;
+       if (joy_y_pos<joy_y_min) joy_y_min=joy_y_pos;
++      */
+ 
++			/* this doesn't work when joy_x_min or joy_y_min < 0 (mid should be ~0),
++			 * because ((+max) - (-min)) / 2 = ((+max) + (+min)) / 2
+       Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2;
+       Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2;
++      */
++      Sint16 joy_x_mid=(joy_x_max+joy_x_min) >> 1;
++      Sint16 joy_y_mid=(joy_y_max+joy_y_min) >> 1;
++      /* this doesn't work as joy_x_mid or joy_y_mid approaches 0
+       Sint16 joy_x_qua=joy_x_mid / 2;
+       Sint16 joy_y_qua=joy_y_mid / 2;
++      */
++      /* (difference) / 100 = 1% of possible values */
++      Sint16 joy_x_qua=(joy_x_max - joy_x_min) / 100;
++      Sint16 joy_y_qua=(joy_y_max - joy_y_min) / 100;
+ 
+       if ((joy_x_pos<(joy_x_mid-joy_x_qua)) || (key[kmap[PAD_LEFT]])) gb_pad|=0x20;
+       if ((joy_x_pos>(joy_x_mid+joy_x_qua)) || (key[kmap[PAD_RIGHT]])) gb_pad|=0x10;

diff --git a/games-emulation/gngb/files/gngb-20060309-ovflfix.patch b/games-emulation/gngb/files/gngb-20060309-ovflfix.patch
new file mode 100644
index 00000000000..0b638a1da9a
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-ovflfix.patch
@@ -0,0 +1,17 @@
+--- a/src/serial.c.old	2010-10-28 14:40:23.000000000 +0200
++++ b/src/serial.c	2010-10-28 14:41:07.000000000 +0200
+@@ -302,11 +302,11 @@
+ /* Gbserial_read: Read a byte on the serial 
+    This is a block function */
+ Uint8 gbserial_read(void) {
+-  Uint8 b;
++  Uint8 b[2];
+ 
+   gbserial.ready2read=0;
+-  if ((read(dest_socket,&b,2))<=0) return 0xFF;
+-  return b;
++  if ((read(dest_socket,b,2))<=0) return 0xFF;
++  return b[0];
+ }
+ 
+ /* Gbserial_write: Write a byte on the serial 

diff --git a/games-emulation/gngb/files/gngb-20060309-qwerty.patch b/games-emulation/gngb/files/gngb-20060309-qwerty.patch
new file mode 100644
index 00000000000..29f563b749e
--- /dev/null
+++ b/games-emulation/gngb/files/gngb-20060309-qwerty.patch
@@ -0,0 +1,24 @@
+From: Markus Koschany <apo@debian.org>
+Date: Thu, 17 Aug 2017 00:15:26 +0200
+Subject: sample_gngbrc
+
+Bug-Debian: https://bugs.debian.org/597910
+Forwarded: no
+---
+ sample_gngbrc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/sample_gngbrc b/sample_gngbrc
+index a76b465..d0fdd3f 100644
+--- a/sample_gngbrc
++++ b/sample_gngbrc
+@@ -65,6 +65,9 @@ map_joy     1,1,0,0,3,2,0,1
+ 
+ map_key      273,274,276,275,120,119,13,303
+ 
++# Key configuration qwerty example
++# map_key 273,274,276,275,122,120,13,303
++
+ 
+ # Normal GB palette (bright to dark)
+ pal_1 0xB8A68D,0x917D5E,0x635030,0x211A10

diff --git a/games-emulation/gngb/gngb-20060309-r1.ebuild b/games-emulation/gngb/gngb-20060309-r1.ebuild
new file mode 100644
index 00000000000..ebe0e3fb3b3
--- /dev/null
+++ b/games-emulation/gngb/gngb-20060309-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools
+
+DESCRIPTION="Gameboy / Gameboy Color emulator"
+HOMEPAGE="http://m.peponas.free.fr/gngb/"
+SRC_URI="http://m.peponas.free.fr/gngb/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="opengl"
+
+RDEPEND="
+	media-libs/libsdl[sound,joystick,video]
+	sys-libs/zlib
+	app-arch/bzip2
+	opengl? ( virtual/opengl )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	# From Debian
+	"${FILESDIR}"/${P}-amd64.patch
+	"${FILESDIR}"/${P}-gcc34.patch
+	"${FILESDIR}"/${P}-gcc5.patch
+	"${FILESDIR}"/${P}-gcc7.patch
+	"${FILESDIR}"/${P}-inline.patch
+	"${FILESDIR}"/${P}-joystick.patch
+	"${FILESDIR}"/${P}-qwerty.patch
+)
+
+src_prepare() {
+	default
+	sed -i -e '70i#define OF(x) x' src/unzip.h || die
+	mv configure.in configure.ac || die
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_enable opengl gl)
+}


^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-04-29 11:26 99% [gentoo-commits] repo/gentoo:master commit in: games-emulation/gngb/, games-emulation/gngb/files/ Pacho Ramos

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