@@ -46,6 +46,7 @@ (define-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -117,7 +118,26 @@ (define-public libtheora
(patches (search-patches "libtheora-config-guess.patch"))))
(build-system gnu-build-system)
(arguments
- (list #:configure-flags #~'("--disable-static")))
+ (append
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'update-config
+ (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"))))))
+ '())
+ (list #:configure-flags #~'("--disable-static"))))
+ (native-inputs
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list config)
+ '()))
(inputs (list libvorbis))
;; The .pc files refer to libogg.
(propagated-inputs (list libogg))