From 2ebb0383a2d9015cb2fb69dce504dcb8dc0a9be3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 1 Sep 2022 01:52:59 +0200 Subject: gnu: appstream: Update to 0.15.5. * gnu/packages/freedesktop.scm (appstream): Update to 0.15.2. [arguments]: Use G-expression. Add #:meson. Enable (some) previously failing tests. Don't patch docbook file names, and use SEARCH-INPUT-FILE for libstemmer header. Add phase to set HOME before tests. [inputs]: Add CURL and LIBXMLB. [native-inputs]: Add ITSTOOL and LIBXML2. [license]: Remove GPL2+. Co-authored-by: Brendan Tildesley Co-authored-by: phodina --- gnu/packages/freedesktop.scm | 105 +++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 65 deletions(-) (limited to 'gnu/packages/freedesktop.scm') diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index d82a4347b1..308f6fed3f 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -9,9 +9,9 @@ ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2017 Nikita ;;; Copyright © 2017, 2018 Mark H Weaver -;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke +;;; Copyright © 2017, 2018, 2019, 2020, 2022 Marius Bakke ;;; Copyright © 2017, 2018, 2019 Rutger Helling -;;; Copyright © 2017, 2020, 2021 Brendan Tildesley +;;; Copyright © 2017, 2020, 2021, 2022 Brendan Tildesley ;;; Copyright © 2018, 2020–2022 Tobias Geerinckx-Rice ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2018 Stefan Stefanović @@ -30,6 +30,7 @@ ;;; Copyright © 2021, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2022 Daniel Meißner ;;; Copyright © 2022 muradm +;;; Copyright © 2022 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,6 +73,7 @@ (define-module (gnu packages freedesktop) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cryptsetup) + #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages disk) #:use-module (gnu packages docbook) @@ -125,7 +127,7 @@ (define-module (gnu packages freedesktop) (define-public appstream (package (name "appstream") - (version "0.13.1") + (version "0.15.5") (source (origin (method url-fetch) @@ -134,69 +136,44 @@ (define-public appstream "appstream/releases/" "AppStream-" version ".tar.xz")) (sha256 - (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds")))) + (base32 "1hh41r82a2p7anyadfsp9lmylrrj1a6gknx2g4w6ha97riifs5fb")))) (build-system meson-build-system) (arguments - `(#:glib-or-gtk? #t - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-libstemmer - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "meson.build" - (("/usr/include") - (string-append (assoc-ref inputs "libstemmer") - "/include"))) - #t)) - (add-after 'patch-libstemmer 'patch-docbook-xml - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion "docs/api" - (substitute* "appstream-docs.xml" - (("http://www.oasis-open.org/docbook/xml/4.3/") - (string-append (assoc-ref inputs "docbook-xml-4.3") - "/xml/dtd/docbook/")))) - (for-each (lambda (file) - (substitute* file - (("http://www.oasis-open.org/docbook/xml/4.5/") - (string-append (assoc-ref inputs "docbook-xml") - "/xml/dtd/docbook/")))) - (find-files "scripts/desc" "\\.xml$")) - #t)) - (add-after 'patch-docbook-xml 'disable-failing-tests - (lambda _ - (substitute* "tests/test-pool.c" - (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;") - "") - (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;") - "") - (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;") - "") - (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;") - "") - (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;") - "")) - #t)) - (add-after 'disable-failing-tests 'patch-install-dir - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "data/meson.build" - (("/etc") - (string-append (assoc-ref outputs "out") - "/etc"))) - #t))))) + (list + #:meson meson-0.63 + #:glib-or-gtk? #t + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-libstemmer + (lambda* (#:key inputs #:allow-other-keys) + (let ((libstemmer.h (search-input-file inputs + "include/libstemmer.h"))) + (substitute* "meson.build" + (("/usr/include") + (dirname libstemmer.h)))))) + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "tests/test-pool.c" + (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;") + "")))) + (add-before 'check 'check-setup + (lambda _ + (setenv "HOME" (getcwd))))))) (native-inputs - `(("cmake" ,cmake) - ("docbook-xml-4.3" ,docbook-xml-4.3) - ("docbook-xml" ,docbook-xml) - ("docbook-xsl" ,docbook-xsl) - ("gettext" ,gettext-minimal) - ("glib:bin" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("gperf" ,gperf) - ("gtk-doc" ,gtk-doc/stable) - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) - ("xsltproc" ,libxslt))) + (list docbook-xml-4.3 + docbook-xml + docbook-xsl + gettext-minimal + `(,glib "bin") + gobject-introspection + gperf + gtk-doc/stable + itstool + libxslt + pkg-config + python-wrapper)) (inputs - (list libsoup-minimal-2 libstemmer libxml2 libyaml lmdb)) + (list curl libsoup-minimal-2 libstemmer libxmlb libxml2 libyaml lmdb)) (propagated-inputs (list glib)) (synopsis "Tools and libraries to work with AppStream metadata") @@ -209,9 +186,7 @@ (define-public appstream services and various other things needed to create user-friendly application-centers for distributions.") (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/") - ;; XXX: meson.build claims both, headers just indicate lgpl2.1+ - ;; there are also some (irrelevant) wtfpl2 examples - (license (list license:gpl2+ license:lgpl2.1+)))) + (license license:lgpl2.1+))) (define-public farstream (package -- cgit v1.2.3