unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch: Add avidemux
@ 2015-02-23 22:04 Andreas Enge
  2015-02-23 22:14 ` Andreas Enge
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Enge @ 2015-02-23 22:04 UTC (permalink / raw)
  To: guix-devel

Hello,

this one was not pretty...

The command line program avidemux3_cli does not work from the bash script
I am using.
avidemux3_gtk opens a little window "Glade - Cannot load glade file",
and prints the following error messages (among others):
Trying :</gnu/store/mp8fhmf27ib6i8wacd207k8jfcn0wdkp-avidemux-2.6.8/lib64/ADM_glade//main/gtk2_build.gtkBuilder>                                                                          
[GtkBuilder] Invalid property: GtkGrid.n_columns on line 549                                 
Trying :</tmp/nix-build-avidemux-2.6.8.drv-2/avidemux_2.6.8/avidemux/gtk/ADM_userInterfaces/ADM_toolkit_gtk/../glade/main/gtk2_build.gtkBuilder>                                          
[GtkBuilder] Failed to open file '/tmp/nix-build-avidemux-2.6.8.drv-2/avidemux_2.6.8/avidemux/gtk/ADM_userInterfaces/ADM_toolkit_gtk/../glade/main/gtk2_build.gtkBuilder': No such file or directory                                                                                   
Trying :<glade/main/gtk2_build.gtkBuilder>                                                   
[GtkBuilder] Failed to open file 'glade/main/gtk2_build.gtkBuilder': No such file or director
So it looks like the build directory is also coded into the binary.

Fortunately, avidemux3_qt4 works. So I would suggest to submit it as it is,
as I am not motivated to debug the gtk version, unless someone feels like it.

Andreas

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

* Re: Patch: Add avidemux
  2015-02-23 22:04 Patch: Add avidemux Andreas Enge
@ 2015-02-23 22:14 ` Andreas Enge
  2015-02-23 23:44   ` Andreas Enge
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Enge @ 2015-02-23 22:14 UTC (permalink / raw)
  To: guix-devel

PS: The package creates a directory lib64/ on x86_64, and not lib/; this
    could be a problem, as I am passing the name into a cmake flag.
    Unlike suggested in
      http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18926
    using
      (string-append  "-DCMAKE_INSTALL_LIBDIR=" out "/lib")
    as an additional cmake flag did not change anything.

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

* Re: Patch: Add avidemux
  2015-02-23 22:14 ` Andreas Enge
