git: 0361482504ed - main - multimedia/aom: unbreak build on aarch64 after f0f115af84c3

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 18 Aug 2023 21:02:34 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0361482504edbe2a85a8afb65de4b1d3ad8ca4c4

commit 0361482504edbe2a85a8afb65de4b1d3ad8ca4c4
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-08-18 12:26:08 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-08-18 20:58:33 +0000

    multimedia/aom: unbreak build on aarch64 after f0f115af84c3
    
    CMake Error at build/cmake/aom_configure.cmake:212 (enable_language):
      The CMAKE_ASM_COMPILER:
    
        as
    
      is not a full path and was not found in the PATH.
    
      Tell CMake where to find the compiler by setting either the environment
      variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full
    path
      to the compiler, or to the compiler name if it is in the PATH.
    
    Reported by:    eduardo
---
 .../files/patch-build_cmake_aom__configure.cmake   | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/multimedia/aom/files/patch-build_cmake_aom__configure.cmake b/multimedia/aom/files/patch-build_cmake_aom__configure.cmake
index 20add2621400..2096d95fa6dd 100644
--- a/multimedia/aom/files/patch-build_cmake_aom__configure.cmake
+++ b/multimedia/aom/files/patch-build_cmake_aom__configure.cmake
@@ -1,4 +1,5 @@
 - FreeBSD and NetBSD powerpc* targets don't abbreviate to ppc*
+- ARM uses compiler intrinsics, so don't require GNU as
 
 --- build/cmake/aom_configure.cmake.orig	2023-08-14 21:22:47 UTC
 +++ build/cmake/aom_configure.cmake
@@ -11,3 +12,37 @@
      set(AOM_TARGET_CPU "ppc")
    else()
      message(WARNING "The architecture ${CMAKE_SYSTEM_PROCESSOR} is not "
+@@ -183,33 +183,6 @@ if(AOM_TARGET_CPU STREQUAL "x86" OR AOM_TARGET_CPU STR
+         "To build without optimizations, add -DAOM_TARGET_CPU=generic to "
+         "your cmake command line.")
+   endif()
+-  string(STRIP "${AOM_AS_FLAGS}" AOM_AS_FLAGS)
+-elseif(AOM_TARGET_CPU MATCHES "arm")
+-  if(AOM_TARGET_SYSTEM STREQUAL "Darwin")
+-    set(CMAKE_ASM_COMPILER as)
+-    set(AOM_AS_FLAGS -arch ${AOM_TARGET_CPU} -isysroot ${CMAKE_OSX_SYSROOT})
+-  elseif(AOM_TARGET_SYSTEM STREQUAL "Windows")
+-    if(NOT CMAKE_ASM_COMPILER)
+-      set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} -c -mimplicit-it=always)
+-    endif()
+-  else()
+-    if(NOT CMAKE_ASM_COMPILER)
+-      set(CMAKE_ASM_COMPILER as)
+-    endif()
+-  endif()
+-  include(CheckLanguage)
+-  check_language(ASM)
+-  if(NOT CMAKE_ASM_COMPILER)
+-    message(
+-      FATAL_ERROR
+-        "Unable to find assembler and optimizations are enabled."
+-        "Searched for ${CMAKE_ASM_COMPILER}. Install it, add it to your path,"
+-        "or set the assembler directly by adding "
+-        "-DCMAKE_ASM_COMPILER=<assembler path> to your CMake command line."
+-        "To build without optimizations, add -DAOM_TARGET_CPU=generic to your "
+-        "cmake command line.")
+-  endif()
+-  enable_language(ASM)
+   string(STRIP "${AOM_AS_FLAGS}" AOM_AS_FLAGS)
+ endif()
+