From 4b3d575b5a3dfe88e2a3fc7185d35347c1e78749 Mon Sep 17 00:00:00 2001 From: fgsch Date: Thu, 31 Jan 2013 22:27:36 +0000 Subject: [PATCH] Update to sdlmame 0.148. With help and comments from dcoppa@ and benoit@. Please note this requires a kernel with the MAXTSIZ bump committed earlier. --- emulators/sdlmame/Makefile | 26 ++++++++++++++----- emulators/sdlmame/distinfo | 14 +++------- emulators/sdlmame/patches/patch-makefile | 24 ++++++++--------- .../sdlmame/patches/patch-src_emu_fileio_h | 8 +++--- .../patches/patch-src_emu_machine_netlist_h | 12 +++++++++ .../sdlmame/patches/patch-src_osd_sdl_sdl_mak | 15 +++++++++++ 6 files changed, 66 insertions(+), 33 deletions(-) create mode 100644 emulators/sdlmame/patches/patch-src_emu_machine_netlist_h create mode 100644 emulators/sdlmame/patches/patch-src_osd_sdl_sdl_mak diff --git a/emulators/sdlmame/Makefile b/emulators/sdlmame/Makefile index 7d4b58afb3d..a610b94647d 100644 --- a/emulators/sdlmame/Makefile +++ b/emulators/sdlmame/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.21 2012/06/02 16:09:40 fgsch Exp $ +# $OpenBSD: Makefile,v 1.22 2013/01/31 22:27:36 fgsch Exp $ # Other archs have not been tested ONLY_FOR_ARCHS = amd64 i386 @@ -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 + # MAME Distribution License, see http://mamedev.org/license.html # history.dat : Creative Commons Attribution 3.0 PERMIT_PACKAGE_CDROM = may not sell @@ -24,14 +26,15 @@ 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 \ pangocairo-1.0 pangoft2-1.0 pixman-1 png pthread \ pthread-stubs stdc++ util xcb xcb-render xcb-shm z -MASTER_SITES = http://mamedev.org/downloader.php?file=releases/ +MASTER_SITES = http://mamedev.org/downloader.php?file=releases/ \ + http://whiper.com/mame/${V:S/0//}/ MASTER_SITES0 = http://mamedev.org/updates/ MASTER_SITES1 = http://www.arcade-history.com/dats/ @@ -40,9 +43,10 @@ DIST_SUBDIR = mame # PATCHFILES doesn't work for .zip DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \ - mamehistory${V:S/0//}.zip:1 + history${V:S/0//}e.zip:1 -MODULES = devel/gettext +MODULES = devel/gettext \ + lang/python RUN_DEPENDS-main = fonts/liberation-fonts LIB_DEPENDS = devel/gconf2 \ @@ -57,6 +61,8 @@ MAKE_ENV += PTR64=1 .endif USE_GMAKE = Yes +CONFIGURE_STYLE = none + MAKE_FILE = makefile NO_REGRESS = Yes @@ -70,7 +76,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 diff --git a/emulators/sdlmame/distinfo b/emulators/sdlmame/distinfo index 89574f6be43..110af20162b 100644 --- a/emulators/sdlmame/distinfo +++ b/emulators/sdlmame/distinfo @@ -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/history148e.zip) = avUNQJMhmJnZWrLO5fjxIwlHw+YhiFRZk+ia9dzXxo4= +SHA256 (mame/mame0148s.zip) = eNimi6U5NP38iV9FDAhoLa2oH37D50qY+wQlOVBtkyE= +SIZE (mame/history148e.zip) = 3779373 +SIZE (mame/mame0148s.zip) = 33822494 diff --git a/emulators/sdlmame/patches/patch-makefile b/emulators/sdlmame/patches/patch-makefile index 26a642823b1..ee821861a28 100644 --- a/emulators/sdlmame/patches/patch-makefile +++ b/emulators/sdlmame/patches/patch-makefile @@ -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 +$OpenBSD: patch-makefile,v 1.4 2013/01/31 22:27:36 fgsch Exp $ +--- 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/27 12:42:28 fgsch Exp $ -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/27 12:42:28 fgsch Exp $ 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/27 12:42:28 fgsch Exp $ # 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/27 12:42:28 fgsch Exp $ # 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 diff --git a/emulators/sdlmame/patches/patch-src_emu_fileio_h b/emulators/sdlmame/patches/patch-src_emu_fileio_h index bac1c586eb7..827629d8fca 100644 --- a/emulators/sdlmame/patches/patch-src_emu_fileio_h +++ b/emulators/sdlmame/patches/patch-src_emu_fileio_h @@ -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) +$OpenBSD: patch-src_emu_fileio_h,v 1.2 2013/01/31 22:27:36 fgsch Exp $ +--- 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); diff --git a/emulators/sdlmame/patches/patch-src_emu_machine_netlist_h b/emulators/sdlmame/patches/patch-src_emu_machine_netlist_h new file mode 100644 index 00000000000..7645e8fe8ba --- /dev/null +++ b/emulators/sdlmame/patches/patch-src_emu_machine_netlist_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_emu_machine_netlist_h,v 1.1 2013/01/31 22:27:36 fgsch Exp $ +--- 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.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 diff --git a/emulators/sdlmame/patches/patch-src_osd_sdl_sdl_mak b/emulators/sdlmame/patches/patch-src_osd_sdl_sdl_mak new file mode 100644 index 00000000000..107b97a5ea6 --- /dev/null +++ b/emulators/sdlmame/patches/patch-src_osd_sdl_sdl_mak @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_osd_sdl_sdl_mak,v 1.5 2013/01/31 22:27:36 fgsch Exp $ +--- 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 + + #-------------------------------------------------