apteryx pushed a commit to branch master
in repository guix.

commit a3ed1a2e0d0c987b8b8fc102de3d70ecb6eb507c
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sat Mar 22 23:48:59 2025 +0900

    gnu: avidemux: Use gexps.
    
    * gnu/packages/video.scm (avidemux) [phases]: Use gexps.
    
    Change-Id: I8a02285a7c85c4cd78558e88c073d62e10fe8d4d
---
 gnu/packages/video.scm | 131 +++++++++++++++++++++++++------------------------
 1 file changed, 66 insertions(+), 65 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index cf1f4b3456..68fcb2c744 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3634,71 +3634,72 @@ for use with HTML5 video.")
            sqlite
            zlib))
     (arguments
-     `(#:tests? #f                      ; no check target
-       #:phases
-       ;; Make sure files inside the included ffmpeg tarball are
-       ;; patch-shebanged.
-       (let ((ffmpeg "ffmpeg-4.2.4"))
-         (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")))))
-           (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" "--mtime=@0"
-                         "--owner=root:0" "--group=root:0")
-                 (delete-file-recursively ffmpeg))))
-           (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))
-                      (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 "../" 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")))))
-           (delete 'install)))))
+     (list
+      #:tests? #f                       ; no check target
+      #:phases
+      ;; Make sure files inside the included ffmpeg tarball are
+      ;; patch-shebanged.
+      #~(let ((ffmpeg "ffmpeg-4.2.4"))
+          (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")))))
+            (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" "--mtime=@0"
+                          "--owner=root:0" "--group=root:0")
+                  (delete-file-recursively ffmpeg))))
+            (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 _
+                (let* ((out #$output)
+                       (lib (string-append out "/lib"))
+                       (top (getcwd))
+                       (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 "../" 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")))))
+            (delete 'install)))))
     (home-page "http://fixounet.free.fr/avidemux/";)
     (synopsis "Video editor")
     (description "Avidemux is a video editor designed for simple cutting,

Reply via email to