]> git.pld-linux.org Git - packages/mame.git/commitdiff
- added c++11 patch (don't disable C++11 ABI to allow using system C++ libraries)
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Nov 2015 15:18:50 +0000 (16:18 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Nov 2015 15:18:50 +0000 (16:18 +0100)
- build just mame binary (now it combines arcade and mess subtargets)

mame-c++11.patch [new file with mode: 0644]
mame.spec

diff --git a/mame-c++11.patch b/mame-c++11.patch
new file mode 100644 (file)
index 0000000..b927129
--- /dev/null
@@ -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 {\r
+ --                                    "-D__USE_MINGW_ANSI_STDIO=1", -- required or lua won't compile linux ignores this but Windows needs it\r
+                                       "-freport-bug",\r
+-                                      "-D_GLIBCXX_USE_CXX11_ABI=0", -- does not seem to matter in linux, mingw needs to link printf,etc\r
+ --                                    "-DNO_MEM_TRACKING",          -- must comment out for mingw GCC 5.2 pedantic or get new/delete redef error\r
+ -- next two should work, but compiler complains about end conditions that are int when loop variable is unsigned. maybe these can be fixed\r
+ --                                    "-funsafe-loop-optimizations",\r
index fb456beb743f6fe5e777a7e6ea4ba55fc4e3a8cc..16735d8c805b870946cd920332c73fb599d1be26 100644 (file)
--- 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
This page took 0.169686 seconds and 4 git commands to generate.