Skip to content

Commit

Permalink
multimedia/aom: update to 3.8.0
Browse files Browse the repository at this point in the history
Changes:	https://aomedia.googlesource.com/aom/+log/v3.7.1..v3.8.0
Reported by:	Repology, portscout
  • Loading branch information
jbeich committed Dec 7, 2023
1 parent 890355b commit 807f3c0
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 54 deletions.
2 changes: 1 addition & 1 deletion multimedia/aom/Makefile
@@ -1,6 +1,6 @@
PORTNAME= aom
DISTVERSIONPREFIX= v
DISTVERSION= 3.7.1
DISTVERSION= 3.8.0
CATEGORIES= multimedia

MAINTAINER= jbeich@FreeBSD.org
Expand Down
6 changes: 3 additions & 3 deletions multimedia/aom/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1700269070
SHA256 (jbeich-aom-v3.7.1_GH0.tar.gz) = ece0d7d5d2a6b83231e51ffba5aa419df0d855e47e86a34a9e2a99c0211a5f8c
SIZE (jbeich-aom-v3.7.1_GH0.tar.gz) = 5357475
TIMESTAMP = 1701386292
SHA256 (jbeich-aom-v3.8.0_GH0.tar.gz) = d8e0cb0157410e97ffcf01f4fe24e6447303c46cc4103d6597ba30ef508afe05
SIZE (jbeich-aom-v3.8.0_GH0.tar.gz) = 5458954
39 changes: 39 additions & 0 deletions multimedia/aom/files/patch-aom__ports_aarch32__cpudetect.c
@@ -0,0 +1,39 @@
- Assume NEON is enabled on armv7
- Implement runtime detection on FreeBSD

--- aom_ports/aarch32_cpudetect.c.orig 2023-11-30 23:18:12 UTC
+++ aom_ports/aarch32_cpudetect.c
@@ -12,7 +12,7 @@

#include "arm_cpudetect.h"

-#if !CONFIG_RUNTIME_CPU_DETECT
+#if !CONFIG_RUNTIME_CPU_DETECT || defined(__ARM_NEON)

static int arm_get_cpu_caps(void) {
// This function should actually be a no-op. There is no way to adjust any of
@@ -55,9 +55,23 @@ static int arm_get_cpu_caps(void) {
return flags;
}

-#elif defined(__linux__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
+#elif defined(__linux__) || defined(__FreeBSD__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)

#include <sys/auxv.h>
+
+#if defined(__FreeBSD__)
+static unsigned long getauxval(unsigned long type)
+{
+ /* Only AT_HWCAP* return unsigned long */
+ if (type != AT_HWCAP && type != AT_HWCAP2) {
+ return 0;
+ }
+
+ unsigned long ret = 0;
+ elf_aux_info(type, &ret, sizeof(ret));
+ return ret;
+}
+#endif

// Define hwcap values ourselves: building with an old auxv header where these
// hwcap values are not defined should not prevent features from being enabled.
29 changes: 29 additions & 0 deletions multimedia/aom/files/patch-aom__ports_aarch64__cpudetect.c
@@ -0,0 +1,29 @@
- Implement runtime detection on FreeBSD

--- aom_ports/aarch64_cpudetect.c.orig 2023-11-30 23:18:12 UTC
+++ aom_ports/aarch64_cpudetect.c
@@ -95,9 +95,23 @@ static int arm_get_cpu_caps(void) {
return flags;
}

-#elif defined(__linux__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
+#elif defined(__linux__) || defined(__FreeBSD__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)

#include <sys/auxv.h>
+
+#if defined(__FreeBSD__)
+static unsigned long getauxval(unsigned long type)
+{
+ /* Only AT_HWCAP* return unsigned long */
+ if (type != AT_HWCAP && type != AT_HWCAP2) {
+ return 0;
+ }
+
+ unsigned long ret = 0;
+ elf_aux_info(type, &ret, sizeof(ret));
+ return ret;
+}
+#endif

// Define hwcap values ourselves: building with an old auxv header where these
// hwcap values are not defined should not prevent features from being enabled.
41 changes: 0 additions & 41 deletions multimedia/aom/files/patch-aom__ports_arm__cpudetect.c

This file was deleted.

16 changes: 8 additions & 8 deletions multimedia/aom/files/patch-build_cmake_cpu.cmake
@@ -1,13 +1,13 @@
- Don't enable NEON on armv6 similar to build/cmake/rtcd.pl

--- build/cmake/cpu.cmake.orig 2023-08-14 21:22:47 UTC
--- build/cmake/cpu.cmake.orig 2023-11-30 23:18:12 UTC
+++ build/cmake/cpu.cmake
@@ -9,7 +9,7 @@
# can obtain it at www.aomedia.org/license/patent.
#
@@ -61,7 +61,7 @@ if("${AOM_TARGET_CPU}" STREQUAL "arm64")
endif()
endforeach()

-if("${AOM_TARGET_CPU}" MATCHES "^arm")
+if("${AOM_TARGET_CPU}" MATCHES "^arm" AND NOT "${AOM_TARGET_CPU}" MATCHES "^armv6")
-elseif("${AOM_TARGET_CPU}" MATCHES "^arm")
+elseif("${AOM_TARGET_CPU}" MATCHES "^arm" AND NOT "${AOM_TARGET_CPU}" MATCHES "^armv6")
set(AOM_ARCH_ARM 1)
if("${AOM_TARGET_CPU}" STREQUAL "arm64")
set(AOM_ARCH_AARCH64 1)
set(RTCD_ARCH_ARM "yes")

2 changes: 1 addition & 1 deletion multimedia/aom/pkg-plist
Expand Up @@ -13,5 +13,5 @@ include/aom/aomdx.h
lib/libaom.a
lib/libaom.so
lib/libaom.so.3
lib/libaom.so.3.7.1
lib/libaom.so.3.8.0
libdata/pkgconfig/aom.pc

0 comments on commit 807f3c0

Please sign in to comment.