aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-04-08 19:55:07 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-04-08 21:48:22 +0300
commit2afb79392d39df05e5b285ea46dd59eafb0616d8 (patch)
treed25365a277d972f2bbd06f6096ebfc1cfe26f1f5 /gnu/packages/video.scm
parenta512aa918168193249b8a277eab65e015d2dd9e3 (diff)
downloadpatches-2afb79392d39df05e5b285ea46dd59eafb0616d8.tar
patches-2afb79392d39df05e5b285ea46dd59eafb0616d8.tar.gz
openshot: Unbundle font.
* gnu/packages/video.scm (openshot)[source]: Add snippet to remove bundled font. [inputs]: Add font-ubuntu. [arguments]: Add custom 'patch-font-location to patch the search path for the unbundled font.
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 8bf13c192e..86076bfa40 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -91,6 +91,7 @@
#:use-module (gnu packages elf)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
@@ -3371,10 +3372,15 @@ API. It includes bindings for Python, Ruby, and other languages.")
(file-name (git-file-name name version))
(sha256
(base32
- "0mg63v36h7l8kv2sgf6x8c1n3ygddkqqwlciz7ccxpbm4x1idqba"))))
+ "0mg63v36h7l8kv2sgf6x8c1n3ygddkqqwlciz7ccxpbm4x1idqba"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "src/images/fonts") #t))))
(build-system python-build-system)
(inputs
`(("ffmpeg" ,ffmpeg)
+ ("font-ubuntu" ,font-ubuntu)
("libopenshot" ,libopenshot)
("python" ,python)
("python-pyqt" ,python-pyqt)
@@ -3390,6 +3396,13 @@ API. It includes bindings for Python, Ruby, and other languages.")
(guix build qt-utils))
#:phases (modify-phases %standard-phases
(delete 'build) ;install phase does all the work
+ (add-after 'unpack 'patch-font-location
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((font (assoc-ref inputs "font-ubuntu")))
+ (substitute* "src/classes/app.py"
+ (("info.IMAGES_PATH") (string-append "\"" font "\""))
+ (("fonts") "share/fonts/truetype")))
+ #t))
(add-before 'install 'set-tmp-home
(lambda _
;; src/classes/info.py "needs" to create several