all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: ffmpeg: Move flags into their own argument.
@ 2015-10-29  3:36 Andy Patterson
  2015-10-29  7:51 ` Efraim Flashner
  2015-10-29 21:11 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Patterson @ 2015-10-29  3:36 UTC (permalink / raw)
  To: guix-devel

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

Hey everyone,

Here's a simple patch which makes it easier to customize ffmpeg's
configure flags when inheriting from the package.

The reason I wanted to do this was so that I could enable TLS support
for ffmpeg locally. The comment in the configure flags specifies that
the tests fail with gnutls support enabled. The tests are currently
working for me with gnutls enabled, on AMD64. I'd like to send another
patch to enable it. Does anyone have any concerns about doing so?

Comments on this patch are welcomed, of course.

Thanks,

Andy

[-- Attachment #2: 0001-gnu-ffmpeg-Move-flags-into-their-own-argument.patch --]
[-- Type: application/octet-stream, Size: 11424 bytes --]

From c78491cc816d936722ec403e8bd498162abcf962 Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
Date: Wed, 28 Oct 2015 22:42:42 -0400
Subject: [PATCH] gnu: ffmpeg: Move flags into their own argument.

* gnu/packages/video.scm (ffmpeg)[arguments]: Move the configurable
  configure flag literals into the configure-flags argument. Call
  configure with these flags from the configure phase.
---
 gnu/packages/video.scm | 168 ++++++++++++++++++++++++++-----------------------
 1 file changed, 91 insertions(+), 77 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index d22975a..554a2ea 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -412,6 +413,89 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
        ("yasm" ,yasm)))
     (arguments
      `(#:test-target "fate"
+       #:configure-flags
+       ;; possible additional inputs:
+       ;;   --enable-avisynth        enable reading of AviSynth script
+       ;;                            files [no]
+       ;;   --enable-frei0r          enable frei0r video filtering
+       ;;   --enable-libaacplus      enable AAC+ encoding via libaacplus [no]
+       ;;   --enable-libcelt         enable CELT decoding via libcelt [no]
+       ;;   --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
+       ;;                            and libraw1394 [no]
+       ;;   --enable-libfaac         enable AAC encoding via libfaac [no]
+       ;;   --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
+       ;;   --enable-libflite        enable flite (voice synthesis) support via
+       ;;                            libflite [no]
+       ;;   --enable-libgme          enable Game Music Emu via libgme [no]
+       ;;   --enable-libgsm          enable GSM de/encoding via libgsm [no]
+       ;;   --enable-libiec61883     enable iec61883 via libiec61883 [no]
+       ;;   --enable-libilbc         enable iLBC de/encoding via libilbc [no]
+       ;;   --enable-libmodplug      enable ModPlug via libmodplug [no]
+       ;;   --enable-libnut          enable NUT (de)muxing via libnut,
+       ;;                            native (de)muxer exists [no]
+       ;;   --enable-libopencore-amrnb    enable AMR-NB de/encoding via
+       ;;                                 libopencore-amrnb [no]
+       ;;   --enable-libopencore-amrwb    enable AMR-WB decoding via
+       ;;                                 libopencore-amrwb [no]
+       ;;   --enable-libopencv       enable video filtering via libopencv [no]
+       ;;   --enable-libopenjpeg     enable JPEG 2000 de/encoding via
+       ;;                            OpenJPEG [no]
+       ;;   --enable-librtmp         enable RTMP[E] support via librtmp [no]
+       ;;   --enable-libschroedinger enable Dirac de/encoding via
+       ;;                            libschroedinger [no]
+       ;;   --enable-libshine        enable fixed-point MP3 encoding via
+       ;;                            libshine [no]
+       ;;   --enable-libssh          enable SFTP protocol via libssh [no]
+       ;;                            (libssh2 does not work)
+       ;;   --enable-libstagefright-h264  enable H.264 decoding via
+       ;;                                 libstagefright [no]
+       ;;   --enable-libutvideo      enable Ut Video encoding and decoding via
+       ;;                            libutvideo [no]
+       ;;   --enable-libv4l2         enable libv4l2/v4l-utils [no]
+       ;;   --enable-libvidstab      enable video stabilization using
+       ;;                            vid.stab [no]
+       ;;   --enable-libvo-aacenc    enable AAC encoding via libvo-aacenc [no]
+       ;;   --enable-libvo-amrwbenc  enable AMR-WB encoding via
+       ;;                            libvo-amrwbenc [no]
+       ;;   --enable-libwavpack      enable wavpack encoding via libwavpack [no]
+       ;;   --enable-libxavs         enable AVS encoding via xavs [no]
+       ;;   --enable-libzmq          enable message passing via libzmq [no]
+       ;;   --enable-libzvbi         enable teletext support via libzvbi [no]
+       ;;   --enable-opencl          enable OpenCL code
+       ;;   --enable-x11grab         enable X11 grabbing [no]
+       '("--enable-avresample"
+         "--enable-gpl" ; enable optional gpl licensed parts
+         "--enable-shared"
+         "--enable-fontconfig"
+         ;; "--enable-gnutls" ; causes test failures
+         "--enable-ladspa"
+         "--enable-libass"
+         "--enable-libbluray"
+         "--enable-libcaca"
+         "--enable-libcdio"
+         "--enable-libfreetype"
+         "--enable-libmp3lame"
+         "--enable-libopus"
+         "--enable-libpulse"
+         "--enable-libquvi"
+         "--enable-libsoxr"
+         "--enable-libspeex"
+         "--enable-libtheora"
+         "--enable-libtwolame"
+         "--enable-libvorbis"
+         "--enable-libvpx"
+         "--enable-libxvid"
+         "--enable-libx264"
+         "--enable-openal"
+
+         "--enable-runtime-cpudetect"
+
+         ;; Runtime cpu detection is not implemented on
+         ;; MIPS, so we disable some features.
+         "--disable-mips32r2"
+         "--disable-mipsdspr1"
+         "--disable-mipsdspr2"
+         "--disable-mipsfpu")
        #:phases
        (modify-phases %standard-phases
          (replace
@@ -424,83 +508,13 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
                 (("#! /bin/sh") (string-append "#!" (which "bash"))))
               (setenv "SHELL" (which "bash"))
               (setenv "CONFIG_SHELL" (which "bash"))
-              ;; possible additional inputs:
-              ;;   --enable-avisynth        enable reading of AviSynth script files [no]
-              ;;   --enable-frei0r          enable frei0r video filtering
-              ;;   --enable-libaacplus      enable AAC+ encoding via libaacplus [no]
-              ;;   --enable-libcelt         enable CELT decoding via libcelt [no]
-              ;;   --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
-              ;;                            and libraw1394 [no]
-              ;;   --enable-libfaac         enable AAC encoding via libfaac [no]
-              ;;   --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
-              ;;   --enable-libflite        enable flite (voice synthesis) support via libflite [no]
-              ;;   --enable-libgme          enable Game Music Emu via libgme [no]
-              ;;   --enable-libgsm          enable GSM de/encoding via libgsm [no]
-              ;;   --enable-libiec61883     enable iec61883 via libiec61883 [no]
-              ;;   --enable-libilbc         enable iLBC de/encoding via libilbc [no]
-              ;;   --enable-libmodplug      enable ModPlug via libmodplug [no]
-              ;;   --enable-libnut          enable NUT (de)muxing via libnut,
-              ;;                            native (de)muxer exists [no]
-              ;;   --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
-              ;;   --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
-              ;;   --enable-libopencv       enable video filtering via libopencv [no]
-              ;;   --enable-libopenjpeg     enable JPEG 2000 de/encoding via OpenJPEG [no]
-              ;;   --enable-librtmp         enable RTMP[E] support via librtmp [no]
-              ;;   --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
-              ;;   --enable-libshine        enable fixed-point MP3 encoding via libshine [no]
-              ;;   --enable-libssh          enable SFTP protocol via libssh [no]
-              ;;                            (libssh2 does not work)
-              ;;   --enable-libstagefright-h264  enable H.264 decoding via libstagefright [no]
-              ;;   --enable-libutvideo      enable Ut Video encoding and decoding via libutvideo [no]
-              ;;   --enable-libv4l2         enable libv4l2/v4l-utils [no]
-              ;;   --enable-libvidstab      enable video stabilization using vid.stab [no]
-              ;;   --enable-libvo-aacenc    enable AAC encoding via libvo-aacenc [no]
-              ;;   --enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
-              ;;   --enable-libwavpack      enable wavpack encoding via libwavpack [no]
-              ;;   --enable-libxavs         enable AVS encoding via xavs [no]
-              ;;   --enable-libzmq          enable message passing via libzmq [no]
-              ;;   --enable-libzvbi         enable teletext support via libzvbi [no]
-              ;;   --enable-opencl          enable OpenCL code
-              ;;   --enable-x11grab         enable X11 grabbing [no]
-              (zero? (system*
-                      "./configure"
-                      (string-append "--prefix=" out)
-                      ;; Add $libdir to the RUNPATH of all the binaries.
-                      (string-append "--extra-ldflags=-Wl,-rpath="
-                                     %output "/lib")
-                      "--enable-avresample"
-                      "--enable-gpl" ; enable optional gpl licensed parts
-                      "--enable-shared"
-                      "--enable-fontconfig"
-                      ;; "--enable-gnutls" ; causes test failures
-                      "--enable-ladspa"
-                      "--enable-libass"
-                      "--enable-libbluray"
-                      "--enable-libcaca"
-                      "--enable-libcdio"
-                      "--enable-libfreetype"
-                      "--enable-libmp3lame"
-                      "--enable-libopus"
-                      "--enable-libpulse"
-                      "--enable-libquvi"
-                      "--enable-libsoxr"
-                      "--enable-libspeex"
-                      "--enable-libtheora"
-                      "--enable-libtwolame"
-                      "--enable-libvorbis"
-                      "--enable-libvpx"
-                      "--enable-libxvid"
-                      "--enable-libx264"
-                      "--enable-openal"
-
-                      "--enable-runtime-cpudetect"
-
-                      ;; Runtime cpu detection is not implemented on
-                      ;; MIPS, so we disable some features.
-                      "--disable-mips32r2"
-                      "--disable-mipsdspr1"
-                      "--disable-mipsdspr2"
-                      "--disable-mipsfpu")))))
+              (zero? (apply system*
+                            "./configure"
+                            (string-append "--prefix=" out)
+                            ;; Add $libdir to the RUNPATH of all the binaries.
+                            (string-append "--extra-ldflags=-Wl,-rpath="
+                                           out "/lib")
+                            configure-flags)))))
          (add-before
           'check 'set-ld-library-path
           (lambda _
-- 
2.5.0


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

* Re: [PATCH] gnu: ffmpeg: Move flags into their own argument.
  2015-10-29  3:36 [PATCH] gnu: ffmpeg: Move flags into their own argument Andy Patterson
@ 2015-10-29  7:51 ` Efraim Flashner
  2015-10-29 21:11 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2015-10-29  7:51 UTC (permalink / raw)
  To: Andy Patterson; +Cc: guix-devel

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

On Wed, 28 Oct 2015 23:36:51 -0400
Andy Patterson <ajpatter@uwaterloo.ca> wrote:

> Hey everyone,
> 
> Here's a simple patch which makes it easier to customize ffmpeg's
> configure flags when inheriting from the package.
> 
> The reason I wanted to do this was so that I could enable TLS support
> for ffmpeg locally. The comment in the configure flags specifies that
> the tests fail with gnutls support enabled. The tests are currently
> working for me with gnutls enabled, on AMD64. I'd like to send another
> patch to enable it. Does anyone have any concerns about doing so?
> 
> Comments on this patch are welcomed, of course.

If we have problems with gnutls causing test failures on certain
architectures we could also just enable gnutls for the platforms that don't
have the issues.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] gnu: ffmpeg: Move flags into their own argument.
  2015-10-29  3:36 [PATCH] gnu: ffmpeg: Move flags into their own argument Andy Patterson
  2015-10-29  7:51 ` Efraim Flashner
@ 2015-10-29 21:11 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-10-29 21:11 UTC (permalink / raw)
  To: Andy Patterson; +Cc: guix-devel

Andy Patterson <ajpatter@uwaterloo.ca> skribis:

> The reason I wanted to do this was so that I could enable TLS support
> for ffmpeg locally. The comment in the configure flags specifies that
> the tests fail with gnutls support enabled. The tests are currently
> working for me with gnutls enabled, on AMD64. I'd like to send another
> patch to enable it. Does anyone have any concerns about doing so?

It turns out that FFmpeg already depends on GnuTLS via libquvi, per:

  guix graph -t references ffmpeg | dot -Tps > t.ps

So I would say that you can add it in a separate patch without any
problems.

> From c78491cc816d936722ec403e8bd498162abcf962 Mon Sep 17 00:00:00 2001
> From: Andy Patterson <ajpatter@uwaterloo.ca>
> Date: Wed, 28 Oct 2015 22:42:42 -0400
> Subject: [PATCH] gnu: ffmpeg: Move flags into their own argument.
>
> * gnu/packages/video.scm (ffmpeg)[arguments]: Move the configurable
>   configure flag literals into the configure-flags argument. Call
>   configure with these flags from the configure phase.

Applied, thanks!

Ludo’.

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

end of thread, other threads:[~2015-10-29 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29  3:36 [PATCH] gnu: ffmpeg: Move flags into their own argument Andy Patterson
2015-10-29  7:51 ` Efraim Flashner
2015-10-29 21:11 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.