Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / x265 / fix-neon-detection.patch
blobdbb826e5466846f81bb468374cfe18341bbecd25
1 commit 72489cd0a1c229258abe4f20e4fdfd414dfa88da
2 Author: rnhmjoj <rnhmjoj@inventati.org>
3 Date: Sun Oct 2 00:15:24 2022 +0200
5 Fix NEON detection
7 diff --git a/cmake/FindNeon.cmake b/cmake/FindNeon.cmake
8 index 0062449..9c436d9 100644
9 --- a/cmake/FindNeon.cmake
10 +++ b/cmake/FindNeon.cmake
11 @@ -1,10 +1,11 @@
12 include(FindPackageHandleStandardArgs)
14 # Check the version of neon supported by the ARM CPU
15 -execute_process(COMMAND cat /proc/cpuinfo | grep Features | grep neon
16 - OUTPUT_VARIABLE neon_version
17 - ERROR_QUIET
18 - OUTPUT_STRIP_TRAILING_WHITESPACE)
19 -if(neon_version)
20 - set(CPU_HAS_NEON 1)
21 +message(STATUS "Detecting NEON support")
22 +execute_process(COMMAND sed -n "/Features.* neon/q 1" /proc/cpuinfo
23 + RESULT_VARIABLE CPU_HAS_NEON)
24 +if(CPU_HAS_NEON)
25 + message(STATUS "Detecting NEON support - supported")
26 +else()
27 + message(STATUS "Detecting NEON support - not supported" )
28 endif()