all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 74079@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#74079] [PATCH 2/2] gnu: x265: Link together all library variants.
Date: Tue, 29 Oct 2024 09:32:39 +0200	[thread overview]
Message-ID: <5ef0d25dc28ffa266a2c5f036627df4f040cef35.1730186934.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1730186934.git.efraim@flashner.co.il>

* gnu/packages/video.scm (x265)[arguments]: Adjust the 'configure-flags
to link the 10bit and 12bit variants of the libraries.  Adjust the
'build-12-bit and 'build-10-bit phases to not build the shared
libraries.  Remove 'install-more-libs phase.

Change-Id: I338e9a3d216e35e6e38fe6ccfd29236d14054306
---
 gnu/packages/video.scm | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bb07a21e981..d9ac0a22806 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1323,8 +1323,11 @@ (define-public x265
     (arguments
      `(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
        #:configure-flags
-         ;; Ensure position independent code for everyone.
          (list "-DENABLE_PIC=TRUE"
+               "-DLINKED_10BIT=ON"
+               "-DLINKED_12BIT=ON"
+               "-DEXTRA_LIB=x265_main10.a;x265_main12.a"
+               "-DEXTRA_LINK_FLAGS=-L../build-10bit -L../build-12bit"
                (string-append "-DCMAKE_INSTALL_PREFIX="
                               (assoc-ref %outputs "out")))
        #:phases
@@ -1343,7 +1346,7 @@ (define-public x265
            (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
              (mkdir "../build-12bit")
              (with-directory-excursion "../build-12bit"
-               (apply invoke
+               (invoke
                  "cmake" "../source"
                  ,@(if (target-aarch64?)
                      '("-DENABLE_ASSEMBLY=OFF")
@@ -1355,8 +1358,9 @@ (define-public x265
                  "-DHIGH_BIT_DEPTH=ON"
                  "-DEXPORT_C_API=OFF"
                  "-DENABLE_CLI=OFF"
-                 "-DMAIN12=ON"
-                 configure-flags)
+                 "-DENABLE_SHARED=OFF"
+                 "-DENABLE_PIC=TRUE"
+                 "-DMAIN12=ON")
                (substitute* (cons "cmake_install.cmake"
                                   (append
                                     (find-files "CMakeFiles/x265-shared.dir")
@@ -1367,7 +1371,7 @@ (define-public x265
            (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
              (mkdir "../build-10bit")
              (with-directory-excursion "../build-10bit"
-               (apply invoke
+               (invoke
                  "cmake" "../source"
                  ,@(if (target-aarch64?)
                      '("-DENABLE_ASSEMBLY=OFF")
@@ -1379,19 +1383,14 @@ (define-public x265
                  "-DHIGH_BIT_DEPTH=ON"
                  "-DEXPORT_C_API=OFF"
                  "-DENABLE_CLI=OFF"
-                 configure-flags)
+                 "-DENABLE_SHARED=OFF"
+                 "-DENABLE_PIC=TRUE")
                (substitute* (cons "cmake_install.cmake"
                                   (append
                                     (find-files "CMakeFiles/x265-shared.dir")
                                     (find-files "CMakeFiles/x265-static.dir")))
                  (("libx265") "libx265_main10"))
                ((assoc-ref %standard-phases 'build)))))
-         (add-after 'install 'install-more-libs
-           (lambda args
-             (with-directory-excursion "../build-12bit"
-               ((assoc-ref %standard-phases 'install)))
-             (with-directory-excursion "../build-10bit"
-               ((assoc-ref %standard-phases 'install)))))
          (add-before 'strip 'move-static-libs
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





      parent reply	other threads:[~2024-10-29  7:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29  7:31 [bug#74079] [PATCH 0/2] x265: Link all library variants Efraim Flashner
2024-10-29  7:32 ` [bug#74079] [PATCH 1/2] gnu: x265: Only build with nasm on x86_64-linux Efraim Flashner
2024-10-29  7:32 ` Efraim Flashner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ef0d25dc28ffa266a2c5f036627df4f040cef35.1730186934.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=74079@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.