Unverified Commit 8932c3d2 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

oculante: Fix build failure due to transitive dependency `libaom-sys` build failure (#476565)

parents 45eddbaf 8bf6e0e4
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
--- a/libaom-sys-0.17.2+libaom.3.11.0/vendor/build/cmake/aom_optimization.cmake
+++ b/libaom-sys-0.17.2+libaom.3.11.0/vendor/build/cmake/aom_optimization.cmake
@@ -212,7 +212,7 @@ endfunction()
 # Currently checks only for presence of required object formats and support for
 # the -Ox argument (multipass optimization).
 function(test_nasm)
-  execute_process(COMMAND ${CMAKE_ASM_NASM_COMPILER} -hf
+  execute_process(COMMAND ${CMAKE_ASM_NASM_COMPILER} -hO
                   OUTPUT_VARIABLE nasm_helptext)
 
   if(NOT "${nasm_helptext}" MATCHES "-Ox")
@@ -220,6 +220,9 @@ function(test_nasm)
       FATAL_ERROR "Unsupported nasm: multipass optimization not supported.")
   endif()
 
+  execute_process(COMMAND ${CMAKE_ASM_NASM_COMPILER} -hf
+                  OUTPUT_VARIABLE nasm_helptext)
+
   if("${AOM_TARGET_CPU}" STREQUAL "x86")
     if("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin")
       if(NOT "${nasm_helptext}" MATCHES "macho32")
+12 −0
Original line number Diff line number Diff line
@@ -67,6 +67,18 @@ rustPlatform.buildRustPackage rec {
    "--skip=thumbnails::test_thumbs" # broken as of v0.9.2
  ];

  patches = [
    # The below patch is needed to fix this build, until the upstream dependency (libavif-rs) fixes the problem.
    # The explicit `patchFlags` can also be removed when this patch becomes obsolete.
    # <https://github.com/njaard/libavif-rs/issues/122>
    ./libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch
  ];

  patchFlags = [
    "-p1"
    "--directory=../${pname}-${version}-vendor"
  ];

  postInstall = ''
    install -Dm444 $src/res/icons/icon.png $out/share/icons/hicolor/128x128/apps/oculante.png
    install -Dm444 $src/res/oculante.desktop -t $out/share/applications