gnu: avidemux: Use 'modify-phases'.

* gnu/packages/video.scm (avidemux)[arguments]: Use 'modify-phases'.
This commit is contained in:
Efraim Flashner 2016-06-16 15:53:32 +03:00
parent 4cafe8adfe
commit 1898900f1f
No known key found for this signature in database
GPG key ID: F4C1D3917EACEE93

View file

@ -1098,14 +1098,13 @@ (define-public avidemux
#:phases #:phases
;; Make sure files inside the included ffmpeg tarball are ;; Make sure files inside the included ffmpeg tarball are
;; patch-shebanged. ;; patch-shebanged.
(alist-cons-before (modify-phases %standard-phases
'patch-source-shebangs 'unpack-ffmpeg (add-before 'patch-source-shebangs 'unpack-ffmpeg
(lambda _ (lambda _
(with-directory-excursion "avidemux_core/ffmpeg_package" (with-directory-excursion "avidemux_core/ffmpeg_package"
(system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2") (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
(delete-file "ffmpeg-2.7.6.tar.bz2"))) (delete-file "ffmpeg-2.7.6.tar.bz2"))))
(alist-cons-after (add-after 'patch-source-shebangs 'repack-ffmpeg
'patch-source-shebangs 'repack-ffmpeg
(lambda _ (lambda _
(with-directory-excursion "avidemux_core/ffmpeg_package" (with-directory-excursion "avidemux_core/ffmpeg_package"
(substitute* "ffmpeg-2.7.6/configure" (substitute* "ffmpeg-2.7.6/configure"
@ -1114,25 +1113,26 @@ (define-public avidemux
;; avoid non-determinism in the archive ;; avoid non-determinism in the archive
"--sort=name" "--mtime=@0" "--sort=name" "--mtime=@0"
"--owner=root:0" "--group=root:0") "--owner=root:0" "--group=root:0")
(delete-file-recursively "ffmpeg-2.7.6"))) (delete-file-recursively "ffmpeg-2.7.6"))))
(alist-replace 'configure (replace 'configure
(lambda _ (lambda _
;; Copy-paste settings from the cmake build system. ;; Copy-paste settings from the cmake build system.
(setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
(setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))) (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
(alist-replace 'build (replace 'build
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* (let*
((out (assoc-ref outputs "out")) ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib")) (lib (string-append out "/lib"))
(top (getcwd)) (top (getcwd))
(sdl (assoc-ref inputs "sdl")) (sdl (assoc-ref inputs "sdl"))
(build_component (build_component
(lambda* (component srcdir #:optional (args '())) (lambda* (component srcdir #:optional (args '()))
(let ((builddir (string-append "build_" component))) (let ((builddir (string-append "build_" component)))
(mkdir builddir) (mkdir builddir)
(with-directory-excursion builddir (with-directory-excursion builddir
(zero? (and (zero?
(and
(apply system* "cmake" (apply system* "cmake"
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
(string-append "-DCMAKE_INSTALL_PREFIX=" out) (string-append "-DCMAKE_INSTALL_PREFIX=" out)
@ -1145,26 +1145,25 @@ (define-public avidemux
(string-append "../" srcdir) (string-append "../" srcdir)
"-DENABLE_QT5=True" "-DENABLE_QT5=True"
args) args)
(system* "make" "-j" (system* "make" "-j"
(number->string (parallel-job-count))) (number->string (parallel-job-count)))
(system* "make" "install")))))))) (system* "make" "install"))))))))
(mkdir out) (mkdir out)
(and (build_component "core" "avidemux_core") (and (build_component "core" "avidemux_core")
(build_component "cli" "avidemux/cli") (build_component "cli" "avidemux/cli")
(build_component "qt4" "avidemux/qt4") (build_component "qt4" "avidemux/qt4")
(build_component "plugins_common" "avidemux_plugins" (build_component "plugins_common" "avidemux_plugins"
'("-DPLUGIN_UI=COMMON")) '("-DPLUGIN_UI=COMMON"))
(build_component "plugins_cli" "avidemux_plugins" (build_component "plugins_cli" "avidemux_plugins"
'("-DPLUGIN_UI=CLI")) '("-DPLUGIN_UI=CLI"))
(build_component "plugins_qt4" "avidemux_plugins" (build_component "plugins_qt4" "avidemux_plugins"
'("-DPLUGIN_UI=QT4")) '("-DPLUGIN_UI=QT4"))
(build_component "plugins_settings" "avidemux_plugins" (build_component "plugins_settings" "avidemux_plugins"
'("-DPLUGIN_UI=SETTINGS"))) '("-DPLUGIN_UI=SETTINGS")))
;; Remove .exe and .dll file. ;; Remove .exe and .dll file.
(delete-file-recursively (delete-file-recursively
(string-append out "/share/ADM6_addons")))) (string-append out "/share/ADM6_addons")))))
(alist-delete 'install (delete 'install))))
%standard-phases)))))))
(home-page "http://fixounet.free.fr/avidemux/") (home-page "http://fixounet.free.fr/avidemux/")
(synopsis "Video editor") (synopsis "Video editor")
(description "Avidemux is a video editor designed for simple cutting, (description "Avidemux is a video editor designed for simple cutting,