[bug#34433,1/1] gnu: Fix aegisub.

Message ID 20190211133641.7e448f1d@alma-ubu
State Accepted
Headers show
Series [bug#34433,1/1] gnu: Fix aegisub. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Björn Höfling Feb. 11, 2019, 12:36 p.m. UTC
* gnu/packages/video.scm (aegisub)[arguments]: Add phase to fix
boost headers.
---
 gnu/packages/video.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

Ricardo Wurmus Feb. 11, 2019, 12:42 p.m. UTC | #1
Hi Björn,

> * gnu/packages/video.scm (aegisub)[arguments]: Add phase to fix
> boost headers.

Thanks!

> +         (add-after 'unpack 'fix-boost-headers
> +               (lambda _
> +                 (for-each
> +                  (lambda (f)
> +                    (substitute* f
> +                      (("#include <boost/gil/gil_all.hpp>")
> +                       "#include <boost/gil.hpp>")))
> +                  (list
> +                   "src/subtitles_provider_libass.cpp"
> +                   "src/colour_button.cpp"
> +                   "src/video_provider_dummy.cpp"
> +                   "./src/video_frame.cpp"))
> +                 #t)))))

It’s better to give “substitute*” a list of files instead of using
“for-each”.

      (lambda _
        (substitute* '("src/subtitles_provider_libass.cpp"
                       "src/colour_button.cpp"
                       "src/video_provider_dummy.cpp"
                       "src/video_frame.cpp")
          (("#include <boost/gil/gil_all.hpp>")
           "#include <boost/gil.hpp>"))
        #t)

Okay with these changes.
Björn Höfling Feb. 13, 2019, 9:44 a.m. UTC | #2
On Mon, 11 Feb 2019 13:42:44 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:

> It’s better to give “substitute*” a list of files instead of using
> “for-each”.

With this change pushed as

f6974e15cfce8128d9a3fb425671b1f6fc05e49b

Thank you,

Björn

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index c0f439ea93..fb964f412f 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2877,7 +2877,20 @@  programmers to access a standard API to open and decompress media files.")
          (add-before 'configure 'fix-ldflags
            (lambda _
              (setenv "LDFLAGS" "-pthread")
-             #t)))))
+             #t))
+         (add-after 'unpack 'fix-boost-headers
+               (lambda _
+                 (for-each
+                  (lambda (f)
+                    (substitute* f
+                      (("#include <boost/gil/gil_all.hpp>")
+                       "#include <boost/gil.hpp>")))
+                  (list
+                   "src/subtitles_provider_libass.cpp"
+                   "src/colour_button.cpp"
+                   "src/video_provider_dummy.cpp"
+                   "./src/video_frame.cpp"))
+                 #t)))))
     (inputs
      `(("boost" ,boost)
        ("desktop-file-utils" ,desktop-file-utils)