summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2017-02-12 20:33:27 -0500
committerNathan Angelacos <nangel@alpinelinux.org>2017-02-12 20:33:27 -0500
commit734046a73f2efb4f0ff7496c1ac5228bb5842fcc (patch)
treefa83c983eeed1e9e8d9143b63858f11f295a7fe4
parent77d4129e7ebd1601acd14e591dece57c48c4102c (diff)
downloadaports-734046a73f2efb4f0ff7496c1ac5228bb5842fcc.tar.bz2
aports-734046a73f2efb4f0ff7496c1ac5228bb5842fcc.tar.xz
sdlmame - does not compile
-rw-r--r--sdlmame/0001-gcc-4-6.patch11
-rw-r--r--sdlmame/0002-glibc-musl-fixes.patch52
-rw-r--r--sdlmame/0003-redefine-page-size.patch26
-rw-r--r--sdlmame/0004-poll-not-sys-poll.patch11
-rw-r--r--sdlmame/APKBUILD69
-rw-r--r--sdlmame/compiler-errors42
6 files changed, 211 insertions, 0 deletions
diff --git a/sdlmame/0001-gcc-4-6.patch b/sdlmame/0001-gcc-4-6.patch
new file mode 100644
index 0000000..7f8753c
--- /dev/null
+++ b/sdlmame/0001-gcc-4-6.patch
@@ -0,0 +1,11 @@
+--- a/3rdparty/bgfx/src/bgfx.cpp
++++ b/3rdparty/bgfx/src/bgfx.cpp
+@@ -3,6 +3,8 @@
+ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ */
+
++#include <cstddef>
++
+ #include <bx/platform.h>
+ #if BX_PLATFORM_WINDOWS
+ // BK - Remotery needs WinSock, but on VS2015/Win10 build
diff --git a/sdlmame/0002-glibc-musl-fixes.patch b/sdlmame/0002-glibc-musl-fixes.patch
new file mode 100644
index 0000000..03ffde3
--- /dev/null
+++ b/sdlmame/0002-glibc-musl-fixes.patch
@@ -0,0 +1,52 @@
+--- a/3rdparty/asio/include/asio/detail/config.hpp
++++ b/3rdparty/asio/include/asio/detail/config.hpp
+@@ -877,9 +877,7 @@
+ # endif // !defined(ASIO_HAS_EVENTFD)
+ # if !defined(ASIO_HAS_TIMERFD)
+ # if defined(ASIO_HAS_EPOLL)
+-# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
+ # define ASIO_HAS_TIMERFD 1
+-# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
+ # endif // defined(ASIO_HAS_EPOLL)
+ # endif // !defined(ASIO_HAS_TIMERFD)
+ #endif // defined(__linux__)
+--- a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
++++ b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
+@@ -23,11 +23,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+-# include <asm/unistd.h>
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+-# include <sys/eventfd.h>
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#include <sys/eventfd.h>
+ #include "asio/detail/cstdint.hpp"
+ #include "asio/detail/eventfd_select_interrupter.hpp"
+ #include "asio/detail/throw_error.hpp"
+@@ -45,15 +41,7 @@
+
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+- write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+- if (read_descriptor_ != -1)
+- {
+- ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+- }
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+-# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
++#if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ write_descriptor_ = read_descriptor_ =
+ ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+ # else // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+@@ -69,7 +57,6 @@
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+ }
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+
+ if (read_descriptor_ == -1)
+ {
diff --git a/sdlmame/0003-redefine-page-size.patch b/sdlmame/0003-redefine-page-size.patch
new file mode 100644
index 0000000..a7b2c26
--- /dev/null
+++ b/sdlmame/0003-redefine-page-size.patch
@@ -0,0 +1,26 @@
+--- a/src/mame/drivers/cmi.cpp
++++ b/src/mame/drivers/cmi.cpp
+@@ -128,7 +128,10 @@
+
+ #define NUM_Q256_CARDS 1 // Max of 2
+ #define NUM_CHANNEL_CARDS 8
+-
++// Page size is defined in limits.h
++#ifdef PAGE_SIZE
++#undef PAGE_SIZE
++#endif
+ #define PAGE_SIZE 2048
+ #define PAGE_COUNT (65536 / PAGE_SIZE)
+ #define PAGE_MASK (PAGE_SIZE - 1)
+--- a/src/mame/drivers/sun4.cpp
++++ b/src/mame/drivers/sun4.cpp
+@@ -456,6 +456,9 @@
+ #define PM_ACCESSED (0x02000000) // accessed flag
+ #define PM_MODIFIED (0x01000000) // modified flag
+
++#ifdef PAGE_SIZE
++#undef PAGE_SIZE
++#endif
+ #define PAGE_SIZE (0x00000400)
+
+ // DMA controller constants
diff --git a/sdlmame/0004-poll-not-sys-poll.patch b/sdlmame/0004-poll-not-sys-poll.patch
new file mode 100644
index 0000000..c6ad524
--- /dev/null
+++ b/sdlmame/0004-poll-not-sys-poll.patch
@@ -0,0 +1,11 @@
+--- a/3rdparty/asio/include/asio/detail/socket_types.hpp
++++ b/3rdparty/asio/include/asio/detail/socket_types.hpp
+@@ -58,7 +58,7 @@
+ #else
+ # include <sys/ioctl.h>
+ # if !defined(__SYMBIAN32__)
+-# include <sys/poll.h>
++# include <poll.h>
+ # endif
+ # include <sys/types.h>
+ # include <sys/stat.h>
diff --git a/sdlmame/APKBUILD b/sdlmame/APKBUILD
new file mode 100644
index 0000000..fded27d
--- /dev/null
+++ b/sdlmame/APKBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
+pkgname=sdlmame
+_pkgmaj=0
+_pkgmin=182
+pkgver=${_pkgmaj}.${_pkgmin}
+_pkgver=${_pkgmaj}${_pkgmin}
+pkgrel=0
+pkgdesc="Vintage computer emulator with SDL and OpenGL support"
+arch=all
+url="http://mamedev.org/"
+license="GPL2"
+depends=""
+makedepends="alsa-lib libxinerama qt5-qtbase-dev sdl2-dev sdl2_ttf-dev glu mesa-dev nasm python2 unzip"
+install=
+#subpackages="$pkgname-dev"
+
+source="https://github.com/mamedev/mame/releases/download/mame${_pkgver}/mame${_pkgver}s.zip
+ 0001-gcc-4-6.patch
+ 0002-glibc-musl-fixes.patch
+ 0003-redefine-page-size.patch
+ 0004-poll-not-sys-poll.patch
+ "
+
+echo $source
+builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+
+ mkdir "$srcdir"/$pkgname-$pkgver
+ cd srcdir
+ unzip mame${_pkgvier}s.zip
+ cd $pkgname-$pkgver
+ unzip ../mame.zip
+ cd "$builddir"
+
+ pwd
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$builddir"
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="${pkgdir}" install || return 1
+}
+
+
+md5sums="96c3abd929782ad9636dfdc812f50eae mame0182s.zip
+0d11de5fe176b7e4e028a43f55b701d8 0001-gcc-4-6.patch
+4bbdeea9c8ddc1f167abc9aa4882aa82 0002-glibc-musl-fixes.patch
+1d47c47d579ac244523032ef6aaa44c6 0003-redefine-page-size.patch
+7bda809c8b098f702993fdbfebda2155 0004-poll-not-sys-poll.patch"
+sha256sums="e36785793129ece4058a19d2946de619b36cd73447fee3cc9b2be5a09fd6efdb mame0182s.zip
+4fe4f91ff62c9e3d6ec43fafeedc696e7d10188ca6d4a6ab863540ba852e8173 0001-gcc-4-6.patch
+e59f3e2448c76176e8d33d4936188550ce26c9521a7daaea8bd3d1e9204bf170 0002-glibc-musl-fixes.patch
+4a6711992549c1bf0b273d6a4166f738f96661447b791f7303c25a5aad4b975f 0003-redefine-page-size.patch
+d5b60e2abb94d839681210c7a210347e1fc67255eb7232e919eed1150cb6be7b 0004-poll-not-sys-poll.patch"
+sha512sums="9e29c9775d6275e46c2c215267f447c6a9e0ab6e3400a12b31ca515f7ff4863feeaaf406e2ace9bc978a0d248dca9212c970b99fa0d441b616925d900425b1e4 mame0182s.zip
+ad2f62d35947c8aadfacd7b6239cbb9f4d5e9c106de5499331afd61db136d04156e6775fa72a3323357fb999ac4b014ea9f03050bde4e93bf8e3ca291bf8f8e2 0001-gcc-4-6.patch
+42de1b632b0d2f10d80bb8d3c9780295cd9e65ee7bfe147522c5515c28859ece9b7a5e672d20941845d6a4556a0faebb8af837b4a87cdb6c016dba2cb3036079 0002-glibc-musl-fixes.patch
+aeee3f987b4a67e650618cab484d922b3092a09ae066dc5d97afe18168a992db717c220980c9045bb09867bbe22c8d1a10aabcff1d26b8585e8bd0f1b307625d 0003-redefine-page-size.patch
+e089903ddc03853e2696d3726ccc78e5ff477fdb0e40d3e23983950d39f82c08c7759b2e8a256fb0d36e2bb0e90aa98b46daa63f5380260e4c12b30f7d79a9d8 0004-poll-not-sys-poll.patch"
diff --git a/sdlmame/compiler-errors b/sdlmame/compiler-errors
new file mode 100644
index 0000000..3d96867
--- /dev/null
+++ b/sdlmame/compiler-errors
@@ -0,0 +1,42 @@
+]0;abuild: sdlmame>>> sdlmame: Checking sanity of /home/nangel/repos/na-aports/sdlmame/APKBUILD...
+>>> sdlmame: Analyzing dependencies...
+>>> sdlmame: Installing for build: build-base alsa-lib libxinerama qt5-qtbase-dev sdl2-dev sdl2_ttf-dev glu mesa-dev nasm python2 unzip
+>>> sdlmame: Cleaning temporary build dirs...
+>>> sdlmame: Checking sha512sums...
+>>> sdlmame: Unpacking /var/cache/distfiles/mame0182s.zip...
+/usr/bin/abuild: cd: line 1: can't cd to srcdir
+unzip: cannot find or open mames.zip, mames.zip.zip or mames.zip.ZIP.
+3rdparty/pugixml/tests/data/????.xml: mismatching "local" filename (3rdparty/pugixml/tests/data/????????.xml),
+ continuing with "central" filename version
+>>> sdlmame: 0001-gcc-4-6.patch
+>>> sdlmame: 0002-glibc-musl-fixes.patch
+>>> sdlmame: 0003-redefine-page-size.patch
+>>> sdlmame: 0004-poll-not-sys-poll.patch
+../../../../../src/lib/netlist/plib/pexception.cpp: In constructor 'plib::fpsignalenabler::fpsignalenabler(unsigned int)':
+../../../../../src/lib/netlist/plib/pexception.cpp:111:36: error: 'feenableexcept' was not declared in this scope
+ m_last_enabled = feenableexcept(b);
+ ^
+../../../../../src/lib/netlist/plib/pexception.cpp: In destructor 'plib::fpsignalenabler::~fpsignalenabler()':
+../../../../../src/lib/netlist/plib/pexception.cpp:124:32: error: 'fedisableexcept' was not declared in this scope
+ fedisableexcept(FE_ALL_EXCEPT); // Enable all floating point exceptions but FE_INEXACT
+ ^
+../../../../../src/lib/netlist/plib/pexception.cpp:125:32: error: 'feenableexcept' was not declared in this scope
+ feenableexcept(m_last_enabled); // Enable all floating point exceptions but FE_INEXACT
+ ^
+make[2]: *** [netlist.make:1000: ../../../../linux_gcc/obj/x64/Release/src/lib/netlist/plib/pexception.o] Error 1
+make[2]: *** Waiting for unfinished jobs....
+make[1]: *** [Makefile:28: netlist] Error 2
+make[1]: *** Waiting for unfinished jobs....
+../../../../../src/devices/cpu/hd61700/hd61700.cpp: In member function 'virtual void hd61700_cpu_device::execute_run()':
+../../../../../src/devices/cpu/hd61700/hd61700.cpp:332:6: internal compiler error: Segmentation fault
+ void hd61700_cpu_device::execute_run()
+ ^~~~~~~~~~~~~~~~~~
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <http://gcc.gnu.org/bugs.html> for instructions.
+make[2]: *** [optional.make:14408: ../../../../linux_gcc/obj/x64/Release/src/devices/cpu/hd61700/hd61700.o] Error 1
+make[2]: *** Waiting for unfinished jobs....
+make[1]: *** [Makefile:85: optional] Error 2
+make: *** [makefile:1238: linux_x64] Error 2
+>>> ERROR: sdlmame: all failed
+]0;>>> sdlmame: Uninstalling dependencies...