about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorWalter Huf <hufman@gmail.com>2023-12-14 17:20:46 -0800
committerFranz Pletz <fpletz@fnordicwalking.de>2024-01-18 15:49:53 +0100
commit869635565236eee11380a508e1ada53d541be899 (patch)
tree286f0c27343dc8ebd80e7734fcae1a858aaab939 /pkgs/applications/video
parenta64d9bf4fd139ceda4b4ab2a2d01ee175a6946f1 (diff)
downloadnixlib-869635565236eee11380a508e1ada53d541be899.tar
nixlib-869635565236eee11380a508e1ada53d541be899.tar.gz
nixlib-869635565236eee11380a508e1ada53d541be899.tar.bz2
nixlib-869635565236eee11380a508e1ada53d541be899.tar.lz
nixlib-869635565236eee11380a508e1ada53d541be899.tar.xz
nixlib-869635565236eee11380a508e1ada53d541be899.tar.zst
nixlib-869635565236eee11380a508e1ada53d541be899.zip
obs-studio: patch to fix libobs.po on arm64
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/obs-studio/default.nix3
-rw-r--r--pkgs/applications/video/obs-studio/fix-arm64-cmake.patch17
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index 74b19296dbdf..0fd2f11900fd 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -94,6 +94,9 @@ stdenv.mkDerivation (finalAttrs: {
       url = "https://github.com/obsproject/obs-studio/commit/6e080a68067b27fe5463f0f4eee7df690451f3d7.patch";
       hash = "sha256-nbn/q3uszoHaDvaW8Et1MS1sgQzMsJRmjGSMHzUxV70=";
     })
+
+    # Fix libobs.pc for plugins on non-x86 systems
+    ./fix-arm64-cmake.patch
   ];
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/video/obs-studio/fix-arm64-cmake.patch b/pkgs/applications/video/obs-studio/fix-arm64-cmake.patch
new file mode 100644
index 000000000000..5f5a0553a0e1
--- /dev/null
+++ b/pkgs/applications/video/obs-studio/fix-arm64-cmake.patch
@@ -0,0 +1,17 @@
+Workaround for https://github.com/obsproject/obs-studio/issues/7972
+Based on https://git.alpinelinux.org/aports/tree/community/obs-studio/broken-config.patch?id=a92887564dcc65e07b6be8a6224fda730259ae2b
+
+diff --git a/cmake/Modules/CompilerConfig.cmake b/cmake/Modules/CompilerConfig.cmake
+index 41c56da..0535724 100644
+--- a/cmake/Modules/CompilerConfig.cmake
++++ b/cmake/Modules/CompilerConfig.cmake
+@@ -163,8 +163,7 @@ else()
+     check_c_compiler_flag("-fopenmp-simd" C_COMPILER_SUPPORTS_OPENMP_SIMD)
+     check_cxx_compiler_flag("-fopenmp-simd" CXX_COMPILER_SUPPORTS_OPENMP_SIMD)
+     set(ARCH_SIMD_FLAGS
+-        -DSIMDE_ENABLE_OPENMP "$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>"
+-        "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>")
++        -DSIMDE_ENABLE_OPENMP -fopenmp-simd)
+   endif()
+ endif()
+