summaryrefslogtreecommitdiff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2018-11-27 19:12:01 +0200
committerEfraim Flashner <efraim@flashner.co.il>2018-11-27 19:58:00 +0200
commit020d4d2cdc388242da91819cc1b146f1a6cce93b (patch)
treecf829dc2b18e0bedc40f4dcb563b937515a91bd4 /gnu/packages/video.scm
parentbd606fb2ce9ce9ec94fa7e9b078c87790723675c (diff)
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.
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 9d3bd3c159..1e1c988c25 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,