aboutsummaryrefslogtreecommitdiff
path: root/emulators/mupen64plus-core
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2008-05-20 18:36:41 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2008-05-20 18:36:41 +0000
commit2f3c1b4aaa6b797579a02c10acfe633ad986575e (patch)
treebf46dc006151f2ade10e89ab5bb111efeb40fffc /emulators/mupen64plus-core
parent2bd1d153f84bb3760a9baeeca6ab33c4560cfa77 (diff)
downloadports-2f3c1b4aaa6b797579a02c10acfe633ad986575e.tar.gz
ports-2f3c1b4aaa6b797579a02c10acfe633ad986575e.zip
Notes
Diffstat (limited to 'emulators/mupen64plus-core')
-rw-r--r--emulators/mupen64plus-core/Makefile42
-rw-r--r--emulators/mupen64plus-core/Makefile.common173
-rw-r--r--emulators/mupen64plus-core/distinfo3
-rw-r--r--emulators/mupen64plus-core/files/patch-Makefile25
-rw-r--r--emulators/mupen64plus-core/files/patch-pre.mk139
-rw-r--r--emulators/mupen64plus-core/pkg-descr8
-rw-r--r--emulators/mupen64plus-core/pkg-plist51
7 files changed, 441 insertions, 0 deletions
diff --git a/emulators/mupen64plus-core/Makefile b/emulators/mupen64plus-core/Makefile
new file mode 100644
index 000000000000..e5cf44002239
--- /dev/null
+++ b/emulators/mupen64plus-core/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: mupen64plus-base
+# Date created: 2008-05-16
+# Whom: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mupen64plus
+PORTVERSION?= 1.3
+PORTREVISION?= 0
+CATEGORIES= emulators
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+PKGNAMESUFFIX?= -base
+DIST_SUBDIR= ${PORTNAME}
+
+MAINTAINER?= acm@FreeBSD.org
+COMMENT?= A fork of Mupen64 Nintendo 64 emulator
+
+USE_ZIP= yes
+USE_GNOME?= pkgconfig gtk20
+USE_GL?= #
+USE_SDL?= #
+USE_GMAKE= yes
+ONLY_FOR_ARCHS= i386 amd64
+
+MAKE_ENV+= CXX="${CXX}" PTHREAD_LIBS="${PTHREAD_LIBS}"
+OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}${PKGNAMESUFFIX}/options
+
+FIXFILES?= r4300/r4300.c r4300/recomp.c memory/dma.c r4300/x86/assemble.c \
+ r4300/x86_64/assemble.c main/gui_gtk/main_gtk.c main/vcr.c
+
+OPTIONS?= NOGUI "Build without GUI support" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_NOGUI)
+HAVE_NOGUI= true
+.endif
+
+.include "${MASTERDIR}/Makefile.common"
+
+.include <bsd.port.post.mk>
diff --git a/emulators/mupen64plus-core/Makefile.common b/emulators/mupen64plus-core/Makefile.common
new file mode 100644
index 000000000000..d6e7dca44c54
--- /dev/null
+++ b/emulators/mupen64plus-core/Makefile.common
@@ -0,0 +1,173 @@
+USE_DOS2UNIX= *.c *.cpp *.h *.H *.ini *.conf
+
+DISTNAME= ${PORTNAME:S/m/M/:S/pl/Pl/}-${PORTVERSION:S/./-/}-src
+PATCHDIR= ${.CURDIR}/files
+WRKSRC?= ${WRKDIR}/${DISTNAME}
+
+EXTRACT_AFTER_ARGS= "${DISTNAME}/Makefile" ${DISTNAME}/pre.mk ${DISTNAME}/release.mk \
+ "${DISTNAME}/config/*" "${DISTNAME}/main/*" "${DISTNAME}/plugins/*"
+
+.if ${PKGNAMESUFFIX} == "-base"
+USE_GL= yes
+USE_SDL= sdl
+. if defined(HAVE_VCR)
+LIB_DEPENDS= aviplay.0:${PORTSDIR}/multimedia/avifile
+MAKE_ENV+= VCR=1
+. endif
+. if defined(HAVE_NOGUI)
+USE_GNOME= #
+MAKE_ENV+= NOGUI_ONLY=1
+. endif
+ALL_TARGET= mupen64plus
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/RELEASE" "${DISTNAME}/README.vcr" "${DISTNAME}/doc/*" "${DISTNAME}/lang/*" \
+ "${DISTNAME}/icons/*" "${DISTNAME}/memory/*" "${DISTNAME}/r4300/*" "${DISTNAME}/debugger/*"
+.else
+EXTRA_PATCHES?= ${.CURDIR}/../mupen64plus-base/files/patch-Makefile \
+ ${.CURDIR}/../mupen64plus-base/files/patch-pre.mk
+PLIST= ${WRKDIR}/pkg-plist
+.endif
+
+.if ${PKGNAMESUFFIX} == "-dummyaudio"
+ALL_TARGET= plugins/dummyaudio.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/dummy_audio/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-sdlinput"
+ALL_TARGET= plugins/blight_input.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/blight_input/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-gln64"
+ALL_TARGET= plugins/glN64.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/glN64/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-sdlaudio"
+ALL_TARGET= plugins/jttl_audio.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/jttl_audio/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-sound"
+ALL_TARGET= plugins/mupen64_audio.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/mupen64_audio/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-input"
+ALL_TARGET= plugins/mupen64_input.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/mupen64_input/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-rsp"
+ALL_TARGET= plugins/mupen64_hle_rsp_azimer.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/rsp_hle/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-glide"
+. if !defined(WITHOUT_YASM)
+BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm
+MAKE_ENV+= ASM="${LOCALBASE}/bin/yasm"
+. else
+BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
+MAKE_ENV+= ASM="${LOCALBASE}/bin/nasm"
+. endif
+ALL_TARGET= plugins/glide64.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/glide64/*"
+.endif
+
+.if ${PKGNAMESUFFIX} == "-rice"
+ALL_TARGET= plugins/ricevideo.so
+EXTRACT_AFTER_ARGS+= "${DISTNAME}/rice_video/*"
+.endif
+
+EXTRACT_AFTER_ARGS+= -d ${WRKDIR}
+
+post-configure:
+.for f in ${FIXFILES}
+ @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/${f}
+.endfor
+
+.if ${PKGNAMESUFFIX} != "-base"
+pre-install:
+ @${RM} -f ${PLIST}
+. if ${PKGNAMESUFFIX} == "-glide"
+ @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME:S/g/G/}.ini" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. endif
+
+. if ${PKGNAMESUFFIX} == "-rice"
+ @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME:S/r/R/:S/v/V/}.cfg" >> ${PLIST}
+ @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME:S/r/R/:S/v/V/}Linux.ini" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. endif
+
+. if ${PKGNAMESUFFIX} == "-glN64"
+ @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. endif
+
+. if ${PKGNAMESUFFIX} == "-sdlaudio"
+ @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. endif
+
+. if ${PKGNAMESUFFIX} == "-sdlinput"
+ @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. endif
+
+ @${ECHO_CMD} "%%DATADIR%%/plugins/${PLUGIN_NAME}.so" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%/plugins" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%" >> ${PLIST}
+.endif
+
+do-install:
+.if ${PKGNAMESUFFIX} == "-base"
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
+
+ @${MKDIR} ${DATADIR}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/mupen64plus.ini ${DATADIR}/config/
+ ${INSTALL_DATA} ${WRKSRC}/config/mupen64plus.conf ${DATADIR}/config/
+
+ @${MKDIR} ${DATADIR}/lang
+ ${INSTALL_DATA} ${WRKSRC}/lang/* ${DATADIR}/lang/
+
+ @${MKDIR} ${DATADIR}/icons
+ ${INSTALL_DATA} ${WRKSRC}/icons/* ${DATADIR}/icons/
+
+. if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/RELEASE ${DOCSDIR}/RELEASE
+ ${INSTALL_DATA} ${WRKSRC}/README.vcr ${DOCSDIR}/README.vcr
+ ${INSTALL_DATA} ${WRKSRC}/doc/readme.pdf ${DOCSDIR}/readme.pdf
+. endif
+.else
+ @${MKDIR} ${DATADIR}/plugins
+. if ${PKGNAMESUFFIX} == "-glide"
+ @${MKDIR} ${DATADIR}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME:S/g/G/}.ini ${DATADIR}/config/
+. endif
+
+. if ${PKGNAMESUFFIX} == "-rice"
+ @${MKDIR} ${DATADIR}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME:S/r/R/:S/v/V/}.cfg ${DATADIR}/config/
+ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME:S/r/R/:S/v/V/}Linux.ini ${DATADIR}/config/
+. endif
+
+. if ${PKGNAMESUFFIX} == "-glN64"
+ @${MKDIR} ${DATADIR}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/
+. endif
+
+. if ${PKGNAMESUFFIX} == "-sdlaudio"
+ @${MKDIR} ${DATADIR}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/
+. endif
+
+. if ${PKGNAMESUFFIX} == "-sdlinput"
+ @${MKDIR} ${DATADIR}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/
+. endif
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/plugins/${PLUGIN_NAME}.so ${DATADIR}/plugins/
+.endif
diff --git a/emulators/mupen64plus-core/distinfo b/emulators/mupen64plus-core/distinfo
new file mode 100644
index 000000000000..299313c428b7
--- /dev/null
+++ b/emulators/mupen64plus-core/distinfo
@@ -0,0 +1,3 @@
+MD5 (mupen64plus/Mupen64Plus-1-3-src.zip) = 578d4712e9617e229c2da44d472eb159
+SHA256 (mupen64plus/Mupen64Plus-1-3-src.zip) = 9327afd94696138bfa6559a02f61689b8107f221b34c26ac11e07c96fe65e6cc
+SIZE (mupen64plus/Mupen64Plus-1-3-src.zip) = 2845612
diff --git a/emulators/mupen64plus-core/files/patch-Makefile b/emulators/mupen64plus-core/files/patch-Makefile
new file mode 100644
index 000000000000..6becc5b95fe9
--- /dev/null
+++ b/emulators/mupen64plus-core/files/patch-Makefile
@@ -0,0 +1,25 @@
+--- Makefile 2008-03-29 14:41:03.000000000 -0500
++++ Makefile 2008-05-20 10:56:58.000000000 -0500
+@@ -83,7 +83,7 @@
+ r4300/tlb.o
+
+ ifeq ($(CPU), X86)
+- ifeq ($(ARCH), 64BITS)
++ ifeq ($(ARCH_DETECTED), 64BITS)
+ DYNAREC = x86_64
+ else
+ DYNAREC = x86
+@@ -205,11 +205,11 @@
+ all: $(ALL)
+
+ mupen64plus: $(OBJECTS)
+- $(CC) $^ $(LDFLAGS) $(LIBS) -Wl,-export-dynamic -lpthread -ldl -o $@
++ $(CC) $^ $(LDFLAGS) $(LIBS) -Wl,-export-dynamic ${PTHREAD_LIBS} -o $@
+ $(STRIP) $@
+
+ mupen64plus_dbg: $(OBJECTS) main/main_gtk.o
+- $(CC) $^ $(LDFLAGS) $(LIBS) -Wl,-export-dynamic -lpthread -ldl -o $@
++ $(CC) $^ $(LDFLAGS) $(LIBS) -Wl,-export-dynamic ${PTHREAD_LIBS} -o $@
+
+ install:
+ ./install.sh $(PREFIX)
diff --git a/emulators/mupen64plus-core/files/patch-pre.mk b/emulators/mupen64plus-core/files/patch-pre.mk
new file mode 100644
index 000000000000..ef4c10350fe4
--- /dev/null
+++ b/emulators/mupen64plus-core/files/patch-pre.mk
@@ -0,0 +1,139 @@
+--- pre.mk 2008-03-29 14:41:03.000000000 -0500
++++ pre.mk 2008-05-20 10:56:16.000000000 -0500
+@@ -1,53 +1,28 @@
+-# detect system architecture: i386, x86_64, or PPC/PPC64
++# detect system architecture: i386, amd64, or PPC/PPC64
+ UNAME = $(shell uname -m)
+-ifeq ("$(UNAME)","x86_64")
++ifeq ("$(UNAME)","amd64")
+ CPU = X86
+ ifeq ("$(BITS)", "32")
+- ARCH = 64BITS_32
++ ARCH_DETECTED = 64BITS_32
+ else
+- ARCH = 64BITS
++ ARCH_DETECTED = 64BITS
+ endif
+ endif
+ ifneq ("$(filter i%86,$(UNAME))","")
+ CPU = X86
+- ARCH = 32BITS
++ ARCH_DETECTED = 32BITS
+ endif
+ ifeq ("$(UNAME)","ppc")
+ CPU = PPC
+- ARCH = 32BITS
++ ARCH_DETECTED = 32BITS
+ endif
+ ifeq ("$(UNAME)","ppc64")
+ CPU = PPC
+- ARCH = 64BITS
++ ARCH_DETECTED = 64BITS
+ endif
+
+-# find installed assembler: yasm or nasm
+-ifneq ("$(shell which yasm 2>&1 | head -c 9)", "which: no")
+- ASM=yasm
+-else
+- ifneq ("$(shell which nasm 2>&1 | head -c 9)", "which: no")
+- ASM=nasm
+- else
+- # throw error
+- $(error No yasm or nasm found!)
+- endif
+-endif
+-
+-# test for presence of SDL
+-ifeq ("$(shell which sdl-config 2>&1 | head -c 9)", "which: no")
+- # throw error
+- $(error No SDL development libraries found!)
+-endif
+-
+-# test for presence of GTK 2.0
+-ifeq ("$(shell which pkg-config 2>&1 | head -c 9)", "which: no")
+- # throw error
+- $(error No GTK 2.x development libraries found!)
+-endif
+-ifneq ("$(shell pkg-config gtk+-2.0 --modversion | head -c 2)", "2.")
+- # throw error
+- $(error No GTK 2.x development libraries found!)
+-endif
++# set assembler program
++ASM ?= $(LOCALBASE)/bin/nasm
+
+ # set GTK flags and libraries
+ GTK_FLAGS = `pkg-config gtk+-2.0 --cflags` -D_GTK2
+@@ -55,36 +30,36 @@
+ GTHREAD_LIBS = `pkg-config gthread-2.0 --libs`
+
+ # set base program pointers and flags
+-CC = gcc
+-CXX = g++
+-LD = g++
+-STRIP = strip --strip-all
+-RM = rm
+-MV = mv
+-CP = cp
+-MD = mkdir
+-FIND = find
+-PROF = gprof
+-INSTALL = ginstall
++CC ?= gcc
++CXX ?= g++
++LD ?= $(CXX)
++STRIP ?= strip --strip-all
++RM ?= rm
++MV ?= mv
++CP ?= cp
++MD ?= mkdir
++FIND ?= find
++PROF ?= gprof
++INSTALL ?= ginstall
+
+ # set base CFLAGS and LDFLAGS for all systems
+-CFLAGS = -pipe -O3 -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing
+-LDFLAGS =
++CFLAGS += -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing
++LDFLAGS +=
+
+ # set special flags per-system
+ ifeq ($(CPU), X86)
+- ifeq ($(ARCH), 64BITS)
+- CFLAGS += -march=athlon64
++ ifeq ($(ARCH_DETECTED), 64BITS)
++ CFLAGS +=
+ else
+- CFLAGS += -march=i686 -mtune=pentium-m -mmmx -msse
++ CFLAGS += -mmmx -msse
+ ifneq ($(PROFILE), 1)
+ CFLAGS += -fomit-frame-pointer
+ endif
+ endif
+ # tweak flags for 32-bit build on 64-bit system
+- ifeq ($(ARCH), 64BITS_32)
+- CFLAGS += -m32
+- LDFLAGS += -m32 -m elf_i386
++ ifeq ($(ARCH_DETECTED), 64BITS_32)
++ CFLAGS +=
++ LDFLAGS +=
+ endif
+ endif
+ ifeq ($(CPU), PPC)
+@@ -105,8 +80,8 @@
+
+ # set CFLAGS, LIBS, and LDFLAGS for external dependencies
+
+-SDL_FLAGS = `sdl-config --cflags`
+-SDL_LIBS = `sdl-config --libs`
++SDL_FLAGS = `${SDL_CONFIG} --cflags`
++SDL_LIBS = `${SDL_CONFIG} --libs`
+
+ AVIFILE_FLAGS = `avifile-config --cflags`
+ AVIFILE_LIBS = `avifile-config --libs`
+@@ -116,5 +91,5 @@
+
+ PLUGIN_LDFLAGS = -Wl,-Bsymbolic -shared
+
+-LIBGL_LIBS = -L/usr/X11R6/lib -lGL
++LIBGL_LIBS = -L${LOCALBASE}/lib -lGL
+
diff --git a/emulators/mupen64plus-core/pkg-descr b/emulators/mupen64plus-core/pkg-descr
new file mode 100644
index 000000000000..6cf8e0e4ea32
--- /dev/null
+++ b/emulators/mupen64plus-core/pkg-descr
@@ -0,0 +1,8 @@
+Mupen64Plus is a plugin-based N64 emulator for Linux, FreeBSD which is capable
+of accurately playing many games. Included are four MIPS R4300 CPU emulators,
+with dynamic recompilers for 32-bit x86 and 64-bit amd64 systems, and necessary
+plugins for audio, graphical rendering (RDP), signal co-processor (RSP), and
+input. There are 3 OpenGL video plugins included: glN64, RiceVideoLinux, and
+Glide64.
+
+WWW: http://code.google.com/p/mupen64plus/
diff --git a/emulators/mupen64plus-core/pkg-plist b/emulators/mupen64plus-core/pkg-plist
new file mode 100644
index 000000000000..0d39a3bc03e7
--- /dev/null
+++ b/emulators/mupen64plus-core/pkg-plist
@@ -0,0 +1,51 @@
+bin/mupen64plus
+%%DATADIR%%/config/mupen64plus.conf
+%%DATADIR%%/config/mupen64plus.ini
+%%DATADIR%%/lang/catalan.lng
+%%DATADIR%%/lang/dutch.lng
+%%DATADIR%%/lang/english.lng
+%%DATADIR%%/lang/french.lng
+%%DATADIR%%/lang/german.lng
+%%DATADIR%%/lang/italian.lng
+%%DATADIR%%/lang/pt_BR.lng
+%%DATADIR%%/lang/spanish.lng
+%%DATADIR%%/icons/australia.png
+%%DATADIR%%/icons/configure-small.png
+%%DATADIR%%/icons/configure.png
+%%DATADIR%%/icons/europe.png
+%%DATADIR%%/icons/france.png
+%%DATADIR%%/icons/fullscreen-small.png
+%%DATADIR%%/icons/fullscreen.png
+%%DATADIR%%/icons/germany.png
+%%DATADIR%%/icons/graphics.png
+%%DATADIR%%/icons/input.png
+%%DATADIR%%/icons/italy.png
+%%DATADIR%%/icons/japan.png
+%%DATADIR%%/icons/logo.png
+%%DATADIR%%/icons/logo.xpm
+%%DATADIR%%/icons/messagebox-error.png
+%%DATADIR%%/icons/messagebox-info.png
+%%DATADIR%%/icons/messagebox-quest.png
+%%DATADIR%%/icons/messagebox-warn.png
+%%DATADIR%%/icons/n64cart.xpm
+%%DATADIR%%/icons/open-small.png
+%%DATADIR%%/icons/open.png
+%%DATADIR%%/icons/pause-small.png
+%%DATADIR%%/icons/pause.png
+%%DATADIR%%/icons/play-small.png
+%%DATADIR%%/icons/play.png
+%%DATADIR%%/icons/rsp.png
+%%DATADIR%%/icons/sound.png
+%%DATADIR%%/icons/spain.png
+%%DATADIR%%/icons/stop-small.png
+%%DATADIR%%/icons/stop.png
+%%DATADIR%%/icons/usa.png
+%%PORTDOCS%%%%DOCSDIR%%/README.vcr
+%%PORTDOCS%%%%DOCSDIR%%/RELEASE
+%%PORTDOCS%%%%DOCSDIR%%/readme.pdf
+@dirrm %%DATADIR%%/icons
+@dirrm %%DATADIR%%/lang
+@dirrmtry %%DATADIR%%/config
+@dirrmtry %%DATADIR%%/plugins
+@dirrmtry %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%