summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2011-12-12 19:07:33 +0000
committerAlfredo Tupone <tupone@gentoo.org>2011-12-12 19:07:33 +0000
commitef46ed7f29dee4fb76cd186cd7a2aaa4300ceb41 (patch)
tree81ceefd69fa23884a95655744c10518d7801e443 /games-emulation
parentStable for AMD64, wrt bug #394013 (diff)
downloadgentoo-2-ef46ed7f29dee4fb76cd186cd7a2aaa4300ceb41.tar.gz
gentoo-2-ef46ed7f29dee4fb76cd186cd7a2aaa4300ceb41.tar.bz2
gentoo-2-ef46ed7f29dee4fb76cd186cd7a2aaa4300ceb41.zip
Build with latest zlib. Bug #387843
(Portage version: 2.1.10.39/cvs/Linux i686)
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/visualboyadvance/ChangeLog8
-rw-r--r--games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-zlib.patch145
-rw-r--r--games-emulation/visualboyadvance/visualboyadvance-1.7.2-r3.ebuild82
3 files changed, 234 insertions, 1 deletions
diff --git a/games-emulation/visualboyadvance/ChangeLog b/games-emulation/visualboyadvance/ChangeLog
index 1c00134ade72..afad996d777e 100644
--- a/games-emulation/visualboyadvance/ChangeLog
+++ b/games-emulation/visualboyadvance/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-emulation/visualboyadvance
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/visualboyadvance/ChangeLog,v 1.37 2011/09/14 16:41:43 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/visualboyadvance/ChangeLog,v 1.38 2011/12/12 19:07:33 tupone Exp $
+
+*visualboyadvance-1.7.2-r3 (12 Dec 2011)
+
+ 12 Dec 2011; Tupone Alfredo <tupone@gentoo.org>
+ +visualboyadvance-1.7.2-r3.ebuild, +files/visualboyadvance-1.7.2-zlib.patch:
+ Build with latest zlib. Bug #387843 by Diego Elio Pettenò
14 Sep 2011; Samuli Suominen <ssuominen@gentoo.org>
visualboyadvance-1.7.2-r2.ebuild,
diff --git a/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-zlib.patch b/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-zlib.patch
new file mode 100644
index 000000000000..d397676c0779
--- /dev/null
+++ b/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-zlib.patch
@@ -0,0 +1,145 @@
+--- src/gb/GB.cpp.old 2011-12-12 11:28:33.412463305 +0100
++++ src/gb/GB.cpp 2011-12-12 11:29:09.592463481 +0100
+@@ -29,7 +29,6 @@
+ #include "gbMemory.h"
+ #include "gbSGB.h"
+ #include "gbSound.h"
+-#include "../unzip.h"
+ #include "../Util.h"
+
+ #ifdef __GNUC__
+--- src/sdl/TestEmu.cpp.old 2011-12-12 11:49:42.802469335 +0100
++++ src/sdl/TestEmu.cpp 2011-12-12 11:49:57.682469414 +0100
+@@ -28,7 +28,7 @@
+ #include "GBA.h"
+ #include "debugger.h"
+ #include "Sound.h"
+-#include "unzip.h"
++#include <minizip/unzip.h>
+ #include "Util.h"
+ #include "gb/GB.h"
+ #include "gb/gbGlobals.h"
+--- ./src/sdl/SDL.cpp.old 2011-12-12 11:29:45.072463639 +0100
++++ ./src/sdl/SDL.cpp 2011-12-12 11:29:56.372463698 +0100
+@@ -34,7 +34,7 @@
+ #include "RTC.h"
+ #include "Sound.h"
+ #include "Text.h"
+-#include "unzip.h"
++#include <minizip/unzip.h>
+ #include "Util.h"
+ #include "gb/GB.h"
+ #include "gb/gbGlobals.h"
+--- ./src/System.h.old 2011-12-12 11:27:56.382463126 +0100
++++ ./src/System.h 2011-12-12 11:28:13.202463209 +0100
+@@ -20,7 +20,7 @@
+ #ifndef VBA_SYSTEM_H
+ #define VBA_SYSTEM_H
+
+-#include "unzip.h"
++#include <minizip/unzip.h>
+
+ #ifndef NULL
+ #define NULL 0
+--- src/memgzio.c.old 2011-12-12 11:37:12.912465774 +0100
++++ src/memgzio.c 2011-12-12 11:42:25.682467264 +0100
+@@ -66,13 +66,13 @@
+ } mem_stream;
+
+
+-local gzFile gz_open OF((char *memory, const int available, const char *mode));
+-local int do_flush OF((gzFile file, int flush));
+-local int get_byte OF((mem_stream *s));
+-local void check_header OF((mem_stream *s));
+-local int destroy OF((mem_stream *s));
+-local void putLong OF((MEMFILE *file, uLong x));
+-local uLong getLong OF((mem_stream *s));
++local gzFile gz_open _Z_OF((char *memory, const int available, const char *mode));
++local int do_flush _Z_OF((gzFile file, int flush));
++local int get_byte _Z_OF((mem_stream *s));
++local void check_header _Z_OF((mem_stream *s));
++local int destroy _Z_OF((mem_stream *s));
++local void putLong _Z_OF((MEMFILE *file, uLong x));
++local uLong getLong _Z_OF((mem_stream *s));
+
+ local MEMFILE *memOpen(char *memory, int available, char mode)
+ {
+--- src/GBA.cpp.old 2011-12-12 11:30:35.262463885 +0100
++++ src/GBA.cpp 2011-12-12 11:30:47.402463941 +0100
+@@ -31,7 +31,7 @@
+ #include "Sound.h"
+ #include "Sram.h"
+ #include "bios.h"
+-#include "unzip.h"
++#include <minizip/unzip.h>
+ #include "Cheats.h"
+ #include "NLS.h"
+ #include "elf.h"
+--- win32/include/zlib/zutil.h.old 2011-12-12 11:35:21.282465241 +0100
++++ win32/include/zlib/zutil.h 2011-12-12 12:00:51.712472515 +0100
+@@ -207,10 +207,10 @@
+ #endif
+
+
+-typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
++typedef uLong (ZEXPORT *check_func) _Z_OF((uLong check, const Bytef *buf,
+ uInt len));
+-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
+-void zcfree OF((voidpf opaque, voidpf ptr));
++voidpf zcalloc _Z_OF((voidpf opaque, unsigned items, unsigned size));
++void zcfree _Z_OF((voidpf opaque, voidpf ptr));
+
+ #define ZALLOC(strm, items, size) \
+ (*((strm)->zalloc))((strm)->opaque, (items), (size))
+--- src/sdl/Makefile.am.old 2011-12-12 12:09:53.442475093 +0100
++++ src/sdl/Makefile.am 2011-12-12 12:10:31.582475274 +0100
+@@ -71,11 +71,9 @@
+ ../remote.cpp \
+ ../scanline.cpp \
+ ../simple2x.cpp \
+- ../thumb.h \
+- ../unzip.cpp \
+- ../unzip.h
++ ../thumb.h
+
+-VisualBoyAdvance_LDADD = @VBA_LIBS@ @SDL_LIBS@
++VisualBoyAdvance_LDADD = @VBA_LIBS@ @SDL_LIBS@ -lminizip
+
+ VisualBoyAdvance_DEPENDENCIES = @VBA_LIBS@
+
+@@ -143,11 +141,9 @@
+ ../remote.cpp \
+ ../scanline.cpp \
+ ../simple2x.cpp \
+- ../thumb.h \
+- ../unzip.cpp \
+- ../unzip.h
++ ../thumb.h
+
+-TestEmu_LDADD = @VBA_LIBS@ @SDL_LIBS@
++TestEmu_LDADD = @VBA_LIBS@ @SDL_LIBS@ -lminizip
+
+ TestEmu_DEPENDENCIES = @VBA_LIBS@
+
+--- src/gtk/Makefile.am.old 2011-12-12 12:13:42.552476181 +0100
++++ src/gtk/Makefile.am 2011-12-12 12:14:20.272476359 +0100
+@@ -26,7 +26,7 @@
+ window.cpp \
+ window.h
+
+-gvba_LDADD = libgba.a @VBA_LIBS@ @GTKMM_LIBS@ @LIBINTL@ @SDL_LIBS@
++gvba_LDADD = libgba.a @VBA_LIBS@ @GTKMM_LIBS@ @LIBINTL@ @SDL_LIBS@ -lminizip
+
+ gvba_DEPENDENCIES = libgba.a @VBA_LIBS@
+
+@@ -99,9 +99,7 @@
+ ../remote.cpp \
+ ../scanline.cpp \
+ ../simple2x.cpp \
+- ../thumb.h \
+- ../unzip.cpp \
+- ../unzip.h
++ ../thumb.h
+
+ libgba_a_CPPFLAGS = -DSDL
+
diff --git a/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r3.ebuild b/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r3.ebuild
new file mode 100644
index 000000000000..f3fe7652c890
--- /dev/null
+++ b/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r3.ebuild,v 1.1 2011/12/12 19:07:33 tupone Exp $
+
+EAPI=2
+inherit eutils flag-o-matic autotools games
+
+DESCRIPTION="gameboy, gameboy color, and gameboy advance emulator"
+HOMEPAGE="http://vba.ngemu.com/"
+SRC_URI="mirror://sourceforge/vba/VisualBoyAdvance-src-${PV}.tar.gz
+ mirror://gentoo/${P}-deprecatedsigc++.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gtk mmx nls"
+
+RDEPEND="media-libs/libpng
+ media-libs/libsdl
+ sys-libs/zlib[minizip]
+ gtk? (
+ >=x11-libs/gtk+-2.4:2
+ >=dev-cpp/gtkmm-2.4:2.4
+ >=dev-cpp/libglademm-2.4:2.4
+ )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ mmx? ( dev-lang/nasm )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/VisualBoyAdvance-${PV}
+
+src_prepare() {
+ cat >> src/i386/2xSaImmx.asm <<-EOF
+ %ifidn __OUTPUT_FORMAT__,elf
+ section .note.GNU-stack noalloc noexec nowrite progbits
+ %endif
+ EOF
+
+ epatch \
+ "${FILESDIR}"/${PV}-homedir.patch \
+ "${FILESDIR}"/${PV}-gcc34.patch \
+ "${FILESDIR}"/${PV}-gcc41.patch \
+ "${WORKDIR}"/${P}-deprecatedsigc++.patch \
+ "${FILESDIR}"/${P}-uninit.patch \
+ "${FILESDIR}"/${P}-glibc2.10.patch \
+ "${FILESDIR}"/${P}-ovflfix.patch \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-zlib.patch
+
+ eautoreconf
+
+ sed -i \
+ -e 's:$(localedir):/usr/share/locale:' \
+ -e 's:$(datadir)/locale:/usr/share/locale:' \
+ $(find . -name 'Makefile.in*') \
+ || die "sed failed"
+}
+
+src_configure() {
+ # -O3 causes GCC to behave badly and hog memory, bug #64670.
+ replace-flags -O3 -O2
+
+ # Removed --enable-c-core as it *should* determine this based on arch
+ egamesconf \
+ --disable-dependency-tracking \
+ $(use_with mmx) \
+ $(use_enable gtk gtk 2.4) \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README README-win.txt
+ if use gtk ; then
+ newicon src/gtk/images/vba-64.png ${PN}.png
+ make_desktop_entry gvba VisualBoyAdvance
+ fi
+ prepgamesdirs
+}