summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lee <rufq99@gmail.com>2021-11-19 02:57:47 -0800
committerSam James <sam@gentoo.org>2022-03-26 22:38:27 +0000
commita47be33c8409b81e5116794952bf194d5710d15b (patch)
treec4c059d31ed61fb454cdaa6824d0f8910aecdd40 /eclass/gstreamer-meson.eclass
parentdev-python/ansible-compat: update HOMEPAGE (diff)
downloadgentoo-a47be33c8409b81e5116794952bf194d5710d15b.tar.gz
gentoo-a47be33c8409b81e5116794952bf194d5710d15b.tar.bz2
gentoo-a47be33c8409b81e5116794952bf194d5710d15b.zip
gstreamer-meson.eclass: fix symlink issue for WORKDIR
Fixes symlink issue with a variety of gstreamer plugin packages. Bug: https://bugs.gentoo.org/820416 Bug: https://bugs.gentoo.org/816702 Closes: https://bugs.gentoo.org/805020 Closes: https://github.com/gentoo/gentoo/pull/22967 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/gstreamer-meson.eclass')
-rw-r--r--eclass/gstreamer-meson.eclass14
1 files changed, 11 insertions, 3 deletions
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
index 490e71e9b97b..bae35c7edcea 100644
--- a/eclass/gstreamer-meson.eclass
+++ b/eclass/gstreamer-meson.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gstreamer-meson.eclass
@@ -383,12 +383,20 @@ gstreamer_multilib_src_compile() {
if [[ "${PN}" == "${GST_ORG_MODULE}" ]]; then
eninja
else
- local plugin_dir plugin
+ local plugin_dir plugin build_dir
for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do
plugin=$(_gstreamer_get_target_filename $(gstreamer_get_plugin_dir ${plugin_dir}))
+ # Read full link of build directory. Outputs symlink's true link.
+ # We want to get the full file path so it can be removed later.
+ # Working around ninja issues w/ symlinks (e.g. PORTAGE_TMPDIR as a symlink)
+
+ # https://github.com/ninja-build/ninja/issues/1251
+ # https://github.com/ninja-build/ninja/issues/1330
+ build_dir=$(readlink -f ${BUILD_DIR})
+
plugin_path="${plugin%%:*}"
- eninja "${plugin_path/"${BUILD_DIR}/"}"
+ eninja "${plugin_path/"${build_dir}/"/}"
done
fi
}