summaryrefslogtreecommitdiff
path: root/emulators/gcube
diff options
context:
space:
mode:
authorMichael Johnson <ahze@FreeBSD.org>2005-06-17 06:24:32 +0000
committerMichael Johnson <ahze@FreeBSD.org>2005-06-17 06:24:32 +0000
commitfc6a4eb756b43cc4fde966c38ce097a8978ed1a5 (patch)
tree593e7877be5b4ac8f5b0f5b2de3b56548e24c650 /emulators/gcube
parent- Update to 2.0.3 (diff)
Add gcube 0.4, gamecube emulator.
PR: ports/82349 Submitted by: Travis Poppe <tlp@liquidx.org>
Diffstat (limited to 'emulators/gcube')
-rw-r--r--emulators/gcube/Makefile65
-rw-r--r--emulators/gcube/distinfo2
-rw-r--r--emulators/gcube/files/cpu.c-patch11
-rw-r--r--emulators/gcube/files/patch-Makefile.rules22
-rw-r--r--emulators/gcube/pkg-descr6
5 files changed, 106 insertions, 0 deletions
diff --git a/emulators/gcube/Makefile b/emulators/gcube/Makefile
new file mode 100644
index 000000000000..f18febcc12c7
--- /dev/null
+++ b/emulators/gcube/Makefile
@@ -0,0 +1,65 @@
+# New ports collection makefile for: gcube
+# Date created: 16 Jun 2005
+# Whom: Travis Poppe <tlp@liquidx.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gcube
+PORTVERSION= 0.4
+CATEGORIES= emulators
+MASTER_SITES= http://gcube.exemu.net/downloads/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+
+MAINTAINER= tlp@liquidx.org
+COMMENT= Gamecube emulator
+
+LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg
+
+WRKSRC= ${WRKDIR}/${PORTVERSION}
+USE_SDL= sdl
+USE_GCC= 3.4
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_REINPLACE= yes
+USE_GETOPT_LONG=yes
+
+PLIST_FILES= bin/gcube bin/gcmap bin/bin2dol bin/isopack bin/tplx
+PORTDOCS= ChangeLog README
+
+FIXME= general.h keys_sdl.h thpview.h video_sdl.c audio_sdl.c hw_gx.c gx.c \
+ gx_texture.c gx_transform.c
+
+post-patch:
+.for i in ${FIXME}
+ ${REINPLACE_CMD} -e 's|SDL/|SDL11/|' ${WRKSRC}/${i}
+.endfor
+ ${REINPLACE_CMD} \
+ -e 's|sdl-config|${SDL_CONFIG}|' ${WRKSRC}/Makefile.rules
+ ${REINPLACE_CMD} \
+ -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/Makefile.rules
+ ${REINPLACE_CMD} \
+ -e 's|/usr/X11R6|${X11BASE}|' ${WRKSRC}/Makefile.rules
+ ${REINPLACE_CMD} \
+ -e 's|%%LDFLAGS%%|${LDFLAGS}|' ${WRKSRC}/Makefile.rules
+ ${REINPLACE_CMD} -e 's|gcc|${CC}|' ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/gcube ${PREFIX}/bin/gcube
+ ${INSTALL_PROGRAM} ${WRKSRC}/gcmap ${PREFIX}/bin/gcmap
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin2dol ${PREFIX}/bin/bin2dol
+ ${INSTALL_PROGRAM} ${WRKSRC}/isopack ${PREFIX}/bin/isopack
+ ${INSTALL_PROGRAM} ${WRKSRC}/tplx ${PREFIX}/bin/tplx
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}/ChangeLog
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+EXTRA_PATCHES= ${FILESDIR}/cpu.c-patch
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/emulators/gcube/distinfo b/emulators/gcube/distinfo
new file mode 100644
index 000000000000..785fc385de5b
--- /dev/null
+++ b/emulators/gcube/distinfo
@@ -0,0 +1,2 @@
+MD5 (gcube-0.4-src.tar.bz2) = e5c08cb4315b67b995afff1e3df47796
+SIZE (gcube-0.4-src.tar.bz2) = 803503
diff --git a/emulators/gcube/files/cpu.c-patch b/emulators/gcube/files/cpu.c-patch
new file mode 100644
index 000000000000..066cb5442fab
--- /dev/null
+++ b/emulators/gcube/files/cpu.c-patch
@@ -0,0 +1,11 @@
+--- cpu.c.orig Fri Jun 17 02:20:13 2005
++++ cpu.c Fri Jun 17 02:20:30 2005
+@@ -45,7 +45,7 @@
+ int RESERVE = 0;
+ __u32 RESERVE_ADDR = 0;
+
+-double (*fp_round[]) (double) = { round, trunc, ceil, floor };
++double (*fp_round[]) (double) = { rint, rint, ceil, floor };
+ #define FP_ROUND(D) (fp_round[FPSCR_RN] (D))
+
+ #if 0
diff --git a/emulators/gcube/files/patch-Makefile.rules b/emulators/gcube/files/patch-Makefile.rules
new file mode 100644
index 000000000000..af3b10fdd6f3
--- /dev/null
+++ b/emulators/gcube/files/patch-Makefile.rules
@@ -0,0 +1,22 @@
+--- Makefile.rules.orig Fri Jun 17 01:59:11 2005
++++ Makefile.rules Fri Jun 17 02:00:14 2005
+@@ -1,8 +1,7 @@
+
+ SDL_CONFIG=sdl-config
+-LIBS=`$(SDL_CONFIG) --libs` -mno-windows -mcygwin -lz -l$(OPENGL)
+-
+-CFLAGS=-g -Wall -I/usr/include -I/usr/local/include
++LIBS=`$(SDL_CONFIG) --libs` -mno-windows -mcygwin -L/usr/X11R6/lib -lz -l$(OPENGL) %%LDFLAGS%%
++CFLAGS=-g -Wall -I/usr/local/include -I/usr/X11R6/include
+ PROFLAGS=-g -Wall -pg -fprofile-arcs -ftest-coverage
+ OPTFLAGS=-O3 -fno-strict-aliasing -fomit-frame-pointer -ffast-math -march=$(CPU) $(OPTIMIZE)
+
+@@ -107,7 +106,7 @@
+ $(CC) $(CFLAGS) $^ -o $@ -lz
+
+ ppc_disasm.o: ppc_disasm.c
+- $(CC) -g -c -o $@ $<
++ $(CC) $(CFLAGS) -g -c -o $@ $<
+
+ video_sdl.o: video_sdl.c icon.c
+ $(CC) $(CFLAGS) `$(SDL_CONFIG) --cflags` -c -o $@ $<
diff --git a/emulators/gcube/pkg-descr b/emulators/gcube/pkg-descr
new file mode 100644
index 000000000000..79ebff59fcb7
--- /dev/null
+++ b/emulators/gcube/pkg-descr
@@ -0,0 +1,6 @@
+A Cross-platform Gamecube emulator.
+
+WWW: http://gcube.exemu.net/
+
+- Travis Poppe
+tlp@liquidx.org