[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/15: gnu: avidemux: Factorise ffmpeg version.
From: |
guix-commits |
Subject: |
12/15: gnu: avidemux: Factorise ffmpeg version. |
Date: |
Sun, 10 Mar 2019 21:28:21 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 642de36b9eded5d4bbcb06560ce963b60e933cec
Author: Tobias Geerinckx-Rice <address@hidden>
Date: Mon Mar 11 01:28:21 2019 +0100
gnu: avidemux: Factorise ffmpeg version.
* gnu/packages/video.scm (avidemux)[arguments]: Move oft-repeated
hard-coded ffmpeg version number to a single let-bound variable.
---
gnu/packages/video.scm | 135 +++++++++++++++++++++++++------------------------
1 file changed, 68 insertions(+), 67 deletions(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index ef73765..9d47f6d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1857,73 +1857,74 @@ for use with HTML5 video.")
#:phases
;; Make sure files inside the included ffmpeg tarball are
;; patch-shebanged.
- (modify-phases %standard-phases
- (add-before 'patch-source-shebangs 'unpack-ffmpeg
- (lambda _
- (with-directory-excursion "avidemux_core/ffmpeg_package"
- (invoke "tar" "xf" "ffmpeg-3.3.7.tar.bz2")
- (delete-file "ffmpeg-3.3.7.tar.bz2"))
- #t))
- (add-after 'patch-source-shebangs 'repack-ffmpeg
- (lambda _
- (with-directory-excursion "avidemux_core/ffmpeg_package"
- (substitute* "ffmpeg-3.3.7/configure"
- (("#! /bin/sh") (string-append "#!" (which "sh"))))
- (invoke "tar" "cjf" "ffmpeg-3.3.7.tar.bz2" "ffmpeg-3.3.7"
- ;; avoid non-determinism in the archive
- "--sort=name" "address@hidden"
- "--owner=root:0" "--group=root:0")
- (delete-file-recursively "ffmpeg-3.3.7"))
- #t))
- (replace 'configure
- (lambda _
- ;; Copy-paste settings from the cmake build system.
- (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
- (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
- #t))
- (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 #:optional (args '()))
- (let ((builddir (string-append "build_" component)))
- (mkdir builddir)
- (with-directory-excursion builddir
- (apply invoke "cmake"
- "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
- (string-append "-DCMAKE_INSTALL_PREFIX=" out)
- (string-append "-DCMAKE_INSTALL_RPATH=" lib)
- (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
- "\"-Wl,-rpath=" lib "\"")
- (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
- (string-append "-DSDL_INCLUDE_DIR="
- sdl "/include/SDL")
- (string-append "../" srcdir)
- "-DENABLE_QT5=True"
- args)
- (invoke "make" "-j"
- (number->string (parallel-job-count)))
- (invoke "make" "install"))))))
- (mkdir out)
- (build_component "core" "avidemux_core")
- (build_component "cli" "avidemux/cli")
- (build_component "qt4" "avidemux/qt4")
- (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_settings" "avidemux_plugins"
- '("-DPLUGIN_UI=SETTINGS"))
- ;; Remove .exe and .dll file.
- (delete-file-recursively
- (string-append out "/share/ADM6_addons"))
- #t)))
- (delete 'install))))
+ (let ((ffmpeg "ffmpeg-3.3.7"))
+ (modify-phases %standard-phases
+ (add-before 'patch-source-shebangs 'unpack-ffmpeg
+ (lambda _
+ (with-directory-excursion "avidemux_core/ffmpeg_package"
+ (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
+ (delete-file (string-append ffmpeg ".tar.bz2")))
+ #t))
+ (add-after 'patch-source-shebangs 'repack-ffmpeg
+ (lambda _
+ (with-directory-excursion "avidemux_core/ffmpeg_package"
+ (substitute* (string-append ffmpeg "/configure")
+ (("#! /bin/sh") (string-append "#!" (which "sh"))))
+ (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
+ ;; avoid non-determinism in the archive
+ "--sort=name" "address@hidden"
+ "--owner=root:0" "--group=root:0")
+ (delete-file-recursively ffmpeg))
+ #t))
+ (replace 'configure
+ (lambda _
+ ;; Copy-paste settings from the cmake build system.
+ (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+ (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+ #t))
+ (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 #:optional (args '()))
+ (let ((builddir (string-append "build_" component)))
+ (mkdir builddir)
+ (with-directory-excursion builddir
+ (apply invoke "cmake"
+ "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+ (string-append "-DCMAKE_INSTALL_PREFIX="
out)
+ (string-append "-DCMAKE_INSTALL_RPATH="
lib)
+ (string-append
"-DCMAKE_SHARED_LINKER_FLAGS="
+ "\"-Wl,-rpath=" lib "\"")
+ (string-append "-DAVIDEMUX_SOURCE_DIR="
top)
+ (string-append "-DSDL_INCLUDE_DIR="
+ sdl "/include/SDL")
+ (string-append "../" srcdir)
+ "-DENABLE_QT5=True"
+ args)
+ (invoke "make" "-j"
+ (number->string (parallel-job-count)))
+ (invoke "make" "install"))))))
+ (mkdir out)
+ (build_component "core" "avidemux_core")
+ (build_component "cli" "avidemux/cli")
+ (build_component "qt4" "avidemux/qt4")
+ (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_settings" "avidemux_plugins"
+ '("-DPLUGIN_UI=SETTINGS"))
+ ;; Remove .exe and .dll file.
+ (delete-file-recursively
+ (string-append out "/share/ADM6_addons"))
+ #t)))
+ (delete 'install)))))
(home-page "http://fixounet.free.fr/avidemux/")
(synopsis "Video editor")
(description "Avidemux is a video editor designed for simple cutting,
- branch master updated (8b3ad45 -> 93a72fa), guix-commits, 2019/03/10
- 14/15: gnu: python-acme, certbot: Update to 0.32.0., guix-commits, 2019/03/10
- 13/15: gnu: avidemux: Update to 2.7.2., guix-commits, 2019/03/10
- 15/15: gnu: xvid: Update to 1.3.5., guix-commits, 2019/03/10
- 09/15: gnu: texmaker: Update to 5.0.3., guix-commits, 2019/03/10
- 12/15: gnu: avidemux: Factorise ffmpeg version.,
guix-commits <=
- 11/15: gnu: avidemux: Don't use NAME in source URI., guix-commits, 2019/03/10
- 10/15: gnu: youtube-dl: Update to 2019.03.09., guix-commits, 2019/03/10
- 06/15: gnu: nginx-documentation: Update to 2019-03-01-2345-7ef11708457e., guix-commits, 2019/03/10
- 08/15: gnu: stunnel: Update to 5.50., guix-commits, 2019/03/10
- 01/15: gnu: snd: Update to 19.2., guix-commits, 2019/03/10
- 07/15: gnu: you-get: Update to 0.4.1270., guix-commits, 2019/03/10
- 03/15: gnu: xf86-video-amdgpu: Update to 19.0.0., guix-commits, 2019/03/10
- 02/15: gnu: console-setup: Update to 1.190., guix-commits, 2019/03/10
- 05/15: gnu: nginx: Update to 1.15.9., guix-commits, 2019/03/10
- 04/15: gnu: xf86-video-ati: Update to 19.0.0., guix-commits, 2019/03/10