pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/multimedia



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Sat Jan 27 02:10:35 UTC 2024

Modified Files:
        pkgsrc/multimedia/ffmpeg5: Makefile Makefile.common distinfo
        pkgsrc/multimedia/ffplay5: Makefile
Added Files:
        pkgsrc/multimedia/ffmpeg5/patches: patch-libavutil_ppc_cpu.c

Log Message:
multimedia/ffmpeg5: Handle machdep.altivec on NetBSD/powerpc too.

Bump revision because this built without the change on
NetBSD/powerpc, but didn't respect machdep.altivec at runtime.

Don't build with -maltivec -mabi=altivec on powerpc.  This doesn't
disable the use of altivec; it just prevents the compiler from trying
to use altivec instructions, like vector-zero and vector-store to
zero-initialize an object on the stack, outside the parts that are
gated on runtime CPU feature detection.

Fixes ffmpeg5 on powerpc CPUs without altivec.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/multimedia/ffmpeg5/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/multimedia/ffmpeg5/Makefile.common
cvs rdiff -u -r1.10 -r1.11 pkgsrc/multimedia/ffmpeg5/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/multimedia/ffmpeg5/patches/patch-libavutil_ppc_cpu.c
cvs rdiff -u -r1.20 -r1.21 pkgsrc/multimedia/ffplay5/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/multimedia/ffmpeg5/Makefile
diff -u pkgsrc/multimedia/ffmpeg5/Makefile:1.30 pkgsrc/multimedia/ffmpeg5/Makefile:1.31
--- pkgsrc/multimedia/ffmpeg5/Makefile:1.30     Fri Jan 26 03:17:31 2024
+++ pkgsrc/multimedia/ffmpeg5/Makefile  Sat Jan 27 02:10:34 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2024/01/26 03:17:31 riastradh Exp $
+# $NetBSD: Makefile,v 1.31 2024/01/27 02:10:34 riastradh Exp $
 
 PKGNAME=       ${DISTNAME:S/ffmpeg/ffmpeg5/}
-PKGREVISION=   1
+PKGREVISION=   2
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://ffmpeg.org/
 COMMENT=       Decoding, encoding and streaming software (v5.x)

Index: pkgsrc/multimedia/ffmpeg5/Makefile.common
diff -u pkgsrc/multimedia/ffmpeg5/Makefile.common:1.9 pkgsrc/multimedia/ffmpeg5/Makefile.common:1.10
--- pkgsrc/multimedia/ffmpeg5/Makefile.common:1.9       Fri Jan 26 03:17:31 2024
+++ pkgsrc/multimedia/ffmpeg5/Makefile.common   Sat Jan 27 02:10:34 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.9 2024/01/26 03:17:31 riastradh Exp $
+# $NetBSD: Makefile.common,v 1.10 2024/01/27 02:10:34 riastradh Exp $
 # used by multimedia/ffmpeg5/Makefile
 # used by multimedia/ffplay5/Makefile
 
