summaryrefslogtreecommitdiff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-01-07 16:27:09 +0100
committerLudovic Courtès <ludo@gnu.org>2024-01-07 16:56:00 +0100
commit5f8a993aa85554ca09bd27139230d7664107e1b6 (patch)
tree024049e8391035e74a625c733a200a56a4823e4f /gnu/packages/video.scm
parent5d97fdb608a89e8653f093bf34720e0822124805 (diff)
gnu: mkvtoolnix: Remove input labels and use gexps.
* gnu/packages/video.scm (mkvtoolnix)[native-inputs]: Remove labels. [arguments]: Use gexps and ‘this-package-input’ & co. Change-Id: I12b6638cd78c8c957ac9856c0e19025f4941847e
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm157
1 files changed, 83 insertions, 74 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index d1b163dc8b..4181013b0d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1090,81 +1090,90 @@ H.264 (MPEG-4 AVC) video streams.")
utfcpp
zlib))
(native-inputs
- `(("docbook-xsl" ,docbook-xsl)
- ("gettext" ,gettext-minimal)
- ("googletest" ,googletest)
- ("libxslt" ,libxslt)
- ("nlohmann-json" ,nlohmann-json)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
- ("po4a" ,po4a)
- ("qttools" ,qttools)
- ("ruby" ,ruby-3.2)))
+ (list docbook-xsl
+ gettext-minimal
+ googletest
+ libxslt
+ nlohmann-json
+ perl
+ pkg-config
+ po4a
+ qttools
+ ruby-3.2))
(arguments
- `(#:configure-flags
- (list (string-append "--with-boost="
- (assoc-ref %build-inputs "boost"))
- (string-append "--with-docbook-xsl-root="
- (assoc-ref %build-inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl))
- "--enable-update-check=no"
- "--enable-precompiled-headers=no")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-utfcpp-include
- (lambda _
- (substitute* "src/common/strings/utf8.cpp"
- (("<utf8.h>")
- "<utf8cpp/utf8.h>"))))
- (add-after 'unpack 'patch-relative-file-names
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
- (("mkvmerge" match)
- (string-append out "/bin/" match)))
- #t)))
- (add-before 'configure 'add-googletest
- (lambda* (#:key inputs #:allow-other-keys)
- (symlink (search-input-directory inputs "/include/gtest")
- "lib/gtest")))
- (replace 'build
- (lambda _
- (let ((-j (list "-j" (number->string (parallel-job-count)))))
- (apply invoke "rake" -j))))
- (replace 'check
- (lambda _
- (invoke "rake" "tests/unit")))
- (replace 'install
- (lambda _
- (invoke "rake" "install")))
- (add-after 'install 'post-install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move the Qt interface to "gui".
- (let* ((out (assoc-ref outputs "out"))
- (gui (assoc-ref outputs "gui"))
- (strip-store-dir (lambda (path)
- (substring path (string-prefix-length out path)))))
- (for-each
- (lambda (file)
- (mkdir-p (string-append gui (dirname file)))
- (rename-file (string-append out file)
- (string-append gui file)))
- (append '("/bin/mkvtoolnix-gui"
- "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
- "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
- "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
- (map strip-store-dir (find-files out "\\.ogg$"))
- (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
- (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
- (for-each
- (lambda (file)
- (delete-file-recursively (string-append out file)))
- '("/share/applications"
- "/share/metainfo"
- "/share/mime"
- "/share/mkvtoolnix")))
- #t)))))
+ (list
+ #:configure-flags
+ #~(list (string-append "--with-boost="
+ #$(this-package-input "boost"))
+ (string-append "--with-docbook-xsl-root="
+ #$(this-package-native-input "docbook-xsl")
+ "/xml/xsl/docbook-xsl-"
+ #$(package-version
+ (this-package-native-input "docbook-xsl")))
+ "--enable-update-check=no"
+ "--enable-precompiled-headers=no")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-utfcpp-include
+ (lambda _
+ (substitute* "src/common/strings/utf8.cpp"
+ (("<utf8.h>")
+ "<utf8cpp/utf8.h>"))))
+ (add-after 'unpack 'patch-relative-file-names
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
+ (("mkvmerge" match)
+ (string-append out "/bin/" match))) #t)))
+ (add-before 'configure 'add-googletest
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink (search-input-directory inputs
+ "/include/gtest")
+ "lib/gtest")))
+ (replace 'build
+ (lambda _
+ (let ((-j (list "-j"
+ (number->string (parallel-job-count)))))
+ (apply invoke "rake" -j))))
+ (replace 'check
+ (lambda _
+ (invoke "rake" "tests/unit")))
+ (replace 'install
+ (lambda _
+ (invoke "rake" "install")))
+ (add-after 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move the Qt interface to "gui".
+ (let* ((out (assoc-ref outputs "out"))
+ (gui (assoc-ref outputs "gui"))
+ (strip-store-dir (lambda (path)
+ (substring path
+ (string-prefix-length
+ out path)))))
+ (for-each (lambda (file)
+ (mkdir-p (string-append gui
+ (dirname
+ file)))
+ (rename-file (string-append out file)
+ (string-append gui file)))
+ (append '("/bin/mkvtoolnix-gui"
+ "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
+ "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
+ "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
+ (map strip-store-dir
+ (find-files out "\\.ogg$"))
+ (map strip-store-dir
+ (find-files out
+ "mkvtoolnix-gui\\.png$"))
+ (map strip-store-dir
+ (find-files out
+ "mkvtoolnix-gui\\.1"))))
+ (for-each (lambda (file)
+ (delete-file-recursively
+ (string-append out file)))
+ '("/share/applications"
+ "/share/metainfo" "/share/mime"
+ "/share/mkvtoolnix"))))))))
(home-page "https://mkvtoolnix.download")
(synopsis "Tools to create, alter and inspect Matroska files")
(description