diff options
Diffstat (limited to 'games/mame/mame.SlackBuild')
-rw-r--r-- | games/mame/mame.SlackBuild | 130 |
1 files changed, 43 insertions, 87 deletions
diff --git a/games/mame/mame.SlackBuild b/games/mame/mame.SlackBuild index 38ffff4b93..3a34db79df 100644 --- a/games/mame/mame.SlackBuild +++ b/games/mame/mame.SlackBuild @@ -9,91 +9,25 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20191208 bkw: Updated for v0.214, after long hiatus. This isn't +# actually the latest version, but it's the latest version that will +# compile with any of the compilers available in Slackware 14.2: +# gcc-5.5.0, llvm-3.8.0, llvm-8.0.1 (from /extra). It may still be +# possible to patch 0.216 to build, or possibly 0.217 will have a fix for +# llvm-8.0.1 (mame docs claim to support "clang version 5 and later"). +# Meanwhile this update is better than nothing. Special thanks for ponce +# and chriswilling for doing test builds on much faster machines than +# I currently have access to. Also, moved old comment log entries to +# ChangeLog.old as it was getting ridiculously long. + # 20181227 bkw: Updated for v0.205. # 20181130 bkw: Updated for v0.204, including compile fix for xavix.cpp. # 20181031 bkw: Updated for v0.203. # 20180928 bkw: Updated for v0.202. # 20180830 bkw: Updated for v0.201. -# 20180731 bkw: Updated for v0.200. -# 20180628 bkw: Updated for v0.199. -# 20180612 bkw: Updated for v0.198 (missed a few releases...) -# 20180130 bkw: Updated for v0.194. -# 20180101 bkw: Updated for v0.193. -# 20171210 bkw: Updated for v0.192. -# 20170927 bkw: Updated for v0.190. - -# 20170902 bkw: Updated for v0.189. -# - Fix complay.py build error. Turns out that the build would fail -# only on systems where PyXML is installed, so add -S to python -# command line so 'import xml.sax' imports the xml stuff that ships -# with core python, instead of the (outdated, deprecated) 3rd-party -# stuff from PyXML. -# - Stop installing useless junk in /usr/doc. -# - Install swlist docs. -# - Compacted log entries. - -# 20170726 bkw: Updated for v0.188. -# 20170702 bkw: Updated for v0.187. - -# 20170607 bkw: Updated for v0.186. -# - Link with ld.gold instead of the default ld, which saves *2 hours* of -# build time on my test box (build is 3x as fast as it was). - -# 20170428 bkw: Updated for v0.185. - -# 20170404 bkw: -# - mame.ini: get rid of $HOME in bgfx_path. Thanks to Doogster for -# reporting this. - -# 20170330 bkw: Updated for v0.184. - -# 20170301 bkw: -# - Use long-form github URL. -# - Fix changelog so newer entries are at the top. - -# 20170223 bkw: Updated for v0.183. -# 20170214 bkw: Add support for GroovyMAME patch. -# 20170128 bkw: Updated for v0.182. -# 20170111 bkw: Updated for v0.181. Missed a month again. -# 20161101 bkw: Updated for v0.179. - -# 20160928 bkw: -# - Updated for v0.178. Sorry, missed a month. -# - Install artwork/ and bgfx/ so the new bgfx shader stuff will work. -# - Set bgfx_path in mame.ini. The default is still 'video opengl' but -# now it's easy to enable bgfx, just by changing to 'video bgfx'. -# Thanks to Doogster for pointing this out. - -# 20160728 bkw: -# - Updated for v0.176. Upstream does a release on the last Wednesday -# of every month. I doubt I'm going to find time to update this -# script 12 times a year, but maybe... - -# 20160721 bkw: -# - Updated for v0.175 (again, after missing several releases) -# - Update ARCH stuff, i486 => i586 -# - Add missing mame.6 and mess.6 man pages (whoops!) -# - man pages now in docs/man/ instead of src/osd/sdl/ -# - Don't modify the *.1 man pages to put them in section 6 any more -# - Symlink mame -> mess in /usr/games (to keep old frontends working) -# - Disable QT debugger by default, as it now requires qt5 and I don't -# want qt5 as a hard dep for this... how many people who install mame -# are *really* going to debug the game ROM code? -# - Add QTDEBUG=yes option for people who really want the debugger, -# make slack-desc say whether or not it's enabled. -# - Upstream removed 'testkeys', stop trying to install it. - -# 20151112 bkw: -# - Updated for v0.167, after missing several releases (sorry!) -# - Get rid of MESS and UME options, mame has basically turned -# into UME at this point (includes old mame + mess in one binary) -# - Use shipped man pages from the source, instead of our own -# - Add new tools: castool floptool imgtool nlwav -# - Use icon extracted from mame.ico in the source -# - Update .ini file slightly (sound=sdl, not sound=1) PRGNAM=mame -VERSION=${VERSION:-0.205} +VERSION=${VERSION:-0.214} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -132,6 +66,20 @@ DIRNAME=$PRGNAM-$SHORTNAME set -e +# 20200108 bkw: before doing ANYTHING else, check to make sure +# our required deps are installed. This is helpful because if +# they are missing, the mame compile will still start and run +# for an hour or more before it errors out, wasting a lot of +# time (some of which was mine). +MISSING="" +for i in sdl2 SDL2_ttf; do + pkg-config --exists $i || MISSING="$MISSING $i" +done +if [ -n "$MISSING" ]; then + echo "*** Missing required dependencies:$MISSING" 1>&2 + exit 1 +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -144,13 +92,6 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -# 20181130 bkw: the new xavix code in 0.204 is missing this include. -# Add future versions to the first case, as needed. -case "$VERSION" in - 0.204) sed -i '1i#include <cmath>' src/mame/video/xavix.cpp ;; - *) ;; -esac - # OK, building modern mame is a bit of a PITA. It uses genie (written # in lua, a fork of premake), but you don't get to run genie directly, # you got a main makefile that builds lua, then builds genie, then runs @@ -188,7 +129,10 @@ case "$VERSION" in sed -i '1i#include <cmath>' \ src/devices/cpu/mips/ps2vif1.cpp \ src/devices/cpu/mips/mips3.cpp - ;; + ;; + 0.204) + sed -i '1i#include <cmath>' src/mame/video/xavix.cpp + ;; *) ;; esac @@ -238,10 +182,20 @@ if [ -e "$GROOVYDIFF" ]; then echo "GROOVYVER $GROOVYVER" fi +# Build option notes: # Having ARCH set in the env will break the build, hence ARCH="". + # Using ld.gold is *much* faster, and I see no disadvantage to it. +# The static libstdc++ and libgcc args allow building a version of mame +# that requires gcc9 (README_gcc9.txt), then running it on a system that +# doesn't have gcc9 installed. This does make the binary slightly larger, +# but it's already around 250MB so it's not going to matter much. + +# The point of the OVERRIDE_CC and friends is to make the build use $PATH +# to find gcc (so ccache will be found if it's using the symlink method). + make USE_QTDEBUG=$QTOPT \ USE_SYSTEM_LIB_EXPAT=1 \ USE_SYSTEM_LIB_ZLIB=1 \ @@ -249,9 +203,11 @@ make USE_QTDEBUG=$QTOPT \ USE_SYSTEM_LIB_FLAC=1 \ PYTHON_EXECUTABLE="/usr/bin/python -S" \ OPT_FLAGS="$SLKCFLAGS" \ - LDOPTS="-fuse-ld=gold" \ + LDOPTS="-fuse-ld=gold -static-libstdc++ -static-libgcc" \ OVERRIDE_CC="$( which gcc )" \ OVERRIDE_CXX="$( which g++ )" \ + CC="$( which gcc )" \ + CXX="$( which g++ )" \ ARCH="" \ VERBOSE=1 \ NOWERROR=1 \ |