From 1898900f1f7a743bfd951815862ae13bc4370df5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 15:53:32 +0300 Subject: gnu: avidemux: Use 'modify-phases'. * gnu/packages/video.scm (avidemux)[arguments]: Use 'modify-phases'. --- gnu/packages/video.scm | 93 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 1decb37e8c..e28375181d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1098,14 +1098,13 @@ (define-public avidemux #: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-2.7.6.tar.bz2") - (delete-file "ffmpeg-2.7.6.tar.bz2"))) - (alist-cons-after - 'patch-source-shebangs 'repack-ffmpeg + (modify-phases %standard-phases + (add-before 'patch-source-shebangs 'unpack-ffmpeg + (lambda _ + (with-directory-excursion "avidemux_core/ffmpeg_package" + (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2") + (delete-file "ffmpeg-2.7.6.tar.bz2")))) + (add-after 'patch-source-shebangs 'repack-ffmpeg (lambda _ (with-directory-excursion "avidemux_core/ffmpeg_package" (substitute* "ffmpeg-2.7.6/configure" @@ -1114,25 +1113,26 @@ (define-public avidemux ;; avoid non-determinism in the archive "--sort=name" "--mtime=@0" "--owner=root:0" "--group=root:0") - (delete-file-recursively "ffmpeg-2.7.6"))) - (alist-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"))) - (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 #:optional (args '())) - (let ((builddir (string-append "build_" component))) - (mkdir builddir) - (with-directory-excursion builddir - (zero? (and + (delete-file-recursively "ffmpeg-2.7.6")))) + (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")))) + (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 + (zero? + (and (apply system* "cmake" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" (string-append "-DCMAKE_INSTALL_PREFIX=" out) @@ -1145,26 +1145,25 @@ (define-public avidemux (string-append "../" srcdir) "-DENABLE_QT5=True" 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 "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")))) - (alist-delete 'install - %standard-phases))))))) + (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 "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"))))) + (delete 'install)))) (home-page "http://fixounet.free.fr/avidemux/") (synopsis "Video editor") (description "Avidemux is a video editor designed for simple cutting, -- cgit v1.2.3