guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: Add gaupol.


From: guix-commits
Subject: 02/02: gnu: Add gaupol.
Date: Sat, 16 Mar 2019 11:56:34 -0400 (EDT)

ambrevar pushed a commit to branch master
in repository guix.

commit 0848615300ec0693b2849e80103a13063fa4b190
Author: Pierre Neidhardt <address@hidden>
Date:   Sat Mar 16 16:11:24 2019 +0100

    gnu: Add gaupol.
    
    * gnu/packages/video.scm (gaupol): New variable.
---
 gnu/packages/video.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 5b40a7d..c661c4c 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3461,3 +3461,72 @@ speed and correctness.")
       (description "Wlstream is a screen capture tool for recording audio and
 video from a Wayland session.")
       (license license:lgpl2.1+))))
+
+(define-public gaupol
+  (package
+    (name "gaupol")
+    (version "1.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/otsaloma/gaupol/";)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0dk44fmcs86ymfxfbpdbrr4x5nn5hnv57wkqjyw61g779xjhlrd2"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("python-pygobject" ,python-pygobject)
+       ("gtk+" ,gtk+)
+       ("python-pycairo" ,python-pycairo) ; Required or else clicking on a 
subtitle line fails.
+       ("python-chardet" ,python-chardet) ; Optional: Character encoding 
detection.
+       ("gtkspell3" ,gtkspell3)           ; Optional: Inline spell-checking.
+       ("iso-codes" ,iso-codes)           ; Optional: Translations.
+       ("gstreamer" ,gstreamer)
+       ("gst-libav" ,gst-libav)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gst-plugins-bad" ,gst-plugins-bad)
+       ("gst-plugins-ugly" ,gst-plugins-ugly)))
+    (arguments
+     `(#:tests? #f                      ; Tests seem to require networking.
+       #:phases
+       (modify-phases %standard-phases
+         ;; gaupol's setup.py script does not support one of the Python build
+         ;; system's default flags, "--single-version-externally-managed".
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "python" "setup.py" "install"
+                     (string-append "--prefix=" (assoc-ref outputs "out"))
+                     "--root=/")))
+         (add-after 'install 'wrap-gaupol
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
+                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+               (wrap-program (string-append out "/bin/gaupol")
+                 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
+             #t))
+         (add-after 'unpack 'patch-data-dir
+           ;; Fix some path variables that setup.py seems to garble.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "setup.py"
+                 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
+                  (string-append "DATA_DIR = '" out "/share/gaupol'\""))
+                 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
+                  (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
+               #t))))))
+    (synopsis "Editor for text-based subtitles")
+    (description
+     "Gaupol supports multiple subtitle file formats and provides means of
+creating subtitles, editing texts and timing subtitles to match video.  The
+user interface features a builtin video player and is designed with attention
+to convenience of translating and batch processing of multiple documents.")
+    (home-page "https://otsaloma.io/gaupol/";)
+    (license license:gpl3+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]