mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: x265: Build 10-bit and 12-bit libraries.
* gnu/packages/video.scm (x265)[arguments]: Add configure-flag to set %output for the other builds. Add custom 'build-12-bit and 'build-10-bit phases to build their respective versions. Add a custom phase to install the 10-bit and 12-bit libraries.
This commit is contained in:
parent
db08ea4087
commit
bd606fb2ce
1 changed files with 46 additions and 4 deletions
|
@ -412,15 +412,57 @@ (define-public x265
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
|
`(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
|
||||||
;; Ensure position independent code for everyone.
|
#:configure-flags
|
||||||
#:configure-flags '("-DENABLE_PIC=TRUE")
|
;; Ensure position independent code for everyone.
|
||||||
|
(list "-DENABLE_PIC=TRUE"
|
||||||
|
(string-append "-DCMAKE_INSTALL_PREFIX="
|
||||||
|
(assoc-ref %outputs "out")))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'prepare-build
|
(add-after 'unpack 'prepare-build
|
||||||
(lambda _
|
(lambda _
|
||||||
(delete-file-recursively "build")
|
(delete-file-recursively "build")
|
||||||
(chdir "source")
|
(chdir "source")
|
||||||
#t)))))
|
#t))
|
||||||
|
(add-before 'configure 'build-12-bit
|
||||||
|
(lambda* (#:key (configure-flags '()) #:allow-other-keys)
|
||||||
|
(mkdir "../build-12bit")
|
||||||
|
(with-directory-excursion "../build-12bit"
|
||||||
|
(apply invoke
|
||||||
|
"cmake" "../source"
|
||||||
|
"-DHIGH_BIT_DEPTH=ON"
|
||||||
|
"-DEXPORT_C_API=OFF"
|
||||||
|
"-DENABLE_CLI=OFF"
|
||||||
|
"-DMAIN12=ON"
|
||||||
|
configure-flags)
|
||||||
|
(substitute* (cons "cmake_install.cmake"
|
||||||
|
(append
|
||||||
|
(find-files "CMakeFiles/x265-shared.dir" ".")
|
||||||
|
(find-files "CMakeFiles/x265-static.dir" ".")))
|
||||||
|
(("libx265") "libx265_main12"))
|
||||||
|
(invoke "make"))))
|
||||||
|
(add-before 'configure 'build-10-bit
|
||||||
|
(lambda* (#:key (configure-flags '()) #:allow-other-keys)
|
||||||
|
(mkdir "../build-10bit")
|
||||||
|
(with-directory-excursion "../build-10bit"
|
||||||
|
(apply invoke
|
||||||
|
"cmake" "../source"
|
||||||
|
"-DHIGH_BIT_DEPTH=ON"
|
||||||
|
"-DEXPORT_C_API=OFF"
|
||||||
|
"-DENABLE_CLI=OFF"
|
||||||
|
configure-flags)
|
||||||
|
(substitute* (cons "cmake_install.cmake"
|
||||||
|
(append
|
||||||
|
(find-files "CMakeFiles/x265-shared.dir" ".")
|
||||||
|
(find-files "CMakeFiles/x265-static.dir" ".")))
|
||||||
|
(("libx265") "libx265_main10"))
|
||||||
|
(invoke "make"))))
|
||||||
|
(add-after 'install 'install-more-libs
|
||||||
|
(lambda _
|
||||||
|
(with-directory-excursion "../build-12bit"
|
||||||
|
(invoke "make" "install"))
|
||||||
|
(with-directory-excursion "../build-10bit"
|
||||||
|
(invoke "make" "install")))))))
|
||||||
(home-page "http://x265.org/")
|
(home-page "http://x265.org/")
|
||||||
(synopsis "Library for encoding h.265/HEVC video streams")
|
(synopsis "Library for encoding h.265/HEVC video streams")
|
||||||
(description "x265 is a H.265 / HEVC video encoder application library,
|
(description "x265 is a H.265 / HEVC video encoder application library,
|
||||||
|
|
Loading…
Reference in a new issue