Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 26 Mar 2022 22:38:46
Message-Id: 1648334307.a47be33c8409b81e5116794952bf194d5710d15b.sam@gentoo
1 commit: a47be33c8409b81e5116794952bf194d5710d15b
2 Author: Tony Lee <rufq99 <AT> gmail <DOT> com>
3 AuthorDate: Fri Nov 19 10:57:47 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 26 22:38:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a47be33c
7
8 gstreamer-meson.eclass: fix symlink issue for WORKDIR
9
10 Fixes symlink issue with a variety of gstreamer plugin packages.
11
12 Bug: https://bugs.gentoo.org/820416
13 Bug: https://bugs.gentoo.org/816702
14 Closes: https://bugs.gentoo.org/805020
15 Closes: https://github.com/gentoo/gentoo/pull/22967
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 eclass/gstreamer-meson.eclass | 14 +++++++++++---
19 1 file changed, 11 insertions(+), 3 deletions(-)
20
21 diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
22 index 490e71e9b97b..bae35c7edcea 100644
23 --- a/eclass/gstreamer-meson.eclass
24 +++ b/eclass/gstreamer-meson.eclass
25 @@ -1,4 +1,4 @@
26 -# Copyright 1999-2021 Gentoo Authors
27 +# Copyright 1999-2022 Gentoo Authors
28 # Distributed under the terms of the GNU General Public License v2
29
30 # @ECLASS: gstreamer-meson.eclass
31 @@ -383,12 +383,20 @@ gstreamer_multilib_src_compile() {
32 if [[ "${PN}" == "${GST_ORG_MODULE}" ]]; then
33 eninja
34 else
35 - local plugin_dir plugin
36 + local plugin_dir plugin build_dir
37
38 for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do
39 plugin=$(_gstreamer_get_target_filename $(gstreamer_get_plugin_dir ${plugin_dir}))
40 + # Read full link of build directory. Outputs symlink's true link.
41 + # We want to get the full file path so it can be removed later.
42 + # Working around ninja issues w/ symlinks (e.g. PORTAGE_TMPDIR as a symlink)
43 +
44 + # https://github.com/ninja-build/ninja/issues/1251
45 + # https://github.com/ninja-build/ninja/issues/1330
46 + build_dir=$(readlink -f ${BUILD_DIR})
47 +
48 plugin_path="${plugin%%:*}"
49 - eninja "${plugin_path/"${BUILD_DIR}/"}"
50 + eninja "${plugin_path/"${build_dir}/"/}"
51 done
52 fi
53 }