aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2016-07-12 17:45:13 +0300
committerEfraim Flashner <efraim@flashner.co.il>2016-07-12 18:14:22 +0300
commit08858812b57796fe5c2acee9f1675523333a149c (patch)
treed49f8187a17e92fbd9ae28fef9bdca9090f901d3
parent17dc32a40033241500123ac2c1a19709820000a7 (diff)
downloadpatches-08858812b57796fe5c2acee9f1675523333a149c.tar
patches-08858812b57796fe5c2acee9f1675523333a149c.tar.gz
gnu: obs: Remove compiler flags for non-Intel hardware.
* gnu/packages/video.scm (obs)[arguments]: If compiling for arm or mips devices then don't add Intel specific compiler flags.
-rw-r--r--gnu/packages/video.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 8d7d3323b8..eb0fdba9e4 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -26,6 +26,8 @@
(define-module (gnu packages video)
#:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
@@ -1403,7 +1405,21 @@ be used for realtime video capture via Linux-specific APIs.")
(base32
"18fycg7xlj2i89wdb9c5js0bnl964s1lpmnvmfyj11zi9k061wsg"))))
(build-system cmake-build-system)
- (arguments '(#:tests? #f)) ; no tests
+ (arguments
+ `(#:tests? #f ; no tests
+ ,@(if (any (cute string-prefix? <> (or (%current-target-system)
+ (%current-system)))
+ '("arm" "mips"))
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-architecture-specific-instructions
+ ;; non-Intel platforms fail to build with the architecture
+ ;; specific compiler flags included by default.
+ (lambda _
+ (substitute* "libobs/CMakeLists.txt"
+ (("if\\(NOT MSVC\\)") "if(MSVC)"))
+ #t))))
+ '())))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs