update to 1.42 by new maintainer Jonathan Schleifer <js@h3c.de>

This commit is contained in:
naddy 2005-10-21 18:07:10 +00:00
parent cca8ef1591
commit cd0e277061
12 changed files with 179 additions and 191 deletions

View File

@ -1,15 +1,15 @@
# $OpenBSD: Makefile,v 1.10 2005/02/13 10:56:23 sturm Exp $
# $OpenBSD: Makefile,v 1.11 2005/10/21 18:07:10 naddy Exp $
ONLY_FOR_ARCHS= i386
COMMENT= "Super Nintendo emulator for x86"
VERSION= 1.36
DISTNAME= zsnes-${VERSION}
PKGNAME= ${DISTNAME}p0
VERSION= 1.42
DISTNAME= zsnes_${VERSION:S/./_/}
PKGNAME= zsnes-${VERSION}
CATEGORIES= emulators games
HOMEPAGE= http://www.zsnes.com/
MAINTAINER= Wilbern Cobb <wcobb@openbsd.org>
MAINTAINER= Jonathan Schleifer <js@h3c.de>
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=zsnes/}
DISTFILES= zsnes${VERSION:S/.//}src${EXTRACT_SUFX}
@ -19,9 +19,11 @@ PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= GL X11 Xext c m pthread usbhid z
BUILD_DEPENDS= nasm::devel/nasm
WANTLIB= GL X11 Xext c m pthread stdc++ usbhid z
BUILD_DEPENDS= nasm::devel/nasm \
automake-1.4::devel/automake/1.4
LIB_DEPENDS= SDL.:sdl-*-!no_x11:devel/sdl \
png.2::graphics/png
@ -32,11 +34,10 @@ CONFIGURE_ARGS= --with-sdl-prefix=${LOCALBASE} \
--with-png \
--with-opengl \
--target=${MACHINE}-unknown-openbsd${OPSYS_VER}
CONFIGURE_ENV+= LDFLAGS="-lm" CFLAGS="${CFLAGS:N-O*}"
CONFIGURE_ENV+= LDFLAGS="-lm" \
CFLAGS="${CFLAGS:N-O*} -I${X11BASE}/include -I${LOCALBASE}/include/libpng"
ALL_TARGET=
DOCS= opengl.txt whatsnew.txt
WRKSRC= ${WRKDIST}/src
NO_REGRESS= Yes
@ -44,13 +45,15 @@ NO_REGRESS= Yes
post-extract:
rm -fr ${WRKSRC}/obj
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/zsnes
cd ${WRKBUILD} && \
${INSTALL_PROGRAM} zsnes ${PREFIX}/bin
cd ${WRKSRC} && \
${INSTALL_MAN} linux/zsnes.1 ${PREFIX}/man/man1/zsnes.1
cd ${WRKDIST} && \
${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/zsnes
post-patch:
cd ${WRKSRC} && AUTOMAKE_VERSION=1.4 ${LOCALBASE}/bin/aclocal
DOCSDIR= ${PREFIX}/share/doc/zsnes
post-install:
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIST}/docs/Linux/*.* ${DOCSDIR}
${INSTALL_DATA_DIR} ${DOCSDIR}/images
${INSTALL_DATA} ${WRKDIST}/docs/Linux/images/* ${DOCSDIR}/images
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
MD5 (zsnes136src.tar.gz) = 576f6f5cc50c7c6f7877aca220ee99b3
RMD160 (zsnes136src.tar.gz) = 8c5bd9a2f0ad4d2dae89cca4d34d76ff029394a4
SHA1 (zsnes136src.tar.gz) = 40c053ac022c098bac5f7acc8413a464a1c7690d
SIZE (zsnes136src.tar.gz) = 901081
MD5 (zsnes142src.tar.gz) = e3fcc13061e169194ec31c27ace1b6e7
RMD160 (zsnes142src.tar.gz) = d794c69e876265715e141c26ecb6ed1802ffc27d
SHA1 (zsnes142src.tar.gz) = d38ca8c1b4168edc5bb5815f504b52654100bc4b
SIZE (zsnes142src.tar.gz) = 1102840

View File

@ -1,9 +1,13 @@
$OpenBSD: patch-src_Makefile_in,v 1.3 2002/08/31 03:54:58 wcobb Exp $
--- src/Makefile.in.orig Sat Aug 31 00:37:51 2002
+++ src/Makefile.in Sat Aug 31 00:37:59 2002
@@ -61,10 +61,10 @@ OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${W
$OpenBSD: patch-src_Makefile_in,v 1.4 2005/10/21 18:07:10 naddy Exp $
--- src/Makefile.in.orig Mon Oct 3 23:10:46 2005
+++ src/Makefile.in Mon Oct 3 23:10:51 2005
@@ -76,13 +76,13 @@ OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${W
.SUFFIXES: .c .asm
.SUFFIXES: .cpp .c .asm
-%.o: %.cpp
+.cpp.o:
@CXX@ @CFLAGS@ -o $@ -c $<
-%.o: %.c
+.c.o:

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_cfgload_c,v 1.1 2005/10/21 18:07:10 naddy Exp $
--- src/cfgload.c.orig Tue Oct 4 00:12:19 2005
+++ src/cfgload.c Tue Oct 4 00:13:22 2005
@@ -68,7 +68,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg
#define ASCIIChar2Bool(x) (((x)-'0') ? 1 : 0)
extern char CMDLineStr[256];
-extern char LoadDir[128];
+extern char LoadDir[1024];
extern char LoadDrive[2];
extern unsigned int pl2selk;
@@ -146,7 +146,7 @@ extern char zcfgdir[1024];
char SRAMDir[1024];
char LoadDriveB[2];
-char LoadDirB[128];
+char LoadDirB[1024];
//extern "C"{
unsigned char cfgsoundon = 0;

View File

@ -1,15 +1,7 @@
--- src/configure.in.orig Thu May 23 10:11:18 2002
+++ src/configure.in Fri Apr 25 22:46:33 2003
@@ -16,7 +16,7 @@ dnl See also: remarks supplied in the de
AC_INIT(init.asm)
AC_CONFIG_HEADER(config.h)
dnl -- Where is our compiler, and who are we compiling for?
-CFLAGS="-pipe -I. -Wall"
+CFLAGS="$CFLAGS -I. -Wall"
AC_PROG_CC
AC_PATH_PROG(NASMPATH,nasm,[AC_MSG_ERROR(nasm 0.98 is required)])
NFLAGS="$NFLAGS -w-orphan-labels"
@@ -29,7 +29,7 @@ case "$target" in
$OpenBSD: patch-src_configure_in,v 1.7 2005/10/21 18:07:10 naddy Exp $
--- src/configure.in.orig Mon Oct 3 23:11:56 2005
+++ src/configure.in Mon Oct 3 23:14:21 2005
@@ -39,7 +39,7 @@ case "$target" in
;;
*-*-*openbsd*)
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
@ -18,36 +10,37 @@
;;
*-*-*bsd*)
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
@@ -143,33 +143,8 @@ else
dnl zsnes more easily deal with small instruction caches, and more
dnl effectivly use branch prediction.
@@ -118,34 +118,9 @@ if test x$debug = xyes; then
else
AC_MSG_RESULT(no)
- CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s"
+ CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2"
- CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations -s"
+ CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations"
NFLAGS="$NFLAGS -O1"
ZSNESEXE="zsnes"
-fi
-
-AC_MSG_CHECKING(which processor class to optimize for)
-if test x$debug != xyes; then
- case "$target" in
- i486-*-*)
- CFLAGS="$CFLAGS -march=i486"
- AC_MSG_RESULT(486)
- ;;
- i586-*-*)
- CFLAGS="$CFLAGS -march=pentium"
- AC_MSG_RESULT(Pentium)
- ;;
- i686-*-*)
- CFLAGS="$CFLAGS -march=pentiumpro"
- AC_MSG_RESULT(PPro/P2)
- ;;
- *)
- AC_MSG_RESULT(386)
- AC_MSG_WARN(*** This is probably not what you want use --target)
- ;;
- esac
-
- case "$target" in
- i486-*-*)
- CFLAGS="$CFLAGS -march=i486"
- AC_MSG_RESULT(486)
- ;;
- i586-*-*)
- CFLAGS="$CFLAGS -march=pentium"
- AC_MSG_RESULT(586)
- ;;
- i686-*-*)
- CFLAGS="$CFLAGS -march=pentiumpro"
- dnl CFLAGS="$CFLAGS -march=pentium3 -mmmx -msse -mfpmath=sse,387"
- AC_MSG_RESULT(686)
- ;;
- *)
- AC_MSG_RESULT(386)
- AC_MSG_WARN(*** This is probably not what you want use --target)
- ;;
- esac
-else
- AC_MSG_RESULT(no optimization because debug enabled)
fi

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_effects_smoke_c,v 1.1 2005/10/21 18:07:10 naddy Exp $
--- src/effects/smoke.c.orig Mon Oct 3 23:21:02 2005
+++ src/effects/smoke.c Mon Oct 3 23:21:35 2005
@@ -13,9 +13,10 @@ Should be fire, but looks more like smok
*/
-
+#ifndef MIN
#define MIN(x, y) \
(((x) < (y)) ? (x) : (y))
+#endif
#define ABS(x) \
(((x) >= 0) ? (x) : ( - (x)))

View File

@ -1,6 +1,7 @@
--- src/gblhdr.h.orig Tue Jun 25 05:25:37 2002
+++ src/gblhdr.h Tue Jun 25 05:25:43 2002
@@ -70,9 +70,7 @@
$OpenBSD: patch-src_gblhdr_h,v 1.3 2005/10/21 18:07:10 naddy Exp $
--- src/gblhdr.h.orig Mon Oct 3 23:14:52 2005
+++ src/gblhdr.h Mon Oct 3 23:15:10 2005
@@ -72,9 +72,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg
// unistd.h stuff

View File

@ -1,105 +0,0 @@
$OpenBSD: patch-src_linux_sdllink_c,v 1.1 2002/08/31 04:19:14 wcobb Exp $
--- src/linux/sdllink.c.orig Sat Aug 31 01:01:05 2002
+++ src/linux/sdllink.c Sat Aug 31 01:11:38 2002
@@ -350,14 +350,24 @@ int Main_Proc(void)
if(cvidmode != 16) {
surface = SDL_SetVideoMode(WindowWidth, WindowHeight,
BitDepth, surface->flags & ~SDL_RESIZABLE);
- adjustMouseXScale();
- adjustMouseYScale();
+ if (surface == NULL) {
+ printf("SDL_SetVideoMode: %s\n",
+ SDL_GetError());
+ break;
+ }
+ adjustMouseXScale();
+ adjustMouseYScale();
break;
}
WindowWidth = SurfaceX = event.resize.w;
WindowHeight = SurfaceY = event.resize.h;
surface = SDL_SetVideoMode(WindowWidth,
WindowHeight, BitDepth, surface->flags);
+ if (surface == NULL) {
+ printf("SDL_SetVideoMode: %s\n",
+ SDL_GetError());
+ break;
+ }
adjustMouseXScale();
adjustMouseYScale();
glViewport(0,0, WindowWidth, WindowHeight);
@@ -526,7 +536,7 @@ int InitSound(void)
if (SDL_OpenAudio(&wanted, NULL) < 0)
{
- fprintf(stderr, "Sound init failed!\n");
+ fprintf(stderr, "SDL_OpenAudio: %s\n", SDL_GetError());
fprintf(stderr, "freq: %d, channels: %d, samples: %d\n",
wanted.freq, wanted.channels, wanted.samples);
SoundEnabled = 0;
@@ -552,7 +562,10 @@ BOOL InitJoystickInput(void)
// If it is possible to use SDL_NumJoysticks
// before initialising SDL_INIT_JOYSTICK then
// this call can be replaced with SDL_InitSubSystem
- SDL_InitSubSystem (SDL_INIT_JOYSTICK);
+ if (SDL_InitSubSystem (SDL_INIT_JOYSTICK) != 0) {
+ printf("SDL_InitSubSystem: %s\n", SDL_GetError());
+ return FALSE;
+ }
max_num_joysticks = SDL_NumJoysticks();
if (!max_num_joysticks)
{
@@ -566,6 +579,10 @@ BOOL InitJoystickInput(void)
for (i = 0; i < max_num_joysticks; i++)
{
JoystickInput[i] = SDL_JoystickOpen(i);
+ if (JoystickInput[i] == NULL) {
+ printf("SDL_JoystickOpen[%d]: %s\n", i, SDL_GetError());
+ return FALSE;
+ }
printf("Joystick %i (%i Buttons): %s\n", i,
SDL_JoystickNumButtons(JoystickInput[i]),
SDL_JoystickName(i));
@@ -584,7 +601,11 @@ int saybitdepth()
{
int MyBitsPerPixel;
const SDL_VideoInfo *info;
- SDL_Init(SDL_INIT_VIDEO);
+
+ if (SDL_Init(SDL_INIT_VIDEO) != 0) {
+ printf("SDL_INIT_VIDEO: %s\n", SDL_GetError());
+ return FALSE;
+ }
info = SDL_GetVideoInfo();
MyBitsPerPixel = info->vfmt->BitsPerPixel;
switch (MyBitsPerPixel)
@@ -593,7 +614,7 @@ int saybitdepth()
case 16: break;
default: printf("You are running in %d bpp, but ZSNES is forcing 16 bpp.\nYou may experience poor performance and/or crashing.\n\n", MyBitsPerPixel); break;
}
- return 0;
+ return TRUE;
}
int startgame(void)
@@ -605,7 +626,8 @@ int startgame(void)
if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_TIMER |
SDL_INIT_VIDEO) < 0)
{
- fprintf(stderr, "Could not initialize SDL: %s", SDL_GetError());
+ fprintf(stderr, "Could not initialize SDL: %s\n",
+ SDL_GetError());
return FALSE;
}
sdl_state = vid_none;
@@ -614,7 +636,9 @@ int startgame(void)
if (sdl_state == vid_soft) sw_end();
#ifdef __OPENGL__
else if (sdl_state == vid_gl) gl_end();
- saybitdepth();
+ if (saybitdepth() == FALSE) {
+ return FALSE;
+ }
if (UseOpenGL)
{
status = gl_start(WindowWidth, WindowHeight, BitDepth, FullScreen);

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-src_linux_zfilew_c,v 1.1 2005/10/21 18:07:10 naddy Exp $
--- src/linux/zfilew.c.orig Fri Jan 14 14:11:19 2005
+++ src/linux/zfilew.c Tue Oct 4 00:42:40 2005
@@ -459,7 +459,7 @@ DWORD GetDate()
}
extern char SRAMDir[1024];
-extern char LoadDir[512];
+extern char LoadDir[1024];
#ifdef __LINUX__
@@ -474,11 +474,12 @@ void obtaindir()
if ((homedir = (char *)getenv("HOME")) == 0)
{
- homedir = (char *)malloc(ZCFG_DIR_LEN);
- getcwd(homedir, ZCFG_DIR_LEN);
+ getcwd(zcfgdir, ZCFG_DIR_LEN);
}
- strcpy(zcfgdir, homedir);
- free(homedir);
+ else
+ {
+ strcpy(zcfgdir, homedir);
+ }
strcat(zcfgdir, ZCFG_DIR);
tmp = opendir(zcfgdir);
if (tmp == NULL)
@@ -496,7 +497,7 @@ void obtaindir()
}
if (*LoadDir == 0)
{
- getcwd(LoadDir, 512);
+ getcwd(LoadDir, 1024);
}
}

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-src_smoke_c,v 1.1 2002/07/17 21:29:06 wcobb Exp $
--- src/smoke.c.orig Wed Jul 17 05:20:37 2002
+++ src/smoke.c Wed Jul 17 05:21:41 2002
@@ -17,9 +17,10 @@ Should be fire, but looks more like smok
*/
-
-#define MIN(x, y) \
- (((x) < (y)) ? (x) : (y))
+#ifndef MIN
+# define MIN(x, y) \
+ (((x) < (y)) ? (x) : (y))
+#endif
#define ABS(x) \
(((x) >= 0) ? (x) : ( - (x)))

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_ui_asm,v 1.1 2005/10/21 18:07:11 naddy Exp $
--- src/ui.asm.orig Tue Oct 4 00:11:28 2005
+++ src/ui.asm Tue Oct 4 00:11:51 2005
@@ -1237,7 +1237,7 @@ NEWSYM gotoroot, db '\',0
SECTION .bss
NEWSYM InitDir, resb 512
-NEWSYM LoadDir, resb 512
+NEWSYM LoadDir, resb 1024
SECTION .text

