From 1f961ef2ace4637fc76725316cd39e989f633965 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Dec 02 2019 10:24:55 +0000 Subject: Fix /usr/bin/env removal scripts to work for flatpak builds Make sure we actually search and replace /usr/bin/env, not %{_prefix}/env as %{_prefix} is redefined as /app for flatpak builds. --- diff --git a/gimp.spec b/gimp.spec index 65d66f8..b9479d4 100644 --- a/gimp.spec +++ b/gimp.spec @@ -493,10 +493,10 @@ ln -snf gimprc-%{binver}.5 %{buildroot}/%{_mandir}/man5/gimprc.5 # Hardcode python interpreter in shipped python plug-ins. This actually has no # effect because gimp maps hashbangs with and without the /usr/bin/env detour # to the system python interpreter, but this will avoid false alarms. -grep -E -rl '^#!\s*%{_bindir}/env\s+python' --include=\*.py "%{buildroot}" | +grep -E -rl '^#!\s*/usr/bin/env\s+python' --include=\*.py "%{buildroot}" | while read file; do - sed -r '1s,^#!\s*%{_bindir}/env\s+python$,#!%{__python2},' -i "$file" - sed -r '1s,^#!\s*%{_bindir}/env\s+python2$,#!%{__python2},' -i "$file" + sed -r '1s,^#!\s*/usr/bin/env\s+python$,#!%{__python2},' -i "$file" + sed -r '1s,^#!\s*/usr/bin/env\s+python2$,#!%{__python2},' -i "$file" done echo "%{__python2}=%{__python2}" >> %{buildroot}%{_libdir}/gimp/%{lib_api_version}/interpreters/pygimp.interp