[packages/mame] - added c++11 patch (don't disable C++11 ABI to allow using system C++ libraries) - build just mame

qboosh qboosh at pld-linux.org
Fri Nov 27 16:18:18 CET 2015


commit c4887c662585dbd249ef6289b7fe2dbc798b05ef
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Nov 27 16:18:50 2015 +0100

    - added c++11 patch (don't disable C++11 ABI to allow using system C++ libraries)
    - build just mame binary (now it combines arcade and mess subtargets)

 mame-c++11.patch | 10 ++++++++++
 mame.spec        | 13 ++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/mame.spec b/mame.spec
index fb456be..16735d8 100644
--- a/mame.spec
+++ b/mame.spec
@@ -11,6 +11,7 @@ Group:		X11/Applications/Games
 Source0:	http://www.mamedev.org/downloader.php?file=mame0167/%{name}%{fver}.zip
 # Source0-md5:	cb2ab1cac87e6a5187d5c631d58ee3fa
 Patch0:		%{name}-system-jsoncpp.patch
+Patch1:		%{name}-c++11.patch
 URL:		http://www.mamedev.org/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	SDL2-devel >= 2
@@ -68,13 +69,12 @@ udowodnić wierne odtworzenie sprzętu?).
 %setup -q -c
 %{__unzip} -q mame.zip
 %patch0 -p1
+%patch1 -p1
 
 %{__sed} -i -e 's/"lua"/"lua5.3"/' scripts/src/main.lua
 
 %build
-for target in mame mess ; do
 %{__make} \
-	TARGET=$target \
 %ifarch arm ppc ppc64 s390 s390x sparc sparcv9 sparc64
 	BIGENDIAN=1 \
 %endif
@@ -86,6 +86,7 @@ for target in mame mess ; do
 	LD="%{__cxx}" \
 	OPT_FLAGS="%{rpmcflags} $(pkg-config --cflags lua5.3)" \
 	LDFLAGS="%{rpmldflags}" \
+	CPP11=1 \
 	OSD=sdl \
 	USE_SYSTEM_LIB_EXPAT=1 \
 	USE_SYSTEM_LIB_FLAC=1 \
@@ -96,13 +97,16 @@ for target in mame mess ; do
 	USE_SYSTEM_LIB_SQLITE3=1 \
 	USE_SYSTEM_LIB_ZLIB=1 \
 	VERBOSE=1
-done
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_bindir}
 
-install mame mess $RPM_BUILD_ROOT%{_bindir}
+%ifarch %{x8664}
+install mame64 $RPM_BUILD_ROOT%{_bindir}/mame
+%else
+install mame $RPM_BUILD_ROOT%{_bindir}/mame
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -111,4 +115,3 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README.md docs/{SDL,config,floppy,hlsl,imgtool,m6502,mamelicense,newvideo,nscsi}.txt docs/luaengine.md
 %attr(755,root,root) %{_bindir}/mame
-%attr(755,root,root) %{_bindir}/mess
diff --git a/mame-c++11.patch b/mame-c++11.patch
new file mode 100644
index 0000000..b927129
--- /dev/null
+++ b/mame-c++11.patch
@@ -0,0 +1,10 @@
+--- mame-0.167s/scripts/genie.lua.orig	2015-10-28 09:47:14.000000000 +0100
++++ mame-0.167s/scripts/genie.lua	2015-11-25 21:54:31.968230955 +0100
+@@ -1041,7 +1041,6 @@
+ 				buildoptions {
+ --					"-D__USE_MINGW_ANSI_STDIO=1", -- required or lua won't compile linux ignores this but Windows needs it
+ 					"-freport-bug",
+-					"-D_GLIBCXX_USE_CXX11_ABI=0", -- does not seem to matter in linux, mingw needs to link printf,etc
+ --					"-DNO_MEM_TRACKING",          -- must comment out for mingw GCC 5.2 pedantic or get new/delete redef error
+ -- next two should work, but compiler complains about end conditions that are int when loop variable is unsigned. maybe these can be fixed
+ --					"-funsafe-loop-optimizations",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mame.git/commitdiff/c4887c662585dbd249ef6289b7fe2dbc798b05ef



More information about the pld-cvs-commit mailing list