Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2018 20:57:10 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r487815 - in head/multimedia/dav1d: . files
Message-ID:  <201812192057.wBJKvAWc090360@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Dec 19 20:57:09 2018
New Revision: 487815
URL: https://svnweb.freebsd.org/changeset/ports/487815

Log:
  multimedia/dav1d: convert to upstreamable patches

Added:
  head/multimedia/dav1d/files/patch-neon-freebsd11   (contents, props changed)
Deleted:
  head/multimedia/dav1d/files/patch-neon
Modified:
  head/multimedia/dav1d/Makefile   (contents, props changed)
  head/multimedia/dav1d/distinfo   (contents, props changed)

Modified: head/multimedia/dav1d/Makefile
==============================================================================
--- head/multimedia/dav1d/Makefile	Wed Dec 19 20:15:33 2018	(r487814)
+++ head/multimedia/dav1d/Makefile	Wed Dec 19 20:57:09 2018	(r487815)
@@ -4,6 +4,10 @@ PORTNAME=	dav1d
 DISTVERSION=	0.1.0
 CATEGORIES=	multimedia
 
+PATCH_SITES=	${GL_SITE}/jbeich/${GL_PROJECT}/commit/
+PATCHFILES+=	d3a03bd9939d.patch:-p1
+PATCHFILES+=	7f01c6166519.patch:-p1
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Small and fast AV1 decoder
 

Modified: head/multimedia/dav1d/distinfo
==============================================================================
--- head/multimedia/dav1d/distinfo	Wed Dec 19 20:15:33 2018	(r487814)
+++ head/multimedia/dav1d/distinfo	Wed Dec 19 20:57:09 2018	(r487815)
@@ -3,3 +3,7 @@ SHA256 (videolan-dav1d-a6b903fb6d78f1515b2c50ba17ae50e
 SIZE (videolan-dav1d-a6b903fb6d78f1515b2c50ba17ae50ead8cf5b72_GL0.tar.gz) = 443816
 SHA256 (videolan-dav1d-test-data-0028f7f3d9cdcd0e95643e16d49d5a691807cb77_GL0.tar.gz) = f7172cb7d4f57e54d0caad8ab60fd43235983a2673a5e955c62fc3565a711eb9
 SIZE (videolan-dav1d-test-data-0028f7f3d9cdcd0e95643e16d49d5a691807cb77_GL0.tar.gz) = 31033900
+SHA256 (d3a03bd9939d.patch) = 38b32e9e7c44eccba0ae328afc79ac9c41e15b06a977da9a0606f5c16d6f0bc2
+SIZE (d3a03bd9939d.patch) = 950
+SHA256 (7f01c6166519.patch) = 6e7407f6db3a423b6c0f801c6607b0609daa948fcd5252f9ba73e7ebc42ae9ff
+SIZE (7f01c6166519.patch) = 1895

Added: head/multimedia/dav1d/files/patch-neon-freebsd11
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/dav1d/files/patch-neon-freebsd11	Wed Dec 19 20:57:09 2018	(r487815)
@@ -0,0 +1,42 @@
+- Implement NEON runtime detection on FreeBSD 11.* armv6
+
+--- src/arm/cpu.c.orig	2018-12-11 14:14:56 UTC
++++ src/arm/cpu.c
+@@ -68,7 +68,37 @@ static unsigned parse_proc_cpuinfo(const char *flag) {
+ }
+ #endif
+ 
++#if defined(__FreeBSD__) && __FreeBSD__ < 12
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <elf.h>
++#include <errno.h>
++#include <unistd.h>
++
++#define HAVE_GETAUXVAL
++#define NEON_HWCAP HWCAP_NEON
++static unsigned long getauxval(unsigned long type) {
++  Elf_Auxinfo auxv[AT_COUNT];
++  size_t len = sizeof(auxv);
++  int mib[] = {
++    CTL_KERN,
++    KERN_PROC,
++    KERN_PROC_AUXV,
++    getpid(),
++  };
++
++  if (sysctl(mib, nitems(mib), auxv, &len, NULL, 0) != -1) {
++    for (size_t i = 0; i < nitems(auxv); i++)
++      if ((unsigned long)auxv[i].a_type == type)
++        return auxv[i].a_un.a_val;
++
++    errno = ENOENT;
++  }
++  return 0;
++}
++#endif
++
+ unsigned dav1d_get_cpu_flags_arm(void) {
+     unsigned flags = 0;
+ #if ARCH_AARCH64
+     flags |= DAV1D_ARM_CPU_FLAG_NEON;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812192057.wBJKvAWc090360>