Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2018 17:21:48 +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: r487536 - in head/multimedia: . dav1d dav1d/files
Message-ID:  <201812151721.wBFHLm2N043576@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Dec 15 17:21:48 2018
New Revision: 487536
URL: https://svnweb.freebsd.org/changeset/ports/487536

Log:
  multimedia/dav1d: add new port

Added:
  head/multimedia/dav1d/
  head/multimedia/dav1d/Makefile   (contents, props changed)
  head/multimedia/dav1d/distinfo   (contents, props changed)
  head/multimedia/dav1d/files/
  head/multimedia/dav1d/files/patch-neon   (contents, props changed)
  head/multimedia/dav1d/pkg-descr   (contents, props changed)
  head/multimedia/dav1d/pkg-plist   (contents, props changed)
Modified:
  head/multimedia/Makefile   (contents, props changed)

Modified: head/multimedia/Makefile
==============================================================================
--- head/multimedia/Makefile	Sat Dec 15 17:19:53 2018	(r487535)
+++ head/multimedia/Makefile	Sat Dec 15 17:21:48 2018	(r487536)
@@ -44,6 +44,7 @@
     SUBDIR += cmrt
     SUBDIR += cuse4bsd-kmod
     SUBDIR += cx88
+    SUBDIR += dav1d
     SUBDIR += deforaos-player
     SUBDIR += devede
     SUBDIR += din

Added: head/multimedia/dav1d/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/dav1d/Makefile	Sat Dec 15 17:21:48 2018	(r487536)
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME=	dav1d
+DISTVERSION=	0.1.0
+CATEGORIES=	multimedia
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Small and fast AV1 decoder
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	${BUILD_DEPENDS_${ARCH}}
+BUILD_DEPENDS_aarch64=	as:devel/binutils
+BUILD_DEPENDS_amd64=	nasm:devel/nasm
+BUILD_DEPENDS_armv6=	${LOCALBASE}/bin/as:devel/binutils
+BUILD_DEPENDS_armv7=	${LOCALBASE}/bin/as:devel/binutils
+BUILD_DEPENDS_i386=	nasm:devel/nasm
+
+USES=		meson
+USE_GITLAB=	yes
+USE_LDCONFIG=	yes
+GL_SITE=	https://code.videolan.org
+GL_ACCOUNT=	videolan
+GL_COMMIT=	a6b903fb6d78f1515b2c50ba17ae50ead8cf5b72
+CONFIGURE_ENV=	UNAME_m=${ARCH} # XXX cpu_family()
+CFLAGS_aarch64=	-no-integrated-as
+CFLAGS_armv6=	-no-integrated-as -B${LOCALBASE}/bin
+CFLAGS_armv7=	-no-integrated-as -B${LOCALBASE}/bin
+
+OPTIONS_DEFINE=	TEST
+
+TEST_GL_TUPLE=	videolan:dav1d-test-data:0028f7f3d9cdcd0e95643e16d49d5a691807cb77:testdata/tests/dav1d-test-data
+TEST_MESON_TRUE=build_tests testdata_tests
+
+.if make(makesum) # for optional distfiles
+.MAKEFLAGS:	WITH="${OPTIONS_DEFINE}"
+.endif
+
+pre-install-TEST-on: do-test
+
+.include <bsd.port.mk>

Added: head/multimedia/dav1d/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/dav1d/distinfo	Sat Dec 15 17:21:48 2018	(r487536)
@@ -0,0 +1,5 @@
+TIMESTAMP = 1544537696
+SHA256 (videolan-dav1d-a6b903fb6d78f1515b2c50ba17ae50ead8cf5b72_GL0.tar.gz) = 28894914313dce4b8ffa5752502c486d11594f2b0ebd64c9dc8ee4ee28cb5e9c
+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

Added: head/multimedia/dav1d/files/patch-neon
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/dav1d/files/patch-neon	Sat Dec 15 17:21:48 2018	(r487536)
@@ -0,0 +1,75 @@
+- Assume NEON on FreeBSD armv7
+- Implement NEON runtime detection on FreeBSD armv6
+
+--- meson.build.orig	2018-12-11 14:14:56 UTC
++++ meson.build
+@@ -147,6 +147,9 @@ if (host_machine.cpu_family() == 'aarch64' or
+     if cc.has_function('getauxval', prefix : '#include <sys/auxv.h>', args : test_args)
+         cdata.set('HAVE_GETAUXVAL', 1)
+     endif
++    if cc.has_function('elf_aux_info', prefix : '#include <sys/auxv.h>', args : test_args)
++        cdata.set('HAVE_ELF_AUX_INFO', 1)
++    endif
+ endif
+ 
+ # Compiler flag tests
+--- src/arm/cpu.c.orig	2018-12-11 14:14:56 UTC
++++ src/arm/cpu.c
+@@ -29,7 +29,7 @@
+ 
+ #include "src/arm/cpu.h"
+ 
+-#if defined(HAVE_GETAUXVAL) && ARCH_ARM
++#if (defined(HAVE_GETAUXVAL) || defined(HAVE_ELF_AUX_INFO)) && ARCH_ARM
+ #include <sys/auxv.h>
+ 
+ #ifndef HWCAP_ARM_NEON
+@@ -68,12 +68,48 @@ 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;
++#elif defined(__ARM_NEON)
++    flags |= DAV1D_ARM_CPU_FLAG_NEON;
+ #elif defined(HAVE_GETAUXVAL) && ARCH_ARM
+     unsigned long hw_cap = getauxval(AT_HWCAP);
++    flags |= (hw_cap & NEON_HWCAP) ? DAV1D_ARM_CPU_FLAG_NEON : 0;
++#elif defined(HAVE_ELF_AUX_INFO) && ARCH_ARM
++    unsigned long hw_cap;
++    elf_aux_info(AT_HWCAP, &hw_cap, sizeof(hw_cap));
+     flags |= (hw_cap & NEON_HWCAP) ? DAV1D_ARM_CPU_FLAG_NEON : 0;
+ #elif defined(__ANDROID__)
+     flags |= parse_proc_cpuinfo("neon") ? DAV1D_ARM_CPU_FLAG_NEON : 0;

Added: head/multimedia/dav1d/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/dav1d/pkg-descr	Sat Dec 15 17:21:48 2018	(r487536)
@@ -0,0 +1,4 @@
+dav1d is a new AV1 cross-platform decoder, open-source, and focused on
+speed and correctness.
+
+WWW: https://code.videolan.org/videolan/dav1d

Added: head/multimedia/dav1d/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/dav1d/pkg-plist	Sat Dec 15 17:21:48 2018	(r487536)
@@ -0,0 +1,10 @@
+bin/dav1d
+include/dav1d/common.h
+include/dav1d/data.h
+include/dav1d/dav1d.h
+include/dav1d/headers.h
+include/dav1d/picture.h
+lib/libdav1d.so
+lib/libdav1d.so.0
+lib/libdav1d.so.0.1.0
+libdata/pkgconfig/dav1d.pc



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