git: 67fc04b9474f - 2024Q4 - multimedia/avidemux: fix build on armv7 with recent binutils

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Mon, 25 Nov 2024 13:23:44 UTC
The branch 2024Q4 has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=67fc04b9474f94c00c13c369bc316fcbf9faaa70

commit 67fc04b9474f94c00c13c369bc316fcbf9faaa70
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2024-11-20 11:48:37 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-11-25 13:23:32 +0000

    multimedia/avidemux: fix build on armv7 with recent binutils
    
    Recent GNU as doesn't like numerical labels that begin with leading
    zeros.  Fix the one occurrence of such a label in the bundled FFmpeg to
    fix the build on armv7.
    
    MFH:            2024Q4
    Approved by:    portmgr (build fix blanket)
    
    (cherry picked from commit c80d811ea8a01117147be9485becbee5d6945973)
---
 multimedia/avidemux/Makefile.common                |  7 ++++--
 .../avidemux/files/ffmpeg_fix_build_on_armv7.patch | 29 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/multimedia/avidemux/Makefile.common b/multimedia/avidemux/Makefile.common
index 4702cc112831..28821ae46e86 100644
--- a/multimedia/avidemux/Makefile.common
+++ b/multimedia/avidemux/Makefile.common
@@ -305,8 +305,11 @@ NOT_FOR_ARCHS=		powerpc powerpc64 powerpcspe sparc64
 NOT_FOR_ARCHS_REASON=	cmake/admDetermineSystem.cmake:78: CPU not supported
 
 post-extract:
-	@${CP} ${FILESDIR}/ffmpeg_fix_build_with_binutils_2.41.patch \
-	       ${WRKSRC}/avidemux_core/ffmpeg_package/patches
+.for p in ffmpeg_fix_build_with_binutils_2.41.patch ffmpeg_fix_build_on_armv7.patch
+	@${CP} ${FILESDIR}/$p \
+	       ${WRKSRC}/avidemux_core/ffmpeg_package/patches/
+.endfor
+
 
 post-patch:
 	@${MKDIR} ${CONFIGURE_WRKSRC}/config
diff --git a/multimedia/avidemux/files/ffmpeg_fix_build_on_armv7.patch b/multimedia/avidemux/files/ffmpeg_fix_build_on_armv7.patch
new file mode 100644
index 000000000000..3510ca86b757
--- /dev/null
+++ b/multimedia/avidemux/files/ffmpeg_fix_build_on_armv7.patch
@@ -0,0 +1,29 @@
+--- libavcodec/arm/mlpdsp_armv5te.S.orig	2024-11-20 11:30:59.957498000 +0000
++++ libavcodec/arm/mlpdsp_armv5te.S	2024-11-20 11:31:40.969226000 +0000
+@@ -229,7 +229,7 @@
+   .endif
+ 
+         // Begin loop
+-01:
++1:
+   .if TOTAL_TAPS == 0
+         // Things simplify a lot in this case
+         // In fact this could be pipelined further if it's worth it...
+@@ -241,7 +241,7 @@
+         str     ST0, [PST, #-4]!
+         str     ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
+         str     ST0, [PSAMP], #4 * MAX_CHANNELS
+-        bne     01b
++        bne     1b
+   .else
+     .if \fir_taps & 1
+       .set LOAD_REG, 1
+@@ -333,7 +333,7 @@
+         str     ST3, [PST, #-4]!
+         str     ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
+         str     ST3, [PSAMP], #4 * MAX_CHANNELS
+-        bne     01b
++        bne     1b
+   .endif
+         b       99f
+