[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: gnu: x265: Install static libraries in a separate output.
From: |
guix-commits |
Subject: |
02/03: gnu: x265: Install static libraries in a separate output. |
Date: |
Tue, 27 Nov 2018 15:21:03 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit 020d4d2cdc388242da91819cc1b146f1a6cce93b
Author: Efraim Flashner <address@hidden>
Date: Tue Nov 27 19:12:01 2018 +0200
gnu: x265: Install static libraries in a separate output.
This saves more than 50% of the closure size.
* gnu/packages/video.scm (x265)[outputs]: New field.
[arguments]: Add custom phase to move the static libraries to a new
output.
---
gnu/packages/video.scm | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 9d3bd3c..1e1c988 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -396,6 +396,7 @@ and creating Matroska files from other media files
(@code{mkvmerge}).")
(package
(name "x265")
(version "2.9")
+ (outputs '("out" "static"))
(source
(origin
(method url-fetch)
@@ -462,7 +463,20 @@ and creating Matroska files from other media files
(@code{mkvmerge}).")
(with-directory-excursion "../build-12bit"
(invoke "make" "install"))
(with-directory-excursion "../build-10bit"
- (invoke "make" "install")))))))
+ (invoke "make" "install"))))
+ (add-before 'strip 'move-static-libs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (with-directory-excursion
+ (string-append out "/lib")
+ (for-each
+ (lambda (file)
+ (rename-file file
+ (string-append static "/lib/" file)))
+ (find-files "." "\\.a$"))))
+ #t)))))
(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,