diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2004-10-12 04:53:51 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2004-10-12 04:53:51 +0000 |
commit | d57538b2e09c609c3f8d9fe83b820c602d0b41df (patch) | |
tree | 13f18ec16a0236fbb75bb7a7e8bf0bf7a2ff99f1 /emulators | |
parent | - new option WITH_OPENSSH_CHROOT (diff) |
Mupen64 base
-
Mupen64 is a highly portable Nintendo 64 emulator. It has been developed
on/for Linux originally but has already been ported successfully to other
operating systems. The program can easily be ported to all operating systems
supported by the SDL library.
In its current state, the emulator is highly compatible and uses a plugin
system. With the correct plugins ("correct" can be computer dependent), it
can achieve nearly perfect graphics and sound in many games.
WWW: http://mupen64.emulation64.com/
PR: 71895
Submitted by: Travis Poppe
Notes
Notes:
svn path=/head/; revision=118779
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/Makefile | 1 | ||||
-rw-r--r-- | emulators/mupen64-base/Makefile | 74 | ||||
-rw-r--r-- | emulators/mupen64-base/distinfo | 2 | ||||
-rw-r--r-- | emulators/mupen64-base/files/mupen64.in | 64 | ||||
-rw-r--r-- | emulators/mupen64-base/files/patch-Makefile | 16 | ||||
-rw-r--r-- | emulators/mupen64-base/files/patch-configure | 128 | ||||
-rw-r--r-- | emulators/mupen64-base/files/patch-main_gtk.c | 30 | ||||
-rw-r--r-- | emulators/mupen64-base/files/patch-plugin.c | 10 | ||||
-rw-r--r-- | emulators/mupen64-base/pkg-descr | 15 | ||||
-rw-r--r-- | emulators/mupen64-base/pkg-message | 9 | ||||
-rw-r--r-- | emulators/mupen64-base/pkg-plist | 25 |
11 files changed, 374 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile index f512454daa81..e5534bf9c8c8 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -60,6 +60,7 @@ SUBDIR += minivmac SUBDIR += mips64emul SUBDIR += mtools + SUBDIR += mupen64-base SUBDIR += osf1_base SUBDIR += p-interp SUBDIR += pcemu diff --git a/emulators/mupen64-base/Makefile b/emulators/mupen64-base/Makefile new file mode 100644 index 000000000000..e1e50345cf7e --- /dev/null +++ b/emulators/mupen64-base/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: mupen64-base +# Date created: 10.Aug 2004 +# Whom: dirk.meyer@dinoex.sub.org +# +# $FreeBSD$ +# + +PORTNAME= mupen64 +PORTVERSION= 0.4 +CATEGORIES+= emulators +MASTER_SITES= http://mupen64.emulation64.com/files/${PORTVERSION}/ +PKGNAMESUFFIX= -base +DISTNAME= ${PORTNAME}_src-${PORTVERSION} + +MAINTAINER?= tlp@LiquidX.org +COMMENT= Mupen64 is a Nintendo 64 emulator + +USE_BZIP2= yes +HAS_CONFIGURE= yes +USE_REINPLACE= yes +USE_GMAKE= yes +USE_SDL= sdl +USE_GNOME= gtk12 +WRKSRC= ${WRKDIR}/emu64 +USE_GCC= 3.4 +ONLY_FOR_ARCHS= i386 + +DOCFILES= readme.pdf readme.ps +FIXME1= main/vcr.c memory/dma.c r4300/r4300.c r4300/recomp.c \ + r4300/x86/assemble.c +FIXME2= r4300/interupt.c main/gui_gtk/main_gtk.c + +pre-configure: + @${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${FILESDIR}/mupen64.in \ + > ${WRKDIR}/mupen64 +.for i in ${FIXME1} + ${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/${i} +.endfor +.for i in ${FIXME2} + ${REINPLACE_CMD} -e 's|SDL/SDL.h|SDL.h|' ${WRKSRC}/${i} +.endfor + ${REINPLACE_CMD} \ + -e 's|sdl-config|${SDL_CONFIG}|g' ${WRKSRC}/configure + ${REINPLACE_CMD} \ + -e 's|gtk-config|${GTK_CONFIG}|' \ + -e 's|-L/usr/X11R6/lib -lSDL -lGL -lpthread|`${SDL_CONFIG} --libs`|' \ + -e 's|-ldl|${LDFLAGS}|' \ + ${WRKSRC}/Makefile + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/whatsnew.txt ${DOCSDIR}/whatsnew.txt +.for i in ${DOCFILES} + ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}/ +.endfor +.endif + ${INSTALL_PROGRAM} ${WRKSRC}/mupen64 ${PREFIX}/libexec/mupen64 + ${INSTALL_SCRIPT} ${WRKDIR}/mupen64 ${PREFIX}/bin/mupen64 + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.pre.mk> + +CFLAGS+= `${SDL_CONFIG} --cflags` +CFLAGS+= -O3 -fomit-frame-pointer -funroll-loops -ffast-math -Wall -pipe +CFLAGS+= -DX86 -mcpu=athlon + +MAKE_ARGS+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" + +.if ${OSVERSION} < 500000 +LDFLAGS+= -L/usr/lib -lcipher +.endif + +.include <bsd.port.post.mk> diff --git a/emulators/mupen64-base/distinfo b/emulators/mupen64-base/distinfo new file mode 100644 index 000000000000..e9c8105912ef --- /dev/null +++ b/emulators/mupen64-base/distinfo @@ -0,0 +1,2 @@ +MD5 (mupen64_src-0.4.tar.bz2) = 322f2226f4f67e24868592c6b441e76a +SIZE (mupen64_src-0.4.tar.bz2) = 1871148 diff --git a/emulators/mupen64-base/files/mupen64.in b/emulators/mupen64-base/files/mupen64.in new file mode 100644 index 000000000000..addc739cca65 --- /dev/null +++ b/emulators/mupen64-base/files/mupen64.in @@ -0,0 +1,64 @@ +#!/bin/sh +# mupen64 - Mupen64 wrapper script +# +# 2004 Travis Poppe + +USERDIR=$HOME/.mupen64 + +if [ ! -x $USERDIR/mupen64 ]; then + echo "$USERDIR/mupen64 not found or not executable." + echo "Setting up Mupen64 for you..." + rm -rf $USERDIR + mkdir $USERDIR + mkdir $USERDIR/lang + mkdir $USERDIR/save + mkdir $USERDIR/roms + mkdir $USERDIR/plugins + cd $USERDIR + ln -s %%PREFIX%%/libexec/mupen64 ./mupen64 + cp %%PREFIX%%/share/mupen64/mupen64.ini ./mupen64.ini + chmod +w ./mupen64.ini + ln -s %%PREFIX%%/share/mupen64/lang/* lang/ + +for source in %%PREFIX%%/share/mupen64/*.conf +do + # source must exist as a plain file + if test ! -f "${source}" + then + continue + fi + target="${USERDIR}/${source##*/}" + cp "${source}" "${target}" + chmod +w "${target}" +done + +for source in %%PREFIX%%/share/mupen64/plugins/*.so +do + # source must exist as a plain file + if test ! -f "${source}" + then + continue + fi + target="${USERDIR}/plugins/${source##*/}" + ln -s "${source}" "${target}" +done + +for source in %%PREFIX%%/share/mupen64/plugins/*.ini +do + # source must exist as a plain file + if test ! -f "${source}" + then + continue + fi + target="${USERDIR}/plugins/${source##*/}" + cp "${source}" "${target}" + chmod +w "${target}" +done + + echo "Done!" + echo "" + echo "Remember to configure your plugins!" + echo "" +fi + +cd $USERDIR && exec ./mupen64 diff --git a/emulators/mupen64-base/files/patch-Makefile b/emulators/mupen64-base/files/patch-Makefile new file mode 100644 index 000000000000..f173d567ea83 --- /dev/null +++ b/emulators/mupen64-base/files/patch-Makefile @@ -0,0 +1,16 @@ +--- Makefile.orig Mon Jul 5 22:37:09 2004 ++++ Makefile Tue Aug 10 23:03:37 2004 +@@ -1,10 +1,10 @@ + #Makefile MUPEN64 for Linux + +-CC =gcc +-CXX =g++ ++CC ?=gcc ++CXX ?=g++ + + #CFLAGS =-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG +-CFLAGS =-DX86 -O3 -fomit-frame-pointer -funroll-loops -ffast-math -mcpu=athlon -Wall -pipe ++#CFLAGS =-DX86 -O3 -fomit-frame-pointer -funroll-loops -ffast-math -mcpu=athlon -Wall -pipe + #CFLAGS =-DX86 -O3 -mcpu=pentium -Wall -g -pg + #CFLAGS =-DX86 -Wall -pipe -g3 -DEMU64_DEBUG + #CFLAGS =-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE diff --git a/emulators/mupen64-base/files/patch-configure b/emulators/mupen64-base/files/patch-configure new file mode 100644 index 000000000000..8c3a8f7fcb05 --- /dev/null +++ b/emulators/mupen64-base/files/patch-configure @@ -0,0 +1,128 @@ +--- configure.orig Mon Jul 5 22:37:11 2004 ++++ configure Wed Aug 11 05:57:43 2004 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if [ -z "$CC" ]; then + CC=gcc +@@ -8,7 +8,7 @@ + fi + + # check for a C compiler +-function check_cc() ++check_cc() + { + if [ ! -z "$CC" ]; then + if [ ! -x "`which "$CC"`" ]; then +@@ -23,8 +23,8 @@ + fi + fi + +- FILE="`tempfile`" +- OUTFILE="`tempfile`" ++ FILE="/tmp/mupen64.configure.1" ++ OUTFILE="/tmp/mupen64.configure.2" + echo "int main(void) { return 0; }" > "$FILE" + $CC -x "c" -o "$OUTFILE" "$FILE" 2>&1 | cat >>config.log + +@@ -51,7 +51,7 @@ + } + + # check for a C++ compiler +-function check_cxx() ++check_cxx() + { + if [ ! -z "$CXX" ]; then + if [ ! -x "`which "$CXX"`" ]; then +@@ -66,8 +66,8 @@ + fi + fi + +- FILE="`tempfile`" +- OUTFILE="`tempfile`" ++ FILE="/tmp/mupen64.configure.1" ++ OUTFILE="/tmp/mupen64.configure.2" + echo "int main(void) { return 0; }" > "$FILE" + $CXX -x "c++" -o "$OUTFILE" "$FILE" 2>&1 | cat >>config.log + +@@ -94,7 +94,7 @@ + } + + # check for libavifile +-function check_libavifile() ++check_libavifile() + { + echo "Checking avifile..." + +@@ -103,8 +103,8 @@ + exit 1 + fi + +- FILE="`tempfile`" +- OUTFILE="`tempfile`" ++ FILE="/tmp/mupen64.configure.1" ++ OUTFILE="/tmp/mupen64.configure.2" + echo "#include <avifile.h>" > "$FILE" + echo "int main(void) { return 0; }" >> "$FILE" + $CXX -x "c++" -o "$OUTFILE" "$FILE" `avifile-config --libs` `avifile-config --cflags` 2>&1 | cat >>config.log +@@ -132,7 +132,7 @@ + } + + # check for libsdl +-function check_libsdl() ++check_libsdl() + { + echo "Checking SDL..." + +@@ -141,8 +141,8 @@ + exit 1 + fi + +- FILE="`tempfile`" +- OUTFILE="`tempfile`" ++ FILE="/tmp/mupen64.configure.1" ++ OUTFILE="/tmp/mupen64.configure.2" + echo "#include \"SDL.h\"" > "$FILE" + echo "#include <stdio.h>" >> "$FILE" + echo "int main(void) { if (SDL_Init( 0 ) < 0) { printf( \"SDL_Init(): %s\\n\", SDL_GetError() ); return 1; } return 0; }" >> "$FILE" +@@ -189,7 +189,8 @@ + echo "Do you want to configure mupen64 to run in a user directory? (Answering no" + echo "will configure it for multi-users usage with the configuration stored in the" + echo "HOME directory)" +-read -p "(Y)es or (N)o [Default is: Yes]: " answer ++#read -p "(Y)es or (N)o [Default is: Yes]: " answer ++answer="No" + + if [ -n "$answer" ] + then +@@ -197,7 +198,8 @@ + then + + echo "In which prefix do u want to install mupen64 ? [Default: /usr/local/] " +- read answer ++# read answer ++ answer="$PREFIX" + + if [ -z $answer ] + then +@@ -211,7 +213,8 @@ + # ---- VCR + echo + echo "Do you want to enable VCR support (requires avifile and a C++ compiler)?" +-read -p "(Y)es or (N)o [Default is: No]: " answer ++# read -p "(Y)es or (N)o [Default is: No]: " answer ++answer="No" + + if [ -n "$answer" ] + then +@@ -273,7 +276,8 @@ + if [ "$CONFIG_CHANGED" -eq "0" ]; then + echo "Note: The configuration has not been changed since the last time it was written." + fi +-read -p "(Y)es or (N)o [Default is: No]: " answer ++#read -p "(Y)es or (N)o [Default is: No]: " answer ++answer="No" + + if [ -n "$answer" ] + then diff --git a/emulators/mupen64-base/files/patch-main_gtk.c b/emulators/mupen64-base/files/patch-main_gtk.c new file mode 100644 index 000000000000..51dd1c48747b --- /dev/null +++ b/emulators/mupen64-base/files/patch-main_gtk.c @@ -0,0 +1,30 @@ +--- main/gui_gtk/main_gtk.c.orig Tue Aug 10 22:44:44 2004 ++++ main/gui_gtk/main_gtk.c Tue Aug 10 22:54:47 2004 +@@ -1783,16 +1783,19 @@ + printf( "SIGSEGV in core thread caught:\n" ); + printf( "\terrno = %d (%s)\n", info->si_errno, strerror( info->si_errno ) ); + printf( "\taddress = 0x%08X\n", (unsigned int)info->si_addr ); ++#ifdef SEGV_MAPERR + switch( info->si_code ) + { + case SEGV_MAPERR: printf( " address not mapped to object\n" ); break; + case SEGV_ACCERR: printf( " invalid permissions for mapped object\n" ); break; + } ++#endif + break; + case SIGILL: + printf( "SIGILL in core thread caught:\n" ); + printf( "\terrno = %d (%s)\n", info->si_errno, strerror( info->si_errno ) ); + printf( "\taddress = 0x%08X\n", (unsigned int)info->si_addr ); ++#ifdef ILL_ILLOPC + switch( info->si_code ) + { + case ILL_ILLOPC: printf( "\tillegal opcode\n" ); break; +@@ -1804,6 +1807,7 @@ + case ILL_COPROC: printf( "\tcoprocessor error\n" ); break; + case ILL_BADSTK: printf( "\tinternal stack error\n" ); break; + } ++#endif + break; + case SIGFPE: + printf( "SIGFPE in core thread caught:\n" ); diff --git a/emulators/mupen64-base/files/patch-plugin.c b/emulators/mupen64-base/files/patch-plugin.c new file mode 100644 index 000000000000..e42ed1dc2c10 --- /dev/null +++ b/emulators/mupen64-base/files/patch-plugin.c @@ -0,0 +1,10 @@ +--- main/plugin.c.orig Mon Jul 5 22:37:09 2004 ++++ main/plugin.c Tue Aug 10 22:39:28 2004 +@@ -33,6 +33,7 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <limits.h> + + #include "winlnxdefs.h" + #include "plugin.h" diff --git a/emulators/mupen64-base/pkg-descr b/emulators/mupen64-base/pkg-descr new file mode 100644 index 000000000000..3b77bcb04913 --- /dev/null +++ b/emulators/mupen64-base/pkg-descr @@ -0,0 +1,15 @@ +Mupen64 base +- +Mupen64 is a highly portable Nintendo 64 emulator. It has been developed +on/for Linux originally but has already been ported successfully to other +operating systems. The program can easily be ported to all operating systems +supported by the SDL library. + +In its current state, the emulator is highly compatible and uses a plugin +system. With the correct plugins ("correct" can be computer dependent), it +can achieve nearly perfect graphics and sound in many games. + +WWW: http://mupen64.emulation64.com/ + +- Travis Poppe +tlp@liquidx.org diff --git a/emulators/mupen64-base/pkg-message b/emulators/mupen64-base/pkg-message new file mode 100644 index 000000000000..d53470396a22 --- /dev/null +++ b/emulators/mupen64-base/pkg-message @@ -0,0 +1,9 @@ +------------------------------------------------------------------------------- +If you have installed/upgraded any new plugins or are upgrading from a previous +version of Mupen64, please note that in order for these changes to take effect, +you -must- backup and then remove ~/.mupen64 first. After you have removed the +directory, run 'mupen64' to re-create it. Then, manually copy back your save +files/other data you need from the backup if necessary. + +Enjoy! +------------------------------------------------------------------------------- diff --git a/emulators/mupen64-base/pkg-plist b/emulators/mupen64-base/pkg-plist new file mode 100644 index 000000000000..189a0b5c2e15 --- /dev/null +++ b/emulators/mupen64-base/pkg-plist @@ -0,0 +1,25 @@ +bin/mupen64 +libexec/mupen64 +share/mupen64/doc/compile.sh +share/mupen64/doc/readme.dvi +share/mupen64/doc/readme.pdf +share/mupen64/doc/readme.latex +share/mupen64/doc/readme.ps +share/mupen64/lang/french.lng +share/mupen64/lang/pt_BR.lng +share/mupen64/lang/german.lng +share/mupen64/lang/spanish.lng +share/mupen64/lang/dutch.lng +share/mupen64/lang/italian.lng +share/mupen64/lang/english.lng +share/mupen64/lang/catalan.lng +share/mupen64/mupen64.ini +share/mupen64/plugins/empty +@dirrm share/mupen64/plugins +@dirrm share/mupen64/lang +@dirrm share/mupen64/doc +@dirrm share/mupen64 +%%PORTDOCS%%%%DOCSDIR%%/whatsnew.txt +%%PORTDOCS%%%%DOCSDIR%%/readme.pdf +%%PORTDOCS%%%%DOCSDIR%%/readme.ps +%%PORTDOCS%%@dirrm %%DOCSDIR%% |