From patchwork Wed Jun 28 00:58:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 51388 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 44DFF27BBE9; Wed, 28 Jun 2023 01:59:21 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 4C70027BBE2 for ; Wed, 28 Jun 2023 01:59:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEJWY-0006sf-EE; Tue, 27 Jun 2023 20:59:10 -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 1qEJWV-0006rQ-6g for guix-patches@gnu.org; Tue, 27 Jun 2023 20:59:07 -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 1qEJWQ-00064v-KH for guix-patches@gnu.org; Tue, 27 Jun 2023 20:59:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEJWP-0001FZ-S1 for guix-patches@gnu.org; Tue, 27 Jun 2023 20:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64213] [PATCH v2 1/2] gnu: imgui: Use #:make-flags. References: <87legcfgqm.fsf@protonmail.com> In-Reply-To: <87legcfgqm.fsf@protonmail.com> Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Jun 2023 00:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64213 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64213@debbugs.gnu.org Received: via spool by 64213-submit@debbugs.gnu.org id=B64213.16879139404798 (code B ref 64213); Wed, 28 Jun 2023 00:59:01 +0000 Received: (at 64213) by debbugs.gnu.org; 28 Jun 2023 00:59:00 +0000 Received: from localhost ([127.0.0.1]:49723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEJWO-0001FI-8N for submit@debbugs.gnu.org; Tue, 27 Jun 2023 20:59:00 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:24897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEJWK-0001Ex-OM for 64213@debbugs.gnu.org; Tue, 27 Jun 2023 20:58:59 -0400 Date: Wed, 28 Jun 2023 00:58:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687913929; x=1688173129; bh=aK3eFzwx6YFe5ABDnTC9U7osp05iqWQ2vCfb1B3oXrw=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Y5RkgZ/+xeQinPJg4AwuL2kLiwSgJISf9K/iqJ0nIpnDrwpFQkONLUTOVXEZXC2ih eGSL1vM9IBNBQ3VKC0N7enkEOxaBw+Il9E5fQOgemv6kcKpNthEjYS9xZnMpUJ/DXL +8eElCW0fInEQl4hHGn6Is54RxwvEs82cu22lzcvXllsG4Km3Q4C78U9q6IkARt++R bP4phxlXV5esD0tQqbuE7AELVT8ge4jo7a1WeVxIVIG6m9CvhSwO3ge7yQParrnM2c 5fQ7GjXi3D3l00UJnUIGxg1BMnQltmM+7kTK7qTed72j+qDa90NfqTd68Xu7g5PFdt 9RQ0G80CcBmMA== Message-ID: <878rc48ksm.fsf@protonmail.com> Feedback-ID: 7805494:user:proton 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: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias 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 With some help from #guix, a better way was found: employ #:make-flags (even though there is no make here, use them the same way in the custom 'build phase). Now there are two patches: first adjusts imgui to use #:make-flags and the second fixes the issue with mangohud from imgui-1.86 by adjusting these flags. From 82f14241e45a4d56fdf26e7bc463407941ead4a7 Mon Sep 17 00:00:00 2001 Message-Id: <82f14241e45a4d56fdf26e7bc463407941ead4a7.1687913689.git.john.kehayias@protonmail.com> From: John Kehayias Date: Tue, 27 Jun 2023 20:43:44 -0400 Subject: [PATCH 1/2] gnu: imgui: Use #:make-flags. * gnu/packages/toolkits.scm (imgui)[arguments]: Add #:make-flags to replace compiler arguments in the 'build phase. --- gnu/packages/toolkits.scm | 54 +++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/gnu/packages/toolkits.scm b/gnu/packages/toolkits.scm index aee6c22e2d..1af10d83f4 100644 --- a/gnu/packages/toolkits.scm +++ b/gnu/packages/toolkits.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022, 2023 Maxim Cournoyer ;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice -;;; Copyright © 2022 John Kehayias +;;; Copyright © 2022, 2023 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,6 +55,18 @@ (define-public imgui (guix build utils) (ice-9 ftw) (srfi srfi-26)) + ;; The build phase does not use make but we will use make-flags in a + ;; similar fashion to make inheritance for older imgui versions easier. + #:make-flags + ;; This first option is necessary at least for OpenBoardView, otherwise + ;; it would fail with the "Too many vertices in ImDrawList using 16-bit + ;; indices". + #~(list "-DImDrawIdx=unsigned int" + "-I" (string-append (getcwd) "/source") + "-I" (search-input-directory %build-inputs "include/freetype2") + "-g" "-O2" "-fPIC" "-shared" + "-lGL" "-lSDL2" "-lglfw" + "-o" "libimgui.so") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'adjust-includes @@ -64,32 +76,24 @@ (define-public imgui "#include )) base-commit: 63660f0febb4aa0d5260791c82dfde15c0df4c79 -- 2.40.1