summaryrefslogtreecommitdiff
path: root/games-emulation/gngb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-emulation/gngb
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-emulation/gngb')
-rw-r--r--games-emulation/gngb/Manifest10
-rw-r--r--games-emulation/gngb/files/gngb-20060309-amd64.patch30
-rw-r--r--games-emulation/gngb/files/gngb-20060309-gcc34.patch22
-rw-r--r--games-emulation/gngb/files/gngb-20060309-gcc5.patch35
-rw-r--r--games-emulation/gngb/files/gngb-20060309-gcc7.patch73
-rw-r--r--games-emulation/gngb/files/gngb-20060309-inline.patch24
-rw-r--r--games-emulation/gngb/files/gngb-20060309-joystick.patch56
-rw-r--r--games-emulation/gngb/files/gngb-20060309-qwerty.patch24
-rw-r--r--games-emulation/gngb/gngb-20060309-r1.ebuild44
-rw-r--r--games-emulation/gngb/metadata.xml8
10 files changed, 326 insertions, 0 deletions
diff --git a/games-emulation/gngb/Manifest b/games-emulation/gngb/Manifest
new file mode 100644
index 000000000000..7a56b75c4b36
--- /dev/null
+++ b/games-emulation/gngb/Manifest
@@ -0,0 +1,10 @@
+AUX gngb-20060309-amd64.patch 982 BLAKE2B 767efcd0db8ae30296a2326ae74b16f2ea776bee490a77ae6c7960ed96ac127e54e6bb896cc4bcaca43a5c3a5508ebb0bcad17c5c7af3add1104c95540090811 SHA512 91f3782ecaeac60ad60c14b8e173099683e85917765f1d8e1ce92edbbba929042e0254c2d7f4432124c1dd2c8965603e88172076bf4e3c6b427e8c46f25c0312
+AUX gngb-20060309-gcc34.patch 623 BLAKE2B 8861c3224bc01d4ce1ec5c062d473bb2ad6f533e834550ba7d53f416d684c44580169d36aa016a65d916f8ffe05aa336f1b60da285e253b7aa288c33f8518860 SHA512 651a0771d1b43762083bece5eb12ecba5833774fb095bdb00c0031e20d11b4a59daae4bdd519a2840a2dd5aa5ea0a852d968da7cf96de8acd7ac1ddd90968167
+AUX gngb-20060309-gcc5.patch 818 BLAKE2B 8b937260859a3bed1339f3d3a253fcc58aff3991503f03fbdc529446666e7a0c344469d10793e6ab31dba42f9b4db4b29181e1e3bdaed23bc41175056cc5f747 SHA512 f61dd42c766ee9fcdd02228401011b38dc9ecc7e87044b34f6d726a4fc9862ebabb39223b83967fce247a675a6cfa8037747e49ead4077b9a0aff522f7377e79
+AUX gngb-20060309-gcc7.patch 1693 BLAKE2B a47637993a219502c6f81750987ea7679935cd07e7cb2ad8ffbdb648a8b11c329ca55585949f172c3b0ce2b18592572a37c4302d59b9172e4d481d1a81871644 SHA512 ff73a5344c1b3d090fbd16c774ffb535f4586cd2b876f71654d1e3e127c1527bb9abe096e24f6c8fb5cff2d19c29b12aa1e6f56e760b00362ff44755711ec433
+AUX gngb-20060309-inline.patch 463 BLAKE2B 8946f6bc81e518b482fb93bac335b3a15a728736a06bb753692d6ac896d1ffc4f550d3aff8b41dbd1bf5d79d38c5c3edf969b7686d9fb05e654e49384d65055b SHA512 6a1916555f7855abde4a1ce3a6ba19575c3b92cd8e3eb9283757b54e1747ee37dce7005c2311d9faaeb5059e8157c742abfba072c912b1c6d5e40555a28c2b25
+AUX gngb-20060309-joystick.patch 2162 BLAKE2B f2c9bf3aad5468e5a4e587489b0737270c07d743a7ee710aada49a041f73d6a8afbdf4b8f1efa7ec2a582603b7a39e75c5b33765d965f9b85538dc7a7ff87d01 SHA512 535fcccfc986fdb4e555d0edca7ad4cbe33ed656a904bd32d4de516a4735ecdc7743e58e38a20d2b6015f515f7dbed6260a974ec92797b497a111b0e5bb1c24c
+AUX gngb-20060309-qwerty.patch 590 BLAKE2B 1042df2d545203547a691322ddfee05a76cd9a8a099e7ce14917f7b93ccee606ff9746a88c056409b838e4cd4a53703248bd1232be177d582a7774a80cf141af SHA512 756923c0d35b42adb69da6bf7c3c7cd89adc6402d758b8f2f50d2e527181841685b108cd9903c70a2e62b7ce3319dd1a784045866d50d9a21eabc870115779b9
+DIST gngb-20060309.tar.gz 168911 BLAKE2B 9377b107c3318041cf903de1661ec6a43078e1cade77b2899b6412616b2c5c32e217d5efc69fcc5324c75242f880493b1b3e678c5bc0a71a4a3ef2dbfd756b4c SHA512 169fdb94eac439240ff15fc2337908cb40e06259338d03c0193a0cb04acb9ee688832fc3157ec56e4e541a8889c4b1a4e7d0efb035b5829ffb856192b60d259f
+EBUILD gngb-20060309-r1.ebuild 951 BLAKE2B ee37545f7f64fc3f75d464523e47768bfb24b27f633481518b66dcf28ac29d5986e8450895bd720950fc9b0f609f1f7267c9f88d161d43cfb59c688713e47797 SHA512 b83debaf3d28f5a7da50dd1cb10b7eaf339cfffdebbec798295dde6c23f520bea064a4ecb43e8e8e2591bbfde1ec9f7554aa7e7972c4bee2af084770c523a9de
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..1e63ee00dd26
--- /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 000000000000..112569287fd3
--- /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 000000000000..72dd21a494fb
--- /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 000000000000..557e69501dc9
--- /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 000000000000..d73ed4cb617b
--- /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 000000000000..ec5003a52c61
--- /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-qwerty.patch b/games-emulation/gngb/files/gngb-20060309-qwerty.patch
new file mode 100644
index 000000000000..29f563b749e9
--- /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 000000000000..ebe0e3fb3b34
--- /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)
+}
diff --git a/games-emulation/gngb/metadata.xml b/games-emulation/gngb/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-emulation/gngb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>