From: Vinfall <Vinfall@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] mame: update to 0273.
Date: Wed, 15 Jan 2025 03:58:26 +0100 [thread overview]
Message-ID: <20250115025826.106B722225@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-53926@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
There is an updated pull request by Vinfall against master on the void-packages repository
https://github.com/Vinfall/void-packages mame-update
https://github.com/void-linux/void-packages/pull/53926
mame: update to 0273.
#### Testing the changes
- I tested the changes in this PR: **briefly**
- Patch is from upstream to address [mamedev/mame/issue#13150](https://github.com/mamedev/mame/issues/13150) and confirm working by myself.
#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- Did not cross build due to compilation time
A patch file from https://github.com/void-linux/void-packages/pull/53926.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mame-update-53926.patch --]
[-- Type: text/x-diff, Size: 10852 bytes --]
From 8a3d9222d6ebd21c767853a48b591cde80b987b4 Mon Sep 17 00:00:00 2001
From: Vinfall <neptuniah@riseup.net>
Date: Sat, 11 Jan 2025 11:19:30 +0800
Subject: [PATCH] mame: update to 0273.
---
.../patches/disable-string-escaping.patch | 56 +++++++++++++++++++
srcpkgs/mame/template | 4 +-
2 files changed, 58 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/mame/patches/disable-string-escaping.patch
diff --git a/srcpkgs/mame/patches/disable-string-escaping.patch b/srcpkgs/mame/patches/disable-string-escaping.patch
new file mode 100644
index 00000000000000..a3e4f2e43e8f27
--- /dev/null
+++ b/srcpkgs/mame/patches/disable-string-escaping.patch
@@ -0,0 +1,56 @@
+Subject: [PATCH] genie: disable command line string escaping, fixes #13150
+https://github.com/mamedev/mame/commit/e745009c30879e63c628b9c2556a6b6e22c5af17
+
+---
+ 3rdparty/genie/src/actions/make/_make.lua | 18 ++++--------------
+ 3rdparty/genie/src/host/scripts.c | 7 +++----
+ 2 files changed, 7 insertions(+), 18 deletions(-)
+
+diff --git a/3rdparty/genie/src/actions/make/_make.lua b/3rdparty/genie/src/actions/make/_make.lua
+index 0f1a4b605191e..598c31bab9c73 100644
+--- a/3rdparty/genie/src/actions/make/_make.lua
++++ b/3rdparty/genie/src/actions/make/_make.lua
+@@ -36,21 +36,11 @@
+ --
+ -- Escape quoted string so it can be passed as define via command line.
+ --
+-
++-- FIXME: this simplistic function doesn't work properly with embedded escapes
++-- and quoted strings, nor with Windows Command Prompt quoting and escaping
++-- rules. It causes build problems on both Windows and Linux and has been disabled.
+ function _MAKE.escquote(value)
+- local result
+- if (type(value) == "table") then
+- result = { }
+- for _,v in ipairs(value) do
+- table.insert(result, _MAKE.escquote(v))
+- end
+- return result
+- else
+- -- handle simple replacements
+- result = value:gsub(" ", "\\ ")
+- result = result:gsub("\"", "\\\"")
+- return result
+- end
++ return value
+ end
+
+
+diff --git a/3rdparty/genie/src/host/scripts.c b/3rdparty/genie/src/host/scripts.c
+index d052a1418f49c..2ea0429904f3e 100644
+--- a/3rdparty/genie/src/host/scripts.c
++++ b/3rdparty/genie/src/host/scripts.c
+@@ -222,10 +222,9 @@ const char* builtin_scripts[] = {
+ "c(cfg.buildtarget.basename), libdirs, cmake.list(cfg.linkoptions), cmake.list(cc.getldflags(cfg)), cmake.list(premake.esc(premake.getlinks(cfg, \"siblings\", \"basename\"))), cmake.list(cc.getlinkflags(cfg)))\n -- Install\n _p(1, 'install(TARGETS %s RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})', premake.esc(cfg.buildtarget.basename))\n end\n _p('endif()')\n _p('')\n end\nend",
+
+ /* actions/make/_make.lua */
+- "_MAKE = { }\npremake.make = { }\nlocal make = premake.make\nfunction _MAKE.esc(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.esc(v))\nend\nreturn result\nelse\nresult = value:gsub(\"\\\\\", \"\\\\\\\\\")\nresult = result:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"%%(\", \"\\\\%(\")\nresult = result:gsub(\"%%)\", \"\\\\%)\")\nresult = result:gsub(\"$\\\\%((.-)\\\\%)\", \"$%(%1%)\")\nreturn result\nend\nend\nfunction _MAKE.escquote(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.escquote(v))\nend\nreturn result\nelse\nresult = value:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"\\\"\", \"\\\\\\\"\")\nreturn result\nend\nend\nfunction premake.make_copyrule(source, target)\n_p('%s: %s', target, source)\n_p('\\t@echo Copying $(notdir %s)', target)\n_p('\\t-$(call COPY,%s,%s)', source, target)\nend\nfunction premake.make_mkdirrule(var)\n_p('\\t@echo Cr"
+- "eating %s', var)\n_p('\\t-$(call MKDIR,%s)', var)\n_p('')\nend\nfunction make.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction _MAKE.getmakefilename(this, searchprjs)\nlocal count = 0\nfor sln in premake.solution.each() do\nif (sln.location == this.location) then count = count + 1 end\nif (searchprjs) then\nfor _,prj in ipairs(sln.projects) do\nif (prj.location == this.location) then count = count + 1 end\nend\nend\nend\nif (count == 1) then\nreturn \"Makefile\"\nelse\nreturn this.name .. \".make\"\nend\nend\nfunction _MAKE.getnames(tbl)\nlocal result = table.extract(tbl, \"name\")\nfor k,v in pairs(result) do\nresult[k] = _MAKE.esc(v)\nend\nreturn result\nend\nfunction make.settings(cfg, cc)\nif #cfg.makesettings > 0 then\nfor _, value in ipairs(cfg.makesettings) do\n_p(value)\nend\nend\nlocal toolsettings = cc.platforms[cfg.platform].cfgsettings\nif toolsettings then\n_p(toolsettings)\nend\nend\nnewaction {\ntrigger = \"gmake\",\nshort"
+- "name = \"GNU Make\",\ndescription = \"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\", \"Vala\", \"Swift\" },\nvalid_tools = {\ncc = { \"gcc\", \"ghs\" },\ndotnet = { \"mono\", \"msnet\", \"pnet\" },\nvalac = { \"valac\" },\nswift = { \"swift\" },\n},\nonsolution = function(sln)\npremake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution)\nend,\nonproject = function(prj)\nlocal makefile = _MAKE.getmakefilename(prj, true)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, makefile, premake.make_csharp)\nelseif premake.iscppproject(prj) then\npremake.generate(prj, makefile, premake.make_cpp)\nelseif premake.isswiftproject(prj) then\npremake.generate(prj, makefile, premake.make_swift)\nelse\npremake.generate(prj, makefile, premake.make_vala)\nend\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, _MAKE.ge"
+- "tmakefilename(sln, false))\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, _MAKE.getmakefilename(prj, true))\nend,\ngmake = {}\n}\n",
++ "_MAKE = { }\npremake.make = { }\nlocal make = premake.make\nfunction _MAKE.esc(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.esc(v))\nend\nreturn result\nelse\nresult = value:gsub(\"\\\\\", \"\\\\\\\\\")\nresult = result:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"%%(\", \"\\\\%(\")\nresult = result:gsub(\"%%)\", \"\\\\%)\")\nresult = result:gsub(\"$\\\\%((.-)\\\\%)\", \"$%(%1%)\")\nreturn result\nend\nend\nfunction _MAKE.escquote(value)\nreturn value\nend\nfunction premake.make_copyrule(source, target)\n_p('%s: %s', target, source)\n_p('\\t@echo Copying $(notdir %s)', target)\n_p('\\t-$(call COPY,%s,%s)', source, target)\nend\nfunction premake.make_mkdirrule(var)\n_p('\\t@echo Creating %s', var)\n_p('\\t-$(call MKDIR,%s)', var)\n_p('')\nend\nfunction make.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction _MAKE.getmakefilename(this, searchprjs)\nlocal count = 0\n"
++ "for sln in premake.solution.each() do\nif (sln.location == this.location) then count = count + 1 end\nif (searchprjs) then\nfor _,prj in ipairs(sln.projects) do\nif (prj.location == this.location) then count = count + 1 end\nend\nend\nend\nif (count == 1) then\nreturn \"Makefile\"\nelse\nreturn this.name .. \".make\"\nend\nend\nfunction _MAKE.getnames(tbl)\nlocal result = table.extract(tbl, \"name\")\nfor k,v in pairs(result) do\nresult[k] = _MAKE.esc(v)\nend\nreturn result\nend\nfunction make.settings(cfg, cc)\nif #cfg.makesettings > 0 then\nfor _, value in ipairs(cfg.makesettings) do\n_p(value)\nend\nend\nlocal toolsettings = cc.platforms[cfg.platform].cfgsettings\nif toolsettings then\n_p(toolsettings)\nend\nend\nnewaction {\ntrigger = \"gmake\",\nshortname = \"GNU Make\",\ndescription = \"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\", \"Val"
++ "a\", \"Swift\" },\nvalid_tools = {\ncc = { \"gcc\", \"ghs\" },\ndotnet = { \"mono\", \"msnet\", \"pnet\" },\nvalac = { \"valac\" },\nswift = { \"swift\" },\n},\nonsolution = function(sln)\npremake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution)\nend,\nonproject = function(prj)\nlocal makefile = _MAKE.getmakefilename(prj, true)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, makefile, premake.make_csharp)\nelseif premake.iscppproject(prj) then\npremake.generate(prj, makefile, premake.make_cpp)\nelseif premake.isswiftproject(prj) then\npremake.generate(prj, makefile, premake.make_swift)\nelse\npremake.generate(prj, makefile, premake.make_vala)\nend\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, _MAKE.getmakefilename(sln, false))\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, _MAKE.getmakefilename(prj, true))\nend,\ngmake = {}\n}\n",
+
+ /* actions/make/make_solution.lua */
+ "function premake.make_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('export config')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('PROJECTS := %s', table.concat(_MAKE.esc(projects), \" \"))\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all: $(PROJECTS)')\n_p('')\nfor _, prj in ipairs(sln.projects) do\n_p('%s: %s', _MAKE.esc(prj.name), table.concat(_MAKE.esc(table.extract(premake.getdependencies(prj), \"name\")), \" \"))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p('\\t@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p('\\t@${MAKE} --no-pr"
diff --git a/srcpkgs/mame/template b/srcpkgs/mame/template
index 29e9dcbe339387..078816f19f5706 100644
--- a/srcpkgs/mame/template
+++ b/srcpkgs/mame/template
@@ -1,6 +1,6 @@
# Template file for 'mame'
pkgname=mame
-version=0272
+version=0273
revision=1
hostmakedepends="pkg-config python3 qt6-base"
makedepends="qt6-base-devel SDL2_ttf-devel asio libutf8proc-devel libgomp-devel
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://mamedev.org"
distfiles="https://github.com/mamedev/mame/archive/mame${version}.tar.gz"
-checksum=cd83bff2f8acf72bdb105ba8e899b49ad09c25cee8a8a063ae27a954fe0dc097
+checksum=37d73e7772bd78ffffabac69a694323f37fd2215f1b5244e05b872c0154785fd
nodebug=yes
replaces="sdlmame>=0 sdlmess>=0"
next prev parent reply other threads:[~2025-01-15 2:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-11 4:24 [PR PATCH] " Vinfall
2025-01-12 2:29 ` Vinfall
2025-01-12 2:29 ` Vinfall
2025-01-12 2:31 ` Vinfall
2025-01-15 2:58 ` Vinfall [this message]
2025-01-16 1:55 ` Vinfall
2025-02-01 3:53 ` [PR PATCH] [Updated] " Vinfall
2025-02-02 10:21 ` Vinfall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250115025826.106B722225@inbox.vuxu.org \
--to=vinfall@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).