View File

@ -1,6 +1,29 @@
@comment $OpenBSD: PLIST,v 1.3 2005/02/13 10:56:23 sturm Exp $
@comment $OpenBSD: PLIST,v 1.4 2005/10/21 18:07:11 naddy Exp $
bin/zsnes
@man man/man1/zsnes.1
share/doc/zsnes/
share/doc/zsnes/opengl.txt
share/doc/zsnes/whatsnew.txt
share/doc/zsnes/about.htm
share/doc/zsnes/bugs.htm
share/doc/zsnes/credits.htm
share/doc/zsnes/faq.htm
share/doc/zsnes/gui.htm
share/doc/zsnes/images/
share/doc/zsnes/images/cheat.png
share/doc/zsnes/images/config.png
share/doc/zsnes/images/corner.png
share/doc/zsnes/images/f1_menu.png
share/doc/zsnes/images/game.png
share/doc/zsnes/images/get.png
share/doc/zsnes/images/gui.png
share/doc/zsnes/images/linuxlogo.png
share/doc/zsnes/images/misc.png
share/doc/zsnes/images/netplay.png
share/doc/zsnes/images/quick.png
share/doc/zsnes/images/safer.png
share/doc/zsnes/images/valid-xhtml11.png
share/doc/zsnes/images/vcss.png
share/doc/zsnes/images/zsneslogo.png
share/doc/zsnes/license.txt
share/doc/zsnes/netplay.htm
share/doc/zsnes/readme.htm
share/doc/zsnes/style.css