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
This commit is contained in:
parent
5d97fdb608
commit
5f8a993aa8
1 changed files with 83 additions and 74 deletions
|
@ -1090,81 +1090,90 @@ (define-public mkvtoolnix
|
||||||
utfcpp
|
utfcpp
|
||||||
zlib))
|
zlib))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("docbook-xsl" ,docbook-xsl)
|
(list docbook-xsl
|
||||||
("gettext" ,gettext-minimal)
|
gettext-minimal
|
||||||
("googletest" ,googletest)
|
googletest
|
||||||
("libxslt" ,libxslt)
|
libxslt
|
||||||
("nlohmann-json" ,nlohmann-json)
|
nlohmann-json
|
||||||
("perl" ,perl)
|
perl
|
||||||
("pkg-config" ,pkg-config)
|
pkg-config
|
||||||
("po4a" ,po4a)
|
po4a
|
||||||
("qttools" ,qttools)
|
qttools
|
||||||
("ruby" ,ruby-3.2)))
|
ruby-3.2))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(list
|
||||||
(list (string-append "--with-boost="
|
#:configure-flags
|
||||||
(assoc-ref %build-inputs "boost"))
|
#~(list (string-append "--with-boost="
|
||||||
(string-append "--with-docbook-xsl-root="
|
#$(this-package-input "boost"))
|
||||||
(assoc-ref %build-inputs "docbook-xsl")
|
(string-append "--with-docbook-xsl-root="
|
||||||
"/xml/xsl/docbook-xsl-"
|
#$(this-package-native-input "docbook-xsl")
|
||||||
,(package-version docbook-xsl))
|
"/xml/xsl/docbook-xsl-"
|
||||||
"--enable-update-check=no"
|
#$(package-version
|
||||||
"--enable-precompiled-headers=no")
|
(this-package-native-input "docbook-xsl")))
|
||||||
#:phases
|
"--enable-update-check=no"
|
||||||
(modify-phases %standard-phases
|
"--enable-precompiled-headers=no")
|
||||||
(add-after 'unpack 'fix-utfcpp-include
|
#:phases
|
||||||
(lambda _
|
#~(modify-phases %standard-phases
|
||||||
(substitute* "src/common/strings/utf8.cpp"
|
(add-after 'unpack 'fix-utfcpp-include
|
||||||
(("<utf8.h>")
|
(lambda _
|
||||||
"<utf8cpp/utf8.h>"))))
|
(substitute* "src/common/strings/utf8.cpp"
|
||||||
(add-after 'unpack 'patch-relative-file-names
|
(("<utf8.h>")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
"<utf8cpp/utf8.h>"))))
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(add-after 'unpack 'patch-relative-file-names
|
||||||
(substitute* "src/mkvtoolnix-gui/util/settings.cpp"
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(("mkvmerge" match)
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(string-append out "/bin/" match)))
|
(substitute* "src/mkvtoolnix-gui/util/settings.cpp"
|
||||||
#t)))
|
(("mkvmerge" match)
|
||||||
(add-before 'configure 'add-googletest
|
(string-append out "/bin/" match))) #t)))
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(add-before 'configure 'add-googletest
|
||||||
(symlink (search-input-directory inputs "/include/gtest")
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
"lib/gtest")))
|
(symlink (search-input-directory inputs
|
||||||
(replace 'build
|
"/include/gtest")
|
||||||
(lambda _
|
"lib/gtest")))
|
||||||
(let ((-j (list "-j" (number->string (parallel-job-count)))))
|
(replace 'build
|
||||||
(apply invoke "rake" -j))))
|
(lambda _
|
||||||
(replace 'check
|
(let ((-j (list "-j"
|
||||||
(lambda _
|
(number->string (parallel-job-count)))))
|
||||||
(invoke "rake" "tests/unit")))
|
(apply invoke "rake" -j))))
|
||||||
(replace 'install
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "rake" "install")))
|
(invoke "rake" "tests/unit")))
|
||||||
(add-after 'install 'post-install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
;; Move the Qt interface to "gui".
|
(invoke "rake" "install")))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(add-after 'install 'post-install
|
||||||
(gui (assoc-ref outputs "gui"))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(strip-store-dir (lambda (path)
|
;; Move the Qt interface to "gui".
|
||||||
(substring path (string-prefix-length out path)))))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(for-each
|
(gui (assoc-ref outputs "gui"))
|
||||||
(lambda (file)
|
(strip-store-dir (lambda (path)
|
||||||
(mkdir-p (string-append gui (dirname file)))
|
(substring path
|
||||||
(rename-file (string-append out file)
|
(string-prefix-length
|
||||||
(string-append gui file)))
|
out path)))))
|
||||||
(append '("/bin/mkvtoolnix-gui"
|
(for-each (lambda (file)
|
||||||
"/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
|
(mkdir-p (string-append gui
|
||||||
"/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
|
(dirname
|
||||||
"/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
|
file)))
|
||||||
(map strip-store-dir (find-files out "\\.ogg$"))
|
(rename-file (string-append out file)
|
||||||
(map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
|
(string-append gui file)))
|
||||||
(map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
|
(append '("/bin/mkvtoolnix-gui"
|
||||||
(for-each
|
"/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
|
||||||
(lambda (file)
|
"/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
|
||||||
(delete-file-recursively (string-append out file)))
|
"/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
|
||||||
'("/share/applications"
|
(map strip-store-dir
|
||||||
"/share/metainfo"
|
(find-files out "\\.ogg$"))
|
||||||
"/share/mime"
|
(map strip-store-dir
|
||||||
"/share/mkvtoolnix")))
|
(find-files out
|
||||||
#t)))))
|
"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")
|
(home-page "https://mkvtoolnix.download")
|
||||||
(synopsis "Tools to create, alter and inspect Matroska files")
|
(synopsis "Tools to create, alter and inspect Matroska files")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue