summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-10-07 10:48:06 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-11-01 19:47:54 +0200
commit34758aca7cdf440f5cdb1793d812830226cd6bdb (patch)
treeee6d0557ffa90a868c8613c669f89b151ea7d6a0
parent7825516e5ded9372f4326f1cdfd910468faef44c (diff)
gnu: libx264: Fix building on riscv64-linux.origin/wip-riscv
* gnu/packages/video.scm (libx264)[inputs]: Add config. [arguments]: Adjust configure-flags to always build PIC code. Add custom phase to replace config.guess, config.sub scripts.
-rw-r--r--gnu/packages/video.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 3a711f9732..7b61bcde1c 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -917,6 +917,8 @@ shared library and encoder and decoder command-line executables.")
(native-inputs
`(("pkg-config" ,pkg-config)
("nasm" ,nasm)))
+ (inputs
+ `(("config" ,config)))
;; TODO: Add gpac input
(arguments
`(#:tests? #f ;no check target
@@ -927,6 +929,7 @@ shared library and encoder and decoder command-line executables.")
;; program depends on ffmpeg and ffmpeg depends on
;; libx264).
"--disable-cli"
+ "--enable-pic"
;; On MIPS, we must pass "--disable-asm" or else
;; configure fails after printing: "You specified a
@@ -937,7 +940,17 @@ shared library and encoder and decoder command-line executables.")
(or (%current-target-system)
(%current-system)))
'("--disable-asm")
- '()))))
+ '()))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub")))))))
(home-page "https://www.videolan.org/developers/x264.html")
(synopsis "H.264 video coding library")
(description "libx264 is an advanced encoding library for creating