mame: fix ppc64 builds, fix ELF in /usr/share

[ci skip]
This commit is contained in:
q66 2018-12-20 18:16:33 +01:00 committed by Helmut Pozimski
parent ab58df2966
commit 718cf88e8d
4 changed files with 42 additions and 7 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
exec_mame() { exec_mame() {
/usr/share/mame/mame \ /usr/libexec/mame/mame \
-artpath "$HOME/.mame/artwork;artwork" \ -artpath "$HOME/.mame/artwork;artwork" \
-ctrlrpath "$HOME/.mame/ctrlr;ctrlr" \ -ctrlrpath "$HOME/.mame/ctrlr;ctrlr" \
-inipath $HOME/.mame/ini \ -inipath $HOME/.mame/ini \
@ -41,5 +41,5 @@ elif [ ! -e $HOME/.mame ]; then
cd $HOME/.mame && exec_mame cd $HOME/.mame && exec_mame
else else
cd /usr/share/mame cd /usr/share/mame
./mame "$@" /usr/libexec/mame/mame "$@"
fi fi

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
exec_mess() { exec_mess() {
/usr/share/mame/mess \ /usr/libexec/mame/mess \
-artpath "$HOME/.mess/artwork;artwork" \ -artpath "$HOME/.mess/artwork;artwork" \
-ctrlrpath "$HOME/.mess/ctrlr;ctrlr" \ -ctrlrpath "$HOME/.mess/ctrlr;ctrlr" \
-inipath $HOME/.mess/ini \ -inipath $HOME/.mess/ini \
@ -41,5 +41,5 @@ elif [ ! -e $HOME/.mess ]; then
cd $HOME/.mess && exec_mess cd $HOME/.mess && exec_mess
else else
cd /usr/share/mame cd /usr/share/mame
./mame "$@" /usr/libexec/mame/mess "$@"
fi fi

View File

@ -0,0 +1,35 @@
--- 3rdparty/bx/include/bx/platform.h
+++ 3rdparty/bx/include/bx/platform.h
@@ -133,8 +133,14 @@
#endif //
#if BX_CPU_PPC
-# undef BX_CPU_ENDIAN_BIG
-# define BX_CPU_ENDIAN_BIG 1
+// _LITTLE_ENDIAN exists on ppc64le.
+# if _LITTLE_ENDIAN
+# undef BX_CPU_ENDIAN_LITTLE
+# define BX_CPU_ENDIAN_LITTLE 1
+# else
+# undef BX_CPU_ENDIAN_BIG
+# define BX_CPU_ENDIAN_BIG 1
+# endif
#else
# undef BX_CPU_ENDIAN_LITTLE
# define BX_CPU_ENDIAN_LITTLE 1
--- makefile
+++ makefile
@@ -394,6 +394,12 @@ BIGENDIAN := 1
endif
endif # BIGENDIAN
+# Work around an issue with long doubles on ppc64 (#3157)
+ifneq (,$(findstring ppc64,$(UNAME)))
+ARCHOPTS_C += -mlong-double-64
+ARCHOPTS_CXX += -mlong-double-64
+endif
+
ifndef PYTHON_EXECUTABLE
PYTHON := python
else

View File

@ -52,7 +52,7 @@ do_build() {
i686*) # Overcome linker memory exhaustion i686*) # Overcome linker memory exhaustion
opts+=" SYMBOLS=0" opts+=" SYMBOLS=0"
;; ;;
x86_64*|aarch64*) x86_64*|aarch64*|ppc64*)
opts+=" PTR64=1" opts+=" PTR64=1"
;; ;;
esac esac
@ -78,13 +78,13 @@ do_install() {
# Install the main application(s) # Install the main application(s)
for f in mame mame64 mamearcade mamearcade64; do for f in mame mame64 mamearcade mamearcade64; do
if [ -r ${f} ]; then if [ -r ${f} ]; then
vinstall ${f} 755 usr/share/${pkgname} mame vinstall ${f} 755 usr/libexec/${pkgname} mame
break break
fi fi
done done
for f in mess mess64; do for f in mess mess64; do
if [ -r ${f} ]; then if [ -r ${f} ]; then
vinstall ${f} 755 usr/share/${pkgname} mess vinstall ${f} 755 usr/libexec/${pkgname} mess
break break
fi fi
done done