diff options
author | Markus Volk <f_l_k@t-online.de> | 2025-03-30 08:58:55 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-03-31 07:41:47 -0700 |
commit | 47757aab70383cb1d3fb1df2a3652efd454c42da (patch) | |
tree | c1efdc94ff9cf0065c933c3acc42a6789f292e1b | |
parent | f4a96810bad3b418db5f4ae0f8d3e72ff9955e1c (diff) | |
download | meta-openembedded-47757aab70383cb1d3fb1df2a3652efd454c42da.tar.gz |
mpv: remove unused patch
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-multimedia/mplayer/mpv/a7efb3e62bbd0af86737f5ecb72d3a8e2a8c3b54.patch | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/meta-oe/recipes-multimedia/mplayer/mpv/a7efb3e62bbd0af86737f5ecb72d3a8e2a8c3b54.patch b/meta-oe/recipes-multimedia/mplayer/mpv/a7efb3e62bbd0af86737f5ecb72d3a8e2a8c3b54.patch deleted file mode 100644 index b8fad22c72..0000000000 --- a/meta-oe/recipes-multimedia/mplayer/mpv/a7efb3e62bbd0af86737f5ecb72d3a8e2a8c3b54.patch +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | From a7efb3e62bbd0af86737f5ecb72d3a8e2a8c3b54 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com> | ||
3 | Date: Sun, 13 Oct 2024 19:18:11 +0200 | ||
4 | Subject: [PATCH] build: fix dynamic generation of mpv.desktop file protocols | ||
5 | |||
6 | Running cross-compiled binaries may be possible, but the runtime | ||
7 | environment must be configured correctly. In some configurations, an | ||
8 | exe_wrapper needs to be used, and in all cases, the library path must be | ||
9 | set correctly for the given binary. Fortunately, Meson handles all of | ||
10 | this if cross-compilation is configured correctly. | ||
11 | |||
12 | Fix this by having Meson run the mpv binary directly, instead of as a | ||
13 | subprocess of a Python script. This ensures that the environment is | ||
14 | properly set for running host binaries, if possible. | ||
15 | |||
16 | Fixes: #15075 | ||
17 | Fixes: 056b03f9ed05607786427da8f336e3ef819b3a1e | ||
18 | |||
19 | Upstream-Status: Submitted [https://github.com/mpv-player/mpv/pull/15075] | ||
20 | |||
21 | Signed-off-by: Markus Volk <f_l_k@t-online.de> | ||
22 | --- | ||
23 | TOOLS/gen-mpv-desktop.py | 17 +++++++---------- | ||
24 | meson.build | 9 +++++++-- | ||
25 | 2 files changed, 14 insertions(+), 12 deletions(-) | ||
26 | |||
27 | diff --git a/TOOLS/gen-mpv-desktop.py b/TOOLS/gen-mpv-desktop.py | ||
28 | index 7bbb33e5be..2c45a7038e 100755 | ||
29 | --- a/TOOLS/gen-mpv-desktop.py | ||
30 | +++ b/TOOLS/gen-mpv-desktop.py | ||
31 | @@ -21,23 +21,28 @@ | ||
32 | # | ||
33 | |||
34 | import sys | ||
35 | -from subprocess import check_output | ||
36 | |||
37 | if __name__ == "__main__": | ||
38 | - with open(sys.argv[1], "r", encoding="UTF-8") as f: | ||
39 | + with open(sys.argv[1], encoding="UTF-8") as f: | ||
40 | next(f) | ||
41 | mpv_desktop = dict([line.split("=", 1) for line in f]) | ||
42 | |||
43 | if not mpv_desktop["X-KDE-Protocols"]: | ||
44 | raise ValueError("Missing X-KDE-Protocols entry in mpv.desktop file") | ||
45 | |||
46 | - mpv_protocols = check_output([sys.argv[2], "--no-config", "--list-protocols"], encoding="UTF-8") | ||
47 | - mpv_protocols = set(line.strip(" :/") for line in mpv_protocols.splitlines() if "://" in line) | ||
48 | + with open(sys.argv[2], encoding="UTF-8") as mpv_protocols: | ||
49 | + mpv_protocols = { | ||
50 | + line.strip(" :/") | ||
51 | + for line in mpv_protocols.read().splitlines() | ||
52 | + if "://" in line | ||
53 | + } | ||
54 | + | ||
55 | if len(mpv_protocols) == 0: | ||
56 | raise ValueError("Unable to parse any protocols from mpv '--list-protocols'") | ||
57 | |||
58 | protocol_list = set(mpv_desktop["X-KDE-Protocols"].strip().split(",")) | ||
59 | - mpv_desktop["X-KDE-Protocols"] = ",".join(sorted(mpv_protocols & protocol_list)) + "\n" | ||
60 | + compatible_protocols = sorted(mpv_protocols & protocol_list) | ||
61 | + mpv_desktop["X-KDE-Protocols"] = ",".join(compatible_protocols) + "\n" | ||
62 | |||
63 | with open(sys.argv[3], "w", encoding="UTF-8") as f: | ||
64 | f.write("[Desktop Entry]" + "\n") | ||
65 | diff --git a/meson.build b/meson.build | ||
66 | index b7bcb1b0ba..c2004b748c 100644 | ||
67 | --- a/meson.build | ||
68 | +++ b/meson.build | ||
69 | @@ -1830,11 +1830,16 @@ if get_option('cplayer') | ||
70 | |||
71 | if not win32 and not darwin | ||
72 | if meson.can_run_host_binaries() | ||
73 | + mpv_protocols = custom_target('mpv_protocols', | ||
74 | + output: 'mpv_protocols', | ||
75 | + command: [mpv, '--no-config','--list-protocols'], | ||
76 | + capture: true, | ||
77 | + ) | ||
78 | mpv_desktop_path = join_paths(source_root, 'etc', 'mpv.desktop') | ||
79 | custom_target('mpv.desktop', | ||
80 | - depends: mpv, | ||
81 | + input: mpv_protocols, | ||
82 | output: 'mpv.desktop', | ||
83 | - command: [mpv_desktop, mpv_desktop_path, mpv.full_path(), '@OUTPUT@'], | ||
84 | + command: [mpv_desktop, mpv_desktop_path, '@INPUT@', '@OUTPUT@'], | ||
85 | install: true, | ||
86 | install_dir: join_paths(datadir, 'applications'), | ||
87 | ) | ||