summaryrefslogtreecommitdiffstats
path: root/sdlmame
diff options
context:
space:
mode:
Diffstat (limited to 'sdlmame')
-rw-r--r--sdlmame/0002-glibc-musl-fixes.patch27
-rw-r--r--sdlmame/APKBUILD100
-rw-r--r--sdlmame/compiler-errors42
3 files changed, 97 insertions, 72 deletions
diff --git a/sdlmame/0002-glibc-musl-fixes.patch b/sdlmame/0002-glibc-musl-fixes.patch
index 03ffde3..c363cdb 100644
--- a/sdlmame/0002-glibc-musl-fixes.patch
+++ b/sdlmame/0002-glibc-musl-fixes.patch
@@ -1,6 +1,8 @@
+diff --git a/3rdparty/asio/include/asio/detail/config.hpp b/3rdparty/asio/include/asio/detail/config.hpp
+index 7bd6a94..f683226 100644
--- a/3rdparty/asio/include/asio/detail/config.hpp
+++ b/3rdparty/asio/include/asio/detail/config.hpp
-@@ -877,9 +877,7 @@
+@@ -877,9 +877,7 @@
# endif // !defined(ASIO_HAS_EVENTFD)
# if !defined(ASIO_HAS_TIMERFD)
# if defined(ASIO_HAS_EPOLL)
@@ -10,6 +12,8 @@
# endif // defined(ASIO_HAS_EPOLL)
# endif // !defined(ASIO_HAS_TIMERFD)
#endif // defined(__linux__)
+diff --git a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
+index 152bffd..005d45a 100644
--- 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 @@
@@ -25,7 +29,7 @@
#include "asio/detail/cstdint.hpp"
#include "asio/detail/eventfd_select_interrupter.hpp"
#include "asio/detail/throw_error.hpp"
-@@ -45,15 +41,7 @@
+@@ -45,15 +41,7 @@ eventfd_select_interrupter::eventfd_select_interrupter()
void eventfd_select_interrupter::open_descriptors()
{
@@ -42,7 +46,7 @@
write_descriptor_ = read_descriptor_ =
::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
# else // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
-@@ -69,7 +57,6 @@
+@@ -69,7 +57,6 @@ void eventfd_select_interrupter::open_descriptors()
::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
}
}
@@ -50,3 +54,20 @@
if (read_descriptor_ == -1)
{
+diff --git a/src/lib/netlist/plib/pexception.cpp b/src/lib/netlist/plib/pexception.cpp
+index 282acfe..585cc7a 100644
+--- a/src/lib/netlist/plib/pexception.cpp
++++ b/src/lib/netlist/plib/pexception.cpp
+@@ -10,11 +10,8 @@
+ #include "pexception.h"
+ #include "pfmtlog.h"
+
+-#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__)
+-#define HAS_FEENABLE_EXCEPT (1)
+-#else
++// musl does not have gnuisms
+ #define HAS_FEENABLE_EXCEPT (0)
+-#endif
+
+ namespace plib {
+ //============================================================
diff --git a/sdlmame/APKBUILD b/sdlmame/APKBUILD
index fded27d..3b23b98 100644
--- a/sdlmame/APKBUILD
+++ b/sdlmame/APKBUILD
@@ -1,18 +1,18 @@
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=sdlmame
_pkgmaj=0
-_pkgmin=182
+_pkgmin=183
pkgver=${_pkgmaj}.${_pkgmin}
_pkgver=${_pkgmaj}${_pkgmin}
pkgrel=0
-pkgdesc="Vintage computer emulator with SDL and OpenGL support"
+pkgdesc="Vintage computer emulator with SDL 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"
+#depends=""
+makedepends="alsa-lib libxinerama-dev qt5-qtbase-dev sdl2-dev sdl2_ttf-dev glu mesa-dev nasm python2 unzip"
install=
-#subpackages="$pkgname-dev"
+subpackages="$pkgname-doc"
source="https://github.com/mamedev/mame/releases/download/mame${_pkgver}/mame${_pkgver}s.zip
0001-gcc-4-6.patch
@@ -21,49 +21,95 @@ source="https://github.com/mamedev/mame/releases/download/mame${_pkgver}/mame${_
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
+ unzip ../mame.zip
+
for i in $source; do
case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;
esac
done
}
build() {
cd "$builddir"
- make || return 1
+ make \
+ NOWERROR=1 \
+ OPTIMIZE=2 \
+ TOOLS=1 \
+ ARCHOPTS=-flifetime-dse=1 \
+ || return 1
+}
+
+check() {
+ # dummy test framework
+ return 0
}
package() {
+
+ # Taken from archlinux's aur
+
cd "$builddir"
- make DESTDIR="${pkgdir}" install || return 1
+
+ install -Dm755 mame "$pkgdir"/usr/lib/${pkgname}/${pkgname} || \
+ install -Dm755 mame64 "$pkgdir"/usr/lib/${pkgname}/${pkgname}
+
+ install -m755 chdman "$pkgdir"/usr/lib/${pkgname}/chdman
+ install -m755 jedutil "$pkgdir"/usr/lib/${pkgname}/jedutil
+ install -m755 regrep "$pkgdir"/usr/lib/${pkgname}/regrep
+ install -m755 romcmp "$pkgdir"/usr/lib/${pkgname}/romcmp
+ # install -m755 testkeys "$pkgdir"/usr/lib/${pkgname}/testkeys
+ install -m755 src2html "$pkgdir"/usr/lib/${pkgname}/src2html
+ install -m755 srcclean "$pkgdir"/usr/lib/${pkgname}/srcclean
+ install -m755 ldverify "$pkgdir"/usr/lib/${pkgname}/ldverify
+ install -m755 ldresample "$pkgdir"/usr/lib/${pkgname}/ldresample
+
+ install -dm755 "$pkgdir"/usr/share/${pkgname}
+ for i in $pkgname chdman jedutil regrep romcmp testkeys src2html srcclean ldverify ldresample; do
+ ln -s /usr/lib/$pkgname/$i "$pkgdir"/usr/share/$pkgname/$i
+ done
+
+ # Install the extra bits
+ install -d "$pkgdir"/usr/share/${pkgname}/{artwork,ctrlr,hash,keymaps,shader}
+ install -d "$pkgdir"/usr/share/man/man1
+ install -d "$pkgdir"/usr/share/man/man6
+ install -m644 src/osd/modules/opengl/shader/glsl*.*h "$pkgdir"/usr/share/${pkgname}/shader/
+ # install -m644 src/osd/sdl/man/*.1* "$pkgdir"/usr/share/man/man1/
+ # install -m644 src/osd/sdl/man/*.6* "$pkgdir"/usr/share/man/man6/
+
+ cp -a "$srcdir"/artwork/* "$pkgdir"/usr/share/${pkgname}/artwork/
+ install -m644 "$srcdir"/ctrlr/* "$pkgdir"/usr/share/${pkgname}/ctrlr/
+ install -m644 keymaps/* "$pkgdir"/usr/share/${pkgname}/keymaps/
+ install -m644 hash/* "$pkgdir"/usr/share/${pkgname}/hash/
+ cp -a bgfx "$pkgdir"/usr/share/${pkgname}/bgfx
+ cp -a plugins "$pkgdir"/usr/share/${pkgname}/plugins
+ cp -a language "$pkgdir"/usr/share/${pkgname}/language
+
+ # Include the license
+ install -Dm644 docs/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
+
+ # FS#28203
+ sed -i 's|KEYCODE_2_PAD|KEYCODE_2PAD|' "$pkgdir"/usr/share/sdlmame/ctrlr/*.cfg
+ sed -i 's|KEYCODE_4_PAD|KEYCODE_4PAD|' "$pkgdir"/usr/share/sdlmame/ctrlr/*.cfg
+ sed -i 's|KEYCODE_6_PAD|KEYCODE_6PAD|' "$pkgdir"/usr/share/sdlmame/ctrlr/*.cfg
+ sed -i 's|KEYCODE_8_PAD|KEYCODE_8PAD|' "$pkgdir"/usr/share/sdlmame/ctrlr/*.cfg
+
+ find "$pkgdir" -type f -exec strip {} \;
+
+ # documentation
+ install -dm0755 "$pkgdir"/usr/share/doc
+ cp -a docs "$pkgdir"/usr/share/doc/$pkgname
}
-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
+sha512sums="4ef43af2f887bc68372e7146ffc3ba0db476994651270ab841b5df823c7345be645c4e6e5a08184c70815abdbe6581c291d624bb51402cc8f4579247cfdf1daf mame0183s.zip
ad2f62d35947c8aadfacd7b6239cbb9f4d5e9c106de5499331afd61db136d04156e6775fa72a3323357fb999ac4b014ea9f03050bde4e93bf8e3ca291bf8f8e2 0001-gcc-4-6.patch
-42de1b632b0d2f10d80bb8d3c9780295cd9e65ee7bfe147522c5515c28859ece9b7a5e672d20941845d6a4556a0faebb8af837b4a87cdb6c016dba2cb3036079 0002-glibc-musl-fixes.patch
+49513b40951d7213275265ef3e00356413d0a8ef6b210efbc13aab13feb999adb731bc49e6c249a60adeaa6ab261a3f0aabb208e903352e6541b2dcdeed37c32 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
deleted file mode 100644
index 3d96867..0000000
--- a/sdlmame/compiler-errors
+++ /dev/null
@@ -1,42 +0,0 @@
-]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...