mame: update to 0.177

This commit is contained in:
Juergen Buchmueller 2016-08-31 09:57:45 +02:00
parent 83f49d70ff
commit 631d1ca797
4 changed files with 100 additions and 3 deletions

View File

@ -0,0 +1,17 @@
With some patches removing c++14 stuff, our gcc-4.9.4 can still
be used to compile MAME. It's about time we get gcc-5.4.0 ready
for Void Linux.
--- scripts/genie.lua 2016-08-31 03:47:01.000000000 +0200
+++ scripts/genie.lua 2016-08-31 07:53:29.475819768 +0200
@@ -970,8 +970,8 @@
}
end
else
- if (version < 50000) then
- print("GCC version 5.0 or later needed")
+ if (version < 40900) then
+ print("GCC version 4.9 or later needed")
os.exit(-1)
end
buildoptions {

View File

@ -0,0 +1,66 @@
The template swap() implementation does not compile with gcc-4.9.4,
but fortunately it is not yet used anywhere in the code, thus just
rip it out.
--- src/lib/util/vecstream.h 2016-08-31 03:47:01.000000000 +0200
+++ src/lib/util/vecstream.h 2016-08-31 08:46:11.374477157 +0200
@@ -107,15 +107,6 @@
setup();
}
- void swap(basic_vectorbuf &that)
- {
- using std::swap;
- std::basic_streambuf<CharT, Traits>::swap(that);
- swap(m_mode, that.m_mode);
- swap(m_storage, that.m_storage);
- swap(m_threshold, that.m_threshold);
- }
-
void reserve(typename vector_type::size_type size)
{
if ((m_mode & std::ios_base::out) && (m_storage.capacity() < size))
@@ -327,8 +318,6 @@
void vec(const vector_type &content) { rdbuf()->vec(content); }
void vec(vector_type &&content) { rdbuf()->vec(std::move(content)); }
- void swap(basic_ivectorstream &that) { std::basic_istream<CharT, Traits>::swap(that); rdbuf()->swap(*that.rdbuf()); }
-
private:
basic_vectorbuf<CharT, Traits, Allocator> m_rdbuf;
};
@@ -350,8 +339,6 @@
void vec(vector_type &&content) { rdbuf()->vec(std::move(content)); }
basic_ovectorstream &reserve(typename vector_type::size_type size) { rdbuf()->reserve(size); return *this; }
- void swap(basic_ovectorstream &that) { std::basic_ostream<CharT, Traits>::swap(that); rdbuf()->swap(*that.rdbuf()); }
-
private:
basic_vectorbuf<CharT, Traits, Allocator> m_rdbuf;
};
@@ -373,8 +360,6 @@
void vec(vector_type &&content) { rdbuf()->vec(std::move(content)); }
basic_vectorstream &reserve(typename vector_type::size_type size) { rdbuf()->reserve(size); return *this; }
- void swap(basic_vectorstream &that) { std::basic_iostream<CharT, Traits>::swap(that); rdbuf()->swap(*that.rdbuf()); }
-
private:
basic_vectorbuf<CharT, Traits, Allocator> m_rdbuf;
};
@@ -386,16 +371,6 @@
typedef basic_vectorstream<char> vectorstream;
typedef basic_vectorstream<wchar_t> wvectorstream;
-template <typename CharT, typename Traits, typename Allocator>
-void swap(basic_vectorbuf<CharT, Traits, Allocator> &a, basic_vectorbuf<CharT, Traits, Allocator> &b) { a.swap(b); }
-
-template <typename CharT, typename Traits, typename Allocator>
-void swap(basic_ivectorstream<CharT, Traits, Allocator> &a, basic_ivectorstream<CharT, Traits, Allocator> &b) { a.swap(b); }
-template <typename CharT, typename Traits, typename Allocator>
-void swap(basic_ovectorstream<CharT, Traits, Allocator> &a, basic_ovectorstream<CharT, Traits, Allocator> &b) { a.swap(b); }
-template <typename CharT, typename Traits, typename Allocator>
-void swap(basic_vectorstream<CharT, Traits, Allocator> &a, basic_vectorstream<CharT, Traits, Allocator> &b) { a.swap(b); }
-
extern template class basic_ivectorstream<char>;
extern template class basic_ivectorstream<wchar_t>;
extern template class basic_ovectorstream<char>;

View File

@ -0,0 +1,14 @@
With gcc-4.9.4 libstdc++ std::min() is not a constexpr as required
by c++14 conforming compilers. Replace std::min with a conditional.
--- src/devices/video/poly.h 2016-08-31 03:47:01.000000000 +0200
+++ src/devices/video/poly.h 2016-08-31 07:56:47.483694756 +0200
@@ -224,7 +224,7 @@
// internal array types
typedef poly_array<polygon_info, _MaxPolys> polygon_array;
typedef poly_array<_ObjectData, _MaxPolys + 1> objectdata_array;
- typedef poly_array<work_unit, std::min(_MaxPolys * UNITS_PER_POLY, 65535)> unit_array;
+ typedef poly_array<work_unit, (_MaxPolys * UNITS_PER_POLY < 65535 ? _MaxPolys * UNITS_PER_POLY : 65535)> unit_array;
// round in a cross-platform consistent manner
inline INT32 round_coordinate(_BaseType value)

View File

@ -1,6 +1,6 @@
# Template file for 'mame'
pkgname=mame
version=0176
version=0177
revision=1
wrksrc="mame-mame${version}"
homepage="http://mamedev.org"
@ -8,7 +8,7 @@ distfiles="https://github.com/mamedev/mame/archive/mame${version}.tar.gz"
short_desc="The Multiple Arcade Machine Emulator"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2"
checksum=e8837ae9c21ac6ca289c0214747a6d7ff7cc4683b9426377f42cda318fddcb25
checksum=4c4a0d8cd00dac82773ed883394254916a8160e81715b593c61e0812f5b44ddd
hostmakedepends="perl pkg-config python automoc4"
makedepends="libstdc++-devel SDL2_ttf-devel $(vopt_if qt qt5-devel) lua-devel
@ -21,7 +21,7 @@ case "$XBPS_TARGET_MACHINE" in
i686*) nodebug=yes
esac
CXXFLAGS="-DUSE_INTERNAL_CBEGIN_CEND=1 -I${XBPS_CROSS_BASE}/usr/include/lua5.3"
CXXFLAGS="-std=c++14 -DUSE_INTERNAL_CBEGIN_CEND=1 -I${XBPS_CROSS_BASE}/usr/include/lua5.3"
LDFLAGS="-Wl,-fuse-ld=gold"
build_options="qt"