unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31965] [PATCH] gnu: Add gaupol.
@ 2018-06-25 15:22 Pierre Neidhardt
  2018-06-25 15:27 ` Pierre Neidhardt
  2018-07-12 21:20 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Pierre Neidhardt @ 2018-06-25 15:22 UTC (permalink / raw)
  To: 31965

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

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index ff0555708..bbac4361e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2967,3 +2967,70 @@ format and some of its derived file formats, including MP4.  It operates as a
 multiplexer and demultiplexer, and can mux video and audio in several formats
 using standalone executable files.")
     (license license:isc)))
+
+(define-public gaupol
+  (package
+    (name "gaupol")
+    (version "1.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/otsaloma/gaupol/archive/"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "12hy5x6s5xk81r75x0z4n6wpq8ygsxc4mbr47qcr0kq55kbvp6jj"))))
+    (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 'install '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* (string-append out "/lib/python3.6/site-packages/aeidon/paths.py")
+                 (("^DATA_DIR = .*$")
+                  (string-append "DATA_DIR = '" out "/share/gaupol'\n"))
+                 (("^LOCALE_DIR = .*$")
+                  (string-append "LOCALE_DIR = '" out "/share/locale'\n"))))
+             #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 "http://otsaloma.io/gaupol/")
+    (license license:gpl3+)))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#31965] [PATCH] gnu: Add gaupol.
  2018-06-25 15:22 [bug#31965] [PATCH] gnu: Add gaupol Pierre Neidhardt
@ 2018-06-25 15:27 ` Pierre Neidhardt
  2018-07-12 21:21   ` Ludovic Courtès
  2018-07-12 21:20 ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Pierre Neidhardt @ 2018-06-25 15:27 UTC (permalink / raw)
  To: 31965

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]


Gaupol seems to work fine except that I can't get the embedded video
player to work.

According to upstream

	https://github.com/otsaloma/gaupol/issues/87

we need gtksink, which normally is to be bound in gst-plugins-good.
When guilx builds it, we can see that that it compiles it:


  CC       gtksink-gtksink.o
  ...
  CCLD     gtksink

However there is no further trace of it during the install phase.  It is
skipped for some reason.

Anyone?

-- 
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#31965] [PATCH] gnu: Add gaupol.
  2018-06-25 15:22 [bug#31965] [PATCH] gnu: Add gaupol Pierre Neidhardt
  2018-06-25 15:27 ` Pierre Neidhardt
@ 2018-07-12 21:20 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-07-12 21:20 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31965

Hello Pierre!

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> * gnu/packages/video.scm (gaupol): New variable.

[...]

> +         (add-after 'install '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* (string-append out "/lib/python3.6/site-packages/aeidon/paths.py")

This could break silently the day we switch to Python 3.7.  Instead, I
think you can write:

  (substitute* (find-files out "^paths\\.py$")
    …)

There’s possibly another issue: if there exists a ‘paths.pyc’ file, it
becomes outdated once we’ve modified ‘paths.py’.

Perhaps we should move this phase before the build phase?

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#31965] [PATCH] gnu: Add gaupol.
  2018-06-25 15:27 ` Pierre Neidhardt
@ 2018-07-12 21:21   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-07-12 21:21 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 31965

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> Gaupol seems to work fine except that I can't get the embedded video
> player to work.
>
> According to upstream
>
> 	https://github.com/otsaloma/gaupol/issues/87
>
> we need gtksink, which normally is to be bound in gst-plugins-good.
> When guilx builds it, we can see that that it compiles it:
>
>
>   CC       gtksink-gtksink.o
>   ...
>   CCLD     gtksink
>
> However there is no further trace of it during the install phase.  It is
> skipped for some reason.

No idea, but I suspect this is not intended.

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-12 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 15:22 [bug#31965] [PATCH] gnu: Add gaupol Pierre Neidhardt
2018-06-25 15:27 ` Pierre Neidhardt
2018-07-12 21:21   ` Ludovic Courtès
2018-07-12 21:20 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).