Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/sdlmame/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- Makefile	2 Jun 2012 16:09:40 -0000	1.21
+++ Makefile	27 Jan 2013 16:13:50 -0000
@@ -8,7 +8,7 @@ MULTI_PACKAGES =	-main -tools
 COMMENT-main =		emulates a massive variety of arcades machines
 COMMENT-tools =		tools to manipulate MAME/MESS roms and disk images
 
-V =			0146
+V =			0148
 DISTNAME =		mame${V}s
 PKGNAME-main =		sdlmame-${V:S/0/0./}
 PKGNAME-tools =		sdlmame-tools-${V:S/0/0./}
@@ -17,6 +17,8 @@ CATEGORIES =		emulators games
 
 HOMEPAGE =		http://mamedev.org/
 
+MAINTAINER =		Federico G. Schwindt <fgsch@openbsd.org>
+
 # MAME Distribution License, see http://mamedev.org/license.html
 # history.dat : Creative Commons Attribution 3.0
 PERMIT_PACKAGE_CDROM =		may not sell
@@ -24,7 +26,7 @@ PERMIT_PACKAGE_FTP =		Yes
 PERMIT_DISTFILES_CDROM =	may not sell
 PERMIT_DISTFILES_FTP =		Yes
 
-WANTLIB =	GL SDL SDL_ttf X11 Xcomposite Xcursor Xdamage Xext \
+WANTLIB =	SDL SDL_ttf X11 Xcomposite Xcursor Xdamage Xext \
 		Xfixes Xi Xinerama Xrandr Xrender atk-1.0 c cairo expat \
 		fontconfig freetype gconf-2 gdk-x11-2.0 gdk_pixbuf-2.0 \
 		gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0 m pango-1.0 \
@@ -40,9 +42,10 @@ DIST_SUBDIR =		mame
 
 # PATCHFILES doesn't work for .zip
 DISTFILES =		${DISTNAME}${EXTRACT_SUFX} \
