On Wed, 21 Apr 2010, Federico G. Schwindt wrote:

> On Mon, Apr 19, 2010 at 06:31:26PM +0100, Federico G. Schwindt wrote:
> > On Mon, Apr 19, 2010 at 06:36:45AM +0000, Jacob Meuser wrote:
> > > I enabled using a separate thread for sounds by default.  it's
> > > possible that the audio block size would be large enough that X
> > > events would be blocked for too long and timeout, returning an
> > > error.  but having the sound handled in a different thread this
> > > does not happen.
> > > 
> > > imo, seems to overall work better than when it was using audio(4).
> > > 
> > > please test.
> > 
> >   Instead of this, please try the update to 1.52 below that includes SDL
> > for audio.  Slightly tested with a Super Turrican, Aero Fighters and
> > Addams Family values.
> 
>   Unless I heard any objections I will commit this on Saturday, so if you
> care please test now.

Can you please regen PLIST and add the gtk-update-icon-cache goo.
Thank you.


> 
>   f.-
>   
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/emulators/snes9x/Makefile,v
> > retrieving revision 1.10
> > diff -N -u -p Makefile
> > --- Makefile        10 Aug 2009 06:31:09 -0000      1.10
> > +++ Makefile        19 Apr 2010 17:15:48 -0000
> > @@ -1,48 +1,67 @@
> >  # $OpenBSD: Makefile,v 1.10 2009/08/10 06:31:09 kili Exp $
> >  
> > -COMMENT=   emulates the Super Nintendo Entertainment System
> > +COMMENT =  emulates the Super Nintendo Entertainment System
> >  
> > -DISTNAME=  snes9x-1.51-src
> > -PKGNAME=   ${DISTNAME:S/-src//}p0
> > -CATEGORIES=        emulators games
> > +DISTNAME = snes9x-1.52-src
> > +PKGNAME =  ${DISTNAME:S/-src//}
> > +CATEGORIES =       emulators games
> >  
> > -HOMEPAGE=  http://www.snes9x.com/
> > +HOMEPAGE = http://www.snes9x.com/
> >  
> >  # non-commercial
> > -PERMIT_PACKAGE_CDROM=      No
> > -PERMIT_PACKAGE_FTP=        Yes
> > -PERMIT_DISTFILES_CDROM=    No
> > -PERMIT_DISTFILES_FTP=      Yes
> > +PERMIT_PACKAGE_CDROM =     No
> > +PERMIT_PACKAGE_FTP =       Yes
> > +PERMIT_DISTFILES_CDROM = No
> > +PERMIT_DISTFILES_FTP =     Yes
> >  
> > -WANTLIB+=  X11 Xext Xxf86dga Xxf86vm c m pthread pthread-stubs stdc++ xcb z
> > +WANTLIB =  X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes \
> > +           Xi Xinerama Xrandr Xrender Xv atk-1.0 c cairo expat \
> > +           fontconfig freetype gio-2.0 glib-2.0 glitz gmodule-2.0 \
> > +           gobject-2.0 gthread-2.0 m pango-1.0 pangocairo-1.0 \
> > +           pangoft2-1.0 pixman-1 pthread pthread-stubs stdc++ \
> > +           xcb xcb-render xcb-render-util z
> >  
> > -MASTER_SITES=      http://vincent.grigorieff.free.fr/snes9x/ \
> > -           http://files.ipherswipsite.com/snes9x/
> > -EXTRACT_SUFX=      .tar.bz2
> > +MASTER_SITES =     http://sites.google.com/site/bearoso/snes9x/
> > +EXTRACT_SUFX =     .tar.bz2
> >  
> > -LIB_DEPENDS=       png::graphics/png
> > +BUILD_DEPENDS =    ::textproc/intltool
> > +RUN_DEPENDS =      :desktop-file-utils-*:devel/desktop-file-utils
> > +LIB_DEPENDS =      glade-2.0::devel/libglade2 \
> > +           SDL::devel/sdl \
> > +           png::graphics/png \
> > +           xml2::textproc/libxml \
> > +           gtk-x11-2.0,gdk-x11-2.0,gdk_pixbuf-2.0::x11/gtk+2 
> >  
> >  .if ${MACHINE_ARCH} == "i386"
> > -BUILD_DEPENDS=  ::devel/nasm 
> > +BUILD_DEPENDS =  ::devel/nasm 
> >  .endif
> >  
> > -AUTOCONF_VERSION=  2.59
> > +MODULES =  devel/gettext
> >  
> > -USE_X11=   Yes
> > -USE_GMAKE= Yes
> > -CONFIGURE_STYLE=autoconf no-autoheader
> > -CONFIGURE_ENV=     OPTFLAGS="${CXXFLAGS} -I${LOCALBASE}/include/libpng" \
> > -           LIBS="-L${LOCALBASE}/lib"
> > +USE_X11 =  Yes
> > +USE_GMAKE =        Yes
> >  
> > -NO_REGRESS=        Yes
> > +CONFIGURE_STYLE = gnu
> > +CONFIGURE_ARGS = --disable-silent-rules \
> > +            --without-portaudio \
> > +            --without-oss \
> > +            --without-alsa \
> > +            --without-pulseaudio \
> > +            --without-opengl 
> > +CONFIGURE_ENV = CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
> > +           LIBS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
> >  
> > -post-configure:
> > -   @perl -pi -e 's|\b_C\b|__C|g' ${WRKSRC}/cheats.cpp
> > +NO_REGRESS =       Yes
> >  
> > -do-install:
> > +WRKSRC =   ${WRKDIST}/gtk
> > +
> > +post-install:
> >     ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/snes9x
> > -   ${INSTALL_PROGRAM} ${WRKSRC}/snes9x ${PREFIX}/bin
> > -   ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${WRKSRC}/unix/docs/*.txt \
> > -     ${PREFIX}/share/doc/snes9x
> > +   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/snes9x
> > +   cd ${WRKDIST}/docs && ${INSTALL_DATA} \
> > +       control-inputs.txt controls.txt snapshots.txt snes9x-license.txt \
> > +       ${PREFIX}/share/doc/snes9x
> > +   cd ${WRKDIST}/docs && ${INSTALL_DATA} snes9x.conf.default \
> > +       ${PREFIX}/share/examples/snes9x
> >  
> >  .include <bsd.port.mk>
> > Index: distinfo
> > ===================================================================
> > RCS file: /cvs/ports/emulators/snes9x/distinfo,v
> > retrieving revision 1.4
> > diff -N -u -p distinfo
> > --- distinfo        9 Sep 2007 15:17:06 -0000       1.4
> > +++ distinfo        19 Apr 2010 17:15:48 -0000
> > @@ -1,5 +1,5 @@
> > -MD5 (snes9x-1.51-src.tar.bz2) = oQOMx2H0ADGM3O2WCXL4pw==
> > -RMD160 (snes9x-1.51-src.tar.bz2) = WBNAWwXxgSJGFPlei6PDCfeeGzY=
> > -SHA1 (snes9x-1.51-src.tar.bz2) = oN4j+zdkY9J/To/H8RQkvTxZhYU=
> > -SHA256 (snes9x-1.51-src.tar.bz2) = 
> > cMj0H8fx4ABgUSfg9CYePrUscgGbPL+byAYbC4zN9oc=
> > -SIZE (snes9x-1.51-src.tar.bz2) = 1707256
> > +MD5 (snes9x-1.52-src.tar.bz2) = gTvToPmXMu4COKLIq0F3JQ==
> > +RMD160 (snes9x-1.52-src.tar.bz2) = 7H+FBY5FcdiaZaidPwni5A2wy8w=
> > +SHA1 (snes9x-1.52-src.tar.bz2) = +zlXto/O3oglGFFglKc+xbvtds8=
> > +SHA256 (snes9x-1.52-src.tar.bz2) = 
> > NuCbLaYrkhD+siTP0YMEehUaccHV5fknSdwovUt/8cs=
> > +SIZE (snes9x-1.52-src.tar.bz2) = 1720137
> > Index: patches/patch-configure_in
> > ===================================================================
> > RCS file: /cvs/ports/emulators/snes9x/patches/patch-configure_in,v
> > retrieving revision 1.1
> > diff -N -u -p patches/patch-configure_in
> > --- patches/patch-configure_in      9 Sep 2007 15:17:06 -0000       1.1
> > +++ /dev/null       28 Sep 2008 10:50:08 -0000
> > @@ -1,60 +0,0 @@
> > -$OpenBSD: patch-configure_in,v 1.1 2007/09/09 15:17:06 fgsch Exp $
> > ---- configure.in.orig      Wed Aug  2 16:04:02 2006
> > -+++ configure.in   Thu Sep  6 12:48:19 2007
> > -@@ -230,30 +230,30 @@ else
> > -   unset snes9x_cv_option_custom_march
> > - fi
> > - 
> > --if test no = "$with_march" ; then
> > --  AC_SYS_COMPILER_FLAG(-O2, o2, OPTIMIZE, [
> > --    AC_SYS_COMPILER_FLAG(-O1, o1, OPTIMIZE)
> > --  ])
> > --else
> > --  AC_SYS_COMPILER_FLAG(-O6, o6, OPTIMIZE, [
> > --    AC_SYS_COMPILER_FLAG(-O4, o4, OPTIMIZE, [
> > --    AC_SYS_COMPILER_FLAG(-O3, o3, OPTIMIZE, [
> > --        AC_SYS_COMPILER_FLAG(-O2, o2, OPTIMIZE, [
> > --          AC_SYS_COMPILER_FLAG(-O1, o1, OPTIMIZE)
> > --          ])
> > --      ])
> > --    ])
> > --  ])
> > --fi
> > -+dnl if test no = "$with_march" ; then
> > -+dnl   AC_SYS_COMPILER_FLAG(-O2, o2, OPTIMIZE, [
> > -+dnl     AC_SYS_COMPILER_FLAG(-O1, o1, OPTIMIZE)
> > -+dnl   ])
> > -+dnl else
> > -+dnl   AC_SYS_COMPILER_FLAG(-O6, o6, OPTIMIZE, [
> > -+dnl     AC_SYS_COMPILER_FLAG(-O4, o4, OPTIMIZE, [
> > -+dnl         AC_SYS_COMPILER_FLAG(-O3, o3, OPTIMIZE, [
> > -+dnl         AC_SYS_COMPILER_FLAG(-O2, o2, OPTIMIZE, [
> > -+dnl           AC_SYS_COMPILER_FLAG(-O1, o1, OPTIMIZE)
> > -+dnl               ])
> > -+dnl       ])
> > -+dnl     ])
> > -+dnl   ])
> > -+dnl fi
> > - 
> > - AC_SYS_COMPILER_FLAG(-fomit-frame-pointer, omit_frame_pointer, OPTIMIZE)
> > - AC_SYS_COMPILER_FLAG(-fno-exceptions, no_exceptions, OPTIMIZE)
> > - AC_SYS_COMPILER_FLAG(-Wall, Wall, OPTIMIZE)
> > - AC_SYS_COMPILER_FLAG(-W, W, OPTIMIZE)
> > --AC_SYS_COMPILER_FLAG(-pedantic, pedantic, OPTIMIZE)
> > -+dnl AC_SYS_COMPILER_FLAG(-pedantic, pedantic, OPTIMIZE)
> > - dnl FIXME: Most of these should be fixed, but several are part of the API.
> > - AC_SYS_COMPILER_FLAG(-Wno-unused-parameter, Wno_unused_parameter, 
> > OPTIMIZE)
> > --AC_SYS_COMPILER_FLAG(-pipe, pipe, OPTIMIZE)
> > -+dnl AC_SYS_COMPILER_FLAG(-pipe, pipe, OPTIMIZE)
> > - AC_SYS_COMPILER_FLAG(-fno-rtti, no_rtti, RTTIFLAG)
> > - 
> > - dnl AC_ARG_WITH(extra_opt,[  --with(out)-extra-opt     Use extra 
> > optimization flags (default: none)],[],[with_extra_opt=no])
> > -@@ -859,7 +859,7 @@ if test yes = "$with_sound" ; then
> > -   AC_MSG_CHECKING(if sound is supported on this platform)
> > -   AC_CACHE_VAL(snes9x_cv_sound, [
> > -   AC_TRY_COMPILE([
> > --#if defined(__linux) || defined(__sun) || defined(__sgi)
> > -+#if defined(__linux) || defined(__sun) || defined(__sgi) || 
> > defined(__OpenBSD__)
> > - /* */
> > - #else
> > - #error No sound for this platform
> > Index: patches/patch-gtk_configure
> > ===================================================================
> > RCS file: patches/patch-gtk_configure
> > diff -N -u -p patches/patch-gtk_configure
> > --- /dev/null       19 Apr 2010 17:15:48 -0000
> > +++ patches/patch-gtk_configure     19 Apr 2010 17:15:48 -0000
> > @@ -0,0 +1,12 @@
> > +$OpenBSD$
> > +--- gtk/configure.orig     Sun Jan 10 17:28:11 2010
> > ++++ gtk/configure  Mon Apr 19 16:59:27 2010
> > +@@ -2351,7 +2351,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS 
> > $
> > + ac_compiler_gnu=$ac_cv_c_compiler_gnu
> > + 
> > + 
> > +-CFLAGS="-O2 -Wall -W -pedantic -Wno-unused-parameter -pipe $CFLAGS"
> > ++CFLAGS="-Wall -W -pedantic -Wno-unused-parameter $CFLAGS"
> > + CXXFLAGS="$CFLAGS"
> > + 
> > + ac_ext=c
> > Index: patches/patch-soundux_h
> > ===================================================================
> > RCS file: /cvs/ports/emulators/snes9x/patches/patch-soundux_h,v
> > retrieving revision 1.1
> > diff -N -u -p patches/patch-soundux_h
> > --- patches/patch-soundux_h 9 Sep 2007 15:17:06 -0000       1.1
> > +++ /dev/null       28 Sep 2008 10:50:08 -0000
> > @@ -1,12 +0,0 @@
> > -$OpenBSD: patch-soundux_h,v 1.1 2007/09/09 15:17:06 fgsch Exp $
> > ---- soundux.h.orig Thu Sep  6 13:10:15 2007
> > -+++ soundux.h      Thu Sep  6 13:10:30 2007
> > -@@ -220,7 +220,7 @@ typedef struct {
> > -   int                             stereo;                                 
> > // stereo or mono
> > -   bool8                   sixteen_bit;                    // 16bit or 
> > 8bit sample
> > -   bool8                   encoded;                                // ** 
> > port specific
> > --#ifdef __sun
> > -+#if defined(__sun) || defined(__OpenBSD__)
> > -   int                             last_eof;                               
> > // ** port specific
> > - #endif
> > - #ifdef __sgi
> > Index: patches/patch-unix_configure
> > ===================================================================
> > RCS file: patches/patch-unix_configure
> > diff -N -u -p patches/patch-unix_configure
> > --- /dev/null       19 Apr 2010 17:15:48 -0000
> > +++ patches/patch-unix_configure    19 Apr 2010 17:15:48 -0000
> > @@ -0,0 +1,12 @@
> > +$OpenBSD$
> > +--- unix/configure.orig    Mon Apr 19 09:47:56 2010
> > ++++ unix/configure Mon Apr 19 09:48:12 2010
> > +@@ -8362,7 +8362,7 @@ fi
> > + if test $ac_cv_header_pthread_h = yes; then
> > + 
> > +           S9XDEFS="$S9XDEFS -DUSE_THREADS"
> > +-          S9XLIBS="$S9XLIBS -lpthread"
> > ++          S9XLIBS="$S9XLIBS -pthread"
> > + 
> > + fi
> > + 
> > Index: patches/patch-unix_unix_cpp
> > ===================================================================
> > RCS file: /cvs/ports/emulators/snes9x/patches/patch-unix_unix_cpp,v
> > retrieving revision 1.1
> > diff -N -u -p patches/patch-unix_unix_cpp
> > --- patches/patch-unix_unix_cpp     9 Sep 2007 15:17:06 -0000       1.1
> > +++ /dev/null       28 Sep 2008 10:50:08 -0000
> > @@ -1,101 +0,0 @@
> > -$OpenBSD: patch-unix_unix_cpp,v 1.1 2007/09/09 15:17:06 fgsch Exp $
> > ---- unix/unix.cpp.orig     Sun Apr 29 01:51:08 2007
> > -+++ unix/unix.cpp  Thu Sep  6 14:59:46 2007
> > -@@ -210,6 +210,10 @@ pthread_mutex_t mutex;
> > - #endif
> > - #endif
> > - 
> > -+#if !defined(NOSOUND) && defined(__OpenBSD__)
> > -+#include <sys/audioio.h>
> > -+#endif
> > -+
> > - //Breaks sol9 and probably others.
> > - //#if defined(__sun) && defined(__GNUC__)
> > - //typedef void (*SIG_PF)();
> > -@@ -264,7 +268,7 @@ void ReadJoysticks ();
> > - #define CONFIGURABLE_SOUND_DEVICE
> > -     char *sound_device = "/dev/dsp";
> > - #endif
> > --#if !defined(NOSOUND) && defined (__sun)
> > -+#if !defined(NOSOUND) && (defined(__sun) || defined(__OpenBSD__))
> > - #define CONFIGURABLE_SOUND_DEVICE
> > -     char *sound_device = "/dev/audio";
> > - #endif
> > -@@ -285,7 +289,7 @@ const char *rom_dir="." SLASH_STR "roms";
> > - const char *inc_format="%03d";
> > - 
> > - //FIXME: I see no reason not to configureenable this for all Unixen
> > --#if defined(DEBUGGER) && (defined(__linux) || defined(__sun))
> > -+#if defined(DEBUGGER) && (defined(__linux) || defined(__sun) || 
> > defined(__OpenBSD__))
> > - static void sigbrkhandler(int)
> > - {
> > -     CPU.Flags |= DEBUG_MODE_FLAG;
> > -@@ -1653,10 +1657,14 @@ void S9xUnixProcessSound (void)
> > - }
> > - #endif
> > - 
> > --#if !defined(NOSOUND) && defined(__sun)
> > -+#if !defined(NOSOUND) && (defined(__sun) || defined(__OpenBSD__))
> > - static int Rates[8] =
> > - {
> > -+#if defined(__sun)
> > -     0, 8000, 11025, 16000, 22050, 32000, 37800, 44100
> > -+#else
> > -+    0, 8000, 11025, 16000, 22050, 32000, 44100, 48000
> > -+#endif
> > - };
> > - 
> > - static int BufferSizes [8] =
> > -@@ -1712,6 +1720,7 @@ bool8 S9xOpenSoundDevice (int mode, bool8 stereo, 
> > int 
> > -       so.playback_rate, so.buffer_size, so.sixteen_bit ? "yes" : "no",
> > -       so.stereo ? "yes" : "no", so.encoded ? "yes" : "no");
> > - 
> > -+    S9xSetPlaybackRate (so.playback_rate);
> > -     return (TRUE);
> > - }
> > - #endif
> > -@@ -1847,7 +1856,7 @@ bool8 S9xOpenSoundDevice (int mode, bool8 stereo, 
> > int 
> > - #endif
> > - 
> > - 
> > --#if !defined(NOSOUND) && (defined (__linux) || defined (__sun))
> > -+#if !defined(NOSOUND) && (defined (__linux) || defined (__sun) || 
> > defined(__OpenBSD__))
> > - void S9xUnixProcessSound (void)
> > - {
> > - }
> > -@@ -1890,7 +1899,7 @@ void *S9xProcessSound (void *)
> > - }
> > - #endif
> > - 
> > --#if !defined(NOSOUND) && (defined (__linux) || defined (__sun))
> > -+#if !defined(NOSOUND) && (defined (__linux) || defined (__sun) || 
> > defined(__OpenBSD__))
> > - void S9xGenerateSound ()
> > - {
> > -     /* Linux and Sun versions */
> > -@@ -2009,7 +2018,7 @@ void *S9xProcessSound (void *)
> > - #endif
> > - 
> > - #endif
> > --#ifdef __sun
> > -+#if defined(__sun) || defined(__OpenBSD__)
> > -     audio_info_t audio;
> > -     if (!Settings.ThreadSound)
> > -     {
> > -@@ -2121,7 +2130,7 @@ void *S9xProcessSound (void *)
> > -     } while (Settings.ThreadSound);
> > - #endif
> > - 
> > --#ifdef __sun
> > -+#if defined(__sun) || defined(__OpenBSD__)
> > -     if (!Settings.ThreadSound)
> > -   write (so.sound_fd, NULL, 0);
> > - #endif
> > -@@ -2130,7 +2139,7 @@ void *S9xProcessSound (void *)
> > - }
> > - #endif
> > - 
> > --#if !defined(NOSOUND) && defined(__sun)
> > -+#if !defined(NOSOUND) && (defined(__sun) || defined(__OpenBSD__))
> > - uint8 int2ulaw(int ch)
> > - {
> > -     int mask;
> > Index: pkg/PLIST
> > ===================================================================
> > RCS file: /cvs/ports/emulators/snes9x/pkg/PLIST,v
> > retrieving revision 1.3
> > diff -N -u -p pkg/PLIST
> > --- pkg/PLIST       9 Sep 2007 15:17:06 -0000       1.3
> > +++ pkg/PLIST       19 Apr 2010 17:15:48 -0000
> > @@ -1,12 +1,40 @@
> >  @comment $OpenBSD: PLIST,v 1.3 2007/09/09 15:17:06 fgsch Exp $
> > -bin/snes9x
> > +...@bin bin/snes9x-gtk
> > +share/applications/
> > +share/applications/snes9x.desktop
> >  share/doc/snes9x/
> > -share/doc/snes9x/changes.txt
> >  share/doc/snes9x/control-inputs.txt
> >  share/doc/snes9x/controls.txt
> > -share/doc/snes9x/faqs.txt
> > -share/doc/snes9x/hardware.txt
> > -...@comment share/doc/snes9x/readme.txt
> > -share/doc/snes9x/readme_unix.txt
> >  share/doc/snes9x/snapshots.txt
> >  share/doc/snes9x/snes9x-license.txt
> > +share/examples/snes9x/
> > +share/examples/snes9x/snes9x.conf.default
> > +share/icons/
> > +share/icons/hicolor/
> > +share/icons/hicolor/16x16/
> > +share/icons/hicolor/16x16/apps/
> > +share/icons/hicolor/16x16/apps/snes9x.png
> > +share/icons/hicolor/24x24/
> > +share/icons/hicolor/24x24/apps/
> > +share/icons/hicolor/24x24/apps/snes9x.png
> > +share/icons/hicolor/32x32/
> > +share/icons/hicolor/32x32/apps/
> > +share/icons/hicolor/32x32/apps/snes9x.png
> > +share/icons/hicolor/scalable/
> > +share/icons/hicolor/scalable/apps/
> > +share/icons/hicolor/scalable/apps/snes9x.svg
> > +share/locale/
> > +share/locale/es_VE/
> > +share/locale/es_VE/LC_MESSAGES/
> > +share/locale/es_VE/LC_MESSAGES/snes9x-gtk.mo
> > +share/locale/fr_FR/
> > +share/locale/fr_FR/LC_MESSAGES/
> > +share/locale/fr_FR/LC_MESSAGES/snes9x-gtk.mo
> > +share/locale/pt_BR/
> > +share/locale/pt_BR/LC_MESSAGES/
> > +share/locale/pt_BR/LC_MESSAGES/snes9x-gtk.mo
> > +share/locale/s...@latin/
> > +share/locale/s...@latin/LC_MESSAGES/
> > +share/locale/s...@latin/LC_MESSAGES/snes9x-gtk.mo
> > +...@exec %D/bin/update-desktop-database
> > +...@unexec-delete %D/bin/update-desktop-database
> > 
> 
> 

-- 
Antoine

Reply via email to