summary refs log tree commit diff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-06-30 19:51:34 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-06-30 20:59:32 +0300
commit857c9ce3607b13e8e22fd5360365a74cb3ef0683 (patch)
treee34e241a4bc9d7d1c14ff71668c51a789d628f04 /gnu/packages/video.scm
parent9829f53a3f88884e245e962073528be46918ad2e (diff)
downloadguix-857c9ce3607b13e8e22fd5360365a74cb3ef0683.tar.gz
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.
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm33
1 files changed, 17 insertions, 16 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index e88c3071a3..55a477a8fd 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1199,22 +1199,19 @@ on the Invidious instances only as a fallback method.")
 (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 @@ on the Invidious instances only as a fallback method.")
          '()
          `(("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 @@ on the Invidious instances only as a fallback method.")
            (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 @@ on the Invidious instances only as a fallback method.")
                  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 @@ on the Invidious instances only as a fallback method.")
                  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 @@ on the Invidious instances only as a fallback method.")
                    (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,