From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Aug 9 05:00:19 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1D4B37B408 for ; Sat, 9 Aug 2003 05:00:18 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EC3A43FDF for ; Sat, 9 Aug 2003 05:00:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h79C0DUp040196 for ; Sat, 9 Aug 2003 05:00:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h79C0Du1040195; Sat, 9 Aug 2003 05:00:13 -0700 (PDT) Resent-Date: Sat, 9 Aug 2003 05:00:13 -0700 (PDT) Resent-Message-Id: <200308091200.h79C0Du1040195@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, KATO Tsuguru Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DE9637B401; Sat, 9 Aug 2003 04:55:40 -0700 (PDT) Received: from hfep02.dion.ne.jp (hfep02.dion.ne.jp [203.181.105.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39F0B43F75; Sat, 9 Aug 2003 04:55:39 -0700 (PDT) (envelope-from tkato@prontomail.com) Received: from localhost ([219.108.124.175]) by hfep02.dion.ne.jp with SMTP id <20030809115530345.CMTW@hfep02.dion.ne.jp>; Sat, 9 Aug 2003 20:55:30 +0900 Message-Id: <20030809205405.4582c54d.tkato@prontomail.com> Date: Sat, 9 Aug 2003 20:54:05 +0900 From: KATO Tsuguru To: FreeBSD-gnats-submit@FreeBSD.org cc: green@FreeBSD.org Subject: ports/55419: Update port: emulators/snes9x to 1.40 (fix ports/44225) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2003 12:00:19 -0000 >Number: 55419 >Category: ports >Synopsis: Update port: emulators/snes9x to 1.40 (fix ports/44225) >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: Sat Aug 09 05:00:13 PDT 2003 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 4.8-RELEASE-p1 i386 >Organization: >Environment: >Description: - Update to version 1.40 New file: files/patch-2XSAI.CPP Remove file: files/patch-aa Following PRs should be superseded by this one: [2001/12/04] ports/32517 green Update port: emulators/snes9x to 1.39 [2002/10/18] ports/44225 green Update port: emulators/snes9x to 1.39 (fix ports/32517) >How-To-Repeat: >Fix: diff -urN /usr/ports/emulators/snes9x/Makefile emulators/snes9x/Makefile --- /usr/ports/emulators/snes9x/Makefile Thu May 8 19:24:22 2003 +++ emulators/snes9x/Makefile Sat Aug 9 01:39:50 2003 @@ -6,48 +6,63 @@ # PORTNAME= snes9x -PORTVERSION= 1.37c +PORTVERSION= 1.40 CATEGORIES= emulators -# MASTER_SITES= http://www.snes9x.com/zips/ is nonexistant right now -MASTER_SITES= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= green -DISTNAME= s9xs137c +MASTER_SITES= http://www.lysator.liu.se/snes9x/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-src-2 MAINTAINER= green@FreeBSD.org COMMENT= Super Nintendo Entertainment System(SNES) Emulator -.if ${MACHINE_ARCH} == i386 -BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm -.elif ${MACHINE_ARCH} == alpha -MAKEFILE= Makefile.alpha -BROKEN= currently does not work on alpha -.endif +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src/snes9x -USE_GMAKE= YES USE_X_PREFIX= YES -MAKE_ENV= CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" -USE_ZIP= YES -WRKSRC= ${WRKDIR}/release +USE_GMAKE= YES +MAKE_ARGS= CC="${CC} ${CFLAGS}" CCC="${CXX} ${CXXFLAGS}" \ + INCLUDES="-I${X11BASE}/include ${PTHREAD_CFLAGS}" \ + LDLIBS="-L${X11BASE}/lib ${PTHREAD_LIBS}" \ + THREAD_SOUND=1 NETPLAY=1 UNZIP=1 + +.include + +.if ${ARCH} == "i386" +BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm +MAKE_ARGS+= ZSNESFX=1 ZSNESC4=1 ASMCPU=1 NASM="nasm" I386SPC="i386/SPC.O" +.if defined(WITH_MMX) +MAKE_ARGS+= ASMKREED=1 +.endif +.endif .if exists(/usr/lib/libusbhid.a) -MAKE_ENV+= USB_JOYSTICK_SUPPORT=yes +MAKE_ARGS+= USB_JOYSTICK_SUPPORT=1 .endif -ONLY_FOR_ARCHS= i386 - -.if ${MACHINE_ARCH} == alpha -post-patch: - @${SED} -e '/^ZSNESFX/d' \ - -e '/^ASMCPU/d' \ - -e '/^OPTIMISE/s/-mpentium //' \ - -e '/^-Ii386/d' \ - -e '/offsets >/s:i386/::' \ - < ${WRKSRC}/Makefile \ - > ${WRKSRC}/Makefile.alpha -.endif +do-configure: + @cd ${WRKSRC} && ${SED} \ + 's:@ZSNESFX@:: ; \ + s:@ZSNESC4@::g ; \ + s:@ASMCPU@::g ; \ + s:@SPC700ASM@::g ; \ + s:@GLIDE@::g ; \ + s:@OPENGL@::g ; \ + s:@AIDO@::g ; \ + s:@THREAD_SOUND@::g ; \ + s:@ASMKREED@::g ; \ + s:@I386SPC@:$${I386SPC}:g ; \ + s:@JOYDEFINES@::g ; \ + s:@CXX@::g ; \ + s:@RTTIFLAG@::g ; \ + s:@CC@::g ; \ + s:@NASM@::g ; \ + s:@XINCLUDES@::g ; \ + s:@OPTIMIZE@::g ; \ + s:@CPUINC@::g ; \ + s:@SYSDEFINES@::g ; \ + s:@SYSLIBS@::g ; \ + s: -lpthread::g ; \ + s: \.\./zlib/libz\.a::g' < Makefile.in > Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/snes9x ${PREFIX}/bin -.include +.include diff -urN /usr/ports/emulators/snes9x/distinfo emulators/snes9x/distinfo --- /usr/ports/emulators/snes9x/distinfo Thu Mar 29 21:35:27 2001 +++ emulators/snes9x/distinfo Fri Aug 8 22:53:09 2003 @@ -1 +1 @@ -MD5 (s9xs137c.zip) = 45a29cb3ba2354c3fa7ad936ac655a07 +MD5 (snes9x-1.40-src-2.tar.gz) = 81c1f8c687fb45fc20d631dd17702a20 diff -urN /usr/ports/emulators/snes9x/files/patch-2XSAI.CPP emulators/snes9x/files/patch-2XSAI.CPP --- /usr/ports/emulators/snes9x/files/patch-2XSAI.CPP Thu Jan 1 09:00:00 1970 +++ emulators/snes9x/files/patch-2XSAI.CPP Sat Aug 9 00:54:09 2003 @@ -0,0 +1,21 @@ +--- 2XSAI.CPP.orig Fri Jul 25 23:20:19 2003 ++++ 2XSAI.CPP Sat Aug 9 00:54:02 2003 +@@ -81,12 +81,12 @@ + #include "port.h" + #include "gfx.h" + +-#if (!defined(NOASM) && defined (__i386__) || defined (__i486__) || \ +- defined (__i586__) || defined (__WIN32__) || defined (__DJGPP)) +-# ifndef MMX +-# define MMX +-# endif +-#endif ++//#if (!defined(NOASM) && defined (__i386__) || defined (__i486__) || \ ++// defined (__i586__) || defined (__WIN32__) || defined (__DJGPP)) ++//# ifndef MMX ++//# define MMX ++//# endif ++//#endif + + extern "C" + { diff -urN /usr/ports/emulators/snes9x/files/patch-aa emulators/snes9x/files/patch-aa --- /usr/ports/emulators/snes9x/files/patch-aa Mon Sep 30 20:49:40 2002 +++ emulators/snes9x/files/patch-aa Thu Jan 1 09:00:00 1970 @@ -1,83 +0,0 @@ ---- Makefile.orig Wed Feb 28 12:29:58 2001 -+++ Makefile Sat Sep 28 20:50:19 2002 -@@ -4,7 +4,6 @@ - #SPC700ASM=1 - NETPLAY=1 - UNZIP=1 --GLIDE=1 - #GUI=1 - THREAD_SOUND=1 - ASMKREED=1 -@@ -81,11 +80,6 @@ - UNZIPDEFINES=-DUNZIP_SUPPORT - endif - --ifdef THREAD_SOUND --CPUDEFINES += -DUSE_THREADS --EXTRALIBS += -lpthread --endif -- - ifdef GLIDE - GLIDEOBJS = unix/glide.o - GLIDEDEFINES = -DUSE_GLIDE -I/usr/include/glide -@@ -98,13 +92,13 @@ - endif - - MOC = $(QTDIR)/bin/moc --CCC = g++ -fno-rtti -+CCC = $(CXX) -fno-rtti - CC = gcc - NASM = nasm - --INCLUDES=-I/usr/X11R6/include -I/usr/local/include -+INCLUDES=-I$(X11BASE)/include -I$(LOCALBASE)/include - --OPTIMISE= -O6 -mpentium -fomit-frame-pointer -fno-exceptions -Wall -W -pedantic -pipe -+OPTIMISE= $(CFLAGS) -fomit-frame-pointer -fno-exceptions -Wall -W -pedantic -pipe - - #OPTIMISE=-g -fno-exceptions - #-DMITSHM -@@ -119,6 +113,7 @@ - -DDEBUGGER \ - -DCPU_SHUTDOWN \ - -DSPC700_SHUTDOWN \ -+-DSOUND \ - $(LINUXDEFINES) \ - $(FXDEFINES) \ - $(C4DEFINES) \ -@@ -131,6 +126,11 @@ - $(KREEDDEFINES) - #-DNO_INLINE_SET_GET - -+ifdef USB_JOYSTICK_SUPPORT -+CCFLAGS += -DJOYSTICK_SUPPORT -+EXTRALIBS += -lusbhid -+endif -+ - #-DSOUND - #-DDEBUGGER - #-DNO_INLINE_SET_GET -@@ -138,12 +138,10 @@ - #-DCPU_SHUTDOWN - #-DSPC700_SHUTDOWN - --CFLAGS=$(CCFLAGS) -- - .SUFFIXES: .o .cpp .c .cc .h .m .i .S .asm .obj --LDLIBS = -L/usr/X11R6/lib frame.o -+LDLIBS = -L$(X11BASE)/lib - --all: offsets snes9x ssnes9x -+all: offsets snes9x - - #ggisnes9x - #xf86snes9x -@@ -165,7 +163,7 @@ - ./offsets >i386/offsets.h - - snes9x: $(OBJECTS) unix/x11.o $(GLIDEOBJS) $(GUIOBJS) -- $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(GUILIBS) -lXxf86dga -lXxf86vm -lXext -lX11 $(EXTRALIBS) -lz -lm -+ $(CCC) $(INCLUDES) $(OPTIMISE) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(GUILIBS) -lXxf86dga -lXxf86vm -lXext -lX11 $(EXTRALIBS) -lz -lm - - ssnes9x: $(OBJECTS) unix/svga.o $(GLIDEOBJS) - $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/svga.o $(LDLIBS) $(GLIDELIBS) -lvga -lvgagl -lz $(EXTRALIBS) -lm diff -urN /usr/ports/emulators/snes9x/files/patch-ad emulators/snes9x/files/patch-ad --- /usr/ports/emulators/snes9x/files/patch-ad Wed Dec 29 16:12:57 1999 +++ emulators/snes9x/files/patch-ad Sat Aug 9 01:09:05 2003 @@ -1,8 +1,7 @@ -diff -ru ../../work/release/memmap.cpp ./memmap.cpp ---- ../../work/release/memmap.cpp Thu Sep 23 19:56:48 1999 -+++ ./memmap.cpp Wed Dec 29 01:54:04 1999 -@@ -39,7 +39,7 @@ - #include +--- MEMMAP.CPP.orig Fri Jul 25 23:20:19 2003 ++++ MEMMAP.CPP Sat Aug 9 01:08:05 2003 +@@ -79,7 +79,7 @@ + #endif #include -#ifdef __linux @@ -10,12 +9,12 @@ #include #endif -@@ -737,7 +737,7 @@ - { - fwrite ((char *) ::SRAM, size, 1, file); - fclose (file); +@@ -1443,7 +1443,7 @@ + { + fwrite ((char *) ::SRAM, size, 1, file); + fclose (file); -#if defined(__linux) +#if defined(__linux) || defined(__FreeBSD__) - chown (filename, getuid (), getgid ()); + chown (filename, getuid (), getgid ()); #endif - return (TRUE); + if(Settings.SPC7110RTC) diff -urN /usr/ports/emulators/snes9x/files/patch-ae emulators/snes9x/files/patch-ae --- /usr/ports/emulators/snes9x/files/patch-ae Sat Oct 14 10:03:29 2000 +++ emulators/snes9x/files/patch-ae Sat Aug 9 01:14:10 2003 @@ -1,30 +1,31 @@ ---- port.h.orig Fri Oct 6 17:02:39 2000 -+++ port.h Fri Oct 13 18:37:38 2000 -@@ -56,15 +56,15 @@ - +--- port.h.orig Fri Jul 25 23:20:20 2003 ++++ port.h Sat Aug 9 01:14:02 2003 +@@ -124,16 +124,16 @@ #ifndef snes9x_types_defined #define snes9x_types_defined + +-typedef unsigned char bool8; ++typedef u_int8_t bool8; + + #ifndef __WIN32__ -typedef unsigned char uint8; -typedef unsigned short uint16; --typedef unsigned int uint32; --typedef unsigned char bool8; -typedef signed char int8; -typedef short int16; +-typedef int int32; +-typedef unsigned int uint32; +-typedef long long int64; +typedef u_int8_t uint8; +typedef u_int16_t uint16; -+typedef u_int32_t uint32; -+typedef u_int8_t bool8; +typedef int8_t int8; +typedef int16_t int16; - #ifndef __WIN32__ --typedef int int32; --typedef long long int64; +typedef int32_t int32; ++typedef u_int32_t uint32; +typedef int64_t int64; - #else - #ifndef WSAAPI - // winsock2.h typedefs int32 as well. -@@ -162,6 +162,10 @@ + #else /* __WIN32__ */ + + #ifdef __BORLANDC__ +@@ -255,6 +255,10 @@ #ifdef __linux #define TITLE "Snes9X: Linux" diff -urN /usr/ports/emulators/snes9x/files/patch-af emulators/snes9x/files/patch-af --- /usr/ports/emulators/snes9x/files/patch-af Wed May 14 05:07:19 2003 +++ emulators/snes9x/files/patch-af Sat Aug 9 00:58:39 2003 @@ -1,8 +1,8 @@ ---- unix/unix.cpp.orig Wed Feb 28 16:12:23 2001 -+++ unix/unix.cpp Tue May 13 13:07:48 2003 -@@ -51,9 +51,11 @@ +--- unix/unix.cpp.orig Fri Jul 25 23:20:19 2003 ++++ unix/unix.cpp Sat Aug 9 00:58:34 2003 +@@ -97,9 +97,11 @@ #include - + #include -#if defined(__linux) || defined(__sun) +#if defined(__linux) || defined(__sun) || defined(__FreeBSD__) @@ -13,7 +13,7 @@ #include #include #include -@@ -68,8 +70,12 @@ +@@ -114,8 +116,12 @@ pthread_mutex_t mutex; #endif @@ -27,9 +27,9 @@ #include #endif -@@ -85,6 +91,11 @@ - typedef void (*SIG_PF)(); - #endif +@@ -132,6 +138,11 @@ + //typedef void (*SIG_PF)(); + //#endif +#if defined(__FreeBSD__) +typedef sig_t SIG_PF; @@ -37,9 +37,9 @@ +#endif + #include "snes9x.h" - #include "memmap.h" + #include "MEMMAP.H" #include "debug.h" -@@ -111,7 +122,10 @@ +@@ -158,7 +169,10 @@ int NumControllers = 5; #ifdef JOYSTICK_SUPPORT @@ -50,7 +50,7 @@ #include int js_fd [4] = {-1, -1, -1, -1}; int js_map_button [4][16] = { -@@ -158,6 +172,68 @@ +@@ -205,6 +219,68 @@ char *js_device [4] = {"/dev/js0", "/dev/js1", "/dev/js2", "/dev/js3"}; #endif @@ -119,7 +119,7 @@ void InitJoysticks (); void ReadJoysticks (); #endif -@@ -168,7 +244,7 @@ +@@ -215,7 +291,7 @@ char *rom_filename = NULL; char *snapshot_filename = NULL; @@ -128,7 +128,7 @@ static void sigbrkhandler(int) { #ifdef DEBUGGER -@@ -195,91 +271,43 @@ +@@ -242,91 +318,43 @@ if (strcmp (argv [i], "-j") == 0 || strcasecmp (argv [i], "-nojoy") == 0) Settings.JoystickEnabled = FALSE; @@ -255,7 +255,7 @@ } else #endif -@@ -418,7 +446,7 @@ +@@ -469,7 +497,7 @@ #if !defined(__MSDOS) && defined(DEBUGGER) #if defined(__unix) && !defined(__NeXT__) struct sigaction sa; @@ -264,7 +264,7 @@ sa.sa_handler = sigbrkhandler; #else sa.sa_handler = (SIG_PF) sigbrkhandler; -@@ -610,6 +638,7 @@ +@@ -661,6 +689,7 @@ } #ifdef JOYSTICK_SUPPORT @@ -272,7 +272,7 @@ void InitJoysticks () { #ifdef JSIOCGVERSION -@@ -730,6 +759,189 @@ +@@ -781,6 +810,189 @@ } #endif } @@ -462,7 +462,7 @@ #endif // defined (JOYSTICK_SUPPORT) const char *GetHomeDirectory () -@@ -1422,7 +1634,7 @@ +@@ -1568,7 +1780,7 @@ } #endif @@ -470,17 +470,26 @@ +#if defined(__linux) || defined(__FreeBSD__) static int Rates[8] = { - 0, 8192, 11025, 16500, 22050, 29300, 36600, 44000 -@@ -1541,7 +1753,7 @@ - } + 0, 8000, 11025, 16000, 22050, 32000, 44100, 48000 +@@ -1688,7 +1900,7 @@ #endif --#if defined (__linux) || defined (__sun) -+#if defined (__linux) || defined (__sun) || defined(__FreeBSD__) + +-#if defined (__linux) || defined (__sun) || defined(NOSOUND) ++#if defined(__linux) || defined(__sun) || defined(__FreeBSD__) || defined(NOSOUND) void S9xUnixProcessSound (void) { } -@@ -1640,7 +1852,7 @@ +@@ -1729,7 +1941,7 @@ + } + #endif + +-#if defined (__linux) || defined (__sun) ++#if defined(__linux) || defined(__sun) || defined(__FreeBSD__) + void S9xGenerateSound () + { + int bytes_so_far = so.sixteen_bit ? (so.samples_mixed_so_far << 1) : +@@ -1814,7 +2026,7 @@ void *S9xProcessSound (void *) { diff -urN /usr/ports/emulators/snes9x/files/patch-aj emulators/snes9x/files/patch-aj --- /usr/ports/emulators/snes9x/files/patch-aj Sat Oct 14 10:03:29 2000 +++ emulators/snes9x/files/patch-aj Sat Aug 9 01:17:03 2003 @@ -1,6 +1,6 @@ ---- netplay.cpp.orig Fri Oct 13 18:44:41 2000 -+++ netplay.cpp Fri Oct 13 18:56:53 2000 -@@ -682,22 +682,24 @@ +--- NETPLAY.CPP.orig Fri Jul 25 23:20:20 2003 ++++ NETPLAY.CPP Sat Aug 9 01:16:22 2003 +@@ -719,22 +719,24 @@ return; } char fname [L_tmpnam]; diff -urN /usr/ports/emulators/snes9x/files/patch-ak emulators/snes9x/files/patch-ak --- /usr/ports/emulators/snes9x/files/patch-ak Sat Oct 14 10:03:29 2000 +++ emulators/snes9x/files/patch-ak Sat Aug 9 01:18:06 2003 @@ -1,6 +1,6 @@ ---- server.cpp.orig Fri Oct 13 18:57:43 2000 -+++ server.cpp Fri Oct 13 19:02:56 2000 -@@ -940,11 +940,18 @@ +--- SERVER.CPP.orig Fri Jul 25 23:20:20 2003 ++++ SERVER.CPP Sat Aug 9 01:17:35 2003 +@@ -976,11 +976,18 @@ void S9xNPSyncClient (int client) { char fname [L_tmpnam]; >Release-Note: >Audit-Trail: >Unformatted: