>From 84c9a44ca17f7e2bc07fd89ef245fc32d1a0ed7b Mon Sep 17 00:00:00 2001 From: Gregor Giesen Date: Tue, 20 Jun 2017 23:47:33 +0200 Subject: [PATCH 1/1] gnu: Add mkvtoolnix. * gnu/packages/serialization.scm (nlohmann-json-cpp): New variable. * gnu/packages/video.scm (mkvtoolnix libmatroska): New variables. * gnu/packages/xml.scm (libebml): New variable. --- gnu/packages/serialization.scm | 23 +++++++++ gnu/packages/video.scm | 113 +++++++++++++++++++++++++++++++++++++++++ gnu/packages/xml.scm | 21 ++++++++ 3 files changed, 157 insertions(+) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 6a3d8f900..7fdd20b57 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017 Corentin Bocquillon +;;; Copyright © 2017 Gregor Giesen ;;; ;;; This file is part of GNU Guix. ;;; @@ -328,3 +329,25 @@ RPC system. Think JSON, except binary. Or think Protocol Buffers, except faste convert JSON documents to BSON and the opposite. BSON stands for Binary JSON, it is comparable to protobuf.") (license license:asl2.0))) + +(define-public nlohmann-json-cpp + (package + (name "nlohmann-json-cpp") + (version "2.1.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/nlohmann/json/" + "archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0lrh6cjd643c7kmvmwafbgq7dqj3b778483gjhjbvp6rc6z5xf2r")))) + (build-system cmake-build-system) + (home-page "https://nlohmann.github.io/json/") + (synopsis "JSON library for C++") + (description + "JSON library for C++ trying to accomplish “Intuitive syntax”, +“Trivial integration”, and “Serious testing”. +However, “Memory efficiency” and “Speed” have not been primary goals.") + (license license:x11))) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index ec81bc1a1..f8166c233 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Ethan R. Jones ;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017 Gregor Giesen ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,14 +58,18 @@ #:use-module (gnu packages avahi) #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages boost) #:use-module (gnu packages cdrom) + #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages dejagnu) + #:use-module (gnu packages docbook) #:use-module (gnu packages elf) + #:use-module (gnu packages file) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) @@ -93,7 +98,10 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages qt) + #:use-module (gnu packages ruby) #:use-module (gnu packages sdl) + #:use-module (gnu packages serialization) + #:use-module (gnu packages shells) #:use-module (gnu packages ssh) #:use-module (gnu packages texinfo) #:use-module (gnu packages textutils) @@ -272,6 +280,83 @@ H.264 (MPEG-4 AVC) video streams.") "file://extras/cl.h" "See extras/cl.h in the distribution."))))) +(define-public mkvtoolnix + (package + (name "mkvtoolnix") + (version "12.0.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://mkvtoolnix.download/sources/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0dmmjizmxcr6agiwxii4135nkniw5yiab4dpgkas5n1nrk8h292w")))) + (build-system gnu-build-system) + (inputs + `(("boost" ,boost) + ("bzip2" ,bzip2) + ("libebml" ,libebml) + ("flac" ,flac) + ("file" ,file) + ("libmatroska" ,libmatroska) + ("libogg" ,libogg) + ("libvorbis" ,libvorbis) + ("lzo" ,lzo) + ("pugixml" ,pugixml) + ("qt" ,qt) + ("utfcpp" ,utfcpp) + ("zlib" ,zlib))) + (native-inputs + `(("docbook-xsl" ,docbook-xsl) + ("gettext" ,gettext-minimal) + ("googletest" ,googletest) + ("libxslt" ,libxslt) + ("nlohmann-json-cpp" ,nlohmann-json-cpp) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("po4a" ,po4a) + ("ruby" ,ruby) + ("zsh", zsh))) + (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)) + (string-append "--with-extra-includes=" + (assoc-ref %build-inputs "nlohmann-json-cpp") + "/include/nlohmann")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'add-googletest + (lambda _ + (symlink + (string-append (assoc-ref %build-inputs "googletest") + "/include/gtest") "lib/gtest") + #t)) + (replace 'build + (lambda _ + (let ((-j (list "-j" (number->string (parallel-job-count))))) + (zero? (apply system* "rake" -j))))) + (replace 'check + (lambda _ + (zero? (system* "rake" "tests/unit")))) + (replace 'install + (lambda _ + (zero? (system* "rake" "install"))))))) + (home-page "https://mkvtoolnix.download") + (synopsis "Tools to create, alter and inspect Matroska files") + (description + "With these tools one can get information about (via @code{mkvinfo}) +Matroska files, extract tracks/data from (via @code{mkvextract}) Matroska +files and create (via @code{mkvmerge}) Matroska files from other media files. +Matroska is a new multimedia file format aiming to become THE new container +format for the future.") + (license license:gpl2))) + (define-public x265 (package (name "x265") @@ -407,6 +492,34 @@ developed according to the official standards for DV video: IEC 61834 and SMPTE 314M.") (license license:lgpl2.1+))) +(define-public libmatroska + (package + (name "libmatroska") + (version "1.4.7") + (source + (origin + (method url-fetch) + (uri (string-append "https://dl.matroska.org/downloads/" + name "/" name "-" version ".tar.bz2")) + (sha256 + (base32 + "1yi5cnv13nhl27xyqayd5l3sf0j3swfj3apzibv71yg9pariwi26")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libebml" ,libebml))) + (home-page "https://www.matroska.org") + (synopsis "C++ libary to parse Matroska files (.mkv and .mka)") + (description + "Matroska aims to become the standard of multimedia container formats. +It is based on EBML (Extensible Binary Meta Language), a binary derivative +of XML. EBML enables the Matroska Development Team to gain significant +advantages in terms of future format extensibility, without breaking file +support in old parsers. +libebml is a C++ library to read and write EBML files.") + (license license:lgpl2.1))) + (define-public libva (package (name "libva") diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 263c26e31..3f684ffe4 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2016 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Marius Bakke ;;; Copyright © 2017 Adriano Peluso +;;; Copyright © 2017 Gregor Giesen ;;; ;;; This file is part of GNU Guix. ;;; @@ -87,6 +88,26 @@ things the parser might find in the XML document (like start tags).") (base32 "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q")))))) +(define-public libebml + (package + (name "libebml") + (version "1.3.4") + (source + (origin + (method url-fetch) + (uri (string-append "https://dl.matroska.org/downloads/" + name "/" name "-" version ".tar.bz2")) + (sha256 + (base32 + "11zka6z9ncywyjr1gfm5cnii33ln7y3w6s86kiacchip2g7kw3f5")))) + (build-system gnu-build-system) + (home-page "https://www.matroska.org") + (synopsis "C++ libary to parse EBML files") + (description + "libebml is a C++ library to read and write EBML files. +EBML (Extensible Binary Meta Language) is a binary pendant to XML.") + (license license:lgpl2.1))) + (define-public libxml2 (package (name "libxml2") -- 2.13.1