diff --git a/emulators/zsnes/Makefile b/emulators/zsnes/Makefile index fcf091b9dc40..2ddf7b91cc57 100644 --- a/emulators/zsnes/Makefile +++ b/emulators/zsnes/Makefile @@ -1,62 +1,70 @@ PORTNAME= zsnes PORTVERSION= 1.51 PORTREVISION= 12 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/ZSNES%20v${PORTVERSION} DISTNAME= zsnes${PORTVERSION:S/.//}src MAINTAINER= cyberbotx@cyberbotx.com COMMENT= Intel x86 only Super Nintendo Entertainment System (SNES) Emulator WWW= https://www.zsnes.com/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/../docs/license.txt ONLY_FOR_ARCHS= i386 ONLY_FOR_ARCHS_REASON= non-portable, for a portable emulator see emulators/snes9x BUILD_DEPENDS= nasm:devel/nasm LIB_DEPENDS= libpng.so:graphics/png USES= gmake localbase sdl tar:bzip2 USE_SDL= sdl GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-cpucheck +CONFIGURE_ENV= CXXFLAGS="${CXXFLAGS} -std=gnu++03" WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION:S/./_/}/src -PLIST_FILES= bin/zsnes share/man/man1/zsnes.1.gz +PLIST_FILES= bin/zsnes \ + share/man/man1/zsnes.1.gz -NO_OPTIONS_SORT=yes -OPTIONS_DEFINE= X11 OPENGL DEBUGGER JMA AO -OPTIONS_DEFAULT=X11 JMA -DEBUGGER_DESC= ZSNES Debugger -JMA_DESC= JMA support +OPTIONS_DEFINE= AO DEBUGGER JMA OPENGL X11 +OPTIONS_DEFAULT= JMA X11 +DEBUGGER_DESC= ZSNES Debugger +JMA_DESC= JMA support +AO_LIB_DEPENDS= libao.so:audio/libao +AO_CONFIGURE_ENABLE= libao DEBUGGER_CONFIGURE_ENABLE= debugger -JMA_CONFIGURE_ENABLE= jma -X11_CONFIGURE_WITH= x +JMA_CONFIGURE_ENABLE= jma OPENGL_CONFIGURE_ENABLE= opengl +X11_CONFIGURE_WITH= x -AO_LIB_DEPENDS= libao.so:audio/libao -AO_CONFIGURE_ENABLE= libao +.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400000 && ${OSVERSION} < 1401000 ) +IGNORE= Does not build on FreeBSD 14.0 - zlib is too old +.endif post-patch: - @${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} + @${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} @${REINPLACE_CMD} -e 's|size_t argc|int argc|g' \ - ${WRKSRC}/parsegen.cpp ${WRKSRC}/tools/depbuild.cpp \ - ${WRKSRC}/tools/extraext.cpp ${WRKSRC}/tools/macroll.cpp \ - ${WRKSRC}/tools/minwhite.cpp ${WRKSRC}/tools/nreplace.cpp \ + ${WRKSRC}/parsegen.cpp \ + ${WRKSRC}/tools/depbuild.cpp \ + ${WRKSRC}/tools/extraext.cpp \ + ${WRKSRC}/tools/macroll.cpp \ + ${WRKSRC}/tools/minwhite.cpp \ + ${WRKSRC}/tools/nreplace.cpp \ ${WRKSRC}/tools/varrep.cpp do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/zsnes ${STAGEDIR}${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/linux/zsnes.1 ${STAGEDIR}${PREFIX}/share/man/man1 + ${INSTALL_PROGRAM} ${WRKSRC}/zsnes \ + ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/linux/zsnes.1 \ + ${STAGEDIR}${PREFIX}/share/man/man1 .include diff --git a/emulators/zsnes/files/patch-configure b/emulators/zsnes/files/patch-configure index bfb9a54abebd..e0d94f34a551 100644 --- a/emulators/zsnes/files/patch-configure +++ b/emulators/zsnes/files/patch-configure @@ -1,92 +1,104 @@ ---- configure.orig Thu Jan 25 23:44:43 2007 -+++ configure Thu Jan 25 23:48:32 2007 -@@ -5130,89 +5130,6 @@ +--- configure.orig 2007-01-25 00:51:21 UTC ++++ configure +@@ -5128,92 +5128,6 @@ else - { echo "$as_me:$LINENO: checking which cpu architecture to optimize for" >&5 - echo $ECHO_N "checking which cpu architecture to optimize for... $ECHO_C" >&6; } + CFLAGSBAK="$CFLAGS" + +- { echo "$as_me:$LINENO: checking which cpu architecture to optimize for" >&5 +-echo $ECHO_N "checking which cpu architecture to optimize for... $ECHO_C" >&6; } - if test x$force_arch != x; then - CFLAGS="$CFLAGS -march=$force_arch" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: forcing $force_arch" >&5 -echo "${ECHO_T}forcing $force_arch" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: $force_arch ??" >&5 -echo "${ECHO_T}$force_arch ??" >&6; } - { echo "$as_me:$LINENO: WARNING: incorrect force_arch parameter" >&5 -echo "$as_me: WARNING: incorrect force_arch parameter" >&2;} - force_arch="" - CFLAGS="$CFLAGSBAK" - { echo "$as_me:$LINENO: checking for autodetected architecture" >&5 -echo $ECHO_N "checking for autodetected architecture... $ECHO_C" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - 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 + enableval=$enable_release; release=$enableval +@@ -5237,7 +5151,7 @@ fi + NFLAGS="$NFLAGS -O1" + fi + fi +-CXXFLAGS="$CFLAGS -fno-rtti" ++CXXFLAGS="$CXXFLAGS -fno-rtti" + + if test x$enable_jma != xno; then + JMA_FILES="\$(JMA_D)/7zlzma.o \$(JMA_D)/crc32.o \$(JMA_D)/iiostrm.o\