From ccf88caec4ea397e3be75fed52ab4217123e2a0e Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 9 Jul 2020 15:32:05 -0400 Subject: [PATCH 39/62] gnu: librsvg-next: Update package definition. * gnu/packages/gnome.scm (librsvg-next): Remove inheritance from librsvg. [version]: Update to 2.48.8. [source][sha256]: Modify base32. [modules]: Remove modules. [snippet]: Remove snippet. [arguments]<#:cargo-inputs>: Add rust-alga, rust-approx, rust-atty, rust-autocfg, rust-block, rust-bstr, rust-bumpalo, rust-byteorder, rust-cast, rust-cfg-if, rust-clap, rust-criterion, rust-criterion-plot, rust-crossbeam-deque, rust-crossbeam-epoch, rust-crossbeam-queue, rust-crossbeam-utils, rust-cssparser-macros, rust-csv, rust-csv-core, rust-derive-more, rust-dtoa, rust-dtoa-short, rust-either, rust-encoding-index-japanese, rust-encoding-index-korean, rust-encoding-index-simpchinese, rust-encoding-index-singlebyte, rust-encoding-index-tradchinese, rust-encoding-index-tests, rust-futf, rust-futures-channel, rust-futures-core, rust-futures-executor, rust-futures-io, rust-futures-macro, rust-futures-task, rust-futures-util, rust-fxhash, rust-generic-array, rust-getrandom, rust-half, rust-hermit-abi, rust-idna, rust-itoa, rust-js-sys, rust-libm, rust-log, rust-mac, rust-malloc-buf, rust-matches, rust-matrixmultiply, rust-maybe-uninit, rust-memchr, rust-memoffset, rust-new-debug-unreachable, rust-nodrop, rust-num-complex, rust-num-integer, rust-num-rational, rust-num-cpus, rust-objc, rust-objc-foundation, rust-objc-id, rust-once-cell, rust-oorandom, rust-pangocairo-sys, rust-percent-encoding, rust-phf-codegen, rust-phf-generator, rust-phf-macros, rust-phf-shared, rust-pin-project, rust-pin-project-internal, rust-pin-utils, rust-pkg-config, rust-plotters, rust-ppv-lite86, rust-precomputed-hash, rust-proc-macro-hack, rust-proc-macro-nested, rust-proc-macro2, rust-quote, rust-rand, rust-rand-chacha, rust-rand-core, rust-rand-distr, rust-rand-hc, rust-rand-pcg, rust-rawpointer, rust-regex-automata, rust-regex-syntax, rust-rgb, rust-rustc-version, rust-ryu, rust-same-file, rust-scopeguard, rust-selectors, rust-semver, rust-semver-parser, rust-serde, rust-serde-cbor, rust-serde-derive, rust-serde-json, rust-servo-arc, rust-siphasher, rust-slab, rust-smallvec, rust-stable-deref-trait, rust-string-cache-codegen, rust-syn, rust-tendril, rust-textwrap, rust-thin-slice, rust-thread-local, rust-time, rust-tinytemplate, rust-tinyvec, rust-typenum, rust-unicode-bidi, rust-unicode-normalization, rust-unicode-width, rust-unicode-xid, rust-utf, rust-walkdir, rust-wasi, rust-wasm-bindgen, rust-wasm-bindgen-backend, rust-wasm-bindgen-macro, rust-wasm-bindgen-macro-support, rust-wasm-bindgen-shared, rust-web-sys, rust-winapi, rust-winapi-i686-pc-windows-gnu, rust-winapi-util, rust-winapi-x86-64-pc-windows-gnu, rust-xml5ever. <#:phases>['patch-docbook]: New phase. ['prepare-for-build]: Modify phase. ['gnu-configure]: Modify. ['remove-failing-tests]: Remove phase. [native-inputs]: Add docbook-xml, python-wrapper and ruby. [inputs]: Add fontconfig, freetype and harfbuzz. [synopsis]: Modify. [description]: Modify. --- gnu/packages/gnome.scm | 334 ++++++++++++++++++++++++++++++----------- 1 file changed, 245 insertions(+), 89 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 9dc88c611e..2ac98a5d6d 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2774,78 +2774,222 @@ diagrams.") (define-public librsvg-next (package - (inherit librsvg) (name "librsvg") - (version "2.46.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/librsvg/" - (version-major+minor version) "/" - "librsvg-" version ".tar.xz")) - (sha256 - (base32 - "0afc82nsxc6kw136xid4vcq9kmq4rmgzzk8bh2pvln2cnvirwnxl")) - (modules '((guix build utils))) - (snippet - '(begin (delete-file-recursively "vendor") - ;; Don't demand an exact version for string_cache - (substitute* "rsvg_internals/Cargo.toml" - (("\"=") "\"")) - #t)))) + (version "2.48.8") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "14i6xzghcidv64cyd3g0wdjbl82rph737yxn9s3x29nzpcjs707l")))) (build-system cargo-build-system) + (outputs '("out" "doc")) (arguments - `(#:modules ((guix build cargo-build-system) - (guix build utils) - ((guix build gnu-build-system) #:prefix gnu:)) - #:vendor-dir "vendor" + `(#:modules + ((guix build cargo-build-system) + (guix build utils) + ((guix build gnu-build-system) #:prefix gnu:)) #:cargo-inputs - (("rust-bitflags" ,rust-bitflags-1) - ("rust-cairo-rs" ,rust-cairo-rs-0.7) - ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.9) - ("rust-cssparser" ,rust-cssparser-0.25) - ("rust-data-url" ,rust-data-url-0.1) - ("rust-downcast-rs" ,rust-downcast-rs-1.1) - ("rust-encoding" ,rust-encoding-0.2) - ("rust-float-cmp" ,rust-float-cmp-0.5) - ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.7) - ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.9) - ("rust-gio" ,rust-gio-0.7) - ("rust-gio-sys" ,rust-gio-sys-0.9) - ("rust-glib" ,rust-glib-0.8) - ("rust-glib-sys" ,rust-glib-sys-0.9) - ("rust-gobject-sys" ,rust-gobject-sys-0.9) - ("rust-itertools" ,rust-itertools-0.8) - ("rust-language-tags" ,rust-language-tags-0.2) - ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-libc" ,rust-libc-0.2) - ("rust-locale-config" ,rust-locale-config-0.3) - ("rust-markup5ever" ,rust-markup5ever-0.9) - ("rust-nalgebra" ,rust-nalgebra-0.18) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-pkg-config" ,rust-pkg-config-0.3) - ("rust-pango" ,rust-pango-0.7) - ("rust-pango-sys" ,rust-pango-sys-0.9) - ("rust-pangocairo" ,rust-pangocairo-0.8) - ("rust-phf" ,rust-phf-0.7) - ("rust-rayon" ,rust-rayon-1) - ("rust-rctree" ,rust-rctree-0.3) - ("rust-string-cache" ,rust-string-cache-0.7) - ("rust-regex" ,rust-regex-1) - ("rust-url" ,rust-url-2.1) - ("rust-xml-rs" ,rust-xml-rs-0.8)) + ( ;; Keep this list updated in accordance with Cargo.lock. + ("aho-corasick" ,rust-aho-corasick-0.7) + ("alga" ,rust-alga-0.9) + ("approx" ,rust-approx-0.3) + ("atty" ,rust-atty-0.2) + ("autocfg" ,rust-autocfg-1.0) + ("bitflags" ,rust-bitflags-1) + ("block" ,rust-block-0.1) + ("bstr" ,rust-bstr-0.2) + ("bumpalo" ,rust-bumpalo-3) + ("byteorder" ,rust-byteorder-1.3) + ("cairo-rs" ,rust-cairo-rs-0.8) + ("cairo-sys-rs" ,rust-cairo-sys-rs-0.9) + ("cast" ,rust-cast-0.2) + ("cfg-if" ,rust-cfg-if-0.1) + ("clap" ,rust-clap-2) + ("criterion" ,rust-criterion-0.3) + ("criterion-plot" ,rust-criterion-plot-0.4) + ("crossbeam-deque" ,rust-crossbeam-deque-0.7) + ("crossbeam-epoch" ,rust-crossbeam-epoch-0.8) + ("crossbeam-queue" ,rust-crossbeam-queue-0.2) + ("crossbeam-utils" ,rust-crossbeam-utils-0.7) + ("cssparser" ,rust-cssparser-0.27) + ("cssparser-macros" ,rust-cssparser-macros-0.6) + ("csv" ,rust-csv-1.1) + ("csv-core" ,rust-csv-core-0.1) + ("data-url" ,rust-data-url-0.1) + ("derive_more" ,rust-derive-more-0.99) + ("downcast-rs" ,rust-downcast-rs-1.2) + ("dtoa" ,rust-dtoa-0.4) + ("dtoa-short" ,rust-dtoa-short-0.3) + ("either" ,rust-either-1.5) + ("encoding" ,rust-encoding-0.2) + ("encoding-index-japanese" ,rust-encoding-index-japanese-1.20141219) + ("encoding-index-korean" ,rust-encoding-index-korean-1.20141219) + ("encoding-index-simpchinese" ,rust-encoding-index-simpchinese-1.20141219) + ("encoding-index-singlebyte" ,rust-encoding-index-singlebyte-1.20141219) + ("encoding-index-tradchinese" ,rust-encoding-index-tradchinese-1.20141219) + ("encoding_index_tests" ,rust-encoding-index-tests-0.1) + ("float-cmp" ,rust-float-cmp-0.6) + ("futf" ,rust-futf-0.1) + ("futures-channel" ,rust-futures-channel-0.3) + ("futures-core" ,rust-futures-core-0.3) + ("futures-executor" ,rust-futures-executor-0.3) + ("futures-io" ,rust-futures-io-0.3) + ("futures-macro" ,rust-futures-macro-0.3) + ("futures-task" ,rust-futures-task-0.3) + ("futures-util" ,rust-futures-util-0.3) + ("fxhash" ,rust-fxhash-0.2) + ("gdk-pixbuf" ,rust-gdk-pixbuf-0.8) + ("gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.9) + ("generic-array" ,rust-generic-array-0.13) + ("getrandom" ,rust-getrandom-0.1) + ("gio" ,rust-gio-0.8) + ("gio-sys" ,rust-gio-sys-0.9) + ("glib" ,rust-glib-0.9) + ("glib-sys" ,rust-glib-sys-0.9) + ("gobject-sys" ,rust-gobject-sys-0.9) + ("half" ,rust-half-1.3) + ("hermit-abi" ,rust-hermit-abi-0.1) + ("idna" ,rust-idna-0.2) + ("itertools-0.8" ,rust-itertools-0.8) + ("itertools-0.9" ,rust-itertools-0.9) + ("itoa" ,rust-itoa-0.4) + ("js-sys" ,rust-js-sys-0.3) + ("language-tags" ,rust-language-tags-0.2) + ("lazy-static" ,rust-lazy-static-1) + ("libc" ,rust-libc-0.2) + ("libm" ,rust-libm-0.2) + ("locale-config" ,rust-locale-config-0.3) + ("log" ,rust-log-0.4) + ("mac" ,rust-mac-0.1) + ("malloc_buf" ,rust-malloc-buf-0.0) + ("markup5ever" ,rust-markup5ever-0.10) + ("matches" ,rust-matches-0.1) + ("matrixmultiply" ,rust-matrixmultiply-0.2) + ("maybe-uninit" ,rust-maybe-uninit-2.0) + ("memchr" ,rust-memchr-2) + ("memoffset" ,rust-memoffset-0.5) + ("nalgebra" ,rust-nalgebra-0.19) + ("new_debug_unreachable" ,rust-new-debug-unreachable-1.0) + ("nodrop" ,rust-nodrop-0.1) + ("num-complex" ,rust-num-complex-0.2) + ("num-integer" ,rust-num-integer-0.1) + ("num-rational" ,rust-num-rational-0.2) + ("num-traits" ,rust-num-traits-0.2) + ("num_cpus" ,rust-num-cpus-1) + ("objc" ,rust-objc-0.2) + ("objc-foundation" ,rust-objc-foundation-0.1) + ("objc_id" ,rust-objc-id-0.1) + ("once_cell" ,rust-once-cell-1.2) + ("oorandom" ,rust-oorandom-11.1) + ("pango" ,rust-pango-0.8) + ("pango-sys" ,rust-pango-sys-0.9) + ("pangocairo" ,rust-pangocairo-0.9) + ("pangocairo-sys" ,rust-pangocairo-sys-0.10) + ("percent-encoding" ,rust-percent-encoding-2.1) + ("phf" ,rust-phf-0.8) + ("phf_codegen" ,rust-phf-codegen-0.8) + ("phf_generator" ,rust-phf-generator-0.8) + ("phf_macros" ,rust-phf-macros-0.8) + ("phf_shared" ,rust-phf-shared-0.8) + ("pin-project" ,rust-pin-project-0.4) + ("pin-project-internal" ,rust-pin-project-internal-0.4) + ("pin-utils" ,rust-pin-utils-0.1) + ("pkg-config" ,rust-pkg-config-0.3) + ("plotters" ,rust-plotters-0.2) + ("ppv-lite86" ,rust-ppv-lite86-0.2) + ("precomputed-hash" ,rust-precomputed-hash-0.1) + ("proc-macro-hack" ,rust-proc-macro-hack-0.5) + ("proc-macro-nested" ,rust-proc-macro-nested-0.1) + ("proc-macro2" ,rust-proc-macro2-1.0) + ("quote" ,rust-quote-1.0) + ("rand" ,rust-rand-0.7) + ("rand_chacha" ,rust-rand-chacha-0.2) + ("rand_core" ,rust-rand-core-0.5) + ("rand_distr" ,rust-rand-distr-0.2) + ("rand_hc" ,rust-rand-hc-0.2) + ("rand_pcg" ,rust-rand-pcg-0.2) + ("rawpointer" ,rust-rawpointer-0.2) + ("rayon" ,rust-rayon-1) + ("rayon-core" ,rust-rayon-core-1) + ("rctree" ,rust-rctree-0.3) + ("regex" ,rust-regex-1) + ("regex-automata" ,rust-regex-automata-0.1) + ("regex-syntax" ,rust-regex-syntax-0.6) + ("rgb" ,rust-rgb-0.8) + ("rustc_version" ,rust-rustc-version-0.2) + ("ryu" ,rust-ryu-1.0) + ("same-file" ,rust-same-file-1.0) + ("scopeguard" ,rust-scopeguard-1.0) + ("selectors" ,rust-selectors-0.22) + ("semver" ,rust-semver-0.9) + ("semver-parser" ,rust-semver-parser-0.7) + ("serde" ,rust-serde-1.0) + ("serde_cbor" ,rust-serde-cbor-0.11) + ("serde_derive" ,rust-serde-derive-1.0) + ("serde_json" ,rust-serde-json-1.0) + ("servo_arc" ,rust-servo-arc-0.1) + ("siphasher" ,rust-siphasher-0.3) + ("slab" ,rust-slab-0.4) + ("smallvec" ,rust-smallvec-1) + ("stable_deref_trait" ,rust-stable-deref-trait-1.1) + ("string-cache" ,rust-string-cache-0.8) + ("string_cache_codegen" ,rust-string-cache-codegen-0.5) + ("syn" ,rust-syn-1.0) + ("tendril" ,rust-tendril-0.4) + ("textwrap" ,rust-textwrap-0.11) + ("thin-slice" ,rust-thin-slice-0.1) + ("thread_local" ,rust-thread-local-1.0) + ("time" ,rust-time-0.1) + ("tinytemplate" ,rust-tinytemplate-1.0) + ("tinyvec" ,rust-tinyvec-0.3) + ("typenum" ,rust-typenum-1) + ("unicode-bidi" ,rust-unicode-bidi-0.3) + ("unicode-normalization" ,rust-unicode-normalization-0.1) + ("unicode-width" ,rust-unicode-width-0.1) + ("unicode-xid" ,rust-unicode-xid-0.2) + ("url" ,rust-url-2.1) + ("utf-8" ,rust-utf-8-0.7) + ("walkdir" ,rust-walkdir-2.3) + ("wasi" ,rust-wasi-0.9) + ("wasm-bindgen" ,rust-wasm-bindgen-0.2) + ("wasm-bindgen-backend" ,rust-wasm-bindgen-backend-0.2) + ("wasm-bindgen-macro" ,rust-wasm-bindgen-macro-0.2) + ("wasm-bindgen-macro-support" ,rust-wasm-bindgen-macro-support-0.2) + ("wasm-bindgen-shared" ,rust-wasm-bindgen-shared-0.2) + ("web-sys" ,rust-web-sys-0.3) + ("winapi" ,rust-winapi-0.3) + ("winapi-i686-pc-windows-gnu" ,rust-winapi-i686-pc-windows-gnu-0.4) + ("winapi-util" ,rust-winapi-util-0.1) + ("winapi-x86_64-pc-windows-gnu" ,rust-winapi-x86-64-pc-windows-gnu-0.4) + ("xml5ever" ,rust-xml5ever-0.16)) #:cargo-development-inputs - (("rust-cairo-rs" ,rust-cairo-rs-0.7) - ("rust-criterion" ,rust-criterion-0.2)) + (("rust-cairo-rs" ,rust-cairo-rs-0.8) + ("rust-criterion" ,rust-criterion-0.3)) #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-docbook + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "doc" + (substitute* "rsvg-docs.xml" + (("http://www.oasis-open.org/docbook/xml/4.3/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) (add-after 'unpack 'prepare-for-build (lambda _ + (delete-file-recursively "vendor") + ;; Don't demand an exact version for string_cache + (substitute* "rsvg_internals/Cargo.toml" + (("\"=") "\"")) ;; In lieu of #:make-flags (setenv "CC" "gcc") ;; Something about the build environment resists building ;; successfully with the '--locked' flag. - (substitute* '("Makefile.am" - "Makefile.in") + (substitute* '("Makefile.am" "Makefile.in") (("--locked") "")) #t)) (add-before 'configure 'pre-configure @@ -2856,23 +3000,29 @@ diagrams.") (("gdk_pixbuf_moduledir = .*$") (string-append "gdk_pixbuf_moduledir = " "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/" - "loaders\n")) + "loaders\n")) ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg. (("gdk_pixbuf_cache_file = .*$") "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n")) #t)) (add-after 'configure 'gnu-configure - (assoc-ref gnu:%standard-phases 'configure)) - ;(lambda* (#:key outputs #:allow-other-keys) - ; ((assoc-ref gnu:%standard-phases 'configure) - ; #:outputs outputs - ; #:configure-flags ("--disable-static" - ; "--enable-vala")))) + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + ((assoc-ref gnu:%standard-phases 'configure) + #:native-inputs native-inputs + #:inputs inputs + #:outputs outputs + #:configure-flags + (list + "--disable-static" + "--enable-vala" + (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html"))))) (add-after 'configure 'dont-vendor-self (lambda* (#:key vendor-dir #:allow-other-keys) ;; Don't keep the whole tarball in the vendor directory (delete-file-recursively - (string-append vendor-dir "/" ,name "-" ,version ".tar.xz")) + (string-append vendor-dir "/" ,name "-" ,version ".tar.xz")) #t)) (replace 'build (assoc-ref gnu:%standard-phases 'build)) @@ -2881,28 +3031,34 @@ diagrams.") ((assoc-ref gnu:%standard-phases 'check) #:test-target "check"))) (replace 'install - (assoc-ref gnu:%standard-phases 'install)) - (add-before 'check 'remove-failing-tests - (lambda _ - (with-directory-excursion "tests/fixtures/reftests" - (for-each delete-file - '(;; The images produced by these tests differ slightly - ;; from their reference counterparts due to differences - ;; in the build environment (missing fonts, etc). See - ;; for details. - ;; These fail on x86_64. - "svg1.1/coords-viewattr-02-b.svg" - "svg1.1/filters-composite-04-f.svg" - "svg1.1/filters-image-01-b.svg" - "svg1.1/filters-conv-02-f.svg" - "svg1.1/filters-conv-04-f.svg" - ;; This test fails on i686: - "svg1.1/masking-path-04-b.svg" - ;; This test fails on armhf: - "svg1.1/masking-mask-01-b.svg" - ;; This test fails on aarch64: - "bugs/777834-empty-text-children.svg"))) - #t))))) + (assoc-ref gnu:%standard-phases 'install))))) + (native-inputs + `(("docbook-xml" ,docbook-xml-4.3) + ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ("ruby" ,ruby) + ("vala" ,vala))) + (inputs + `(("bzip2" ,bzip2) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("harfbuzz" ,harfbuzz) + ("libcroco" ,libcroco) + ("libgsf" ,libgsf) + ("libxml2" ,libxml2) + ("pango" ,pango))) + (propagated-inputs + `(("cairo" ,cairo) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib))) + (synopsis "SVG rendering library") + (description "Librsvg is a library to render SVG images to Cairo surfaces. +GNOME uses this to render SVG icons. Outside of GNOME, other desktop +environments use it for similar purposes. Wikimedia uses it for Wikipedia's SVG +diagrams.") + (home-page "https://wiki.gnome.org/LibRsvg") (license license:lgpl2.1+))) (define-public libidl -- 2.27.0