<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a04967c1b508ce64bda082179b420eb8fbd94eb2">https://github.com/macports/macports-ports/commit/a04967c1b508ce64bda082179b420eb8fbd94eb2</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new a04967c1b50 mame: various fixes
</span>a04967c1b50 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit a04967c1b508ce64bda082179b420eb8fbd94eb2
</span>Author: Christopher Nielsen <62156882+mascguy@users.noreply.github.com>
AuthorDate: Sun Dec 20 12:23:45 2020 -0500
<span style='display:block; white-space:pre;color:#404040;'> mame: various fixes
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * mame: enhancements: add variant 'debug'; soft link tools in /bin; add tools man pages; improve link time; reduce warnings; eliminate superfluous files; remove variant 'python36', add comment explaining need for 'gmake'
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Authored-by: Masc Guy <mascguy@github.com>
</span>---
emulators/mame/Portfile | 552 ++++++++++++++++-----
...-patch-0226-scripts-genie-compile-warnings.diff | 13 +-
2 files changed, 450 insertions(+), 115 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/emulators/mame/Portfile b/emulators/mame/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 336b847b24e..027977dbdb5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/emulators/mame/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/emulators/mame/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3,13 +3,10 @@
</span> #------------------------------------------------------------------------------
# Portfile Style Notes
#
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# * For cases where local variables are created within phases, they are
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# explicitly unset when no longer being used. This is a conscious choice,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# and helps avoid any possible clashes elsewhere.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# * To aid readability, intermediate variables, lists, etc, are often
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# employed. While that makes the portfile longer, it also assists when
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# trying to understand what is being done... aiding in diagnosing and
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# debugging issues. Again, this is a conscious choice.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# * When local variables are created within phases, they are unset when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# finished. This prevents clashes elsewhere.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# * Intermediate variables, lists, etc, are often employed. While more
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# verbose, it aids readability.
</span> #------------------------------------------------------------------------------
PortSystem 1.0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,11 +15,12 @@ PortGroup github 1.0
</span> PortGroup compiler_blacklist_versions 1.0
github.setup mamedev mame 0226 mame
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span>
version [string index ${github.version} 0].[string range ${github.version} 1 end]
categories emulators
<span style='display:block; white-space:pre;background:#ffe0e0;'>-maintainers {@mascguy} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {@mascguy} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openmaintainer
</span> platforms darwin
license GPL-2+
homepage https://www.mamedev.org
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -40,19 +38,20 @@ github.tarball_from archive
</span> # Patches and Checksums
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Patch 'language-portuguese_brazil' is only applicable to release 0.226.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Fix was submitted, and merged, by Mame maintainers... and will be part of
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# official Mame releases from 0.227 onward. Net-Net, this particular patch can
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# be removed starting with 0.227. Tracked by Mame issue:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Patch 'language-portuguese_brazil' applies to release 0.226; fixes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# errors during translation build phase.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fix submitted, and merged, by Mame maintainers; will be part of Mame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# releases from 0.227 onward. Tracked by Mame issue:
</span> # https://github.com/mamedev/mame/issues/7510
#
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Patch 'src-posixfile-build-error' applies to release 0.226. It fixes a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# compilation error on older MacOS/Xcode releases, particularly 10.8.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Patch 'src-posixfile-build-error' applies to release 0.226; fixes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# compilation errors for MacOS 10.8 and Xcode 5.x.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fix submitted, and merged, by Mame maintainers; will be part of Mame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# releases from 0.227 onward. Tracked by Mame issue:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/mamedev/mame/issues/7536
</span> #
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Conversely, patch 'scripts-genie-compile-warnings' is not specific to any
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# particular Mame release. Indeed, it is technically not required at all.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# However, it eliminates spurious warnings due to use of deprecated types
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# and/or calls... and reduces pollution in the build log.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Patch 'scripts-genie-compile-warnings' applies to all releases; greatly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# reduces compilation warnings.
</span>
patchfiles mame-patch-0226-language-portuguese_brazil.diff \
mame-patch-0226-src-posixfile-build-error.diff \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -66,6 +65,15 @@ checksums rmd160 b9e4ae321b7673790d374c63bbe966d1502d6738 \
</span> # Port-Specific Globals
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Whether we're building a 64-bit binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_build_arch_64 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Whether to build the BGFX components
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_build_bgfx_enabled 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Prefix for Tools executables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_tools_prefix "mame-"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Python version info, populated by python* variants.
set g_mame_python_info_dict \
[dict create \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -87,6 +95,19 @@ set g_mame_build_args_docs_list \
</span> [list \
]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# BGFX build targets.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: Values populated in phase 'pre-build', as they differ based on variants.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_build_targets_bgfx_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# BGFX build args.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: Dynamic values populated in phase 'pre-build'.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_build_args_bgfx_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "--trace" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Main build targets.
# Note: Target 'all' must be run before 'translation', or latter will fail.
set g_mame_build_targets_main_list \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -95,12 +116,25 @@ set g_mame_build_targets_main_list \
</span> "translation" \
]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Distribution build targets.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_build_targets_dist_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "all" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Distribution build args.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: Dynamic values populated in phase 'pre-build'.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set g_mame_build_args_dist_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #------------------------------------------------------------------------------
# Dependencies
#------------------------------------------------------------------------------
depends_build-append \
port:asio \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:gmake \
</span> port:pkgconfig
depends_lib-append \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -125,10 +159,16 @@ depends_run-append \
</span> # Build Options
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#ffe0e0;'>-use_parallel_build yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: ARM64 support untested
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#supported_archs ppc ppc64 i386 x86_64 arm64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs ppc ppc64 i386 x86_64
</span>
use_configure no
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: GMake needed for newer features like '--trace', which are unavailable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# in Apple's older version.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.cmd ${prefix}/bin/gmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # https://github.com/mamedev/mame/issues/6004
compiler.blacklist {clang < 1000}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -144,7 +184,14 @@ compiler.cxx_standard 2014
</span> # Note: Compiler optimization level is controlled by makefile variable 'OPTIMIZE', below.
configure.cxxflags-delete -O1 -O2 -O3 -Os
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# TODO: Disable debugging, via 'DEBUG=0'?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: Linker flag '-no_deduplicate' is absolutely vital, ensuring that 'ld'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# finishes quickly. Without it, the final link time increases by a factor of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# 10x for a release build... and 50x for a debug build! (The latter can take
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# 50+ minutes without it.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.cxxflags-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -Xlinker -no_deduplicate \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -Wno-unused-command-line-argument
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> build.args-append ARCHOPTS="${configure.cxxflags}" \
CC="${configure.cc}" \
CXX="${configure.cxx}" \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -152,7 +199,10 @@ build.args-append ARCHOPTS="${configure.cxxflags}" \
</span> OVERRIDE_CXX="${configure.cxx}" \
CFLAGS="-isystem${prefix}/include" \
LDOPTS="-L${prefix}/lib" \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- LDOPTS="-lSDL2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PRECOMPILE=1 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TESTS=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BENCHMARKS=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DEBUG=0 \
</span> OPTIMIZE=2 \
NOWERROR=1 \
VERBOSE=1 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,35 +219,85 @@ build.args-append ARCHOPTS="${configure.cxxflags}" \
</span> USE_SYSTEM_LIB_UTF8PROC=1 \
USE_SYSTEM_LIB_ZLIB=1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Clear 'build.target', to avoid contaminating 'build.pre_args'.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# We cannot rely on default build logic, as multiple makefiles are involved.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# TODO: Ensure errors are grouped with their command invocation during make.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Requires jobserver coordination with non-make subprocesses; not done yet.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#build.pre_args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# "--output-sync=line"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.post_args
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[tbool configure.ccache]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.post_args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "CCACHE=ccache"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Ensure 'g_mame_build_arch_64' set early, as it's needed later
</span> if {$build_arch in [list arm64 x86_64 ppc64]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- build.args-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- PTR64=1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set executable mame64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set g_mame_build_arch_64 1
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- build.args-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- PTR64=0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set executable mame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set g_mame_build_arch_64 0
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Clear 'build.target', to avoid contaminating 'build.pre_args'.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Note that we cannot rely on default build logic, as multiple makefiles are involved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-build.target
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> #------------------------------------------------------------------------------
# Test Support
#
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Note: At the time of this writing (12/2020), Mame's test suite is quite
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# limited. And it does not require a build. But it's still worthwhile, to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# provide some basic sanity checks.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: As of release 0.226, Mame's test suite is quite limited. And it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# doesn't require a build. But it's still worthwhile, to provide some basic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# sanity checks.
</span> #------------------------------------------------------------------------------
test.run yes
test.target tests
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Procs - Low Level
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Developer-Only Command-Line Overrides
</span> #
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Should only be called by High-Level procs!
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# These allow testing key options, without local portfile modification.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#------------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Toggle BGFX build, which fails on some MasOS/Xcode combinations.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: Normally disabled, due to those failures.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[info exists mame.override.build.bgfx]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "mame.override.build.bgfx specified: ${mame.override.build.bgfx}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set g_mame_build_bgfx_enabled \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [string is true ${mame.override.build.bgfx}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#------------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Procs - Bootstrap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#------------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc mame_arch_setup {p_arch_64} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Architecture setup - 64-bit vs 32-bit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${p_arch_64}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set executable "mame64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set executable "mame"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remember to append a 'd' suffix for debug builds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note: Mame Tools executables have no such suffix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset debug]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set executable "${executable}d"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "mame_arch_setup: executable: ${executable}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This must be run early, after 'g_mame_build_arch_64' set.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+mame_arch_setup ${g_mame_build_arch_64}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#------------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Procs - Low Level - Python Setup
</span> #------------------------------------------------------------------------------
# Populate global Python info dictionary, for specified version
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -243,6 +343,19 @@ proc mame_python_add_deps {} {
</span> # Procs - High Level - Variant Support
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#e0ffe0;'>+proc mame_variant_debug_setup {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "DEBUG=0" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "DEBUG=1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Disable optimization, to improve debuggability
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "OPTIMIZE=2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "OPTIMIZE=0"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc mame_variant_tools_setup {} {
build.args-append \
"TOOLS=1"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -258,22 +371,70 @@ proc mame_variant_python_setup {p_ver_major p_ver_minor} {
</span> return 0
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#------------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Procs - Low Level - Phase Support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#------------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc mame_get_release_dir {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global worksrcpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global g_mame_build_arch_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Generate release dir name, based on build options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Format: build/release/[x64|x32]/[Debug|Release]/mame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_release_dir \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [file join \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${worksrcpath}/build/release" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [expr { ${g_mame_build_arch_64} ? "x64" : "x32" } ] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [expr { [variant_isset debug] ? "Debug" : "Release" } ] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "mame" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ${mame_release_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc mame_get_tools_list {p_dir p_fn_prefix} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_tools_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}aueffectutil" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}castool" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}chdman" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}floptool" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}imgtool" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}jedutil" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}ldresample" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}ldverify" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}nltool" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}nlwav" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}pngcmp" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}regrep" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}romcmp" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}split" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}srcclean" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}testkeys" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_dir}/${p_fn_prefix}unidasm" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ${mame_tools_list}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #------------------------------------------------------------------------------
# Procs - High Level - Phase Support
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc mame_build_run {p_work_path p_target p_build_args_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc mame_build_run {p_work_path p_makefile p_target p_build_args_list} {
</span> global build.cmd
global build.jobs
global build.pre_args
ui_debug "mame_build_run: p_work_path: ${p_work_path}"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "mame_build_run: p_makefile: ${p_makefile}"
</span> ui_debug "mame_build_run: p_target: ${p_target}"
ui_debug "mame_build_run: p_build_args_list: ${p_build_args_list}"
set build_cmd_line \
"${build.cmd} \
--jobs=${build.jobs} \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ --file=${p_makefile} \
</span> [join ${build.pre_args}] \
${p_target} \
[join ${p_build_args_list}]"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -291,32 +452,31 @@ proc mame_build_run {p_work_path p_target p_build_args_list} {
</span> # Variants
#------------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#e0ffe0;'>+variant debug \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description {Enable debug support} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mame_variant_debug_setup
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> variant tools \
description {Compile and install the mame tools like chdman and others} {
mame_variant_tools_setup
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python36 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description {Use python 3.6 for build} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts python37 python38 python39 {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- mame_variant_python_setup 3 6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> variant python37 \
description {Use python 3.7 for build} \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts python36 python38 python39 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts python38 python39 {
</span> mame_variant_python_setup 3 7
}
variant python38 \
description {Use python 3.8 for build} \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts python36 python37 python39 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts python37 python39 {
</span> mame_variant_python_setup 3 8
}
variant python39 \
description {Use python 3.9 for build} \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts python36 python37 python38 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts python37 python38 {
</span> mame_variant_python_setup 3 9
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -326,7 +486,7 @@ default_variants +tools
</span> universal_variant no
# Ensure one python* variant is selected by default, if not specified by user
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
</span> default_variants +python38
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -335,7 +495,15 @@ if {![variant_isset python36] && ![variant_isset python37] && ![variant_isset py
</span> #------------------------------------------------------------------------------
pre-build {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Update build args for documentation build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Main - update build args
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note: These need to be set first, as they're also used below
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_bin [dict get ${g_mame_python_info_dict} py_bin]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PTR64=${g_mame_build_arch_64}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PYTHON_EXECUTABLE=${py_bin}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset py_bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Documentation - update build args
</span> set sphinx_bin [dict get ${g_mame_python_info_dict} sphinx_bin]
set build_args_docs \
[list \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -349,96 +517,225 @@ pre-build {
</span> unset build_args_docs
unset sphinx_bin
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Update build args for main build
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set py_bin [dict get ${g_mame_python_info_dict} py_bin]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- build.args-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "PYTHON_EXECUTABLE=${py_bin}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unset py_bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # BGFX - update build args
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Combine the args for main build, with those that are BGFX-specific
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set g_mame_build_args_bgfx_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [concat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${build.args} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${g_mame_build_args_bgfx_list} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Distribution - update build args
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Combine the args for main build, with those that are dist-specific
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set g_mame_build_args_dist_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [concat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${build.args} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${g_mame_build_args_dist_list} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # BGFX - add appropriate build target, based on whether debug requested
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note: BGFX doesn't support 32-bit builds. So if/when we enable this,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # we'll have to add additional logic to warn about that.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset debug]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set bgfx_target "osx-debug64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set bgfx_target "osx-release64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_targets_bgfx \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${bgfx_target} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set g_mame_build_targets_bgfx_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [concat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${g_mame_build_targets_bgfx_list} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${build_targets_bgfx} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset build_targets_bgfx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset bgfx_target
</span>
ui_debug "Phase pre-build: g_mame_build_args_docs_list: ${g_mame_build_args_docs_list}"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase pre-build: g_mame_build_args_bgfx_list: ${g_mame_build_args_bgfx_list}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase pre-build: g_mame_build_targets_bgfx_list: ${g_mame_build_targets_bgfx_list}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase pre-build: g_mame_build_args_dist_list: ${g_mame_build_args_dist_list}"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Override the standard build phase, to include both documentation and code
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Override the standard build phase, to work with separate makefiles and targets
</span> build {
# Documentation build; iterate over targets
foreach target ${g_mame_build_targets_docs_list} {
ui_msg "Building documentation target: ${target}"
mame_build_run \
"${worksrcpath}/docs" \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ "Makefile" \
</span> ${target} \
${g_mame_build_args_docs_list}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # BGFX build; iterate over targets, if enabled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${g_mame_build_bgfx_enabled}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach target ${g_mame_build_targets_bgfx_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Building bgfx target: ${target}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mame_build_run \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${worksrcpath}/3rdparty/bgfx" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "makefile" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${target} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${g_mame_build_args_bgfx_list}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase build: BGFX build disabled"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Main build; iterate over targets
foreach target ${g_mame_build_targets_main_list} {
ui_msg "Building main target: ${target}"
mame_build_run \
${worksrcpath} \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ "makefile" \
</span> ${target} \
${build.args}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Distribution build; iterate over targets
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach target ${g_mame_build_targets_dist_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Building distribution target: ${target}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mame_build_run \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "dist.mak" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${target} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${g_mame_build_args_dist_list}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> unset target
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+post-build {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_release_dir \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [mame_get_release_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_release_doc_dir \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${mame_release_dir}/docs/man"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-build: mame_release_dir: ${mame_release_dir}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-build: mame_release_doc_dir: ${mame_release_doc_dir}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Rename Tools-related man pages, to include defined prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set man_page_rename_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -nocomplain -type f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -directory ${mame_release_doc_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *.1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-build: man_page_rename_list: ${man_page_rename_list}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach tgt ${man_page_rename_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fn [file tail ${tgt}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fn_new "${g_mame_tools_prefix}${fn}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-build: renaming man page: ${fn} -> ${fn_new}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${tgt} "${mame_release_doc_dir}/${fn_new}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy generated Mame man page, joining pre-generated files for Tools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy "${worksrcpath}/docs/build/man/MAME.1" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${mame_release_doc_dir}/mame.1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove section 6 man pages, which aren't helpful
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set man_page_delete_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -nocomplain -type f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -directory ${mame_release_doc_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *.6]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-build: man_page_delete_list: ${man_page_delete_list}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach tgt ${man_page_delete_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-build: deleting man page: ${tgt}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${tgt}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset tgt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset man_page_rename_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset man_page_delete_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_release_doc_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_release_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_target_dir "${destroot}${prefix}/libexec/mame"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_share_dir "${destroot}${prefix}/share/mame"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_dir_create_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/cfg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/cheat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/comments \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/crsshair \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/fonts \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/inp \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/nvram \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/software \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/snap \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_target_dir}/sta \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_share_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach tgt ${mame_dir_create_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${tgt}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset tgt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_dir_create_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_share_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_target_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> destroot {
set mame_target_dir "${destroot}${prefix}/libexec/mame"
set mame_share_dir "${destroot}${prefix}/share/mame"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_release_dir \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [mame_get_release_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase destroot: mame_release_dir: ${mame_release_dir}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_copy_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_release_dir}/${executable} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/artwork \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/bgfx \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_release_dir}/ctrlr \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_release_dir}/hash \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/hlsl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_release_dir}/ini \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/keymaps \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_release_dir}/language \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/plugins \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_release_dir}/roms \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/samples \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Main
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/${executable} ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/artwork ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/bgfx ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/cfg
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/cheat
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/comments
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/crsshair
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/ctrlr ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/fonts
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/hash ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/hlsl ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/ini ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/inp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/keymaps ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/language ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/nvram
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/plugins ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/roms ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/samples ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/scripts ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/software
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/snap
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_target_dir}/sta
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Docs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${mame_share_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/docs/build/man ${mame_share_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Tools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy content
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach tgt ${mame_copy_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy ${tgt} ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # For Tools, prefix each command with defined prefix
</span> if {[variant_isset tools]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/aueffectutil \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/castool \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/chdman \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/floptool \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/imgtool \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/jedutil \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/ldresample \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/ldverify \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/nltool \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/nlwav \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/pngcmp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/regrep \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/romcmp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/split \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/srcclean \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/testkeys \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/unidasm \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${mame_target_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_tools_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [mame_get_tools_list ${mame_release_dir} ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach tgt ${mame_tools_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fn [file tail ${tgt}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fn_dest "${mame_target_dir}/${g_mame_tools_prefix}${fn}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${tgt}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy ${tgt} ${fn_dest}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Distribution doesn't copy everything, so fall back to worksrcdir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase destroot: Tool missing from dist, srcing from worksrcpath: ${fn}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy "${worksrcpath}/${fn}" ${fn_dest}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset tgt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy all docs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy "${mame_release_dir}/docs" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${mame_share_dir}
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_tools_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_copy_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset mame_release_dir
</span> unset mame_share_dir
unset mame_target_dir
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -456,16 +753,41 @@ post-destroot {
</span> # Substitute placeholder with real executable name
reinplace "s|@@MACPORTS_MAME_EXECUTABLE@@|${executable}|g" \
${mame_launch_script}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Create soft link 'mame', to launch wrapper script
ln -s "${prefix}/libexec/mame/mame.sh" \
${mame_launch_link}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Create soft link to man page
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d -m 755 ${mp_man_dest_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ln -s "${prefix}/share/mame/man/MAME.1" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "${mp_man_dest_dir}/mame.1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create soft links to Tools executables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset tools]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mame_tools_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [mame_get_tools_list ${mame_target_dir} ${g_mame_tools_prefix}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-destroot: mame_tools_list: ${mame_tools_list}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f ${mame_tools_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-destroot: soft linking tool: ${f}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fn [file tail ${f}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s "${prefix}/libexec/mame/${fn}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${destroot}${prefix}/bin/${fn}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set man_page_files \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -nocomplain -type f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -directory "${destroot}${prefix}/share/mame/docs/man" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *.1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-destroot: man_page_files: ${man_page_files}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create soft links to man pages
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${mp_man_dest_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f ${man_page_files} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Phase post-destroot: man pages: soft linking to: ${f}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fn [file tail ${f}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s "${prefix}/share/mame/docs/man/${fn}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${mp_man_dest_dir}/${fn}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset f
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset man_page_files
</span> unset mame_launch_link
unset mame_launch_script
unset mame_share_dir
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -491,6 +813,12 @@ notes {
</span> if {[variant_isset tools]} {
notes-append {
--------------------------------------------------------------------------
<span style='display:block; white-space:pre;background:#ffe0e0;'>- Mame tools are available in path ${prefix}/libexec/mame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Mame tools are installed. Each has a prefix of 'mame-', to avoid\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts with system tools.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Examples:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mame-imgtool
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mame-split
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/emulators/mame/files/mame-patch-0226-scripts-genie-compile-warnings.diff b/emulators/mame/files/mame-patch-0226-scripts-genie-compile-warnings.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 9199feb37a1..8b483fad2c8 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/emulators/mame/files/mame-patch-0226-scripts-genie-compile-warnings.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/emulators/mame/files/mame-patch-0226-scripts-genie-compile-warnings.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,6 +1,13 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- scripts/genie.lua 2020-11-28 16:02:27.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ scripts/genie.lua 2020-11-28 17:01:38.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1002,6 +1002,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- scripts/genie.lua 2020-12-11 20:39:27.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ scripts/genie.lua 2020-12-11 20:39:15.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -996,12 +996,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ buildoptions {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-Wall",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-Wcast-align",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "-Wundef",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-Wno-undef",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-Wformat-security",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-Wwrite-strings",
</span> "-Wno-sign-compare",
"-Wno-conversion",
"-Wno-error=deprecated-declarations",
</pre><pre style='margin:0'>
</pre>