commit 2e145cc6a0b37be6a2fe4a3139de9706ec3d2885
Author: Dominik 'Rathann' Mierzejewski <dominik(a)greysector.net>
Date: Mon Mar 18 22:35:18 2024 +0100
use patch instead of sed
It'll fail when it no longer applies and we can drop it of fix it.
gpac-noopt.patch | 12 ++++++++++++
gpac.spec | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gpac-noopt.patch b/gpac-noopt.patch
new file mode 100644
index 0000000..2d47d03
--- /dev/null
+++ b/gpac-noopt.patch
@@ -0,0 +1,12 @@
+diff -up gpac-2.2.1/configure.orig gpac-2.2.1/configure
+--- gpac-2.2.1/configure.orig 2023-04-24 14:57:53.000000000 +0200
++++ gpac-2.2.1/configure 2024-03-18 22:28:23.019132462 +0100
+@@ -945,7 +945,7 @@ fi
+
+ #GCC opt
+ if test "$no_gcc_opt" = "no"; then
+- CFLAGS="-O3 $CFLAGS"
++ CFLAGS="$CFLAGS"
+ else
+ CFLAGS="-O0 $CFLAGS"
+ fi
diff --git a/gpac.spec b/gpac.spec
index 663d061..303f657 100644
--- a/gpac.spec
+++ b/gpac.spec
@@ -31,6 +31,8 @@ Patch2: gpac-no-zmemcpy.patch
# cuvid device pointers are 64bit on aarch64 as well
#
https://github.com/gpac/gpac/pull/2781
Patch3: gpac-aarch64-nvdec.patch
+# drop -O3 from CFLAGS
+Patch4: gpac-noopt.patch
BuildRequires: SDL2-devel
BuildRequires: a52dec-devel
@@ -116,8 +118,6 @@ iconv -f ISO-8859-1 -t UTF8 ipmpx_syntax.bt >
ipmpx_syntax.bt.utf8
touch -r ipmpx_syntax.bt{,.utf8}
mv ipmpx_syntax.bt{.utf8,}
popd
-sed -i 's/-O0 $CFLAGS/$CFLAGS/' configure
-sed -i 's/-O3 $CFLAGS/$CFLAGS/' configure
%build