From patchwork Mon Jan 9 19:25:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 45997 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 6F47027BBF0; Mon, 9 Jan 2023 19:27:51 +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=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 7025927BBE9 for ; Mon, 9 Jan 2023 19:27:50 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pExnd-0007De-7V; Mon, 09 Jan 2023 14:27:13 -0500 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 1pExnW-0007AL-S3 for guix-patches@gnu.org; Mon, 09 Jan 2023 14:27:08 -0500 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 1pExnS-0003C9-UT for guix-patches@gnu.org; Mon, 09 Jan 2023 14:27:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pExnS-0007Fx-Q9 for guix-patches@gnu.org; Mon, 09 Jan 2023 14:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60695] [PATCH 2/9] gnu: Add qtimgui. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Jan 2023 19:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60695 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60695@debbugs.gnu.org Received: via spool by 60695-submit@debbugs.gnu.org id=B60695.167329237527747 (code B ref 60695); Mon, 09 Jan 2023 19:27:02 +0000 Received: (at 60695) by debbugs.gnu.org; 9 Jan 2023 19:26:15 +0000 Received: from localhost ([127.0.0.1]:38210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pExmg-0007DM-Ub for submit@debbugs.gnu.org; Mon, 09 Jan 2023 14:26:15 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:33186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pExme-0007CX-5c for 60695@debbugs.gnu.org; Mon, 09 Jan 2023 14:26:13 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 01F6BE3058 for <60695@debbugs.gnu.org>; Mon, 9 Jan 2023 19:26:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SiJlvtB0ihq8 for <60695@debbugs.gnu.org>; Mon, 9 Jan 2023 19:26:06 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 91F70E4497 for <60695@debbugs.gnu.org>; Mon, 9 Jan 2023 19:26:06 +0000 (UTC) From: Simon South Date: Mon, 9 Jan 2023 14:25:56 -0500 Message-Id: <655b7031be0bb48f2c805e592357ffff430221ee.1673286570.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 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/qt.scm (qtimgui): New variable. --- gnu/packages/qt.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 6406fd5c49..7ffb52492d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -26,6 +26,7 @@ ;;; Copyright © 2022 Foo Chuan Wei ;;; Copyright © 2022 Zhu Zihao ;;; Copyright © 2022 Petr Hodina +;;; Copyright © 2023 Simon South ;;; ;;; This file is part of GNU Guix. ;;; @@ -114,6 +115,7 @@ (define-module (gnu packages qt) #:use-module (gnu packages sqlite) #:use-module (gnu packages telephony) #:use-module (gnu packages tls) + #:use-module (gnu packages toolkits) #:use-module (gnu packages valgrind) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) @@ -3548,6 +3550,67 @@ (define-public python-pyqt+qscintilla (description "This package contains the union of PyQt and the Qscintilla extension."))) +(define-public qtimgui + (let ((commit "48d64a715b75dee24e398f7e5b0942c2ca329334") + (revision "0")) + (package + (name "qtimgui") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/seanchas116/qtimgui") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0x71j8m15w003ak0d7q346rlwyvklkda9l0dwbxfx6kny3gsl11k")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags #~(list "-DQTIMGUI_BUILD_IMGUI=OFF" + "-DQTIMGUI_BUILD_IMPLOT=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + ;; Disable building the examples. + (("^add_subdirectory\\(examples\\)") "")) + (substitute* "src/CMakeLists.txt" + ;; Build shared libraries, not static. + (("STATIC") "SHARED") + ;; Compile with the system imgui headers. + (("^(target_include_directories.*)\\)" _ prefix) + (string-append prefix + " " + (search-input-directory inputs + "include/imgui") + ")"))))) + (replace 'install + ;; No install target provided; manually copy the header and + ;; library files to the output. + (lambda* (#:key source #:allow-other-keys) + (for-each + (lambda (file-name) + (install-file (string-append source "/src/" file-name) + (string-append #$output "/include/qtimgui"))) + '("ImGuiRenderer.h" "QtImGui.h")) + (for-each + (lambda (file-name) + (install-file (string-append "src/" file-name) + (string-append #$output "/lib"))) + '("libqt_imgui_quick.so" "libqt_imgui_widgets.so"))))) + #:tests? #f)) ; no test suite + (inputs + (list imgui-1.86 implot qtbase-5 qtdeclarative-5)) + (home-page "https://github.com/seanchas116/qtimgui") + (synopsis "Qt backend for the ImGui GUI library") + (description "QtImGui allows the ImGui C++ GUI library to be used by Qt +applications within subclasses of @code{QOpenGLWidget} and +@code{QOpenGLWindow}.") + (license license:expat)))) + (define-public qtkeychain (package (name "qtkeychain")