From patchwork Sat Jun 17 01:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 50994 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5E8A027BBEA; Sat, 17 Jun 2023 02:27:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BE57127BBE2 for ; Sat, 17 Jun 2023 02:27:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAKiW-0002UA-4I; Fri, 16 Jun 2023 21:27:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAKiU-0002Tx-IB for guix-patches@gnu.org; Fri, 16 Jun 2023 21:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAKiU-0001F1-9w for guix-patches@gnu.org; Fri, 16 Jun 2023 21:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAKiU-0002qy-5p for guix-patches@gnu.org; Fri, 16 Jun 2023 21:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60826] [PATCH v2] gnu: shared-mime-info: Update to 2.2. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2023 01:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60826 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60826@debbugs.gnu.org Cc: Bruno Victal , liliana.prikler@gmail.com Received: via spool by 60826-submit@debbugs.gnu.org id=B60826.168696519110923 (code B ref 60826); Sat, 17 Jun 2023 01:27:02 +0000 Received: (at 60826) by debbugs.gnu.org; 17 Jun 2023 01:26:31 +0000 Received: from localhost ([127.0.0.1]:50630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAKhy-0002q7-5Q for submit@debbugs.gnu.org; Fri, 16 Jun 2023 21:26:30 -0400 Received: from smtpm2.myservices.hosting ([185.26.105.233]:39146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAKhu-0002pv-WB for 60826@debbugs.gnu.org; Fri, 16 Jun 2023 21:26:28 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 7BF0D20F1B; Sat, 17 Jun 2023 03:26:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id B042880097; Sat, 17 Jun 2023 03:26:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kUhSkZHxq45t; Sat, 17 Jun 2023 03:26:24 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id EA9DA80060; Sat, 17 Jun 2023 03:26:23 +0200 (CEST) From: Bruno Victal Date: Sat, 17 Jun 2023 02:26:23 +0100 Message-Id: <3e142d3b4f560ec3dc55d3356d6ede44a727916b.1686964927.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gnome.scm (shared-mime-info): Update to 2.2. [source]: Switch to git source. Patch xdgmime location. [build-system]: Switch to meson. [arguments]: Enable parallel builds. Do not patch test files. [native-inputs]: Switch to new style. Add python, xmlto, docbook-xml-4.1.2 and docbook-xsl. (xdgmime): New variable. --- Notable changes since v1: * Rebased against gnome-team. (this package should probably be relocated to freedesktop.scm instead) * Refactored package definition. (the testsuite now works!) * Removed nonsense comments present in v1. (leftovers from squashing?) gnu/packages/gnome.scm | 92 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 13 deletions(-) base-commit: 909788c0aebd8098084c009afa98d1209c9ec869 diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 6db2d6569e..58d0e25c1d 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -73,6 +73,7 @@ ;;; Copyright © 2022 Rene Saavedra ;;; Copyright © 2022 Alexandros Theodotou ;;; Copyright © 2022 Arjan Adriaanse +;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Kaelyn Takata ;;; Copyright © 2023 Juliana Sims ;;; Copyright © 2023 Dominik Delgado Steuter @@ -2913,29 +2914,94 @@ (define-public tango-icon-theme guidelines.") (license license:public-domain))) +;; Private package used by shared-mime-info. +(define xdgmime + ;; No public release, match commit to the one used in the + ;; shared-mime-info release. + (let ((commit "de283fc430460b9b3a7e61432a6d273cd64cb102") + (revision "1")) + (package + (name "xdgmime") + ;; set version to 0.0 and change commit instead + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/xdg/xdgmime.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0m9k7nfxgchb9j0xh9cwsldz6564qisqdkvlhgkcgc0grd4nfbn9")) + (modules '((guix build utils))) + (snippet + #~(substitute* "src/Makefile" + (("all: (.+)$" all targets) + (format #f "~a +install: ~a +~/install -Dm755 -t $(DESTDIR)/bin $^~%" all targets)))))) + (arguments + (list + #:tests? #f ; no tests + #:make-flags #~(list (string-append "DESTDIR=" #$output) + #$(string-append "CC=" (cc-for-target))) + #:phases + #~(modify-phases %standard-phases + ;; Package uses a hand-crafted Makefile. + (delete 'configure) + ;; Use the patched install rule in src/Makefile. + (add-before 'install 'change-directory + (lambda _ + (chdir "src")))))) + (build-system gnu-build-system) + (home-page "https://gitlab.freedesktop.org/xdg/xdgmime/") + (synopsis "Module that parses the freedesktop.org MIME spec") + (description "This module is used for shared-mime-info package tests.") + (license (list license:lgpl2.1+ license:artistic2.0))))) + (define-public shared-mime-info (package (name "shared-mime-info") - (version "1.15") + (version "2.2") (source (origin - (method url-fetch) - (uri (string-append - "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/" - "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version - ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/xdg/shared-mime-info.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl")))) - (build-system gnu-build-system) + "04dfnnflspprxg7qia3whz1754lfvgi4ihvmihg379936zy5xd22")) + (modules '((guix build utils))) + ;; Override the suffix assumed by meson.build. + (snippet + #~(substitute* "meson.build" + (("^(xdgmime = get_option\\('xdgmime-path'\\)) / 'src'" + _ stem) + stem))))) (arguments - ;; The build system appears not to be parallel-safe. - '(#:parallel-build? #f)) + (list + #:configure-flags + #~(list (string-append "-Dxdgmime-path=" + #$(this-package-native-input "xdgmime") + "/bin")) + #:phases + #~(modify-phases %standard-phases + ;; Don't patch shebangs for the test files. + (replace 'patch-source-shebangs + (lambda* (#:key source #:allow-other-keys) + (let ((pred (lambda (file stat) + (and (eq? 'regular (stat:type stat)) + (not (string-prefix? "./tests/mime-detection" + file)))))) + (for-each patch-shebang + (find-files "." pred #:stat lstat)))))))) + (build-system meson-build-system) (inputs (list glib libxml2)) (native-inputs - `(("gettext" ,gettext-minimal) - ("itstool" ,itstool) - ("pkg-config" ,pkg-config))) + (list gettext-minimal itstool pkg-config python xmlto + docbook-xml-4.1.2 docbook-xsl xdgmime)) (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info") (synopsis "Database of common MIME types") (description