summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2009-07-27 16:10:51 +0000
committerMichał Górny <mgorny@gentoo.org>2009-07-27 16:10:51 +0000
commit44f32cc2c3a75431536ac1009cbd2ca8201c22a8 (patch)
tree9ee005230fe024571ddbd5eb105c0725de964984 /games-emulation
parentNew license used by dev-db/mongodb (diff)
downloadsunrise-44f32cc2c3a75431536ac1009cbd2ca8201c22a8.tar.gz
sunrise-44f32cc2c3a75431536ac1009cbd2ca8201c22a8.tar.bz2
sunrise-44f32cc2c3a75431536ac1009cbd2ca8201c22a8.zip
games-emulation/mupen64plus: Ebuild for games-emulation/mupen64plus (bug #215426). Thanks to all Bugzilla thread contributors.
svn path=/sunrise/; revision=8889
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/mupen64plus/ChangeLog11
-rw-r--r--games-emulation/mupen64plus/Manifest7
-rw-r--r--games-emulation/mupen64plus/files/mupen64plus-1.5-glide64-gcc44.patch24
-rw-r--r--games-emulation/mupen64plus/files/mupen64plus-1.5-plugindir.patch13
-rw-r--r--games-emulation/mupen64plus/files/mupen64plus-1.5-unbundle-bzip2.patch38
-rw-r--r--games-emulation/mupen64plus/metadata.xml5
-rw-r--r--games-emulation/mupen64plus/mupen64plus-1.5.ebuild140
7 files changed, 238 insertions, 0 deletions
diff --git a/games-emulation/mupen64plus/ChangeLog b/games-emulation/mupen64plus/ChangeLog
new file mode 100644
index 000000000..9077e6287
--- /dev/null
+++ b/games-emulation/mupen64plus/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for games-emulation/mupen64plus
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 27 Jul 2009; Michał Górny (sedzimir) <gentoo@mgorny.alt.pl>
+ +mupen64plus-1.5.ebuild, +files/mupen64plus-1.5-glide64-gcc44.patch,
+ +files/mupen64plus-1.5-plugindir.patch,
+ +files/mupen64plus-1.5-unbundle-bzip2.patch, +metadata.xml:
+ Ebuild for games-emulation/mupen64plus (bug #215426). Thanks to all Bugzilla
+ thread contributors.
+
diff --git a/games-emulation/mupen64plus/Manifest b/games-emulation/mupen64plus/Manifest
new file mode 100644
index 000000000..2adb8868a
--- /dev/null
+++ b/games-emulation/mupen64plus/Manifest
@@ -0,0 +1,7 @@
+AUX mupen64plus-1.5-glide64-gcc44.patch 1262 RMD160 28ccdd74a669af58363501f386acf290cf6a55bd SHA1 5113cffff2c0a472bd37325fa0f582850d71fac0 SHA256 fc9665e4cfa8ae99ab1a4e8d1810d257d81f6cd2c59fc3ac4b7b5d1ec42ef069
+AUX mupen64plus-1.5-plugindir.patch 722 RMD160 905d38cd37f4afdc67d2e7ac7f8d66a5bc9a296a SHA1 d4b77ace873c4a50ebe89fe81f523c6e00dffc8d SHA256 07507a688ab77322317cf3b7fb6419f681386b343c77d26bf3fd01afa3348276
+AUX mupen64plus-1.5-unbundle-bzip2.patch 1317 RMD160 98403a2c3853fc60c666180b106a735e8c8410a3 SHA1 9ff21c4c945dc475f7c248f738913adb13d29b82 SHA256 cc5e3e15ad44b2c5483b222dd55bba8588759ac032b97667d9e3c69d590938e0
+DIST Mupen64Plus-1-5-src.tar.gz 2348443 RMD160 690d1e80d4a10a3a74e7d955c0ee23e3bd4ff996 SHA1 ef200d6ea2eb3faa969ba9c82d2a771236c3145d SHA256 58b2da6095ed8f3bcdcb5d7612bb0f1ba81cda1861ca784ef7e46991fd73cf3f
+EBUILD mupen64plus-1.5.ebuild 3359 RMD160 f99d7adcd0b97ea81639be4824d503851bfd818b SHA1 8be3df6792d980f3a7727c21a028eb4919fe7b58 SHA256 dcced79ff64f47a168928c867a74a11c939a645fc8b2013ae9f59c5dbd238480
+MISC ChangeLog 470 RMD160 15d8acb1172bbc08f7b2405c5410b62e19827bcc SHA1 9d4fb6bb80f33f14bef5d8ee137dfd1103acddc5 SHA256 60015db342de5137016b68e82ec87c74cb04862660d451ef8e569670df747d20
+MISC metadata.xml 171 RMD160 ed284df01c230fc7990a6b5888b39166d23f29ba SHA1 f3d64a69044b710e23fb874b3ee4cd338858c8b4 SHA256 a7b30fbacd0e4c312c07a3efac112a3794c81d134442d8104325734d03425adf
diff --git a/games-emulation/mupen64plus/files/mupen64plus-1.5-glide64-gcc44.patch b/games-emulation/mupen64plus/files/mupen64plus-1.5-glide64-gcc44.patch
new file mode 100644
index 000000000..c11f103c6
--- /dev/null
+++ b/games-emulation/mupen64plus/files/mupen64plus-1.5-glide64-gcc44.patch
@@ -0,0 +1,24 @@
+diff -dupr Mupen64Plus-1-5-src.old/glide64/Combine.cpp Mupen64Plus-1-5-src/glide64/Combine.cpp
+--- Mupen64Plus-1-5-src.old/glide64/Combine.cpp 2009-01-04 19:47:08.000000000 +0100
++++ Mupen64Plus-1-5-src/glide64/Combine.cpp 2009-07-27 16:54:40.737065400 +0200
+@@ -11873,7 +11873,7 @@ void InitCombine ()
+ LOG ("InitCombine() ");
+ memset(&cmb, 0, sizeof(cmb));
+ const char *extensions = grGetString (GR_EXTENSION);
+- if (char * extstr = strstr(extensions, "COMBINE")) {
++ if (const char * extstr = strstr(extensions, "COMBINE")) {
+ if (!strncmp(extstr, "COMBINE", 7)) {
+ LOG ("extensions ");
+ cmb.grColorCombineExt = (GRCOLORCOMBINEEXT) grGetProcAddress("grColorCombineExt");
+diff -dupr Mupen64Plus-1-5-src.old/glide64/Main.cpp Mupen64Plus-1-5-src/glide64/Main.cpp
+--- Mupen64Plus-1-5-src.old/glide64/Main.cpp 2009-07-27 16:49:30.596192066 +0200
++++ Mupen64Plus-1-5-src/glide64/Main.cpp 2009-07-27 16:49:42.492067819 +0200
+@@ -784,7 +784,7 @@ BOOL InitGfx (BOOL evoodoo_using_window)
+ printf("bebefore2\n");
+ if (settings.fb_hires)
+ {
+- if (char * extstr = strstr(extensions, "TEXTUREBUFFER"))
++ if (const char * extstr = strstr(extensions, "TEXTUREBUFFER"))
+ {
+ if (!strncmp(extstr, "TEXTUREBUFFER", 13))
+ {
diff --git a/games-emulation/mupen64plus/files/mupen64plus-1.5-plugindir.patch b/games-emulation/mupen64plus/files/mupen64plus-1.5-plugindir.patch
new file mode 100644
index 000000000..96363547a
--- /dev/null
+++ b/games-emulation/mupen64plus/files/mupen64plus-1.5-plugindir.patch
@@ -0,0 +1,13 @@
+diff -dupr Mupen64Plus-1-5-src.orig/main/main.c Mupen64Plus-1-5-src/main/main.c
+--- Mupen64Plus-1-5-src.orig/main/main.c 2009-05-01 09:18:21.387785870 +0200
++++ Mupen64Plus-1-5-src/main/main.c 2009-05-01 09:20:10.998784906 +0200
+@@ -1476,8 +1476,7 @@ int main(int argc, char *argv[])
+ // if it's not set in the config file, use the /plugins/ sub-folder of the installation directory
+ if (strlen(dirpath) < 2)
+ {
+- strncpy(dirpath, l_InstallDir, PATH_MAX);
+- strncat(dirpath, "plugins/", PATH_MAX - strlen(dirpath));
++ strncpy(dirpath, "%PUT_PLUGIN_PATH_HERE%", PATH_MAX);
+ dirpath[PATH_MAX-1] = '\0';
+ }
+ // scan the plugin directory and set the config dir for the plugins
diff --git a/games-emulation/mupen64plus/files/mupen64plus-1.5-unbundle-bzip2.patch b/games-emulation/mupen64plus/files/mupen64plus-1.5-unbundle-bzip2.patch
new file mode 100644
index 000000000..9ed10be85
--- /dev/null
+++ b/games-emulation/mupen64plus/files/mupen64plus-1.5-unbundle-bzip2.patch
@@ -0,0 +1,38 @@
+diff -dupr Mupen64Plus-1-5-src.old/Makefile Mupen64Plus-1-5-src/Makefile
+--- Mupen64Plus-1-5-src.old/Makefile 2009-01-04 19:47:07.000000000 +0100
++++ Mupen64Plus-1-5-src/Makefile 2009-07-27 17:12:55.984193344 +0200
+@@ -111,13 +111,6 @@ OBJ_CORE = \
+ main/savestates.o \
+ main/zip/ioapi.o \
+ main/zip/unzip.o \
+- main/bzip2/bzlib.o \
+- main/bzip2/crctable.o \
+- main/bzip2/decompress.o \
+- main/bzip2/compress.o \
+- main/bzip2/randtable.o \
+- main/bzip2/huffman.o \
+- main/bzip2/blocksort.o \
+ main/lzma/buffer.o \
+ main/lzma/io.o \
+ main/lzma/main.o \
+@@ -246,7 +239,7 @@ SHARE = $(shell grep CONFIG_PATH config.
+ # set primary objects and libraries for all outputs
+ ALL = mupen64plus $(PLUGINS)
+ OBJECTS = $(OBJ_CORE) $(OBJ_DYNAREC) $(OBJ_OPENGL)
+-LIBS = $(SDL_LIBS) $(LIBGL_LIBS)
++LIBS = $(SDL_LIBS) $(LIBGL_LIBS) -lbz2
+
+ # add extra objects and libraries for selected options
+ ifeq ($(DBG), 1)
+diff -dupr Mupen64Plus-1-5-src.old/main/rom.c Mupen64Plus-1-5-src/main/rom.c
+--- Mupen64Plus-1-5-src.old/main/rom.c 2009-01-04 19:47:07.000000000 +0100
++++ Mupen64Plus-1-5-src/main/rom.c 2009-07-27 17:29:55.918067662 +0200
+@@ -28,7 +28,7 @@
+ #include <zlib.h>
+
+ #include "zip/unzip.h"
+-#include "bzip2/bzlib.h"
++#include <bzlib.h>
+ #include "lzma/lzmadec.h"
+ #include "7zip/7zExtract.h"
+ #include "7zip/7zCrc.h"
diff --git a/games-emulation/mupen64plus/metadata.xml b/games-emulation/mupen64plus/metadata.xml
new file mode 100644
index 000000000..6f1d493c5
--- /dev/null
+++ b/games-emulation/mupen64plus/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>maintainer-wanted</herd>
+</pkgmetadata>
diff --git a/games-emulation/mupen64plus/mupen64plus-1.5.ebuild b/games-emulation/mupen64plus/mupen64plus-1.5.ebuild
new file mode 100644
index 000000000..617c29f4c
--- /dev/null
+++ b/games-emulation/mupen64plus/mupen64plus-1.5.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils flag-o-matic games
+
+MY_P="Mupen64Plus-${PV/./-}-src"
+
+DESCRIPTION="A fork of Mupen64 Nintendo 64 emulator"
+HOMEPAGE="http://code.google.com/p/mupen64plus/"
+SRC_URI="http://mupen64plus.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="custom-cflags +gtk libsamplerate lirc qt4 sse"
+
+# GTK+ is currently required by plugins even if no GUI support is enabled
+RDEPEND="virtual/opengl
+ media-libs/freetype:2
+ media-libs/libpng
+ media-libs/libsdl
+ media-libs/sdl-ttf
+ sys-libs/zlib
+ x11-libs/gtk+:2
+ libsamplerate? ( media-libs/libsamplerate )
+ lirc? ( app-misc/lirc )
+ qt4? ( x11-libs/qt-gui:4
+ x11-libs/qt-core:4 )"
+
+DEPEND="${RDEPEND}
+ dev-lang/yasm
+ dev-util/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if ! use gtk && ! use qt4; then
+ ewarn "Building ${PN} without any GUI! To get one, enable USE=gtk or USE=qt4."
+ elif use gtk && use qt4; then
+ ewarn "Only one GUI can be built, using GTK+ one."
+ fi
+
+ games_pkg_setup
+}
+
+src_prepare() {
+ # unbundle bzip2
+ epatch "${FILESDIR}"/${P}-unbundle-bzip2.patch
+ # XXX: try to unbundle more?
+
+ # fix compilation with gcc4.4
+ epatch "${FILESDIR}"/${P}-glide64-gcc44.patch
+
+ # first prepare to replace plugin path
+ epatch "${FILESDIR}"/${P}-plugindir.patch
+
+ # and then do real path replace
+ sed -i \
+ -e "s:/usr/local/share/mupen64plus:${GAMES_DATADIR}/mupen64plus:" \
+ -e "s:%PUT_PLUGIN_PATH_HERE%:$(games_get_libdir)/${PN}/plugins/:" \
+ main/main.c || die "sed failed"
+
+ # set right CFLAGS and disable stripping
+ local march
+ march="$(get-flag "-march")"
+ sed -i \
+ -e "s:STRIP.*= .*$:STRIP = true:" \
+ -e "s:CFLAGS += -march=.*$:CFLAGS += ${march}:" \
+ pre.mk glide64/Makefile || die "sed failed"
+
+ # replace absolute icon path with relative one
+ sed -i -e "s:^Icon=.*$:Icon=${PN}:" \
+ ${PN}.desktop.in || die "sed failed"
+
+ # prevent use of environment CFLAGS
+ sed -i -e '1i CFLAGS =' pre.mk || die "sed failed"
+
+ if use custom-cflags; then
+ sed -i -e "s:CFLAGS += -pipe .*$:CFLAGS += ${CFLAGS}:" \
+ pre.mk || die "sed failed"
+ fi
+}
+
+get_opts() {
+ use libsamplerate || echo -n "NO_RESAMP=1 "
+ use lirc && echo -n "LIRC=1 "
+ use sse || echo -n "NO_ASM=1 "
+
+ echo -n GUI=
+ if use gtk; then
+ echo -n GTK2
+ elif use qt4; then
+ echo -n QT4
+ else
+ echo -n NONE
+ fi
+}
+
+src_compile() {
+ emake $(get_opts) all || die "make failed"
+}
+
+src_install() {
+ # These are:
+ # 1) prefix - not used really, printed only
+ # 2) SHAREDIR
+ # 3) BINDIR
+ # 4) 'LIBDIR' - where to put plugins in
+ # 5) 'MANDIR' - exact directory to put man file in
+ # 6) APPLICATIONSDIR - where to put .desktop in
+
+ ./install.sh "${D}" \
+ "${D}${GAMES_DATADIR}/${PN}" \
+ "${D}${GAMES_BINDIR}" \
+ "${D}$(games_get_libdir)/${PN}/plugins" \
+ "${D}/usr/share/man/man1" \
+ "${D}/usr/share/applications" \
+ || or die "install.sh failed"
+
+ # Copy icon into system-wide location
+ newicon icons/mupen64plus-large.png ${PN}.png || die "newicon failed"
+
+ # 'Move' docs into correct dir
+ rm -r "${D}${GAMES_DATADIR}/${PN}/doc"
+ dodoc README RELEASE TODO doc/*.txt || die "dodoc failed"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ if use lirc; then
+ elog "For lirc configuration see:"
+ elog "http://code.google.com/p/mupen64plus/wiki/LIRC"
+ fi
+}