Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2005 16:45:53 -0300
From:      "Alejandro Pulver" <alejandro@varnet.biz>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/82008: Update port: emulators/generator - SEGA Genesis emulator
Message-ID:  <1118173553.0@phobos.mars.bsd>
Resent-Message-ID: <200506071950.j57Jo4M8046190@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         82008
>Category:       ports
>Synopsis:       Update port: emulators/generator - SEGA Genesis emulator
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 07 19:50:04 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Alejandro Pulver
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:


System: FreeBSD 5.4-RELEASE #0: Sat May 21 12:14:47 ART 2005
    root@phobos.mars.bsd:/usr/src/sys/i386/compile/ATHLON-ALE



>Description:





>How-To-Repeat:





>Fix:


--- generator.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	generator
#	generator/files
#	generator/files/patch-configure
#	generator/files/patch-hdr::generator.h
#	generator/files/patch-main::ui-gtk.c
#	generator/pkg-message
#	generator/pkg-descr
#	generator/distinfo
#	generator/Makefile
#
echo c - generator
mkdir -p generator > /dev/null 2>&1
echo c - generator/files
mkdir -p generator/files > /dev/null 2>&1
echo x - generator/files/patch-configure
sed 's/^X//' >generator/files/patch-configure << 'END-of-generator/files/patch-configure'
X*** configure.orig	Mon May  5 12:08:27 2003
X--- configure	Fri Apr 29 17:47:06 2005
X***************
X*** 1919,1933 ****
X  echo "${ECHO_T}Turning on gcc 3 optimisations" >&6
X          CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
X        fi
X!       case $target_cpu in
X!         i?86) echo "$as_me:$LINENO: result: Turning on pentium optimisations" >&5
X! echo "${ECHO_T}Turning on pentium optimisations" >&6
X!               # cannot do malign-double as we link to other libraries and it
X!               # would break binary compatibility
X!               CFLAGS="$CFLAGS -march=pentium -malign-loops=5"
X!               CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
X!               ;;
X!       esac
X      else
X        { echo "$as_me:$LINENO: WARNING: You did not opt for gcc optimisations!" >&5
X  echo "$as_me: WARNING: You did not opt for gcc optimisations!" >&2;}
X--- 1919,1933 ----
X  echo "${ECHO_T}Turning on gcc 3 optimisations" >&6
X          CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
X        fi
X! #      case $target_cpu in
X! #        i?86) echo "$as_me:$LINENO: result: Turning on pentium optimisations" >&5
X! #echo "${ECHO_T}Turning on pentium optimisations" >&6
X! #              # cannot do malign-double as we link to other libraries and it
X! #              # would break binary compatibility
X! #              CFLAGS="$CFLAGS -march=pentium -malign-loops=5"
X! #              CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
X! #              ;;
X! #      esac
X      else
X        { echo "$as_me:$LINENO: WARNING: You did not opt for gcc optimisations!" >&5
X  echo "$as_me: WARNING: You did not opt for gcc optimisations!" >&2;}
END-of-generator/files/patch-configure
echo x - generator/files/patch-hdr::generator.h
sed 's/^X//' >generator/files/patch-hdr::generator.h << 'END-of-generator/files/patch-hdr::generator.h'
X--- hdr/generator.h.orig	Mon May  5 03:50:43 2003
X+++ hdr/generator.h	Sun Nov 23 04:46:22 2003
X@@ -13,6 +13,10 @@
X void gen_softreset(void);
X void gen_loadmemrom(const char *rom, int romlen);
X 
X+#if (defined(__unix__) || defined(unix)) && !defined(USG)
X+#include <sys/param.h>
X+#endif
X+
X #if defined(linux)
X   #include <byteswap.h>
X   #define SWAP16(x) bswap_16((x))
X@@ -21,6 +25,10 @@
X   #include <machine/endian.h>
X   #define SWAP16(x) bswap_16((x))
X   #define SWAP32(x) bswap_32((x))
X+#elif defined(__FreeBSD__) && __FreeBSD_version >= 470000
X+  #include <sys/endian.h>
X+  #define SWAP16(x) (be16toh(x))
X+  #define SWAP32(x) (be32toh(x))
X #else
X   #define SWAP16(y) (( ((y)>>8) & 0x00ff) | (( ((y)<<8) & 0xff00)))
X   #define SWAP32(y) (( ((y)>>24) & 0x000000ff) | \
X@@ -221,11 +229,11 @@
X #  define LOG_DEBUG3(x)   /* ui_log_debug3 ## x */
X #  define LOG_DEBUG2(x)   /* ui_log_debug2 ## x */
X #  define LOG_DEBUG1(x)   /* ui_log_debug1 ## x */
X-#  define LOG_USER(x)     ui_log_user ## x
X-#  define LOG_VERBOSE(x)  ui_log_verbose ## x
X-#  define LOG_NORMAL(x)   ui_log_normal ## x
X-#  define LOG_CRITICAL(x) ui_log_critical ## x
X-#  define LOG_REQUEST(x)  ui_log_request ## x
X+#  define LOG_USER(x)     ui_log_user x
X+#  define LOG_VERBOSE(x)  ui_log_verbose x
X+#  define LOG_NORMAL(x)   ui_log_normal x
X+#  define LOG_CRITICAL(x) ui_log_critical x
X+#  define LOG_REQUEST(x)  ui_log_request x
X #endif
X 
X typedef struct {
END-of-generator/files/patch-hdr::generator.h
echo x - generator/files/patch-main::ui-gtk.c
sed 's/^X//' >generator/files/patch-main::ui-gtk.c << 'END-of-generator/files/patch-main::ui-gtk.c'
X--- main/ui-gtk.c.orig	Sun May  4 09:09:51 2003
X+++ main/ui-gtk.c	Sun Nov 23 04:32:57 2003
X@@ -739,7 +739,7 @@
X /* logging is done this way because this was the best I could come up with
X    whilst battling with macros that can only take fixed numbers of arguments */
X 
X-#define LOG_FUNC(name,level,txt) void ui_log_ ## name ## (const char *text, ...) \
X+#define LOG_FUNC(name,level,txt) void ui_log_ ## name (const char *text, ...) \
X { \
X   va_list ap; \
X   if (gen_loglevel >= level) { \
END-of-generator/files/patch-main::ui-gtk.c
echo x - generator/pkg-message
sed 's/^X//' >generator/pkg-message << 'END-of-generator/pkg-message'
XGenerator has been installed.
X
XIf you enabled the option SDL_AUDIO and your sound is delayed try setting the
Xvariable "sound_maxfields" and "sound_minfields" in your configuration file
X(usually "~/.genrc") to lower values. Like:
X
X# default: 5
Xsound_minfields = 1
X
X# default: 10
Xsound_maxfields = 2
X
XTo gain more performance set the CPUTYPE variable in "make.conf" as appropiate
X(in addition to enabling the build option OPTIMIZED_CFLAGS), then rebuild and
Xinstall generator.
X
XNOTE: if you want more features use the port "emulators/generator-cbiere".
X
XFor more information visit: http://www.squish.net/generator/
END-of-generator/pkg-message
echo x - generator/pkg-descr
sed 's/^X//' >generator/pkg-descr << 'END-of-generator/pkg-descr'
XSEGA Genesis emulator
X
XGenerator is an open source emulator designed to emulate the Sega Genesis /
XMega Drive console, a popular games machine produced in the early 1990s. It is
Xa portable program written in C and has been ported to the Amiga, Macintosh,
XWindows and even pocket PCs such as the iPAQ and Cassiopeia. Natively it
Xcompiles under unix for X Windows with either tcl/tk or gtk/SDL, for svgalib
Xand even cross-compiles to DOS with djgpp/allegro.
X
XGenerator uses it's own custom 68000 processor emulation which is and uses
Xcompilation techniques such as block-marking, flag calculation removal,
Xoperand pre-calculation, endian pre-conversion etc. There are approximately
X1600 C routines generated by the first stage of compilation to cope with the
X67 instruction families. These include two versions of every instruction - one
Xthat calculates flags and one that doesn't, so that unnecessary flag
Xcomputation is avoided.
X
XAuthor: James Ponder
X
XWWW: http://www.squish.net/generator/
X
X- Alejandro Pulver
Xalejandro@varnet.biz
END-of-generator/pkg-descr
echo x - generator/distinfo
sed 's/^X//' >generator/distinfo << 'END-of-generator/distinfo'
XMD5 (generator-0.35.tar.gz) = 86f23702f2f7b38172863d080bb94630
XSIZE (generator-0.35.tar.gz) = 469541
END-of-generator/distinfo
echo x - generator/Makefile
sed 's/^X//' >generator/Makefile << 'END-of-generator/Makefile'
X# New ports collection makefile for:   emulators/generator
X# Date created:        16 April 2001
X# Whom:                Yukihiro Nakai <nakai@FreeBSD.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	generator
XPORTVERSION=	0.35
XPORTREVISION=	3
XCATEGORIES=	emulators
XMASTER_SITES=	http://www.squish.net/generator/files/
X
XMAINTAINER=	alejandro@varnet.biz
XCOMMENT=	SEGA Genesis emulator
X
XLIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg
X
XUSE_SDL=	sdl
XUSE_GMAKE=	yes
XUSE_GNOME=	gtk12
X
XOPTIONS=	OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
X		RAZE "Use RAZE z80 emulation (only for i386)" on \
X		SDL_AUDIO "Use SDL for audio" off
X
XGNU_CONFIGURE=		yes
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XCONFIGURE_ENV=		CPPFLAGS="-I${LOCALBASE}/include" \
X			LDFLAGS="-L${LOCALBASE}/lib"
XCONFIGURE_ARGS+=	--with-gtk
X
XMAKE_ARGS=	ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
X		AUTOHEADER="${TRUE}"
X
XPLIST_FILES=	bin/${PORTNAME}-gtk
X
Xpost-install:
X	@${ECHO_CMD}
X	@${CAT} ${PKGMESSAGE}
X	@${ECHO_CMD}
X
X.include <bsd.port.pre.mk>
X
X.if ${ARCH} == "alpha" && ${OSVERSION} >= 502102
XBROKEN=		"Does not configure on alpha 5.x"
X.endif
X
X# Generator needs GCC 2.95.x or GCC >= 3.4.2 to work properly.
X# Generator does not automatically determine the GCC version.
X
X.if ${OSVERSION} < 400012
X# GCC < 2.95 is in the base system.
XUSE_GCC=		2.95
X.endif
X
X.if ${OSVERSION} >= 500035 && ${OSVERSION} < 502126
X# GCC > 2.95 (3.X) && GCC < 3.4.2 is in the base system.
XUSE_GCC=		3.4
X.endif
X
X.if ${OSVERSION} < 500035
XCONFIGURE_ARGS+=	--with-gcc=2
X.endif
X
X.if ${OSVERSION} >= 500035
XCONFIGURE_ARGS+=	--with-gcc=3
X.endif
X
X.if defined(WITHOUT_OPTIMIZED_CFLAGS)
XCONFIGURE_ARGS+=	--without-gcc
X.endif
X
X.if defined(WITH_RAZE) && ${ARCH} == "i386"
XBUILD_DEPENDS+=		nasm:${PORTSDIR}/devel/nasm
XCONFIGURE_ARGS+=	--with-raze
X.else
XCONFIGURE_ARGS+=	--with-cmz80
X.endif
X
X.if defined(WITH_SDL_AUDIO)
XCONFIGURE_ARGS+=	--with-sdl-audio
X.endif
X
X.include <bsd.port.post.mk>
END-of-generator/Makefile
exit

--- generator.shar ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1118173553.0>