From patchwork Fri Mar 22 07:33:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: aurtzy X-Patchwork-Id: 62123 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 41B2127BBEA; Fri, 22 Mar 2024 07:40:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 3539E27BBE2 for ; Fri, 22 Mar 2024 07:40:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnZVn-0005hl-0Q; Fri, 22 Mar 2024 03:40:23 -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 1rnZVm-0005hP-3c for guix-patches@gnu.org; Fri, 22 Mar 2024 03:40:22 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnZVl-0002NA-Qy for guix-patches@gnu.org; Fri, 22 Mar 2024 03:40:21 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnZWQ-0005T2-6D for guix-patches@gnu.org; Fri, 22 Mar 2024 03:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69637] [PATCH mesa-updates v2 5/5] gnu: mesa: Update to 24.0.3. Resent-From: aurtzy Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Mar 2024 07:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69637 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69637@debbugs.gnu.org Cc: john.kehayias@protonmail.com, aurtzy , efraim@flashner.co.il Received: via spool by 69637-submit@debbugs.gnu.org id=B69637.171109322320906 (code B ref 69637); Fri, 22 Mar 2024 07:41:02 +0000 Received: (at 69637) by debbugs.gnu.org; 22 Mar 2024 07:40:23 +0000 Received: from localhost ([127.0.0.1]:56336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnZVm-0005R5-B9 for submit@debbugs.gnu.org; Fri, 22 Mar 2024 03:40:23 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:46505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnZTQ-0005IS-B2 for 69637@debbugs.gnu.org; Fri, 22 Mar 2024 03:38:02 -0400 Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-430ad286ab8so10906481cf.1 for <69637@debbugs.gnu.org>; Fri, 22 Mar 2024 00:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711092970; x=1711697770; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DqpIGbkg3h9RQTnaz/Zt0dHzLz5GIMo/7ter5JUwc/o=; b=cJpAk/rfVJYGWfrR5t8PM3wo6INKnTe0HiNVxDhMxVqMFLgm4sdeTG65Itma0y3Pzu dDZeEZ/V/ZYoNE+hZ/sXJeqstFVul8uu8CGZ16851t8FseLpQZujrVcvqLq5LUw74rC4 S+vN7RKwcwRFcbgdAz84PHLJ1TuTnPOJrLKW3tCM5hEKZ7yEun7Tqr/7mOzuhOf9/NAj NkpcY24goGbtwfuJ+maQ55CRnE4GRy1plwssMUDgW6o+zP5vr4qaBARfc1WdjhgkIM8D A1Q/ZE5fd4hsccNULi21AyBMzod4787LL6vXZVfaN1OH69qWd9dmhdxiMYBpwXJu/7Va lOsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711092970; x=1711697770; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DqpIGbkg3h9RQTnaz/Zt0dHzLz5GIMo/7ter5JUwc/o=; b=h4K21bYUXA/yiiBHGxf6wIk4VazFUrblbSoQRCDkUc4lxWyNOlzPA7ogMQLJd62NSP PJ3Zna/bGDNpme5HW/SY6zCnJWN36Qr2jjtj1bLArL1oqfl4zkTTO2BIP+2zmkyV5iGF HU975lvRiQdNU2SKi6j1Hip/lyaHkF3R840XOrpE5YMfFaYNptooUcHcUf5ENs+/24OY A5W3KCmKFXm76/fn+amnE+wmT9p8eejsZPHO/4SF1f74iUFn7jUgvPbSGRQ0CxHgM7pt aTdRMR/iME4ZpnhFy6n/pUJdaZyeQJFyAPdwOCSCBOZ9Zic1SnxZ8OziTAGlUTZow8NN guXQ== X-Gm-Message-State: AOJu0Yzd2F52QUipfJJVGOZEfTzwb3uUSHe6OOhr5lo13d4UZHiU6Y/l QIggM/7ygnUhqxTWChvSyPpxhw+dxqUZq4vlb3aDXqFeJc2b8pCFLFEOYhsc X-Google-Smtp-Source: AGHT+IFoxM/meSkdWatiJsjwxS2qc71xuKe97mxa11vwFve0CgHJ9IYbpQbIVie6qCoiTQ1d8qqZLQ== X-Received: by 2002:a05:622a:196:b0:431:435:20fb with SMTP id s22-20020a05622a019600b00431043520fbmr1502539qtw.64.1711092970055; Fri, 22 Mar 2024 00:36:10 -0700 (PDT) Received: from localhost.localdomain (ool-18bb63f6.dyn.optonline.net. [24.187.99.246]) by smtp.gmail.com with ESMTPSA id jz9-20020a05622a81c900b00430bf59ebccsm648013qtb.11.2024.03.22.00.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 00:36:09 -0700 (PDT) From: aurtzy Date: Fri, 22 Mar 2024 03:33:21 -0400 Message-ID: <06ab73253d226155792ae2817c74d0f8d790db14.1711091869.git.aurtzy@gmail.com> X-Mailer: git-send-email 2.41.0 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/gl.scm (mesa): Update to 24.0.3. Change-Id: Ic4176f8a747bcb4c5210af6ccb4569589192e4a7 --- gnu/packages/gl.scm | 80 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index f8dc8c1d9d..0265716ac0 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2023 Kaelyn Takata ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Liliana Marie Prikler +;;; Copyright © 2024 aurtzy ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,8 +41,10 @@ (define-module (gnu packages gl) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bison) + #:use-module (gnu packages build-tools) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages crates-io) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages flex) @@ -55,6 +58,8 @@ (define-module (gnu packages gl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) @@ -297,17 +302,17 @@ (define libva-without-mesa (define-public mesa (package (name "mesa") - (version "23.3.2") + (version "24.0.3") (source - (origin - (method url-fetch) - (uri (list (string-append "https://archive.mesa3d.org/" - "mesa-" version ".tar.xz") - (string-append "ftp://ftp.freedesktop.org/pub/mesa/" - "mesa-" version ".tar.xz"))) - (sha256 - (base32 - "1p4swrbmz3kb1805kdj973hf8virgmix4m9qprmcb2bgl4gviz1w")))) + (origin + (method url-fetch) + (uri (list (string-append "https://archive.mesa3d.org/" + "mesa-" version ".tar.xz") + (string-append "ftp://ftp.freedesktop.org/pub/mesa/" + "mesa-" version ".tar.xz"))) + (sha256 + (base32 + "1gpx3glifdvyw2fxigiannrxkdfhag6b6h0nxab3azbvlfickbkp")))) (build-system meson-build-system) (propagated-inputs ;; The following are in the Requires.private field of gl.pc. @@ -340,15 +345,23 @@ (define-public mesa python-mako python-wrapper (@ (gnu packages base) which) - (if (%current-target-system) - (list cmake-minimal-cross - pkg-config-for-build - wayland - wayland-protocols) - '()))) + (append + (if (%current-target-system) + (list cmake-minimal-cross + pkg-config-for-build + wayland + wayland-protocols) + '()) + ;; NVK-specific inputs + (if (target-x86-64?) + (list clang-15 + rust-bindgen-cli + rust) + '())))) (outputs '("out" "bin")) (arguments (list + #:meson meson-1.3 #:configure-flags #~(list #$@(cond @@ -379,9 +392,12 @@ (define-public mesa "-Dgbm=enabled" "-Dshared-glapi=enabled" - ;; Explicitly enable Vulkan on some architectures. + ;; Explicitly enable Vulkan on some architectures. TODO: Identify other + ;; architectures where nouveau (NVK) works and enable it for them #$@(cond - ((or (target-x86-32?) (target-x86-64?)) + ((target-x86-64?) + '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast,nouveau-experimental")) + ((target-x86-32?) '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast")) ((or (target-ppc64le?) (target-ppc32?)) '("-Dvulkan-drivers=amd,swrast")) @@ -478,6 +494,34 @@ (define-public mesa (("'lp_test_arit', ") "")))) (_ '((display "No tests to disable on this architecture.\n")))))) + #$@(if (target-x86-64?) + #~((add-after 'unpack 'change-subproject-sources + ;; Patch subproject source URLs to point to the store, which lets + ;; meson correctly identify rust inputs and avoid an attempt to + ;; download them mid-build. + (lambda _ + (for-each + (match-lambda + ((file input) + (substitute* file + (("source_url = .*$") + "") + (("source_hash = .*$") + "") + (("(source_filename = ).*$" all assign) + (string-append assign input "\n"))))) + ;; TODO: Patch mesa to allow for using sources with different + ;; versions so we don't have to package these crates + ;; specifically for mesa. + '(("subprojects/syn.wrap" + #$(package-source rust-syn-2.0.39)) + ("subprojects/unicode-ident.wrap" + #$(package-source rust-unicode-ident-1)) + ("subprojects/quote.wrap" + #$(package-source rust-quote-1.0.33)) + ("subprojects/proc-macro2.wrap" + #$(package-source rust-proc-macro2-1.0.70))))))) + #~()) (add-before 'configure 'fix-dlopen-libnames (lambda _ (let ((out #$output))