gnu: x265: Update to 3.5.

* gnu/packages/video.scm (x265): Update to 3.5.
[source]: Update to new upstream URI.
[arguments]: Adjust custom 'prepare-build phase due to changes in the
codebase. Remove trailing #t from phases and shorten find-files.
This commit is contained in:
Efraim Flashner 2022-06-30 19:51:34 +03:00
parent 9829f53a3f
commit 857c9ce360
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -1199,22 +1199,19 @@ (define-public straw-viewer
(define-public x265
(package
(name "x265")
(version "3.4")
(version "3.5")
(outputs '("out" "static"))
(source
(origin
(method url-fetch)
(uri (list (string-append "https://bitbucket.org/multicoreware/x265"
"/downloads/x265_" version ".tar.gz")
(string-append "https://download.videolan.org/videolan/x265/"
"x265_" version ".tar.gz")))
(uri (string-append "https://bitbucket.org/multicoreware/x265_git"
"/downloads/x265_" version ".tar.gz"))
(sha256
(base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
(base32 "1s6afxj61jdwfjnn70dwiql34fbqsvn6zv10785vmjyar8sk62p7"))
(patches (search-patches "x265-arm-flags.patch"))
(modules '((guix build utils)))
(snippet '(begin
(delete-file-recursively "source/compat/getopt")
#t))))
(delete-file-recursively "source/compat/getopt")))))
(build-system cmake-build-system)
(native-inputs
;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
@ -1222,7 +1219,7 @@ (define-public x265
'()
`(("nasm" ,nasm))))
(arguments
`(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
`(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
#:configure-flags
;; Ensure position independent code for everyone.
(list "-DENABLE_PIC=TRUE"
@ -1237,7 +1234,12 @@ (define-public x265
(lambda _
(delete-file-recursively "build")
(chdir "source")
#t))
;; We're not building from a git or mercurial repository,
;; so help cmake find the version number.
(substitute* "cmake/Version.cmake"
(("if\\(X265_TAG_DISTANCE STREQUAL \"0\"\\)")
(string-append "if(TRUE)\n"
" set(X265_LATEST_TAG \"" ,version "\")\n")))))
(add-before 'configure 'build-12-bit
(lambda* (#:key (configure-flags '()) #:allow-other-keys)
(mkdir "../build-12bit")
@ -1251,8 +1253,8 @@ (define-public x265
configure-flags)
(substitute* (cons "cmake_install.cmake"
(append
(find-files "CMakeFiles/x265-shared.dir" ".")
(find-files "CMakeFiles/x265-static.dir" ".")))
(find-files "CMakeFiles/x265-shared.dir")
(find-files "CMakeFiles/x265-static.dir")))
(("libx265") "libx265_main12"))
(invoke "make"))))
(add-before 'configure 'build-10-bit
@ -1267,8 +1269,8 @@ (define-public x265
configure-flags)
(substitute* (cons "cmake_install.cmake"
(append
(find-files "CMakeFiles/x265-shared.dir" ".")
(find-files "CMakeFiles/x265-static.dir" ".")))
(find-files "CMakeFiles/x265-shared.dir")
(find-files "CMakeFiles/x265-static.dir")))
(("libx265") "libx265_main10"))
(invoke "make"))))
(add-after 'install 'install-more-libs
@ -1288,8 +1290,7 @@ (define-public x265
(lambda (file)
(rename-file file
(string-append static "/lib/" file)))
(find-files "." "\\.a$"))))
#t)))))
(find-files "." "\\.a$")))))))))
(home-page "http://x265.org/")
(synopsis "Library for encoding h.265/HEVC video streams")
(description "x265 is a H.265 / HEVC video encoder application library,