From e28042a742b7235a5b13a3a34541a0519e1f8980 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 5 Dec 2023 18:49:27 +0100 Subject: [PATCH] Guard MOZ_GMP_PATH for multiple inclusion Otherwise we get the same path repeated once for every subshell that sources the profile.d scripts. --- openh264.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openh264.spec b/openh264.spec index a28f667..bc452ee 100644 --- a/openh264.spec +++ b/openh264.spec @@ -136,8 +136,10 @@ EOF mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d cat > $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/gmpopenh264.sh << 'EOF' -MOZ_GMP_PATH="${MOZ_GMP_PATH}${MOZ_GMP_PATH:+:}%{_libdir}/mozilla/plugins/gmp-gmpopenh264/system-installed" -export MOZ_GMP_PATH +if [[ ":$MOZ_GMP_PATH:" != *":%{_libdir}/mozilla/plugins/gmp-gmpopenh264/system-installed:"* ]]; then + MOZ_GMP_PATH="${MOZ_GMP_PATH}${MOZ_GMP_PATH:+:}%{_libdir}/mozilla/plugins/gmp-gmpopenh264/system-installed" + export MOZ_GMP_PATH +fi EOF mkdir -p $RPM_BUILD_ROOT%{_datadir}/fish/vendor_conf.d