@ 2015-02-23 23:44   ` Andreas Enge
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Enge @ 2015-02-23 23:44 UTC (permalink / raw)
  To: guix-devel

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

The attached patch now also adds the previous version of avidemux. The gtk
binary works, as well as the command line binary with the script I was using.

Andreas


[-- Attachment #2: 0001-gnu-Add-avidemux.patch --]
[-- Type: text/plain, Size: 11529 bytes --]

From 87a4e44c433e76442735a467103a5099d46f01c4 Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Mon, 23 Feb 2015 22:59:20 +0100
Subject: [PATCH] gnu: Add avidemux.

* gnu/packages/video.scm (avidemux, avidemux-2.5): New variables.
---
 gnu/packages/video.scm | 217 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 214 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 31e5d70..6dabe22 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;;
@@ -24,21 +24,26 @@
                 #:select (gpl2 gpl2+ gpl3+ bsd-3 public-domain))
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages cdrom)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages zip)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages fribidi)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gnutls)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
@@ -55,7 +60,8 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages yasm))
+  #:use-module (gnu packages yasm)
+  #:use-module (gnu packages zip))
 
 (define-public ffmpeg
   (package
@@ -514,3 +520,208 @@ encapsulated.")
 for use with HTML5 video.")
     (home-page "http://dthompson.us/pages/software/srt2vtt")
     (license gpl3+)))
+
+(define-public avidemux
+  (package
+    (name "avidemux")
+    (version "2.6.8")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "mirror://sourceforge/avidemux/avidemux_"
+                   version ".tar.gz"))
+             (sha256
+              (base32
+               "10p60wjkzf1bxqcb6i7bx4hbqy3vqg598p3l9lc4v2c9b8iqr682"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    ;; FIXME: Once packaged, add libraries not found during the build.
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("fribidi" ,fribidi)
+       ("glu" ,glu)
+       ("gtk+" ,gtk+)
+       ("jack" ,jack-1)
+       ("lame" ,lame)
+       ("libvorbis" ,libvorbis)
+       ("libvpx" ,libvpx)
+       ("libxv" ,libxv)
+       ("perl" ,perl)
+       ("pulseaudio" ,pulseaudio)
+       ("python" ,python-wrapper)
+       ("qt" ,qt-4)
+       ("sdl" ,sdl)
+       ("sqlite" ,sqlite)
+       ("yasm" ,yasm)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f ; no check target
+       #:phases
+       ;; Make sure files inside the included ffmpeg tarball are
+       ;; patch-shebanged.
+       (alist-cons-before
+        'patch-source-shebangs 'unpack-ffmpeg
+        (lambda _
+          (with-directory-excursion "avidemux_core/ffmpeg_package"
+            (system* "tar" "xf" "ffmpeg-1.2.1.tar.bz2")
+            (delete-file "ffmpeg-1.2.1.tar.bz2")))
+        (alist-cons-after
+         'patch-source-shebangs 'repack-ffmpeg
+         (lambda _
+           (with-directory-excursion "avidemux_core/ffmpeg_package"
+             (substitute* "ffmpeg-1.2.1/configure"
+               (("#! /bin/sh") (string-append "#!" (which "bash"))))
+             (system* "tar" "cjf" "ffmpeg-1.2.1.tar.bz2" "ffmpeg-1.2.1")
+             (delete-file-recursively "ffmpeg-1.2.1")))
+         (alist-replace 'configure
+          (lambda _
+            ;; Copy-paste settings from the cmake build system.
+            (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+            (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
+          (alist-replace 'build
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let*
+                ((out (assoc-ref outputs "out"))
+                 (lib (string-append out "/lib64"))
+                 (top (getcwd))
+                 (sdl (assoc-ref inputs "sdl"))
+                 (build_component
+                   (lambda* (component srcdir #:optional (args '()))
+                     (let ((builddir (string-append "build_" component)))
+                       (mkdir builddir)
+                       (with-directory-excursion builddir
+                        (zero? (and
+                          (apply system* "cmake"
+                                 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+                                 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
+                                 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
+                                 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
+                                 (string-append "-DSDL_INCLUDE_DIR="
+                                                sdl "/include/SDL")
+                                 (string-append "../" srcdir)
+                                 args)
+                          (system* "make" "-j"
+                                   (number->string (parallel-job-count)))
+                          (system* "make" "install"))))))))
+                (mkdir out)
+                (and (build_component "core" "avidemux_core")
+                     (build_component "cli" "avidemux/cli")
+                     (build_component "qt4" "avidemux/qt4")
+                     (build_component "gtk" "avidemux/gtk")
+                     (build_component "plugins_common" "avidemux_plugins"
+                                     '("-DPLUGIN_UI=COMMON"))
+                     (build_component "plugins_cli" "avidemux_plugins"
+                                     '("-DPLUGIN_UI=CLI"))
+                     (build_component "plugins_qt4" "avidemux_plugins"
+                                     '("-DPLUGIN_UI=QT4"))
+                     (build_component "plugins_gtk" "avidemux_plugins"
+                                     '("-DPLUGIN_UI=GTK"))
+                     (build_component "plugins_settings" "avidemux_plugins"
+                                     '("-DPLUGIN_UI=SETTINGS")))
+                ;; Remove .exe and .dll file.
+                (delete-file-recursively
+                  (string-append out "/share/ADM6_addons"))))
+            (alist-delete 'install
+               %standard-phases)))))))
+    (home-page "http://fixounet.free.fr/avidemux/")
+    (synopsis "Video editor")
+    (description "Avidemux is a video editor designed for simple cutting,
+filtering and encoding tasks.  It supports many file types, including AVI,
+DVD compatible MPEG files, MP4 and ASF, using a variety of codecs.  Tasks
+can be automated using projects, job queue and powerful scripting
+capabilities.")
+    ;; Software with various licenses is included, see License.txt.
+    (license gpl2+)))
+
+(define-public avidemux-2.5
+  (package (inherit avidemux)
+    (version "2.5.6")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "mirror://sourceforge/avidemux/avidemux_"
+                   version ".tar.gz"))
+             (sha256
+              (base32
+               "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("gettext" ,gnu-gettext)
+       ("gtk+" ,gtk+-2)
+       ("jack" ,jack-1)
+       ("lame" ,lame)
+       ("libvorbis" ,libvorbis)
+       ("libvpx" ,libvpx)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("libxv" ,libxv)
+       ("perl" ,perl)
+       ("pulseaudio" ,pulseaudio)
+       ("qt" ,qt-4)
+       ("sdl" ,sdl)
+       ("yasm" ,yasm)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (alist-cons-before
+        'patch-source-shebangs 'unpack-ffmpeg
+        (lambda _
+          (with-directory-excursion "avidemux/ADM_libraries"
+            (system* "tar" "xf" "ffmpeg-0.9.tar.bz2")
+            (delete-file "ffmpeg-0.9.tar.bz2")))
+        (alist-cons-after
+         'patch-source-shebangs 'repack-ffmpeg
+         (lambda _
+           (with-directory-excursion "avidemux/ADM_libraries"
+             (substitute* "ffmpeg-0.9/configure"
+               (("#! /bin/sh") (string-append "#!" (which "bash"))))
+             (system* "tar" "cjf" "ffmpeg-0.9.tar.bz2" "ffmpeg-0.9")
+             (delete-file-recursively "ffmpeg-0.9")))
+         (alist-replace 'configure
+          (lambda _
+            (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+            (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
+          (alist-replace 'build
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let*
+                ((out (assoc-ref outputs "out"))
+                 (lib (string-append out "/lib"))
+                 (top (getcwd))
+                 (sdl (assoc-ref inputs "sdl"))
+                 (build_component
+                   (lambda* (component srcdir)
+                     (let ((builddir (string-append "build_" component)))
+                       (mkdir builddir)
+                       (with-directory-excursion builddir
+                        (zero? (and
+                          (system* "cmake"
+                                   "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+                                   (string-append "-DCMAKE_INSTALL_PREFIX="
+                                                  out)
+                                   (string-append "-DCMAKE_INSTALL_RPATH="
+                                                  lib)
+                                   (string-append "-DAVIDEMUX_SOURCE_DIR="
+                                                  top)
+                                   (string-append "-DAVIDEMUX_CORECONFIG_DIR="
+                                                  top "/build_main/config")
+                                   (string-append "-DAVIDEMUX_INSTALL_PREFIX="
+                                                  out)
+                                   (string-append "-DSDL_INCLUDE_DIR="
+                                                  sdl "/include/SDL")
+                                   (string-append "../" srcdir))
+                          (system* "make" "-j"
+                                   (number->string (parallel-job-count)))
+                          (system* "make" "install"))))))))
+                (mkdir out)
+                (and (build_component "main" ".")
+                     (build_component "plugins" "plugins"))
+                (delete-file-recursively
+                  (string-append out "/share/ADM_addons"))))
+            (alist-delete 'install
+               %standard-phases)))))))))
-- 
2.2.1


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

end of thread, other threads:[~2015-02-23 23:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 22:04 Patch: Add avidemux Andreas Enge
2015-02-23 22:14 ` Andreas Enge
2015-02-23 23:44   ` Andreas Enge

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).