diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2024-01-07 16:27:09 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-01-07 16:56:00 +0100 |
| commit | 5f8a993aa85554ca09bd27139230d7664107e1b6 (patch) | |
| tree | 024049e8391035e74a625c733a200a56a4823e4f | |
| parent | 5d97fdb608a89e8653f093bf34720e0822124805 (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
| -rw-r--r-- | gnu/packages/video.scm | 157 |
1 files changed, 83 insertions, 74 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d1b163dc8b5..4181013b0d4 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm | |||
| @@ -1090,81 +1090,90 @@ H.264 (MPEG-4 AVC) video streams.") | |||
| 1090 | utfcpp | 1090 | utfcpp |
| 1091 | zlib)) | 1091 | zlib)) |
| 1092 | (native-inputs | 1092 | (native-inputs |
| 1093 | `(("docbook-xsl" ,docbook-xsl) | 1093 | (list docbook-xsl |
| 1094 | ("gettext" ,gettext-minimal) | 1094 | gettext-minimal |
| 1095 | ("googletest" ,googletest) | 1095 | googletest |
| 1096 | ("libxslt" ,libxslt) | 1096 | libxslt |
| 1097 | ("nlohmann-json" ,nlohmann-json) | 1097 | nlohmann-json |
| 1098 | ("perl" ,perl) | 1098 | perl |
| 1099 | ("pkg-config" ,pkg-config) | 1099 | pkg-config |
| 1100 | ("po4a" ,po4a) | 1100 | po4a |
| 1101 | ("qttools" ,qttools) | 1101 | qttools |
| 1102 | ("ruby" ,ruby-3.2))) | 1102 | ruby-3.2)) |
| 1103 | (arguments | 1103 | (arguments |
| 1104 | `(#:configure-flags | 1104 | (list |
| 1105 | (list (string-append "--with-boost=" | 1105 | #:configure-flags |
| 1106 | (assoc-ref %build-inputs "boost")) | 1106 | #~(list (string-append "--with-boost=" |
| 1107 | (string-append "--with-docbook-xsl-root=" | 1107 | #$(this-package-input "boost")) |
| 1108 | (assoc-ref %build-inputs "docbook-xsl") | 1108 | (string-append "--with-docbook-xsl-root=" |
| 1109 | "/xml/xsl/docbook-xsl-" | 1109 | #$(this-package-native-input "docbook-xsl") |
| 1110 | ,(package-version docbook-xsl)) | 1110 | "/xml/xsl/docbook-xsl-" |
| 1111 | "--enable-update-check=no" | 1111 | #$(package-version |
| 1112 | "--enable-precompiled-headers=no") | 1112 | (this-package-native-input "docbook-xsl"))) |
| 1113 | #:phases | 1113 | "--enable-update-check=no" |
| 1114 | (modify-phases %standard-phases | 1114 | "--enable-precompiled-headers=no") |
| 1115 | (add-after 'unpack 'fix-utfcpp-include | 1115 | #:phases |
| 1116 | (lambda _ | 1116 | #~(modify-phases %standard-phases |
| 1117 | (substitute* "src/common/strings/utf8.cpp" | 1117 | (add-after 'unpack 'fix-utfcpp-include |
| 1118 | (("<utf8.h>") | 1118 | (lambda _ |
| 1119 | "<utf8cpp/utf8.h>")))) | 1119 | (substitute* "src/common/strings/utf8.cpp" |
| 1120 | (add-after 'unpack 'patch-relative-file-names | 1120 | (("<utf8.h>") |
| 1121 | (lambda* (#:key outputs #:allow-other-keys) | 1121 | "<utf8cpp/utf8.h>")))) |
| 1122 | (let ((out (assoc-ref outputs "out"))) | 1122 | (add-after 'unpack 'patch-relative-file-names |
| 1123 | (substitute* "src/mkvtoolnix-gui/util/settings.cpp" | 1123 | (lambda* (#:key outputs #:allow-other-keys) |
| 1124 | (("mkvmerge" match) | 1124 | (let ((out (assoc-ref outputs "out"))) |
| 1125 | (string-append out "/bin/" match))) | 1125 | (substitute* "src/mkvtoolnix-gui/util/settings.cpp" |
| 1126 | #t))) | 1126 | (("mkvmerge" match) |
| 1127 | (add-before 'configure 'add-googletest | 1127 | (string-append out "/bin/" match))) #t))) |
| 1128 | (lambda* (#:key inputs #:allow-other-keys) | 1128 | (add-before 'configure 'add-googletest |
| 1129 | (symlink (search-input-directory inputs "/include/gtest") | 1129 | (lambda* (#:key inputs #:allow-other-keys) |
| 1130 | "lib/gtest"))) | 1130 | (symlink (search-input-directory inputs |
| 1131 | (replace 'build | 1131 | "/include/gtest") |
| 1132 | (lambda _ | 1132 | "lib/gtest"))) |
| 1133 | (let ((-j (list "-j" (number->string (parallel-job-count))))) | 1133 | (replace 'build |
| 1134 | (apply invoke "rake" -j)))) | 1134 | (lambda _ |
| 1135 | (replace 'check | 1135 | (let ((-j (list "-j" |
| 1136 | (lambda _ | 1136 | (number->string (parallel-job-count))))) |
| 1137 | (invoke "rake" "tests/unit"))) | 1137 | (apply invoke "rake" -j)))) |
| 1138 | (replace 'install | 1138 | (replace 'check |
| 1139 | (lambda _ | 1139 | (lambda _ |
| 1140 | (invoke "rake" "install"))) | 1140 | (invoke "rake" "tests/unit"))) |
| 1141 | (add-after 'install 'post-install | 1141 | (replace 'install |
| 1142 | (lambda* (#:key outputs #:allow-other-keys) | 1142 | (lambda _ |
| 1143 | ;; Move the Qt interface to "gui". | 1143 | (invoke "rake" "install"))) |
| 1144 | (let* ((out (assoc-ref outputs "out")) | 1144 | (add-after 'install 'post-install |
| 1145 | (gui (assoc-ref outputs "gui")) | 1145 | (lambda* (#:key outputs #:allow-other-keys) |
| 1146 | (strip-store-dir (lambda (path) | 1146 | ;; Move the Qt interface to "gui". |
| 1147 | (substring path (string-prefix-length out path))))) | 1147 | (let* ((out (assoc-ref outputs "out")) |
| 1148 | (for-each | 1148 | (gui (assoc-ref outputs "gui")) |
| 1149 | (lambda (file) | 1149 | (strip-store-dir (lambda (path) |
| 1150 | (mkdir-p (string-append gui (dirname file))) | 1150 | (substring path |
| 1151 | (rename-file (string-append out file) | 1151 | (string-prefix-length |
| 1152 | (string-append gui file))) | 1152 | out path))))) |
| 1153 | (append '("/bin/mkvtoolnix-gui" | 1153 | (for-each (lambda (file) |
| 1154 | "/share/applications/org.bunkus.mkvtoolnix-gui.desktop" | 1154 | (mkdir-p (string-append gui |
| 1155 | "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml" | 1155 | (dirname |
| 1156 | "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml") | 1156 | file))) |
| 1157 | (map strip-store-dir (find-files out "\\.ogg$")) | 1157 | (rename-file (string-append out file) |
| 1158 | (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$")) | 1158 | (string-append gui file))) |
| 1159 | (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1")))) | 1159 | (append '("/bin/mkvtoolnix-gui" |
| 1160 | (for-each | 1160 | "/share/applications/org.bunkus.mkvtoolnix-gui.desktop" |
| 1161 | (lambda (file) | 1161 | "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml" |
| 1162 | (delete-file-recursively (string-append out file))) | 1162 | "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml") |
| 1163 | '("/share/applications" | 1163 | (map strip-store-dir |
| 1164 | "/share/metainfo" | 1164 | (find-files out "\\.ogg$")) |
| 1165 | "/share/mime" | 1165 | (map strip-store-dir |
| 1166 | "/share/mkvtoolnix"))) | 1166 | (find-files out |
| 1167 | #t))))) | 1167 | "mkvtoolnix-gui\\.png$")) |
| 1168 | (map strip-store-dir | ||
| 1169 | (find-files out | ||
| 1170 | "mkvtoolnix-gui\\.1")))) | ||
| 1171 | (for-each (lambda (file) | ||
| 1172 | (delete-file-recursively | ||
| 1173 | (string-append out file))) | ||
| 1174 | '("/share/applications" | ||
| 1175 | "/share/metainfo" "/share/mime" | ||
| 1176 | "/share/mkvtoolnix")))))))) | ||
| 1168 | (home-page "https://mkvtoolnix.download") | 1177 | (home-page "https://mkvtoolnix.download") |
| 1169 | (synopsis "Tools to create, alter and inspect Matroska files") | 1178 | (synopsis "Tools to create, alter and inspect Matroska files") |
| 1170 | (description | 1179 | (description |
