public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script
@ 2020-12-11 23:17 Mike Gilbert
  2020-12-11 23:17 ` [gentoo-dev] [PATCH 2/3] meson.eclass: use " Mike Gilbert
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Mike Gilbert @ 2020-12-11 23:17 UTC (permalink / raw
  To: gentoo-dev; +Cc: williamh, chewi, Mike Gilbert

Bug: https://bugs.gentoo.org/759433
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
 dev-util/meson/files/meson-array               | 18 ++++++++++++++++++
 ...on-0.55.3.ebuild => meson-0.55.3-r1.ebuild} |  5 +++++
 dev-util/meson/meson-9999.ebuild               |  5 +++++
 3 files changed, 28 insertions(+)
 create mode 100644 dev-util/meson/files/meson-array
 rename dev-util/meson/{meson-0.55.3.ebuild => meson-0.55.3-r1.ebuild} (96%)

diff --git a/dev-util/meson/files/meson-array b/dev-util/meson/files/meson-array
new file mode 100644
index 000000000000..0f4e8c7c6389
--- /dev/null
+++ b/dev-util/meson/files/meson-array
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import itertools
+import shlex
+import sys
+
+def quote(s):
+    return "'" + s.replace("\\", "\\\\").replace("'", "\\'") + "'"
+
+def main():
+    args = sys.argv[1:]
+    args = (shlex.split(x) for x in args)
+    args = itertools.chain.from_iterable(args)
+    args = (quote(x) for x in args)
+    print("[" + ", ".join(args) + "]")
+
+if __name__ == "__main__":
+    main()
diff --git a/dev-util/meson/meson-0.55.3.ebuild b/dev-util/meson/meson-0.55.3-r1.ebuild
similarity index 96%
rename from dev-util/meson/meson-0.55.3.ebuild
rename to dev-util/meson/meson-0.55.3-r1.ebuild
index ddf27ccdc725..4708a46b324f 100644
--- a/dev-util/meson/meson-0.55.3.ebuild
+++ b/dev-util/meson/meson-0.55.3-r1.ebuild
@@ -82,6 +82,11 @@ python_test() {
 	) || die "Testing failed with ${EPYTHON}"
 }
 
+python_install() {
+	distutils-r1_python_install
+	python_doscript "${FILESDIR}/meson-array"
+}
+
 python_install_all() {
 	distutils-r1_python_install_all
 
diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-9999.ebuild
index 38ccf9179e21..1cdd142a3f79 100644
--- a/dev-util/meson/meson-9999.ebuild
+++ b/dev-util/meson/meson-9999.ebuild
@@ -82,6 +82,11 @@ python_test() {
 	) || die "Testing failed with ${EPYTHON}"
 }
 
+python_install() {
+	distutils-r1_python_install
+	python_doscript "${FILESDIR}/meson-array"
+}
+
 python_install_all() {
 	distutils-r1_python_install_all
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-12-17 21:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11 23:17 [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script Mike Gilbert
2020-12-11 23:17 ` [gentoo-dev] [PATCH 2/3] meson.eclass: use " Mike Gilbert
2020-12-11 23:24   ` [gentoo-dev] " James Le Cuirot
2020-12-11 23:17 ` [gentoo-dev] [PATCH 3/3] app-emulation/gallium-nine-standalone: use meson-array Mike Gilbert
2020-12-12 21:07   ` William Hubbs
2020-12-12 20:48 ` [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script William Hubbs
2020-12-12 21:25   ` Mike Gilbert
2020-12-13  2:09     ` William Hubbs
2020-12-13  2:22       ` Mike Gilbert
2020-12-17 20:38         ` William Hubbs
2020-12-17 20:50           ` Mike Gilbert
2020-12-17 21:08             ` Mike Gilbert
2020-12-17 21:14               ` Michał Górny
2020-12-17 21:08           ` James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox