Sure. But I use xboard. Never even realized there was another way. And you say it has sound. Perhaps I'll try it out. :-).
.... Ken On Sat, Jan 2, 2010 at 3:24 PM, Jacob Meuser <jake...@sdf.lonestar.org> wrote: > > no chess players here? > > On Sat, Dec 26, 2009 at 12:46:43PM +0000, Jacob Meuser wrote: >> >> -- >> jake...@sdf.lonestar.org >> SDF Public Access UNIX System - http://sdf.lonestar.org >> >> Index: Makefile >> =================================================================== >> RCS file: /cvs/ports/games/eboard/Makefile,v >> retrieving revision 1.36 >> diff -N -u -p Makefile >> --- Makefile 10 Aug 2009 06:31:42 -0000 1.36 >> +++ Makefile 26 Dec 2009 12:46:21 -0000 >> @@ -3,7 +3,7 @@ >> COMMENT= gtk+2 chess board interface >> >> DISTNAME= eboard-1.0.4 >> -PKGNAME= ${DISTNAME}p4 >> +PKGNAME= ${DISTNAME}p5 >> CATEGORIES= games x11 >> >> HOMEPAGE= http://www.bergo.eng.br/eboard/ >> @@ -18,7 +18,7 @@ WANTLIB= X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xex >> Xi Xinerama Xrandr Xrender atk-1.0 c cairo expat fontconfig \ >> freetype gio-2.0 glib-2.0 glitz gmodule-2.0 gobject-2.0 \ >> m pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 \ >> - png pthread pthread-stubs stdc++ xcb z >> + png pthread pthread-stubs sndio stdc++ xcb z >> >> MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=eboard/} >> >> Index: patches/patch-configure >> =================================================================== >> RCS file: /cvs/ports/games/eboard/patches/patch-configure,v >> retrieving revision 1.3 >> diff -N -u -p patches/patch-configure >> --- patches/patch-configure 19 Dec 2007 09:01:25 -0000 1.3 >> +++ patches/patch-configure 26 Dec 2009 12:46:21 -0000 >> @@ -1,15 +1,17 @@ >> $OpenBSD: patch-configure,v 1.3 2007/12/19 09:01:25 fgsch Exp $ >> ---- configure.orig Wed May 23 20:57:45 2007 >> -+++ configure Sun Dec 16 02:26:41 2007 >> -@@ -6,7 +6,7 @@ my $prefix = "/usr/local"; >> +--- configure.orig Wed May 23 11:57:45 2007 >> ++++ configure Sat Dec 26 03:23:34 2009 >> +@@ -6,8 +6,8 @@ my $prefix = "/usr/local"; >> my $package = "eboard"; >> my $version = "1.0.4"; >> my $cxx = "g++"; >> -my @cxxflags = ("-O6"); >> +-my @ldflags = ("-lpthread"); >> +my @cxxflags = (); >> - my @ldflags = ("-lpthread"); >> ++my @ldflags = ("-pthread"); >> my @libs = (); >> my $configh = "config.h"; >> + my $configmake = "config.make"; >> @@ -236,7 +236,7 @@ sub append_flags { >> my $x = shift @_; >> my @y; >> @@ -37,7 +39,18 @@ $OpenBSD: patch-configure,v 1.3 2007/12/19 09:01:25 fg >> } else { >> $program = "#include <$z>\nint main() { return 0; }\n"; >> } >> -@@ -536,7 +538,7 @@ if ($t2 != 0) { >> +@@ -512,6 +514,10 @@ if (!header_check("stdio.h","stdlib.h","string.h","uni >> + #optional headers >> + >> header_check("strings.h","sys/soundcard.h","sys/audioio.h","linux/joystick.h"); >> + >> ++if (header_check("sndio.h")) { >> ++ append_libs("sndio"); >> ++} >> ++ >> + $t1=macro_check("netinet/in.h","IPPROTO_TCP","HAVE_IPPROTO_TCP_ON_IN_H"); >> + $t2=macro_check("netinet/in.h","TCP_NODELAY","HAVE_TCP_NODELAY_ON_IN_H"); >> + $t3=macro_check("netinet/in.h","SOL_TCP","HAVE_SOL_TCP_ON_IN_H"); >> +@@ -536,7 +542,7 @@ if ($t2 != 0) { >> print "netinet/tcp.h not required, SOL_TCP present.\n"; >> } >> } else { >> Index: patches/patch-sound_cc >> =================================================================== >> RCS file: /cvs/ports/games/eboard/patches/patch-sound_cc,v >> retrieving revision 1.6 >> diff -N -u -p patches/patch-sound_cc >> --- patches/patch-sound_cc 3 Dec 2007 18:54:58 -0000 1.6 >> +++ patches/patch-sound_cc 26 Dec 2009 12:46:21 -0000 >> @@ -1,7 +1,7 @@ >> $OpenBSD: patch-sound_cc,v 1.6 2007/12/03 18:54:58 fgsch Exp $ >> ---- sound.cc.orig Wed May 23 19:57:45 2007 >> -+++ sound.cc Mon Dec 3 11:58:00 2007 >> -@@ -46,6 +46,7 @@ >> +--- sound.cc.orig Wed May 23 11:57:45 2007 >> ++++ sound.cc Sat Dec 26 04:11:49 2009 >> +@@ -46,14 +46,25 @@ >> #include "eboard.h" >> >> #define SOME_DRIVER 1 >> @@ -9,8 +9,16 @@ $OpenBSD: patch-sound_cc,v 1.6 2007/12/03 18:54:58 fgs >> >> #ifdef HAVE_SYS_SOUNDCARD_H >> >> -@@ -54,6 +55,9 @@ >> + #define OSS_DRIVER 1 >> + #include <sys/soundcard.h> >> >> ++#elif defined HAVE_SNDIO_H >> ++ >> ++#define SNDIO_DRIVER 1 >> ++#include <sndio.h> >> ++#undef SOUND_DEV >> ++#define SOUND_DEV "default" >> ++ >> #elif defined HAVE_SYS_AUDIOIO_H >> >> +#undef SOUND_DEV >> @@ -19,7 +27,7 @@ $OpenBSD: patch-sound_cc,v 1.6 2007/12/03 18:54:58 fgs >> #define OPENBSD_DRIVER 1 >> #include <sys/audioio.h> >> >> -@@ -74,7 +78,7 @@ SoundEvent::SoundEvent() { >> +@@ -74,7 +85,7 @@ SoundEvent::SoundEvent() { >> Pitch=800; >> Duration=250; >> Count=1; >> @@ -28,7 +36,7 @@ $OpenBSD: patch-sound_cc,v 1.6 2007/12/03 18:54:58 fgs >> ExtraData[0]=0; >> enabled = true; >> } >> -@@ -157,7 +161,7 @@ ostream & operator<<(ostream &s, SoundEvent e) { >> +@@ -157,7 +168,7 @@ ostream & operator<<(ostream &s, SoundEvent e) { >> s << e.Device << ',' << e.Count << ',' << (e.enabled?1:0); >> break; >> case EXT_WAVE: >> @@ -37,3 +45,92 @@ $OpenBSD: patch-sound_cc,v 1.6 2007/12/03 18:54:58 fgs >> s << "1," << e.Device << ',' << e.ExtraData; >> s << ',' << (e.enabled?1:0); >> break; >> +@@ -200,8 +211,12 @@ void SoundEvent::play() { >> + >> + switch(type) { >> + case EXT_WAVE: >> ++#ifdef SNDIO_DRIVER >> ++ execlp("aucat","aucat","-i",ExtraData,(char *)NULL); >> ++#else >> + execlp("play","play","-d",Device,ExtraData,0); >> + execlp("sox",ExtraData,"-t","ossdsp",Device,0); >> ++#endif >> + break; >> + case EXT_PROGRAM: >> + execlp("/bin/sh","/bin/sh","-c",ExtraData,0); >> +@@ -231,6 +246,11 @@ void SoundEvent::sine_beep(char *device,int pitch,int >> + int channels=1; >> + #endif >> + >> ++#ifdef SNDIO_DRIVER >> ++ struct sio_hdl *hdl; >> ++ struct sio_par par; >> ++#endif >> ++ >> + #ifdef OPENBSD_DRIVER >> + audio_info_t ai; >> + #endif // OPENBSD >> +@@ -257,9 +277,15 @@ void SoundEvent::sine_beep(char *device,int pitch,int >> + for(i=1;i<Count;i++) >> + memcpy(wave+i*(bl+interval),wave,bl); >> + >> ++#ifdef SNDIO_DRIVER >> ++ hdl=sio_open(NULL,SIO_PLAY,0); >> ++ if (hdl==NULL) >> ++#else >> + fd=open(device,O_WRONLY); >> + if (fd<0) >> ++#endif >> + goto leave2; >> ++ >> + #endif // SOME >> + >> + #ifdef OSS_DRIVER >> +@@ -273,6 +299,20 @@ void SoundEvent::sine_beep(char *device,int pitch,int >> + goto leave1; >> + #endif // OSS >> + >> ++#ifdef SNDIO_DRIVER >> ++ sio_initpar(&par); >> ++ par.bits=8; >> ++ par.sig=0; >> ++ par.pchan=1; >> ++ par.rate=rate; >> ++ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) >> ++ goto leave1; >> ++ if (par.bits != 8 || par.sig != 0 || par.pchan != 1 || par.rate != rate) >> ++ goto leave1; >> ++ if (!sio_start(hdl)) >> ++ goto leave1; >> ++#endif >> ++ >> + #ifdef OPENBSD_DRIVER >> + AUDIO_INITINFO(&ai); >> + ai.mode = AUMODE_PLAY; >> +@@ -285,8 +325,13 @@ void SoundEvent::sine_beep(char *device,int pitch,int >> + #endif // OPENBSD >> + >> + #ifdef SOME_DRIVER >> +- for(i=0;i<ts;) >> ++ for(i=0;i<ts;) { >> ++#ifdef SNDIO_DRIVER >> ++ i+=sio_write(hdl,&wave[i],ts-i); >> ++#else >> + i+=::write(fd,&wave[i],ts-i); >> ++#endif >> ++ } >> + #endif // SOME >> + >> + #ifdef OSS_DRIVER >> +@@ -299,7 +344,11 @@ void SoundEvent::sine_beep(char *device,int pitch,int >> + >> + #ifdef SOME_DRIVER >> + leave1: >> ++#ifdef SNDIO_DRIVER >> ++ sio_close(hdl); >> ++#else >> + close(fd); >> ++#endif // SNDIO >> + leave2: >> + free(wave); >> + #endif // SOME >> Index: pkg/PLIST >> =================================================================== >> RCS file: /cvs/ports/games/eboard/pkg/PLIST,v >> retrieving revision 1.8 >> diff -N -u -p pkg/PLIST >> --- pkg/PLIST 3 Dec 2007 18:54:58 -0000 1.8 >> +++ pkg/PLIST 26 Dec 2009 12:46:21 -0000 >> @@ -1,5 +1,5 @@ >> �...@comment $OpenBSD: PLIST,v 1.8 2007/12/03 18:54:58 fgsch Exp $ >> -bin/eboard >> +...@bin bin/eboard >> bin/eboard-addtheme >> bin/eboard-config >> �...@man man/man1/eboard-addtheme.1 > > -- > jake...@sdf.lonestar.org > SDF Public Access UNIX System - http://sdf.lonestar.org > >