Hi,

Here is an update to gambatte r532. Works well on i386.

ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/gambatte/Makefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile
--- Makefile    11 Mar 2013 11:06:04 -0000      1.5
+++ Makefile    31 May 2013 05:40:40 -0000
@@ -2,9 +2,9 @@
 
 COMMENT =              highly accurate Game Boy Color emulator
 
-V =                    0.5.0
-DISTNAME =             gambatte_src-${V}-wip2v2
-PKGNAME =              gambatte-${V}-beta3
+REV =                  532
+DISTNAME =             gambatte_src-r${REV}
+PKGNAME =              gambatte-0.5.0.${REV}
 
 CATEGORIES =           emulators
 
@@ -36,8 +36,6 @@ do-build:
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKDIST}/gambatte_sdl/gambatte_sdl ${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKDIST}/gambatte_sdl/man/gambatte_sdl.6 \
-               ${PREFIX}/man/man6
 
 do-test:
        ${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKDIST}/testrunner \
Index: distinfo
===================================================================
RCS file: /cvs/ports/emulators/gambatte/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- distinfo    13 Aug 2012 06:38:00 -0000      1.2
+++ distinfo    31 May 2013 05:40:40 -0000
@@ -1,2 +1,2 @@
-SHA256 (gambatte_src-0.5.0-wip2v2.tar.gz) = 
f0Ca2ujiwJKDDleSqhp5nF/UYgi0UT+W4myUZXADRy4=
-SIZE (gambatte_src-0.5.0-wip2v2.tar.gz) = 523879
+SHA256 (gambatte_src-r532.tar.gz) = 
9iXBbqHmmpMlM++2aDWXlSlH+NeN8y12kTQ6apQYTvc=
+SIZE (gambatte_src-r532.tar.gz) = 520626
Index: patches/patch-gambatte_sdl_SConstruct
===================================================================
RCS file: patches/patch-gambatte_sdl_SConstruct
diff -N patches/patch-gambatte_sdl_SConstruct
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gambatte_sdl_SConstruct       31 May 2013 05:40:40 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+--- gambatte_sdl/SConstruct.orig       Thu May 30 10:38:24 2013
++++ gambatte_sdl/SConstruct    Thu May 30 10:38:40 2013
+@@ -9,7 +9,7 @@ vars.Add('CXX')
+ env = Environment(CPPPATH = ['src', '../libgambatte/include', '../common'],
+                   CFLAGS = cflags,
+                   CXXFLAGS = cxxflags,
+-                  CPPDEFINES = { 'HAVE_STDINT_H': None },
++                  CPPDEFINES = [ 'HAVE_STDINT_H', None ],
+                   variables = vars)
+ env.ParseConfig('sdl-config --cflags --libs')
+ 
+@@ -44,11 +44,11 @@ conf = env.Configure()
+ conf.CheckLib('z')
+ conf.Finish()
+ 
+-version_str_def = { 'GAMBATTE_SDL_VERSION_STR': r'\"r532\"' }
++version_str_def = [ 'GAMBATTE_SDL_VERSION_STR', r'\"r532\"' ]
+ if Dir('../.git').exists():
+       try:
+               git_revno = subprocess.check_output("git rev-list HEAD 
--count", shell=True).strip()
+-              version_str_def = { 'GAMBATTE_SDL_VERSION_STR': r'\"r' + 
git_revno + r'\"' }
++              version_str_def = [ 'GAMBATTE_SDL_VERSION_STR', r'\"r' + 
git_revno + r'\"' ]
+       except subprocess.CalledProcessError:
+               pass
+ 
Index: patches/patch-gambatte_sdl_man_gambatte_sdl_6
===================================================================
RCS file: patches/patch-gambatte_sdl_man_gambatte_sdl_6
diff -N patches/patch-gambatte_sdl_man_gambatte_sdl_6
--- patches/patch-gambatte_sdl_man_gambatte_sdl_6       13 Aug 2012 06:38:00 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-$OpenBSD: patch-gambatte_sdl_man_gambatte_sdl_6,v 1.1 2012/08/13 06:38:00 
bentley Exp $
-https://sourceforge.net/tracker/?func=detail&aid=3555949&group_id=203791&atid=987012
---- gambatte_sdl/man/gambatte_sdl.6.orig       Thu Oct 25 05:57:46 2007
-+++ gambatte_sdl/man/gambatte_sdl.6    Fri Aug 10 00:20:20 2012
-@@ -69,12 +69,27 @@ Use YUV overlay for (usually faster) scaling.
- TAB
- fast-forward
- .TP
--Ctrl-f 
-+Ctrl-f
- toggle full screen
- .TP
- Ctrl-r
- reset
- .TP
-+F5
-+save state
-+.TP
-+F6
-+previous state slot
-+.TP
-+F7
-+next state slot
-+.TP
-+F8
-+load state
-+.TP
-+0 to 9
-+select state slot 0 to 9
-+.TP
- Return
- Start
- .TP
-@@ -87,4 +102,4 @@ A
- c
- B
- .SH AUTHOR
--Gambatte and this manual page was written by Sindre AamÄs 
<[email protected]>.
-+Gambatte and this manual page was written by Sindre Aam\(oas 
<[email protected]>.
Index: patches/patch-gambatte_sdl_src_gambatte_sdl_cpp
===================================================================
RCS file: patches/patch-gambatte_sdl_src_gambatte_sdl_cpp
diff -N patches/patch-gambatte_sdl_src_gambatte_sdl_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gambatte_sdl_src_gambatte_sdl_cpp     31 May 2013 05:40:40 
-0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- gambatte_sdl/src/gambatte_sdl.cpp.orig     Thu May 30 13:44:21 2013
++++ gambatte_sdl/src/gambatte_sdl.cpp  Thu May 30 13:44:22 2013
+@@ -804,7 +804,7 @@ int GambatteSdl::run(long const sampleRate, int const 
+                       return 0;
+ 
+               BlitterWrapper::Buf const &vbuf = blitter.inBuf();
+-              std::size_t runsamples = gb_samples_per_frame - bufsamples;
++              unsigned runsamples = gb_samples_per_frame - bufsamples;
+               std::ptrdiff_t const vidFrameDoneSampleCnt = gambatte.runFor(
+                       vbuf.pixels, vbuf.pitch, audioBuf + bufsamples, 
runsamples);
+               std::size_t const outsamples = vidFrameDoneSampleCnt >= 0
Index: patches/patch-libgambatte_include_gambatte_h
===================================================================
RCS file: patches/patch-libgambatte_include_gambatte_h
diff -N patches/patch-libgambatte_include_gambatte_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libgambatte_include_gambatte_h        31 May 2013 05:40:40 
-0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- libgambatte/include/gambatte.h.orig        Thu May 30 13:33:56 2013
++++ libgambatte/include/gambatte.h     Thu May 30 13:34:01 2013
+@@ -81,7 +81,7 @@ class GB { (public)
+         *         if no new video frame was completed.
+         */
+       std::ptrdiff_t runFor(gambatte::uint_least32_t *videoBuf, 
std::ptrdiff_t pitch,
+-                            gambatte::uint_least32_t *audioBuf, std::size_t 
&samples);
++                            gambatte::uint_least32_t *audioBuf, unsigned 
&samples);
+ 
+       /**
+         * Reset to initial state.
Index: patches/patch-libgambatte_src_gambatte_cpp
===================================================================
RCS file: patches/patch-libgambatte_src_gambatte_cpp
diff -N patches/patch-libgambatte_src_gambatte_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libgambatte_src_gambatte_cpp  31 May 2013 05:40:40 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- libgambatte/src/gambatte.cpp.orig  Thu May 30 13:41:10 2013
++++ libgambatte/src/gambatte.cpp       Thu May 30 13:41:15 2013
+@@ -55,7 +55,7 @@ GB::~GB() {
+ }
+ 
+ std::ptrdiff_t GB::runFor(gambatte::uint_least32_t *const videoBuf, 
std::ptrdiff_t const pitch,
+-                          gambatte::uint_least32_t *const soundBuf, 
std::size_t &samples) {
++                          gambatte::uint_least32_t *const soundBuf, unsigned 
&samples) {
+       if (!p_->cpu.loaded()) {
+               samples = 0;
+               return -1;
Index: patches/patch-testrunner_SConstruct
===================================================================
RCS file: /cvs/ports/emulators/gambatte/patches/patch-testrunner_SConstruct,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-testrunner_SConstruct
--- patches/patch-testrunner_SConstruct 13 Aug 2012 06:38:00 -0000      1.1
+++ patches/patch-testrunner_SConstruct 31 May 2013 05:40:40 -0000
@@ -1,17 +1,22 @@
-$OpenBSD: patch-testrunner_SConstruct,v 1.1 2012/08/13 06:38:00 bentley Exp $
---- testrunner/SConstruct.orig Sat Jul 23 11:02:32 2011
-+++ testrunner/SConstruct      Fri Aug  3 00:33:05 2012
-@@ -2,9 +2,11 @@ global_cflags = ARGUMENTS.get('CFLAGS', '-Wall -Wextra
+$OpenBSD$
+--- testrunner/SConstruct.orig Sun May 12 06:51:24 2013
++++ testrunner/SConstruct      Thu May 30 23:21:43 2013
+@@ -1,11 +1,16 @@
+ global_cflags = ARGUMENTS.get('CFLAGS', '-Wall -Wextra -O2 -g')
  global_cxxflags = ARGUMENTS.get('CXXFLAGS', global_cflags + ' -fno-exceptions 
-fno-rtti')
  global_defines = ' -DHAVE_STDINT_H'
++vars = Variables()
++vars.Add('CC')
++vars.Add('CXX')
  
 -env = Environment(CPPPATH = ['.', '../libgambatte/include'],
 +env = Environment(CPPPATH = ['.', '../libgambatte/include', 
'${LOCALBASE}/include/libpng'],
                    CFLAGS = global_cflags + global_defines,
--                  CXXFLAGS = global_cxxflags + global_defines)
-+                  CXXFLAGS = global_cxxflags + global_defines,
+                   CXXFLAGS = global_cxxflags + global_defines,
+-                  LIBS = 'm')
 +                  LIBPATH = '${LOCALBASE}/lib',
-+                  LIBS = 'm')
++                  LIBS = 'm',
++                  variables = vars)
  
  sourceFiles = Split('''
                        testrunner.cpp
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/emulators/gambatte/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   8 Dec 2010 19:58:04 -0000       1.1.1.1
+++ pkg/PLIST   31 May 2013 05:40:40 -0000
@@ -1,3 +1,2 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2010/12/08 19:58:04 landry Exp $
 @bin bin/gambatte_sdl
-@man man/man6/gambatte_sdl.6

Reply via email to