aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2005-06-12 15:17:43 +0800
committerpat <pat@FreeBSD.org>2005-06-12 15:17:43 +0800
commitd43ecd7d8fa74e6c4e4686b6a4d30457ff7165e3 (patch)
treeb6b37e3998d408b954eec9e585e3fc0b0b98c0c6 /emulators
parentcdf07944f006264c76b57f6fbf424aef8447cde9 (diff)
downloadfreebsd-ports-gnome-d43ecd7d8fa74e6c4e4686b6a4d30457ff7165e3.tar.gz
freebsd-ports-gnome-d43ecd7d8fa74e6c4e4686b6a4d30457ff7165e3.tar.zst
freebsd-ports-gnome-d43ecd7d8fa74e6c4e4686b6a4d30457ff7165e3.zip
Add sound support
Bump PORTREVISION Submitter takes maintainership Add pkg-message and rework pkg-descr PR: ports/82141 Submitted by: Alejandro Pulver <alejandro@varnet.biz>
Diffstat (limited to 'emulators')
-rw-r--r--emulators/generator/Makefile61
-rw-r--r--emulators/generator/files/patch-configure18
-rw-r--r--emulators/generator/pkg-descr21
-rw-r--r--emulators/generator/pkg-message19
4 files changed, 101 insertions, 18 deletions
diff --git a/emulators/generator/Makefile b/emulators/generator/Makefile
index 4476c4f23f3a..24a50c90bf39 100644
--- a/emulators/generator/Makefile
+++ b/emulators/generator/Makefile
@@ -7,47 +7,76 @@
PORTNAME= generator
PORTVERSION= 0.35
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= emulators
MASTER_SITES= http://www.squish.net/generator/files/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= alejandro@varnet.biz
COMMENT= SEGA Genesis emulator
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg
-PLIST_FILES= bin/generator-gtk
+PLIST_FILES= bin/${PORTNAME}-gtk
USE_GNOME= gtk12
USE_SDL= sdl
-USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --with-gtk
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ARGS+= --with-gtk
MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
AUTOHEADER="${TRUE}"
+OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
+ RAZE "Use RAZE z80 emulation (only for i386)" on \
+ SDL_AUDIO "Use SDL for audio" off
+
+post-install:
+ @${ECHO_CMD}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD}
+
.include <bsd.port.pre.mk>
.if ${ARCH} == "alpha" && ${OSVERSION} >= 502102
BROKEN= "Does not configure on alpha 5.x"
.endif
-.if ${ARCH} == "i386"
-BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
+# Generator needs GCC 2.95.x or GCC >= 3.4.2 to work properly.
+# Generator does not automatically determine the GCC version.
+
+.if ${OSVERSION} < 400012
+# GCC < 2.95 is in the base system.
+USE_GCC= 2.95
+.endif
+
+.if ${OSVERSION} >= 500035 && ${OSVERSION} < 502126
+# GCC > 2.95 (3.X) && GCC < 3.4.2 is in the base system.
+USE_GCC= 3.4
+.endif
+
+.if ${OSVERSION} < 500035
+CONFIGURE_ARGS+= --with-gcc=2
+.endif
+
+.if ${OSVERSION} >= 500035
+CONFIGURE_ARGS+= --with-gcc=3
+.endif
+
+.if defined(WITHOUT_OPTIMIZED_CFLAGS)
+CONFIGURE_ARGS+= --without-gcc
+.endif
+
+.if defined(WITH_RAZE) && ${ARCH} == "i386"
+BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
CONFIGURE_ARGS+= --with-raze
.else
CONFIGURE_ARGS+= --with-cmz80
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's|-O3||g ; \
- s|-minline-all-stringops||g ; \
- s|-march=pentium||g ; \
- s|-malign-loops=5||g ; \
- s|-malign-jumps=5||g ; \
- s|-malign-functions=5||g' ${WRKSRC}/configure
+.if defined(WITH_SDL_AUDIO)
+CONFIGURE_ARGS+= --with-sdl-audio
+.endif
.include <bsd.port.post.mk>
diff --git a/emulators/generator/files/patch-configure b/emulators/generator/files/patch-configure
new file mode 100644
index 000000000000..d36090a035c7
--- /dev/null
+++ b/emulators/generator/files/patch-configure
@@ -0,0 +1,18 @@
+--- configure.orig Mon May 5 12:08:27 2003
++++ configure Sat Jun 11 11:55:59 2005
+@@ -1919,15 +1919,6 @@
+ echo "${ECHO_T}Turning on gcc 3 optimisations" >&6
+ CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
+ fi
+- case $target_cpu in
+- i?86) echo "$as_me:$LINENO: result: Turning on pentium optimisations" >&5
+-echo "${ECHO_T}Turning on pentium optimisations" >&6
+- # cannot do malign-double as we link to other libraries and it
+- # would break binary compatibility
+- CFLAGS="$CFLAGS -march=pentium -malign-loops=5"
+- CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
+- ;;
+- esac
+ else
+ { echo "$as_me:$LINENO: WARNING: You did not opt for gcc optimisations!" >&5
+ echo "$as_me: WARNING: You did not opt for gcc optimisations!" >&2;}
diff --git a/emulators/generator/pkg-descr b/emulators/generator/pkg-descr
index ff0cfb014030..6909dd9a05c5 100644
--- a/emulators/generator/pkg-descr
+++ b/emulators/generator/pkg-descr
@@ -1,6 +1,23 @@
SEGA Genesis emulator
-I ported to FreeBSD with all sound support off.
-If you want the sound support, you hack.
+Generator is an open source emulator designed to emulate the Sega Genesis /
+Mega Drive console, a popular games machine produced in the early 1990s. It is
+a portable program written in C and has been ported to the Amiga, Macintosh,
+Windows and even pocket PCs such as the iPAQ and Cassiopeia. Natively it
+compiles under unix for X Windows with either tcl/tk or gtk/SDL, for svgalib
+and even cross-compiles to DOS with djgpp/allegro.
+
+Generator uses it's own custom 68000 processor emulation which is and uses
+compilation techniques such as block-marking, flag calculation removal,
+operand pre-calculation, endian pre-conversion etc. There are approximately
+1600 C routines generated by the first stage of compilation to cope with the
+67 instruction families. These include two versions of every instruction - one
+that calculates flags and one that doesn't, so that unnecessary flag
+computation is avoided.
+
+Author: James Ponder
WWW: http://www.squish.net/generator/
+
+- Alejandro Pulver
+alejandro@varnet.biz
diff --git a/emulators/generator/pkg-message b/emulators/generator/pkg-message
new file mode 100644
index 000000000000..3482d8d3eafe
--- /dev/null
+++ b/emulators/generator/pkg-message
@@ -0,0 +1,19 @@
+Generator has been installed.
+
+If you enabled the option SDL_AUDIO and your sound is delayed try setting the
+variable "sound_maxfields" and "sound_minfields" in your configuration file
+(usually "~/.genrc") to lower values. Like:
+
+# default: 5
+sound_minfields = 1
+
+# default: 10
+sound_maxfields = 2
+
+To gain more performance set the CPUTYPE variable in "make.conf" as appropiate
+(in addition to enabling the build option OPTIMIZED_CFLAGS), then rebuild and
+install generator.
+
+NOTE: if you want more features use the port "emulators/generator-cbiere".
+
+For more information visit: http://www.squish.net/generator/