@@ -43,6 +43,10 @@ CONFIGURE_ARGS+=     --target-os=${LOWER_OPS
 .  if ${MACHINE_ENDIAN} == "big"
 CONFIGURE_ENV+=                bigendian=yes
 .  endif
+.  if !empty(MACHINE_ARCH:Mpowerpc*)
+BUILDLINK_TRANSFORM+=  rm:-maltivec
+BUILDLINK_TRANSFORM+=  rm:-mabi=altivec
+.  endif
 .endif
 
 .if !empty(MACHINE_PLATFORM:MDarwin-1[2-9].*-*) || !empty(MACHINE_PLATFORM:MDarwin-2*)

Index: pkgsrc/multimedia/ffmpeg5/distinfo
diff -u pkgsrc/multimedia/ffmpeg5/distinfo:1.10 pkgsrc/multimedia/ffmpeg5/distinfo:1.11
--- pkgsrc/multimedia/ffmpeg5/distinfo:1.10     Mon Nov 13 15:40:34 2023
+++ pkgsrc/multimedia/ffmpeg5/distinfo  Sat Jan 27 02:10:34 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2023/11/13 15:40:34 wiz Exp $
+$NetBSD: distinfo,v 1.11 2024/01/27 02:10:34 riastradh Exp $
 
 BLAKE2s (ffmpeg-5.1.4.tar.xz) = 9645cbe4c30b4d566831e77520b9b10f3fd7df4fadc62dd211c67660fad65233
 SHA512 (ffmpeg-5.1.4.tar.xz) = 7d7fe8c660a62971a979553a864648d5c859059d3e64d4d32e4f5dca6fd4374270abdeec2dd782c34b2254e7485995c3fe0c1dcef54159e30536eab7f20e0795
@@ -18,5 +18,6 @@ SHA1 (patch-libavdevice_sunau__enc.c) = 
 SHA1 (patch-libavformat_avformat.h) = b7662e9b90b6f6ecebe02478ac2fc0ab3bd7bf70
 SHA1 (patch-libavformat_mux__utils.c) = 225d39530656b4e2267dcdf44098e1ac5a1728ba
 SHA1 (patch-libavutil_macros.h) = 7d9770f018a2207d2dcb1fe057564e30be51fd42
+SHA1 (patch-libavutil_ppc_cpu.c) = 0c77fecf2b92fa7b8f786987b216fe70a0d45904
 SHA1 (patch-libavutil_x86_asm.h) = 8f48f9e8ec08b5176bb40fc0021f3bb913dbef22
 SHA1 (patch-libavutil_x86_cpu.c) = 9c97e68fde0fcb19741e034a803d509040ea4487

Index: pkgsrc/multimedia/ffplay5/Makefile
diff -u pkgsrc/multimedia/ffplay5/Makefile:1.20 pkgsrc/multimedia/ffplay5/Makefile:1.21
--- pkgsrc/multimedia/ffplay5/Makefile:1.20     Mon Jan 22 13:17:02 2024
+++ pkgsrc/multimedia/ffplay5/Makefile  Sat Jan 27 02:10:35 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2024/01/22 13:17:02 ryoon Exp $
+# $NetBSD: Makefile,v 1.21 2024/01/27 02:10:35 riastradh Exp $
 
 PKGNAME=       ${DISTNAME:S/ffmpeg/ffplay5/}
-PKGREVISION=   1
+PKGREVISION=   2
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://ffmpeg.org/
 COMMENT=       Simple SDL frontend for FFmpeg

Added files:

Index: pkgsrc/multimedia/ffmpeg5/patches/patch-libavutil_ppc_cpu.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg5/patches/patch-libavutil_ppc_cpu.c:1.1
--- /dev/null   Sat Jan 27 02:10:35 2024
+++ pkgsrc/multimedia/ffmpeg5/patches/patch-libavutil_ppc_cpu.c Sat Jan 27 02:10:35 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-libavutil_ppc_cpu.c,v 1.1 2024/01/27 02:10:35 riastradh Exp $
+
+Handle machdep.altivec on NetBSD like on OpenBSD.
+
+--- libavutil/ppc/cpu.c.orig   2023-11-09 23:38:54.000000000 +0000
++++ libavutil/ppc/cpu.c
+@@ -27,7 +27,7 @@
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+-#elif defined(__OpenBSD__)
++#elif defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include <machine/cpu.h>
+@@ -56,8 +56,8 @@ int ff_get_cpu_flags_ppc(void)
+     if (result == VECTORTYPE_ALTIVEC)
+         return AV_CPU_FLAG_ALTIVEC;
+     return 0;
+-#elif defined(__APPLE__) || defined(__OpenBSD__)
+-#ifdef __OpenBSD__
++#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#if defined(__NetBSD__) || defined(__OpenBSD__)
+     int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
+ #else
+     int sels[2] = {CTL_HW, HW_VECTORUNIT};



Home | Main Index | Thread Index | Old Index