pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/multimedia/x264 Make it build on NetBSD/macppc



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4c3d12b9ab4e
branches:  trunk
changeset: 390275:4c3d12b9ab4e
user:      martin <martin%pkgsrc.org@localhost>
date:      Sun Dec 18 09:07:24 2022 +0000

description:
Make it build on NetBSD/macppc

diffstat:

 multimedia/x264/distinfo                   |   3 ++-
 multimedia/x264/patches/patch-common_cpu.c |  24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r f2e31b16bdfc -r 4c3d12b9ab4e multimedia/x264/distinfo
--- a/multimedia/x264/distinfo  Sun Dec 18 08:26:21 2022 +0000
+++ b/multimedia/x264/distinfo  Sun Dec 18 09:07:24 2022 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2022/09/26 17:00:21 adam Exp $
+$NetBSD: distinfo,v 1.2 2022/12/18 09:07:24 martin Exp $
 
 BLAKE2s (x264-20220601.tar.bz2) = 2990b29a9425fc9ad246905ddad2a9c0e888919fb1c3fd28b96209af823a085a
 SHA512 (x264-20220601.tar.bz2) = 73b8be945a2a82ea7af5039f5baa816440292887c1cad2672556f699a9d80eb8fbc2d5e44826cb36fecbbe83e6e75095c9ccd352bd2cb128caff7d4d7ed84e81
 Size (x264-20220601.tar.bz2) = 777576 bytes
+SHA1 (patch-common_cpu.c) = 164f6962edb1eb8442247822eb80e508a2e72d77
 SHA1 (patch-configure) = c986b2ad87f940bd2cf1a96f471bd497e075b872
 SHA1 (patch-encoder_analyse.c) = 2057583899e029a4c2173c511293e6a35cf80f78
diff -r f2e31b16bdfc -r 4c3d12b9ab4e multimedia/x264/patches/patch-common_cpu.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/x264/patches/patch-common_cpu.c        Sun Dec 18 09:07:24 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-common_cpu.c,v 1.1 2022/12/18 09:07:24 martin Exp $
+
+Add support for NetBSD/macppc altivec discovery
+
+--- common/cpu.c.orig  2022-12-18 09:53:44.331288779 +0100
++++ common/cpu.c       2022-12-18 10:00:12.985921601 +0100
+@@ -305,7 +305,7 @@ uint32_t x264_cpu_detect( void )
+ 
+ #elif HAVE_ALTIVEC
+ 
+-#if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD
++#if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD || SYS_NETBSD
+ 
+ uint32_t x264_cpu_detect( void )
+ {
+@@ -320,6 +320,8 @@ uint32_t x264_cpu_detect( void )
+     size_t   length = sizeof( has_altivec );
+ #if SYS_MACOSX || SYS_OPENBSD
+     int      error = sysctl( selectors, 2, &has_altivec, &length, NULL, 0 );
++#elif SYS_NETBSD
++    int      error = sysctlbyname( "machdep.altivec", &has_altivec, &length, NULL, 0 );
+ #else
+     int      error = sysctlbyname( "hw.altivec", &has_altivec, &length, NULL, 0 );
+ #endif



Home | Main Index | Thread Index | Old Index