From nobody Thu Jun 01 22:30:06 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QXLRg4BMqz4YWX9; Thu, 1 Jun 2023 22:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXLRf39Hmz4Nm1; Thu, 1 Jun 2023 22:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685658606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BIp7X9B+xcsAvxQN1K+7pj0lP/Z/1zza0BJcJoiLxyg=; b=FCZwUu9bRWSKgNeUweV7A5c22upSEG1cdSYa79RXNeSpLwkQUdXVzd6xs7prMATFMyfY3Q lWas2BH86uaSTEUyz1dA2nozO8phoZet1gTHGKYKB6IDqxUxfNSsaFDNVHixQX2VF3pOli O+vspGvyffAf8gI09k06KSr0ifHHTACcxJ0fxxqRiKySpCqPl+t/gW03rCwpEH4Fqw+l7+ lpbb0dJAG8+3WlJS8P4VnmYU6MSMPJ5p8gdIk8+XYGPB2U78y7f2YC++UolhRSfhJK4BfH f/Z/F65U3vgncwtXUZKJ7tvtuqn6rJU3GFFAbPcBdqdyIEhrLlZbftWJbDkjWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685658606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BIp7X9B+xcsAvxQN1K+7pj0lP/Z/1zza0BJcJoiLxyg=; b=Y5DBq9Cs8BQnugka8nrTwQqvVtsxghcVJUp7GAGUGVn3LohppF8PQdTUu/dK1kp5wMZS48 it5Hi93LTd3V8vv7n5XfoeTDMtbmC1z0J25o7Yy4VmMGBxhcICRUNkrWJvSsYY8sTUri57 gO1qCxQiGNr+Tc0etMIHGHSuC+wvB1AoFRXIYxh2HLeexvd15ugrZZreAKKWYA34Lr4aCc DYp5eP0LXmMg3MVwxIpJopp2B2pv/ulYYwK2y9F0/gP4v9aiqQ0OmC+HExzlG7oTaiZM0H kD68PW5SSnnruO86WtxLh2V0Bup0CrzH4ZZbPRl0440ShpVZeXFya9HZkH+64A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685658606; a=rsa-sha256; cv=none; b=hzmO2ZhgEGopQJgSnD7wDieE+xZjGw5i/lZXEf2/rOqqmF3qtpdLxOxdjzrWb0W86bSMmm KgDyT+H1m53z5TcbteRiA5AWJRH5ALGC2qBi76CKg80Y/73orb1VWJwSlR3S+XzIoISD9f 2Os6NC2ZEq666N7D0m9D3kDy4xdhzJOXbAsbVlxGL5gxw/Kkynab5wyVM5+FxiOYKWyRT9 2qgqL83dzMLrw37pdE3GJT7AikkaKHz6gPbpBqAlNeUu/PTk9sSh3ZyJstA9qVkpzqMCxr ui9Cwxo5wkspYy89ZyHbyNn3tDhLnC78RpmswIUCn3RKcQm9AANRoKsciZ9vCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QXLRf1s1GzZSn; Thu, 1 Jun 2023 22:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 351MU6Sf098188; Thu, 1 Jun 2023 22:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 351MU6J6098183; Thu, 1 Jun 2023 22:30:06 GMT (envelope-from git) Date: Thu, 1 Jun 2023 22:30:06 GMT Message-Id: <202306012230.351MU6J6098183@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 84c2e2313e70 - main - emulators/mame: fix build on 14-CURRENT List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84c2e2313e7098468fc7e99ef95527903a7bc0b5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=84c2e2313e7098468fc7e99ef95527903a7bc0b5 commit 84c2e2313e7098468fc7e99ef95527903a7bc0b5 Author: Alastair Hogge AuthorDate: 2023-05-31 08:28:33 +0000 Commit: Robert Clausecker CommitDate: 2023-06-01 22:29:21 +0000 emulators/mame: fix build on 14-CURRENT - explicitly declare more system libraries - port-{clippy,fmt,lint} maintenance - separate out Qt machine debugger via OPTIONS - separate out tools via OPTIONS - remove licenses from ${PORTDOCS} as they are catalogued thru various ${LICENSE}* definitions - add conditional logic for when OS ≧ 14 then explicitly build with LLVM - a lot of the work in the post-patch target is on static files, so move most of this to files/ - files/patch-scripts_genie.lua is a fix for GCC - sort targets into the order they run in. PR: 271374 --- emulators/mame/Makefile | 233 +++++++++++---------- .../mame/files/{target.ini.in => mame.ini.in} | 57 +++-- ...h-3rdparty_genie_build_gmake.freebsd_genie.make | 63 ++++++ .../files/patch-3rdparty_genie_src_host_scripts.c | 16 ++ .../files/patch-3rdparty_genie_src_tools_gcc.lua | 15 ++ ...patch-3rdparty_genie_tests_test__gmake__cpp.lua | 15 ++ emulators/mame/files/patch-makefile | 29 ++- emulators/mame/files/patch-scripts_genie.lua | 14 ++ emulators/mame/files/patch-scripts_toolchain.lua | 4 +- emulators/mame/files/pkg-message.in | 15 +- emulators/mame/files/plugin.ini.in | 20 ++ emulators/mame/files/ui.ini.in | 71 +++++++ emulators/mame/pkg-plist | 59 +++--- 13 files changed, 435 insertions(+), 176 deletions(-) diff --git a/emulators/mame/Makefile b/emulators/mame/Makefile index 26b2e16f7030..d026e3a5e0b5 100644 --- a/emulators/mame/Makefile +++ b/emulators/mame/Makefile @@ -1,6 +1,6 @@ PORTNAME= mame -PORTVERSION= 0.254 -PORTREVISION= 1 +DISTVERSION= 0.254 +PORTREVISION= 2 CATEGORIES= emulators games MAINTAINER= agh@riseup.net @@ -21,161 +21,174 @@ LICENSE_FILE= ${WRKSRC}/docs/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 armv7 i386 powerpc powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= not yet ported to any architecture other than armv7, arm64, x86, and powerpc* -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-svg2pdfconverter>0:textproc/py-sphinxcontrib-svg2pdfconverter@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-svg2pdfconverter>0:textproc/py-sphinxcontrib-svg2pdfconverter@${PY_FLAVOR} \ + glm>0:math/glm \ + rapidjson>0:devel/rapidjson LIB_DEPENDS= libexpat.so:textproc/expat2 \ libFLAC.so:audio/flac \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ - libpugixml.so:textproc/pugixml + libportmidi.so:audio/portmidi \ + libpugixml.so:textproc/pugixml \ + libutf8proc.so:textproc/utf8proc \ + libuv.so:devel/libuv RUN_DEPENDS= liberation-fonts-ttf>=0:x11-fonts/liberation-fonts-ttf -USES= compiler:c++14-lang gl gmake jpeg localbase lua:54 pkgconfig \ - python:3.9,build qt:5 sdl shebangfix sqlite:3 xorg +USES= compiler:c++17-lang gl gmake jpeg localbase lua:54 pkgconfig \ + python:3.9,build sdl shebangfix sqlite:3 xorg USE_GITHUB= yes GH_ACCOUNT= mamedev -GH_PROJECT= mame # explicit (master port) -GH_TAGNAME= mame${PORTVERSION:S/.//} +GH_TAGNAME= mame${DISTVERSION:S/.//} USE_GL= gl -USE_QT= buildtools core gui qmake widgets USE_SDL= sdl2 ttf2 USE_XORG= x11 xext xi xinerama xrender MAKEFILE= makefile MAKE_ARGS= TARGETOS=freebsd \ - TOOLS=1 \ - USE_SYSTEM_LIB_PUGIXML=1 \ - USE_SYSTEM_LIB_SQLITE3=1 \ - VERBOSE=1 -MAKE_ENV= FULLNAME="mame" \ - GCC_LDFLAGS="${LDFLAGS}" \ - LD="${CXX}" \ + VERBOSE="1" +MAKE_ENV= LDOPTS="${LDFLAGS}" \ + NO_USE_PORTAUDIO=1 \ + NO_USE_PULSEAUDIO=1 \ NOWERROR=1 \ OPT_FLAGS="${CXXFLAGS}" \ - PYTHON="${PYTHON_CMD}" \ - SDL_NETWORK="pcap" \ - SUBTARGET="${MSUBTARGET}" \ - TARGET="${MTARGET}" \ - USE_NETWORK=1 - -BINARY_ALIAS= python3=${PYTHON_CMD} python=${PYTHON_CMD} -SUB_FILES= pkg-message target.ini -SUB_LIST= MSUBTARGET=${MSUBTARGET} \ - MTARGET=${MTARGET} - -PORTDOCS= LICENSE html/* legal/* -PORTEXAMPLES= ${MSUBTARGET}.ini - -OPTIONS_DEFINE= DEBUG DOCS EXAMPLES -DEBUG_DESC= Build with debug profiling and symbols -DOCS_DESC= Install additional MAME documentation -EXAMPLES_DESC= Install example ${EMULATOR}.ini configuration - -DEBUG_MAKE_ENV= DEBUG=1 - -GENIE= ${WRKSRC}/3rdparty/genie -MSUBTARGET= mame -MTARGET= mame + PRECOMPILE=0 \ + PYTHON_EXECUTABLE="${PYTHON_CMD}" \ + USE_PCAP=1 \ + USE_SYSTEM_LIB_EXPAT=1 \ + USE_SYSTEM_LIB_FLAC=1 \ + USE_SYSTEM_LIB_GLM=1 \ + USE_SYSTEM_LIB_JPEG=1 \ + USE_SYSTEM_LIB_PORTMIDI=1 \ + USE_SYSTEM_LIB_PUGIXML=1 \ + USE_SYSTEM_LIB_RAPIDJSON=1 \ + USE_SYSTEM_LIB_SQLITE3=1 \ + USE_SYSTEM_LIB_UTF8PROC=1 \ + USE_SYSTEM_LIB_UV=1 \ + USE_SYSTEM_LIB_ZLIB=1 \ + USE_TAPTUN=1 + +SUB_FILES= pkg-message mame.ini plugin.ini ui.ini + +PORTDOCS= html/* + +OPTIONS_DEFINE= DEBUG DOCS QTDEBUGGER TOOLS +OPTIONS_SUB= yes + +DEBUG_DESC= Build with debug profiling and symbols +DOCS_DESC= Install extensive online MAME documentation +QTDEBUGGER_DESC= Install Qt interactive low-level machine debugger +TOOLS_DESC= Install tools for machine archiving and development + +DEBUG_MAKE_ENV= DEBUG=1 \ + OPTIMIZE=0 \ + PROFILER=1 \ + SYMBOLS=1 +DEBUG_MAKE_ENV_OFF= OPTIMIZE=2 \ + STRIP_SYMBOLS=1 +# Attempt to avoid address space exhaustion during linking, specifically +# on armv7, and possibly other architectures: +DEBUG_LDFLAGS_OFF= -s +QTDEBUGGER_USES= qt:5 +QTDEBUGGER_USE= QT=core,gui,widgets,buildtools:build,qmake:build +QTDEBUGGER_MAKE_ENV= USE_QTDEBUG=1 +QTDEBUGGER_MAKE_ENV_OFF= USE_QTDEBUG=0 +TOOLS_MAKE_ENV= TOOLS=1 +TOOLS_MAKE_ENV_OFF= TOOLS=0 + +_GENIE= ${WRKSRC}/3rdparty/genie .include .if ${PORT_OPTIONS:MDEBUG} -WITH_DEBUG= "YES" -MAKE_ENV+= DEBUG="1" \ - OPTIMIZE="0" \ - PROFILER="1" \ - SYMBOLS="1" +WITH_DEBUG= yes +.endif + +.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1400000 +USES+= llvm:15,build +MAKE_ENV+= OVERRIDE_AR="llvm-ar${LLVM_VERSION}" \ + OVERRIDE_CC="clang${LLVM_VERSION}" \ + OVERRIDE_CXX="clang++${LLVM_VERSION}" \ + OVERRIDE_LD="lld${LLVM_VERSION}" .else -# avoid address space exhaustion in linker on armv7 -LDFLAGS+= -s +MAKE_ENV+= OVERRIDE_AR="${AR}" \ + OVERRIDE_CC="${CC}" \ + OVERRIDE_CXX="${CXX}" \ + OVERRIDE_LD="${LD}" .endif -.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Mpowerpc64*} +.if ${ARCH:Maarch64} || ${ARCH:Mamd64} || ${ARCH:Mpowerpc64*} MAKE_ARGS+= PTR64=1 .endif -EMULATOR= ${MSUBTARGET} -PLIST_SUB+= EMULATOR=${EMULATOR} +post-extract: + @${MV} ${WRKSRC}/src/lib/util/png.h \ + ${WRKSRC}/src/lib/util/localpng.h + +post-patch: +# Prefer some system headers over bundled. + @${RM} ${WRKSRC}/3rdparty/bx/include/compat/freebsd/dirent.h + @${RM} ${WRKSRC}/3rdparty/bx/include/compat/freebsd/signal.h +# Accommodate GENie conception of BSD. + @${MV} ${_GENIE}/build/gmake.freebsd \ + ${_GENIE}/build/gmake.bsd +# Patch build to use bundled PNG. + @${GREP} -rl '"png.h"' ${WRKSRC}/src | \ + ${XARGS} ${REINPLACE_CMD} -e 's|"png.h"|"localpng.h"|' + @${REINPLACE_CMD} -e 's|"util/png.h"|"util/localpng.h"|' \ + ${WRKSRC}/src/frontend/mame/ui/icorender.cpp do-build-DOCS-on: - (cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} \ - ${MAKE_CMD} ${MAKE_ARGS} html \ - SPHINXBUILD=sphinx-build-${PYTHON_VER}) + (cd ${WRKSRC}/docs && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} html SPHINXBUILD=sphinx-build-${PYTHON_VER}) @${RM} ${WRKSRC}/docs/build/html/.buildinfo -do-install: -.for PROGRAM in castool chdman floptool imgtool jedutil ldresample ldverify \ - nltool nlwav pngcmp regrep romcmp split srcclean testkeys unidasm - ${INSTALL_PROGRAM} ${WRKSRC}/${PROGRAM} \ - ${STAGEDIR}${PREFIX}/bin -.endfor +post-build: + (cd ${WRKSRC}/docs && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} man SPHINXBUILD=sphinx-build-${PYTHON_VER}) -.for data in artwork bgfx ctrlr ini hash language plugins samples +do-install: +.for DATA in artwork bgfx ctrlr ini hash language plugins samples (cd ${WRKSRC} && \ - ${COPYTREE_SHARE} ${data} ${STAGEDIR}${DATADIR}) + ${COPYTREE_SHARE} ${DATA} ${STAGEDIR}${DATADIR}) .endfor ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_MAN} ${WRKSRC}/docs/man/*.1 \ + ${INSTALL_MAN} ${WRKSRC}/docs/build/man/MAME.1 \ ${STAGEDIR}${MANPREFIX}/man/man1 - ${INSTALL_MAN} ${WRKSRC}/docs/build/man/*.1 \ - ${STAGEDIR}${MANPREFIX}/man/man1 - ${INSTALL_MAN} ${WRKSRC}/docs/man/${EMULATOR}.6 \ + ${INSTALL_MAN} ${WRKSRC}/docs/man/mame.6 \ ${STAGEDIR}${MANPREFIX}/man/man6 - ${INSTALL_MAN} ${WRKSRC}/docs/LICENSE \ - ${STAGEDIR}${DOCSDIR} - (cd ${WRKSRC}/docs && \ - ${COPYTREE_SHARE} legal ${STAGEDIR}${DOCSDIR}) -do-install-DEBUG-off: - ${INSTALL_PROGRAM} ${WRKSRC}/${MSUBTARGET} \ - ${STAGEDIR}${PREFIX}/bin/${EMULATOR} + ${MKDIR} ${STAGEDIR}${ETCDIR} +.for INI in mame plugin ui + ${INSTALL_DATA} ${WRKDIR}/${INI}.ini \ + ${STAGEDIR}${ETCDIR}/${INI}.ini.sample +.endfor do-install-DEBUG-on: - ${INSTALL_PROGRAM} ${WRKSRC}/${MSUBTARGET}d \ - ${STAGEDIR}${PREFIX}/bin/${EMULATOR} + ${INSTALL_PROGRAM} ${WRKSRC}/mamed \ + ${STAGEDIR}${PREFIX}/bin/mame -post-build: - cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} \ - ${MAKE_CMD} ${MAKE_ARGS} man \ - SPHINXBUILD=sphinx-build-${PYTHON_VER} +do-install-DEBUG-off: + ${INSTALL_PROGRAM} ${WRKSRC}/mame \ + ${STAGEDIR}${PREFIX}/bin/ -post-install-DOCS-on: +do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/docs/build && \ ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR}) -post-install-EXAMPLES-on: - ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKDIR}/target.ini \ - ${STAGEDIR}${EXAMPLESDIR}/${EMULATOR}.ini +do-install-TOOLS-on: +.for PROGRAM in castool chdman floptool imgtool jedutil ldresample ldverify \ + nltool nlwav pngcmp regrep romcmp split srcclean testkeys unidasm + ${INSTALL_PROGRAM} ${WRKSRC}/${PROGRAM} \ + ${STAGEDIR}${PREFIX}/bin +.endfor -post-patch: - @${RM} ${WRKSRC}/3rdparty/bx/include/compat/freebsd/dirent.h - @${RM} ${WRKSRC}/3rdparty/bx/include/compat/freebsd/signal.h - @${MV} ${GENIE}/build/gmake.freebsd \ - ${GENIE}/build/gmake.bsd - @${REINPLACE_CMD} -e \ - 's|^\(AR \)|#\1| ; \ - s|^\(CC \)|#\1| ; \ - s|^\(CXX \)|#\1| ; \ - s|^\(CXX:\)|#\1| ; \ - s|^\(LD \)|#\1| ; \ - s| .(ARCH)||g' \ - ${WRKSRC}/makefile \ - ${GENIE}/build/gmake.bsd/genie.make - @${REINPLACE_CMD} -e 's|gcc|${CC}|; s|g++|${CXX}|' \ - ${GENIE}/src/tools/gcc.lua \ - ${GENIE}/src/tools/snc.lua \ - ${GENIE}/tests/test_gmake_cpp.lua - @${REINPLACE_CMD} -e 's|= \"gcc|= \"${CC}|; s|= \"g++|= \"${CXX}|' \ - -e "s|'CXX =|'#CXX =|; s|'CC =|'#CC =|; s| .(ARCH)| |g" \ - ${GENIE}/src/host/scripts.c - @${GREP} -rl '"png.h"' ${WRKSRC}/src | \ - ${XARGS} ${REINPLACE_CMD} -e 's|"png.h"|"localpng.h"|' - @${REINPLACE_CMD} -e 's|"util/png.h"|"util/localpng.h"|' \ - ${WRKSRC}/src/frontend/mame/ui/icorender.cpp - @${MV} ${WRKSRC}/src/lib/util/png.h \ - ${WRKSRC}/src/lib/util/localpng.h +.for MANUAL in castool chdman floptool imgtool jedutil ldplayer ldresample \ + ldverify romcmp + ${INSTALL_MAN} ${WRKSRC}/docs/man/${MANUAL}.1 \ + ${STAGEDIR}${MANPREFIX}/man/man1 +.endfor .include diff --git a/emulators/mame/files/target.ini.in b/emulators/mame/files/mame.ini.in similarity index 85% rename from emulators/mame/files/target.ini.in rename to emulators/mame/files/mame.ini.in index 45f332852e02..af7225c732b5 100644 --- a/emulators/mame/files/target.ini.in +++ b/emulators/mame/files/mame.ini.in @@ -7,31 +7,31 @@ writeconfig 0 # # CORE SEARCH PATH OPTIONS # -homepath ~/.%%MTARGET%% -rompath ~/.%%MTARGET%%/roms;%%DATADIR%%/roms/ -hashpath ~/.%%MTARGET%%/hash;%%DATADIR%%/hash/ -samplepath ~/.%%MTARGET%%/samples;%%DATADIR%%/samples/ -artpath ~/.%%MTARGET%%/artwork;%%DATADIR%%/artwork/ -ctrlrpath ~/.%%MTARGET%%/ctrlr;%%DATADIR%%/ctrlr/ -inipath ~/.%%MTARGET%%/;.;~/.%%MTARGET%%/ini;%%DATADIR%%/ini/ -fontpath ~/.%%MTARGET%%/font;%%DATADIR%%/font/ -cheatpath ~/.%%MTARGET%%/cheat;%%DATADIR%%/cheat/ -crosshairpath ~/.%%MTARGET%%/crosshair;%%DATADIR%%/crosshair/ -pluginspath ~/.%%MTARGET%%/plugins;%%DATADIR%%/plugins/ -languagepath ~/.%%MTARGET%%/language;%%DATADIR%%/language/ -swpath ~/.%%MTARGET%%/software;%%DATADIR%%/software/ +homepath ~/.mame +rompath ~/.mame/roms;%%DATADIR%%/roms/ +hashpath ~/.mame/hash;%%DATADIR%%/hash/ +samplepath ~/.mame/samples;%%DATADIR%%/samples/ +artpath ~/.mame/artwork;%%DATADIR%%/artwork/ +ctrlrpath ~/.mame/ctrlr;%%DATADIR%%/ctrlr/ +inipath ~/.mame/ini;%%DATADIR%%/ini/;. +fontpath ~/.mame/font;%%DATADIR%%/font/ +cheatpath ~/.mame/cheat;%%DATADIR%%/cheat/ +crosshairpath ~/.mame/crosshair;%%DATADIR%%/crosshair/ +pluginspath ~/.mame/plugins;%%DATADIR%%/plugins/ +languagepath ~/.mame/language;%%DATADIR%%/language/ +swpath ~/.mame/software;%%DATADIR%%/software/ # # CORE OUTPUT DIRECTORY OPTIONS # -cfg_directory ~/.%%MTARGET%%/cfg -nvram_directory ~/.%%MTARGET%%/nvram -input_directory ~/.%%MTARGET%%/inp -state_directory ~/.%%MTARGET%%/state -snapshot_directory ~/.%%MTARGET%%/snapshot -diff_directory ~/.%%MTARGET%%/diff -comment_directory ~/.%%MTARGET%%/comments -share_directory ~/.%%MTARGET%%/share +cfg_directory ~/.mame/cfg +nvram_directory ~/.mame/nvram +input_directory ~/.mame/inp +state_directory ~/.mame/state +snapshot_directory ~/.mame/snapshot +diff_directory ~/.mame/diff +comment_directory ~/.mame/comments +share_directory ~/.mame/share # # CORE STATE/PLAYBACK OPTIONS @@ -138,6 +138,7 @@ offscreen_reload 0 joystick_map auto joystick_deadzone 0.3 joystick_saturation 0.85 +joystick_threshold 0.3 natural 0 joystick_contradictory 0 coin_impulse 0 @@ -211,9 +212,11 @@ http_port 8080 http_root web # -# OSD KEYBOARD MAPPING OPTIONS +# OSD INPUT MAPPING OPTIONS # uimodekey auto +controller_map none +background_input 0 # # OSD FONT OPTIONS @@ -330,6 +333,16 @@ glsl_shader_screen9 none sound auto audio_latency 2 +# +# OSD MIDI OPTIONS +# +midiprovider auto + +# +# OSD EMULATED NETWORKING OPTIONS +# +networkprovider auto + # # BGFX POST-PROCESSING OPTIONS # diff --git a/emulators/mame/files/patch-3rdparty_genie_build_gmake.freebsd_genie.make b/emulators/mame/files/patch-3rdparty_genie_build_gmake.freebsd_genie.make new file mode 100644 index 000000000000..d528ea1d3b91 --- /dev/null +++ b/emulators/mame/files/patch-3rdparty_genie_build_gmake.freebsd_genie.make @@ -0,0 +1,63 @@ +--- 3rdparty/genie/build/gmake.freebsd/genie.make.orig 2023-05-26 04:14:50 UTC ++++ 3rdparty/genie/build/gmake.freebsd/genie.make +@@ -28,9 +28,9 @@ endif + RM = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0 + endif + +-CC = gcc +-CXX = g++ +-AR = ar ++CC ?= gcc ++CXX ?= g++ ++AR ?= ar + + ifndef RESCOMP + ifdef WINDRES +@@ -49,17 +49,17 @@ ifeq ($(config),release) + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I"../../src/host/lua-5.3.0/src" + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) +- ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) +- ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) +- ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) +- ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) +- ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) ++ ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -Os $(MPARAM) ++ ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -Os $(MPARAM) ++ ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -Os $(MPARAM) ++ ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -Os $(MPARAM) ++ ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -Os $(MPARAM) + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic + LDDEPS += + LIBS += $(LDDEPS) -lm + EXTERNAL_LIBS += +- LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) ++ LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) + OBJECTS := \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ +@@ -132,17 +132,17 @@ ifeq ($(config),debug) + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I"../../src/host/lua-5.3.0/src" + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) +- ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g +- ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g +- ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g +- ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g +- ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ++ ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -g ++ ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -g ++ ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -g ++ ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -g ++ ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -g + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic + LDDEPS += + LIBS += $(LDDEPS) -lm + EXTERNAL_LIBS += +- LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) ++ LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) + OBJECTS := \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ diff --git a/emulators/mame/files/patch-3rdparty_genie_src_host_scripts.c b/emulators/mame/files/patch-3rdparty_genie_src_host_scripts.c new file mode 100644 index 000000000000..044cf87ada38 --- /dev/null +++ b/emulators/mame/files/patch-3rdparty_genie_src_host_scripts.c @@ -0,0 +1,16 @@ +--- 3rdparty/genie/src/host/scripts.c.orig 2023-05-22 09:40:13 UTC ++++ 3rdparty/genie/src/host/scripts.c +@@ -237,10 +237,10 @@ const char* builtin_scripts[] = { + "exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = %s', cc.rc or 'windres')\n_p(' endif')\n_p('endif')\n_p('')\nif (not premake.make.makefile_ignore) then\n_p('MAKEFILE = %s', _MAKE.getmakefilename(prj, true))\n_p('')\nend\nend\nlocal function is_excluded(prj, cfg, file)\nif table.icontains(prj.excludes, file) then\nreturn true\nend\nif table.icontains(cfg.excludes, file) then\nreturn true\nend\nreturn false\nend\nfunction premake.gmake_cpp_configs(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nend\nfunction premake.gmake_cpp_config( prj, cfg, cc)\n_p('ifeq ($(conf" + "ig),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\nlocal targetDir = _MAKE.esc(cfg.buildtarget.directory)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', iif(targetDir == \"\", \".\", targetDir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(_MAKE.escquote(cc.getdefines(cfg.defines))))\nlocal id = make.list(cc.getincludedirs(cfg.includedirs));\nlocal uid = make.list(cc.getquoteincludedirs(cfg.userincludedirs))\nlocal sid = make.list(cc.getsystemincludedirs(cfg.systemincludedirs))\nif id ~= \"\" then\n_p(' INCLUDES +=%s', id)\nend\nif uid ~= \"\" then\n_p(' INCLUDES +=%s', uid)\nend\nif sid " + "~= \"\" then\n_p(' INCLUDES +=%s', sid)\nend\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\ntable.sort(cfg.files)\nif cfg.flags.UseObjectResponseFile then\n_p(' OBJRESP = $(OBJDIR)/%s_objects', prj.name)\nelse\n_p(' OBJRESP =')\nend\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\nif not is_excluded(prj, cfg, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then \n_p('\\t@echo Running post-bui" +- "ld commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\n_p(' FORCE_INCLUDE_OBJC += -include $(OBJDIR)/$(notdir $(PCH))_objc')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list( table.join(cc.getcflags(cfg), c" +- "fg.buildoptions, cfg.buildoptions_asm)))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objcpp)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker( prj, cfg, cc)\nlocal libdeps\nl" ++ "ld commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\n_p(' FORCE_INCLUDE_OBJC += -include $(OBJDIR)/$(notdir $(PCH))_objc')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) %s', make.list(table.j oin(cc.getcflags(cfg), c" ++ "fg.buildoptions, cfg.buildoptions_asm)))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) %s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) %s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) %s', make.list(table.join(cc.getcflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) %s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objcpp)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\nlocal libdeps \nl" + "ocal lddeps\nif #cfg.wholearchive > 0 then\nlibdeps = {}\nlddeps = {}\nfor _, linkcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nlocal linkpath = path.rebase(linkcfg.linktarget.fullpath, linkcfg.location, cfg.location)\nif table.icontains(cfg.wholearchive, linkcfg.project.name) then\nlddeps = table.join(lddeps, cc.wholearchive(linkpath))\nelse\ntable.insert(lddeps, linkpath)\nend\ntable.insert(libdeps, linkpath)\nend\nlibdeps = make.list(_MAKE.esc(libdeps))\nlddeps = make.list(_MAKE.esc(lddeps))\nelse\nlibdeps = make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\")))\nlddeps = libdeps\nend\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LIBDEPS +=%s', libdeps)\n_p(' LDDEPS +=%s', lddeps)\nif cfg.flags.UseLDResponseFile then\n_p(' LDRESP = $(OBJDIR)/%s_libs', prj.name)\n_p(' LIBS += @$(LDRESP)%s', make.li st(cc.getlinkflags(cfg)))\nelse" +- "\n_p(' LDRESP =')\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nend\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\n_p(' LINKOBJS = %s', (cfg.flags.UseObjectResponseFile and \"@$(OBJRESP)\" or \"$(OBJECTS)\"))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\nlocal startgroup = ''\nlocal endgroup = ''\nif (cfg.flags.LinkSupportCircularDependencies) then\nstartgroup = '-Wl,--start-group '\nendgroup = ' -Wl,--end-group'\nend\n_p(' LINKCMD = $(%s) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) %s$(LIBS)%s', tool, startgroup," ++ "\n_p(' LDRESP =')\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nend\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\n_p(' LINKOBJS = %s', (cfg.flags.UseObjectResponseFile and \"@$(OBJRESP)\" or \"$(OBJECTS)\"))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\nlocal startgroup = ''\nlocal endgroup = ''\nif (cfg.flags.LinkSupportCircularDependencies) then\nstartgroup = '-Wl,--start-group '\nendgroup = ' -Wl,--end-group'\nend\n_p(' LINKCMD = $(%s) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ALL_LDFLAGS) %s$(LIB S)%s', tool, startgroup," + " endgroup)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\n_p(' GCH_OBJC = $(OBJDIR)/$(notdir $(PCH))_objc.gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) $(MAKEFILE) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('')\n_p('$(GCH_OBJC): $(PCH) $(MAKEFILE) | $(OBJDIR)'" + ")\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_OBJCFLAGS) -x objective-c-header\", \"$(CXX) $(ALL_OBJCPPFLAGS) -x objective-c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj, cc)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\n_p('ifneq (,$(OBJRESP))')\n_p('$(OBJRESP): $(OBJECTS) | $(TARGETDIR) $(OBJDIRS)')\n_p('\\t$(SILENT) echo $^')\n_p('\\t$(SILENT) echo $^ > $@')\n_p('endif')\n_p('')\n_p('ifneq (,$(LDRESP))')\n_p('$(LDRESP): $(LDDEPS) | $(TARGETDIR) $(OBJDIRS)')\n_p('\\t$(SILENT) echo $^')\n_p('\\t$(SILENT) echo $^ > $@')\n_p('endif')\n_p('')\ntable.sort(prj.allfiles)\nfor _, file in ipairs(prj.allfiles or {}) do\nif path.issourcefile(file) then\nif (path.isobjcfile(file)) then\n_p('$(OBJDIR)/%s.o: %s $(GCH_OBJC) $(MAKEFILE) | $(OBJDIR)/%s'\ n, _MAKE.esc(path.trimdots(path" + ".removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.esc(path.getdirectory(path.trimdots(file)))\n)\nelse\n_p('$(OBJDIR)/%s.o: %s $(GCH) $(MAKEFILE) | $(OBJDIR)/%s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.esc(path.getdirectory(path.trimdots(file)))\n)\nend\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\nif (path.iscfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE_OBJC) -o \"$@\" -c \"$<\"')\nelse\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCPPFLAGS) $(FORCE_INCLUDE_OBJC) -o \"$@\" -c \"$<\"')\nend\nelseif (path.isasmfile(file)) then\n_p('\\t$(SILENT) $(CC) $(ALL_ASMFLAGS) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s ', task)\n_p('')\nend\n_p('')\n" diff --git a/emulators/mame/files/patch-3rdparty_genie_src_tools_gcc.lua b/emulators/mame/files/patch-3rdparty_genie_src_tools_gcc.lua new file mode 100644 index 000000000000..9ffe65ae8854 --- /dev/null +++ b/emulators/mame/files/patch-3rdparty_genie_src_tools_gcc.lua @@ -0,0 +1,15 @@ +--- 3rdparty/genie/src/tools/gcc.lua.orig 2023-05-25 09:19:09 UTC ++++ 3rdparty/genie/src/tools/gcc.lua +@@ -12,9 +12,9 @@ -- + -- Set default tools + -- + +- premake.gcc.cc = "gcc" +- premake.gcc.cxx = "g++" +- premake.gcc.ar = "ar" ++ premake.gcc.cc = _OPTIONS["CC"] ++ premake.gcc.cxx = _OPTIONS["CXX"] ++ premake.gcc.ar = _OPTIONS["AR"] + premake.gcc.rc = "windres" + premake.gcc.llvm = false + diff --git a/emulators/mame/files/patch-3rdparty_genie_tests_test__gmake__cpp.lua b/emulators/mame/files/patch-3rdparty_genie_tests_test__gmake__cpp.lua new file mode 100644 index 000000000000..481cbce2ab24 --- /dev/null +++ b/emulators/mame/files/patch-3rdparty_genie_tests_test__gmake__cpp.lua @@ -0,0 +1,15 @@ +--- 3rdparty/genie/tests/test_gmake_cpp.lua.orig 2023-04-25 15:19:25 UTC ++++ 3rdparty/genie/tests/test_gmake_cpp.lua +@@ -47,9 +47,9 @@ endif + SILENT = @ + endif + +-CC = gcc +-CXX = g++ +-AR = ar ++CC ?= gcc ++CXX ?= g++ ++AR ?= ar + + ifndef RESCOMP + ifdef WINDRES diff --git a/emulators/mame/files/patch-makefile b/emulators/mame/files/patch-makefile index 82288e63f2ca..eda56ef1f250 100644 --- a/emulators/mame/files/patch-makefile +++ b/emulators/mame/files/patch-makefile @@ -1,14 +1,27 @@ ---- makefile.orig 2023-05-17 11:43:34 UTC +--- makefile.orig 2023-04-25 15:19:25 UTC +++ makefile -@@ -1425,6 +1425,11 @@ $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile: make +@@ -447,9 +447,9 @@ ifneq ($(TARGETOS),asmjs) + endif - .PHONY: freebsd_x64_clang - freebsd_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile -+ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile -+ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 + ifneq ($(TARGETOS),asmjs) +-CC := $(SILENT)gcc +-LD := $(SILENT)g++ +-CXX:= $(SILENT)g++ ++CC ?= $(SILENT)gcc ++LD ?= $(SILENT)g++ ++CXX ?= $(SILENT)g++ + endif + + #------------------------------------------------- +@@ -1409,6 +1409,11 @@ $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile: make + + $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile: makefile $(SCRIPTS) $(GENIE) + $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=freebsd-clang --gcc_version=$(CLANG_VERSION) $(MAKETYPE) + +.PHONY: freebsd_arm64_clang +freebsd_arm64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile - $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile - $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 + .PHONY: freebsd_x64_clang + freebsd_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile diff --git a/emulators/mame/files/patch-scripts_genie.lua b/emulators/mame/files/patch-scripts_genie.lua new file mode 100644 index 000000000000..fbe17676dd90 --- /dev/null +++ b/emulators/mame/files/patch-scripts_genie.lua @@ -0,0 +1,14 @@ +--- scripts/genie.lua.orig 2023-05-24 01:14:32 UTC ++++ scripts/genie.lua +@@ -1238,6 +1238,11 @@ configuration { "netbsd" } + "LinkSupportCircularDependencies", + } + ++configuration { "freebsd" } ++ flags { ++ "LinkSupportCircularDependencies", ++ } ++ + configuration { "osx*" } + links { + "pthread", diff --git a/emulators/mame/files/patch-scripts_toolchain.lua b/emulators/mame/files/patch-scripts_toolchain.lua index 014ee01b1f28..fe4f9966ff46 100644 --- a/emulators/mame/files/patch-scripts_toolchain.lua +++ b/emulators/mame/files/patch-scripts_toolchain.lua @@ -1,4 +1,4 @@ ---- scripts/toolchain.lua.orig 2023-05-06 02:56:32 UTC +--- scripts/toolchain.lua.orig 2023-05-27 02:18:45 UTC +++ scripts/toolchain.lua @@ -60,7 +60,8 @@ function androidToolchainRoot() local hostTags = { @@ -6,7 +6,7 @@ linux = "linux-x86_64", - macosx = "darwin-x86_64" + macosx = "darwin-x86_64", -+ bsd = "freebsd-x86_64" ++ bsd = "freebsd-x86_64" } android.toolchainRoot = (os.getenv("ANDROID_NDK_HOME") or "") .. "/toolchains/llvm/prebuilt/" .. hostTags[os.get()] end diff --git a/emulators/mame/files/pkg-message.in b/emulators/mame/files/pkg-message.in index 0d2518668aee..2133bf702035 100644 --- a/emulators/mame/files/pkg-message.in +++ b/emulators/mame/files/pkg-message.in @@ -1,12 +1,15 @@ [ { type: install message: <