-			mamehistory${V:S/0//}.zip:1
+			history${V:S/0//}b.zip:1
 
-MODULES =		devel/gettext
+MODULES =		devel/gettext \
+			lang/python
 
 RUN_DEPENDS-main =	fonts/liberation-fonts
 LIB_DEPENDS =		devel/gconf2 \
@@ -57,6 +60,8 @@ MAKE_ENV +=		PTR64=1
 .endif
 USE_GMAKE =		Yes
 
+CONFIGURE_STYLE =	none
+
 MAKE_FILE =		makefile
 
 NO_REGRESS =		Yes
@@ -70,7 +75,13 @@ pre-patch:
 #	${PATCH} ${PATCH_DIST_ARGS} < ${WRKDIR}/${V}u${v}.diff
 #.endfor
 	@perl -pi -e 's|\r\n|\n|g' ${WRKDIST}/makefile \
-	    ${WRKDIST}/src/emu/fileio.h
+	    ${WRKDIST}/src/emu/fileio.h \
+	    ${WRKDIST}/src/emu/machine/netlist.h \
+	    ${WRKDIST}/src/osd/sdl/sdl.mak
+
+pre-build:
+	@ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
+	${SUBST_CMD} ${WRKDIST}/src/osd/sdl/sdl.mak
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/mame ${PREFIX}/bin/sdlmame
Index: distinfo
===================================================================
RCS file: /cvs/ports/emulators/sdlmame/distinfo,v
retrieving revision 1.7
diff -u -p -r1.7 distinfo
--- distinfo	2 Jun 2012 16:09:40 -0000	1.7
+++ distinfo	27 Jan 2013 16:13:50 -0000
@@ -1,10 +1,4 @@
-MD5 (mame/mame0146s.zip) = dj/bWzOd2gD+r6nmNb1Y/Q==
-MD5 (mame/mamehistory146.zip) = NdFXq8Bcw7ihAbE5P4YK7w==
-RMD160 (mame/mame0146s.zip) = TGUOAxinsABYlx4OR6k7eEJGQ1g=
-RMD160 (mame/mamehistory146.zip) = CGG9t7Oq4vwTXzD4WQw2HPSyW9g=
-SHA1 (mame/mame0146s.zip) = a9LGIJ3V/GRo0EYc0XObg1Wdu/c=
-SHA1 (mame/mamehistory146.zip) = 2nw8MI+e4FgtbSmkA/mWEcnkzEE=
-SHA256 (mame/mame0146s.zip) = 1qYf67r9c9CElV4R5eQjeK7yICqB5/6+NkwWAv0YRuk=
-SHA256 (mame/mamehistory146.zip) = x9ZU60sBZCMieNCYacY+zwolDyOexrlRm3Vkj9Lmj4s=
-SIZE (mame/mame0146s.zip) = 20933242
-SIZE (mame/mamehistory146.zip) = 3240006
+SHA256 (mame/history148b.zip) = /IIJsqMG44BCqi3uEf5g2WhtBteBcCWrpG9ccEoQfw8=
+SHA256 (mame/mame0148s.zip) = eNimi6U5NP38iV9FDAhoLa2oH37D50qY+wQlOVBtkyE=
+SIZE (mame/history148b.zip) = 4199927
+SIZE (mame/mame0148s.zip) = 33822494
Index: patches/patch-makefile
===================================================================
RCS file: /cvs/ports/emulators/sdlmame/patches/patch-makefile,v
retrieving revision 1.3
diff -u -p -r1.3 patch-makefile
--- patches/patch-makefile	27 Nov 2011 12:42:28 -0000	1.3
+++ patches/patch-makefile	27 Jan 2013 16:13:51 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-makefile,v 1.3 2011/11/27 12:42:28 fgsch Exp $
---- makefile.orig	Sat Feb 12 15:17:48 2011
-+++ makefile	Thu Jun  2 12:18:06 2011
-@@ -206,10 +206,10 @@ endif
+--- makefile.orig	Sun Jan 20 20:15:29 2013
++++ makefile	Sun Jan 20 20:15:29 2013
+@@ -214,10 +214,10 @@ endif
  # BIGENDIAN = 1
  
  # uncomment next line to build expat as part of MAME build
@@ -12,9 +12,9 @@ $OpenBSD: patch-makefile,v 1.3 2011/11/2
 -BUILD_ZLIB = 1
 +# BUILD_ZLIB = 1
  
- # uncomment next line to include the symbols
- # SYMBOLS = 1
-@@ -298,7 +298,7 @@ endif
+ # uncomment next line to build libflac as part of MAME build
+ BUILD_FLAC = 1
+@@ -315,7 +315,7 @@ endif
  
  # compiler, linker and utilities
  AR = @ar
@@ -23,7 +23,7 @@ $OpenBSD: patch-makefile,v 1.3 2011/11/2
  LD = @g++
  MD = -mkdir$(EXE)
  RM = @rm -f
-@@ -347,7 +347,7 @@ NAME = $(TARGET)$(SUBTARGET)
+@@ -364,7 +364,7 @@ NAME = $(TARGET)$(SUBTARGET)
  endif
  
  # fullname is prefix+name+suffix+suffix64+suffixdebug
@@ -32,7 +32,7 @@ $OpenBSD: patch-makefile,v 1.3 2011/11/2
  
  # add an EXE suffix to get the final emulator name
  EMULATOR = $(FULLNAME)$(EXE)
-@@ -423,7 +423,7 @@ CPPONLYFLAGS =
+@@ -455,7 +455,7 @@ CPPONLYFLAGS =
  
  # CFLAGS is defined based on C or C++ targets
  # (remember, expansion only happens when used, so doing it here is ok)
@@ -41,12 +41,12 @@ $OpenBSD: patch-makefile,v 1.3 2011/11/2
  
  # we compile C-only to C89 standard with GNU extensions
  # we compile C++ code to C++98 standard with GNU extensions
-@@ -450,7 +450,7 @@ CCOMFLAGS += -pg
+@@ -482,7 +482,7 @@ CCOMFLAGS += -pg
  endif
  
  # add the optimization flag
 -CCOMFLAGS += -O$(OPTIMIZE)
 +#CCOMFLAGS += -O$(OPTIMIZE)
  
- # if we are optimizing, include optimization options
- # and make all errors into warnings
+ # add the error warning flag
+ ifndef NOWERROR
Index: patches/patch-src_emu_fileio_h
===================================================================
RCS file: /cvs/ports/emulators/sdlmame/patches/patch-src_emu_fileio_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_emu_fileio_h
--- patches/patch-src_emu_fileio_h	27 Nov 2011 12:42:28 -0000	1.1
+++ patches/patch-src_emu_fileio_h	27 Jan 2013 16:13:51 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_emu_fileio_h,v 1.1 2011/11/27 12:42:28 fgsch Exp $
---- src/emu/fileio.h.orig	Tue Nov  8 22:52:52 2011
-+++ src/emu/fileio.h	Tue Nov  8 22:52:52 2011
-@@ -151,6 +151,7 @@ class emu_file (public)
+--- src/emu/fileio.h.orig	Sun Jan 20 20:15:29 2013
++++ src/emu/fileio.h	Sun Jan 20 20:15:29 2013
+@@ -153,6 +153,7 @@ class emu_file (public)
  
  	// reading
  	UINT32 read(void *buffer, UINT32 length);
Index: patches/patch-src_emu_machine_netlist_h
===================================================================
RCS file: patches/patch-src_emu_machine_netlist_h
diff -N patches/patch-src_emu_machine_netlist_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_emu_machine_netlist_h	27 Jan 2013 16:13:51 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/emu/machine/netlist.h.orig	Sun Jan 20 20:35:07 2013
++++ src/emu/machine/netlist.h	Sun Jan 20 20:34:40 2013
+@@ -107,7 +107,7 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &ne
+ #define NETLIST_MEMREGION(_name)                                                    \
+ 		netlist.parse((char *)downcast<netlist_t &>(netlist.netlist()).machine().root_device().memregion(_name)->base());       \
+ 
+-#if defined(__GNUC__) && (__GNUC__ >= 3)
++#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
+ #if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
+ #define ATTR_ALIGN __attribute__ ((aligned(128)))
+ #else
Index: patches/patch-src_osd_sdl_sdl_mak
===================================================================
RCS file: patches/patch-src_osd_sdl_sdl_mak
diff -N patches/patch-src_osd_sdl_sdl_mak
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_osd_sdl_sdl_mak	27 Jan 2013 16:13:51 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- src/osd/sdl/sdl.mak.orig	Thu Jan 24 15:42:05 2013
++++ src/osd/sdl/sdl.mak	Thu Jan 24 15:43:24 2013
+@@ -697,9 +697,9 @@ LIBS += `pkg-config QtGui --libs`
+ endif
+ 
+ # some systems still put important things in a different prefix
+-LIBS += -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib
++LIBS += -L${X11BASE}/lib
+ # make sure we can find X headers
+-INCPATH += -I/usr/X11/include -I/usr/X11R6/include -I/usr/openwin/include
++INCPATH += -I${X11BASE}/include
+ endif # NO_X11
+ 
+ #-------------------------------------------------
