gnu: video: Return #t from all phases.

* gnu/packages/video.scm (youtube-dl-gui, avidemux, xvid, twitchy, aegisub):
Return #t from all phases, use invoke where appropriate, and remove vestigial
plumbing.
This commit is contained in:
Mark H Weaver 2018-06-27 21:08:56 -04:00
parent 4851af9ebe
commit 9dcfd6aac9
No known key found for this signature in database
GPG Key ID: 7CEF29847562C516

View File

@ -1371,7 +1371,8 @@ YouTube.com and many more sites.")
(("os\\.path\\.join\\('/usr', 'share'") (("os\\.path\\.join\\('/usr', 'share'")
(string-append "os.path.join('" (string-append "os.path.join('"
(assoc-ref %outputs "out") (assoc-ref %outputs "out")
"', 'share'")))))))) "', 'share'")))
#t)))))
(inputs (inputs
`(("python2-wxpython" ,python2-wxpython) `(("python2-wxpython" ,python2-wxpython)
("youtube-dl" ,youtube-dl))) ("youtube-dl" ,youtube-dl)))
@ -1709,67 +1710,68 @@ for use with HTML5 video.")
(add-before '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") (invoke "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
(delete-file "ffmpeg-2.7.6.tar.bz2")))) (delete-file "ffmpeg-2.7.6.tar.bz2"))
#t))
(add-after 'patch-source-shebangs 'repack-ffmpeg (add-after '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"
(("#! /bin/sh") (string-append "#!" (which "sh")))) (("#! /bin/sh") (string-append "#!" (which "sh"))))
(system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6" (invoke "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
;; 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"))
#t))
(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"))
#t))
(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 (apply invoke "cmake"
(zero? "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
(and (string-append "-DCMAKE_INSTALL_PREFIX=" out)
(apply system* "cmake" (string-append "-DCMAKE_INSTALL_RPATH=" lib)
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
(string-append "-DCMAKE_INSTALL_PREFIX=" out) "\"-Wl,-rpath=" lib "\"")
(string-append "-DCMAKE_INSTALL_RPATH=" lib) (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
(string-append "-DCMAKE_SHARED_LINKER_FLAGS=" (string-append "-DSDL_INCLUDE_DIR="
"\"-Wl,-rpath=" lib "\"") sdl "/include/SDL")
(string-append "-DAVIDEMUX_SOURCE_DIR=" top) (string-append "../" srcdir)
(string-append "-DSDL_INCLUDE_DIR=" "-DENABLE_QT5=True"
sdl "/include/SDL") args)
(string-append "../" srcdir) (invoke "make" "-j"
"-DENABLE_QT5=True"
args)
(system* "make" "-j"
(number->string (parallel-job-count))) (number->string (parallel-job-count)))
(system* "make" "install")))))))) (invoke "make" "install"))))))
(mkdir out) (mkdir out)
(and (build_component "core" "avidemux_core") (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"))
#t)))
(delete 'install)))) (delete 'install))))
(home-page "http://fixounet.free.fr/avidemux/") (home-page "http://fixounet.free.fr/avidemux/")
(synopsis "Video editor") (synopsis "Video editor")
@ -1849,7 +1851,8 @@ format changes.")
(lambda _ (lambda _
(chdir "build/generic") (chdir "build/generic")
(substitute* "configure" (substitute* "configure"
(("#! /bin/sh") (string-append "#!" (which "sh"))))))) (("#! /bin/sh") (string-append "#!" (which "sh"))))
#t)))
;; No 'check' target. ;; No 'check' target.
#:tests? #f)) #:tests? #f))
(home-page "https://www.xvid.com/") (home-page "https://www.xvid.com/")
@ -1922,7 +1925,8 @@ from sites like Twitch.tv and pipes them into a video player of choice.")
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(install-file "plugins/rofi-twitchy" (install-file "plugins/rofi-twitchy"
(string-append (assoc-ref outputs "out") (string-append (assoc-ref outputs "out")
"/bin"))))))) "/bin"))
#t)))))
(inputs (inputs
`(("python-requests" ,python-requests) `(("python-requests" ,python-requests)
("streamlink" ,streamlink))) ("streamlink" ,streamlink)))