From: Jakub Bogusz Date: Fri, 27 Nov 2015 15:18:50 +0000 (+0100) Subject: - added c++11 patch (don't disable C++11 ABI to allow using system C++ libraries) X-Git-Tag: auto/th/mame-0.167s-1~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fmame.git;a=commitdiff_plain;h=c4887c6 - 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) --- 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", 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