diff --git a/emulators/zsnes/Makefile b/emulators/zsnes/Makefile index 61e862ea0d93..89753f540db5 100644 --- a/emulators/zsnes/Makefile +++ b/emulators/zsnes/Makefile @@ -6,12 +6,10 @@ # PORTNAME= zsnes -PORTVERSION= 1.42 -PORTREVISION= 4 +PORTVERSION= 1.50 PORTEPOCH= 1 CATEGORIES= emulators -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= SF DISTNAME= zsnes${PORTVERSION:S/.//}src MAINTAINER= freebsd-ports@stsp.in-berlin.de @@ -27,14 +25,17 @@ ONLY_FOR_ARCHS= i386 WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION:S/./_/}/src OPTIONS= X11 "Enable X11 video driver" on \ - OPENGL "Enable OpenGL video driver" off + OPENGL "Enable OpenGL video driver" off \ + DEBUGGER "Enable ZSNES debugger" off \ + JMA "Enable JMA support" on +USE_BZIP2= yes USE_SDL= sdl USE_GMAKE= yes GNU_CONFIGURE= yes -CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ARGS+= --disable-cpucheck CONFIGURE_ENV= CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" -ALL_TARGET= ALL +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} MAN1= zsnes.1 PLIST_FILES= bin/zsnes @@ -45,6 +46,22 @@ LDFLAGS+= -L${LOCALBASE}/lib .include +.if ${OSVERSION} < 602000 +IGNORE= needs zlib >= 1.2.3 ,it is available on FreeBSD >= 6.2 +.endif + +.if defined(WITH_DEBUGGER) +CONFIGURE_ARGS+=--enable-debugger +.else +CONFIGURE_ARGS+=--disable-debugger +.endif + +.if defined(WITH_JMA) +CONFIGURE_ARGS+=--enable-jma +.else +CONFIGURE_ARGS+=--disable-jma +.endif + .if defined(WITHOUT_X11) CONFIGURE_ARGS+=--without-x PKGNAMESUFFIX= -nox11 @@ -63,17 +80,12 @@ CONFIGURE_ARGS+=--disable-opengl .endif post-patch: - @${REINPLACE_CMD} -e \ - 's| -pipe||g ; \ - s| -I/usr/local/include||g ; \ - s|^VERSION=1.41|VERSION=${PORTVERSION}|; \ - s| -D__FreeBSD__||g; \ - s| -I/usr/include||g ; \ - s| -O3 .* -s||g' ${WRKSRC}/configure @${REINPLACE_CMD} -e \ 's|@CXX@ @CFLAGS@ -o|@CXX@ @CXXFLAGS@ @CPPFLAGS@ -o|g ; \ s|@CC@ @CFLAGS@ -o|@CC@ @CFLAGS@ @CPPFLAGS@ -o|g' \ ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -i "" -e \ + 's|-O3||g' ${WRKSRC}/${CONFIGURE_SCRIPT} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/zsnes ${PREFIX}/bin diff --git a/emulators/zsnes/distinfo b/emulators/zsnes/distinfo index 1c94566452f8..de41648eb23e 100644 --- a/emulators/zsnes/distinfo +++ b/emulators/zsnes/distinfo @@ -1,3 +1,3 @@ -MD5 (zsnes142src.tar.gz) = e3fcc13061e169194ec31c27ace1b6e7 -SHA256 (zsnes142src.tar.gz) = f06ef14db8d3fdae9d7c12442a52e535a5feee1cb18c78b51a74ed282ed874be -SIZE (zsnes142src.tar.gz) = 1102840 +MD5 (zsnes150src.tar.bz2) = f0612e27b1c3dd821044525be5cf4450 +SHA256 (zsnes150src.tar.bz2) = 2ddaaff892d511c717d3e270cc035b208ba2eca04cdf3e749c5739df78ba9aba +SIZE (zsnes150src.tar.bz2) = 1058671 diff --git a/emulators/zsnes/files/patch-configure b/emulators/zsnes/files/patch-configure new file mode 100644 index 000000000000..1da6da61b77b --- /dev/null +++ b/emulators/zsnes/files/patch-configure @@ -0,0 +1,41 @@ +--- configure.orig Tue Dec 26 18:52:47 2006 ++++ configure Tue Dec 26 18:53:22 2006 +@@ -5075,38 +5075,6 @@ + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- if test x$force_arch = x; then +- if test x$ARCH_INFO = x; then +- case x$target in +- i686-*-*) +- { echo "$as_me:$LINENO: result: guessing i686" >&5 +-echo "${ECHO_T}guessing i686" >&6; } +- CFLAGS="$CFLAGS -march=i686" +- ;; +- i586-*-*) +- { echo "$as_me:$LINENO: result: guessing i586" >&5 +-echo "${ECHO_T}guessing i586" >&6; } +- CFLAGS="$CFLAGS -march=i586" +- ;; +- i486-*-*) +- { echo "$as_me:$LINENO: result: guessing i486" >&5 +-echo "${ECHO_T}guessing i486" >&6; } +- CFLAGS="$CFLAGS -march=i486" +- ;; +- *) +- { echo "$as_me:$LINENO: result: guessing i386" >&5 +-echo "${ECHO_T}guessing i386" >&6; } +- CFLAGS="$CFLAGS -march=i386" +- { echo "$as_me:$LINENO: WARNING: This is not what you want, use --target or force-arch" >&5 +-echo "$as_me: WARNING: This is not what you want, use --target or force-arch" >&2;} +- ;; +- esac +- else +- { echo "$as_me:$LINENO: result: $ARCH_INFO" >&5 +-echo "${ECHO_T}$ARCH_INFO" >&6; } +- CFLAGS="$CFLAGS -march=$ARCH_INFO" +- fi +- fi + + # Check whether --enable-release was given. + if test "${enable_release+set}" = set; then diff --git a/emulators/zsnes/files/patch-linux-zfilew.c b/emulators/zsnes/files/patch-linux-zfilew.c deleted file mode 100644 index f4ad601d7248..000000000000 --- a/emulators/zsnes/files/patch-linux-zfilew.c +++ /dev/null @@ -1,21 +0,0 @@ -$FreeBSD$ - ---- linux/zfilew.c Fri Jan 14 06:11:19 2005 -+++ linux/zfilew.c.new Thu Jun 2 19:29:43 2005 -@@ -474,11 +474,12 @@ - - if ((homedir = (char *)getenv("HOME")) == 0) - { -- homedir = (char *)malloc(ZCFG_DIR_LEN); -- getcwd(homedir, ZCFG_DIR_LEN); -+ getcwd(zcfgdir, ZCFG_DIR_LEN); -+ } -+ else -+ { -+ strcpy(zcfgdir, homedir); - } -- strcpy(zcfgdir, homedir); -- free(homedir); - strcat(zcfgdir, ZCFG_DIR); - tmp = opendir(zcfgdir); - if (tmp == NULL)