From patchwork Sun Aug 29 03:25:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 32354 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 3F63D27BBE4; Sun, 29 Aug 2021 04:26:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,MISSING_HEADERS, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AA58527BBE3 for ; Sun, 29 Aug 2021 04:26:08 +0100 (BST) Received: from localhost ([::1]:52810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKBSR-0006cM-PU for patchwork@mira.cbaines.net; Sat, 28 Aug 2021 23:26:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKBSM-0006cD-1g for guix-patches@gnu.org; Sat, 28 Aug 2021 23:26:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKBSL-0007op-QP for guix-patches@gnu.org; Sat, 28 Aug 2021 23:26:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKBSL-0001fD-L7 for guix-patches@gnu.org; Sat, 28 Aug 2021 23:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50054] [PATCH] gnu: Add bgfx Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Aug 2021 03:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50054 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch Cc: 50054@debbugs.gnu.org Received: via spool by 50054-submit@debbugs.gnu.org id=B50054.16302075476347 (code B ref 50054); Sun, 29 Aug 2021 03:26:01 +0000 Received: (at 50054) by debbugs.gnu.org; 29 Aug 2021 03:25:47 +0000 Received: from localhost ([127.0.0.1]:55256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKBS6-0001eJ-QC for submit@debbugs.gnu.org; Sat, 28 Aug 2021 23:25:47 -0400 Received: from mail-io1-f45.google.com ([209.85.166.45]:37785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKBS4-0001e5-8j for 50054@debbugs.gnu.org; Sat, 28 Aug 2021 23:25:45 -0400 Received: by mail-io1-f45.google.com with SMTP id b7so14901037iob.4 for <50054@debbugs.gnu.org>; Sat, 28 Aug 2021 20:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=fHfXalRahxSdUhWgieiWIPMIaFdwYK+3r8WFGSgWfio=; b=pFi9w06i0fStanHULIdBSikiNzaQumIeFRBVBobhm+9RBmFkSFIN7OUXcxczFciG1g RJbfI3aeF6d07QJWzAQ4EUt95xofTCOSM+e6iLTPKuNyM3QOW9s/uS+YXaDyT7k5cTPf 3IAnGNxPCXqe0gKqYugEUFf1ngJvm3WcsM4Ckr3sjQvj5hVkqLapVhcbX0SKV7tWMG2m cRHIKZwzG00dvhgYC6r7RjlekjzwhMtAC91S/JmJA1gkBSenGxfTm4CO5xFdzSe4lBbx TTs0omDGRnbuvSGbU+RaTt+Zt0QhtxrwlGCwoGNhgvBJpIWKDZf433wyw2mJ556huzbz Tr2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=fHfXalRahxSdUhWgieiWIPMIaFdwYK+3r8WFGSgWfio=; b=PTcrhWTlgxy2SKRzTDFEwQe2E0PlAjmXaWc2X6HeUiB8wV+mLu4OUIXnYDSgFG+3zG gwkMHbIBJlcho5YnDqnw3isQqfZjQBobwekwzdLqnevj4lltATenKWbkYwY1KMTLRINJ 0+BwpRjnW0ydE6sRrGhfiJKYVikoNp32udWp+6RpJWB50K2g5MvHp8/hhUNib5McaP5U vdy64nh4tRCAxcnXCoSzYV0uJjHi0OulU+g5iY+KE9umUzcJxxwsFivuX+o3ZDMGnBQR VChkjuRU+NiIFqHq3G/D04wtlnzjHb86ghOE0ciAPSSXp8mWEtxGb+Ys3ZzjkwE+4EQw 097w== X-Gm-Message-State: AOAM533vgyMz6iqBRy5nCAPn8+dozcqvevG2JYMMdBYpupeh8xD8uLdb k21q6Jox3724Lmc033OKA/WC5nhVTVtQ66UGAlwDYVGLb9s= X-Google-Smtp-Source: ABdhPJxyOm1YF1a0K1nMkQHEqA3OSNAWyrRV9moJvBFgkpkOeTQ4oRYPUqExCTdqWhM2suuTO2aO3OzD9OARHebm6q4= X-Received: by 2002:a5d:8710:: with SMTP id u16mr12740316iom.62.1630207538406; Sat, 28 Aug 2021 20:25:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andy Tai Date: Sat, 28 Aug 2021 20:25:02 -0700 Message-ID: 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" X-getmail-retrieved-from-mailbox: Patches updated patch attached: directly checking out additional source repos rather than relying on git submodule first attempt at removing "nasty" stuff, removing bx/tools/bin > On Mon, Aug 16, 2021 at 5:52 AM Leo Prikler > wrote: > > > > Hi, > > > > Am Montag, den 16.08.2021, 05:42 -0700 schrieb Andy Tai: > > > Leo, by "nasty stuff" you meant non-free stuff (I doubt if there is > > > any in a graphics library but will check), or you meant the embedded > > > packages that shall be reference to other packages in guix (if > > > packaged already)? I think the embedded copies of other stuff may > > > have local customization that may make it impossible to simply build > > > with the existing packages in guix. > > Nasty stuff are not only already existing packages, but also outdated > > versions thereof. If there are heavily customized versions or packages > > not yet included in Guix, then those can be left in (but with a > > remark!), though in the long term it would be better to make those > > packages work with upstream versions rather than require specific > > tweaking. > > > > The other thing I already mentioned are binaries, which upstream seems > > also aware about, see e.g. > > https://github.com/bkaradzic/bgfx/commit/caed3f91026bf0e703f1eaf6f622e27b820df86c From 1b55b4ef74177d22fd695910bf75ae3d89ad0b90 Mon Sep 17 00:00:00 2001 From: Andy Tai Date: Sat, 28 Aug 2021 20:12:52 -0700 Subject: [PATCH] gnu: Add bgfx To: guix-patches@gnu.org * gnu/packages/graphics.scm (bgfx): New variable --- gnu/packages/graphics.scm | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 38feb27c87..3c34e31a07 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2000,3 +2000,77 @@ Some feature highlights: such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be a complete and conforming implementation of the OpenXR API made by Khronos.") (license license:boost1.0))) + +(define-public bgfx + (let ((commit "b029632186b897a7d65486f9809d65b3eb900abf") + (revision "0")) + (package + (name "bgfx") + (version + (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/bkaradzic/bgfx.cmake") + (commit commit))) + (file-name (git-file-name "bgfx.cmake" version)) + (sha256 + (base32 + "1j19a0ya1mi8vls6696b4zyb573hk8qil9lrzqd2anlrfn2xn395")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (delete-file-recursively "bx") + (delete-file-recursively "bimg") + (delete-file-recursively "bgfx") + + (copy-recursively (assoc-ref inputs "bx") + "./bx") + (copy-recursively (assoc-ref inputs "bimg") + "./bimg") + (copy-recursively (assoc-ref inputs "bgfx") + "./bgfx") + ;; delete binaries from source git + (delete-file-recursively "bx/tools/bin") + #t))) + + #:tests? #f)) ;; no tests + (inputs + `(("glslang" ,glslang) + ("libxcb" ,libxcb) + ("opengl" ,mesa) + ("vulkan-loader" ,vulkan-loader))) + (native-inputs + (let ((additional-repo (lambda (url commit name hash) + (origin + (method git-fetch) + (uri (git-reference + (url url) + (commit commit))) + (file-name (git-file-name name commit)) + (sha256 (base32 hash)))))) + `(("bx" + ,(additional-repo "https://github.com/bkaradzic/bx" + "9978d894cb54efc0fcb874461f3127cbe8e55b33" + "bx" "0r98x2fdklldvkswda1hld6igzd0kzm21d0fhfdwi6401a718dyx")) + ("bimg" + ,(additional-repo "https://github.com/bkaradzic/bimg" + "0b6febf2b0ba07f5fd5de6a30acaf7c3afdb9921" + "bimg" "1a0d43ryv6hzssq18ri0rqb1zvqs62x7qp98mdc5qhgbn46bqg9z")) + ("bgfx" + ,(additional-repo "https://github.com/bkaradzic/bgfx" + "f26885aaed87ce6c39e8862212d62f82ff4a93ac" + "bgfx" "037h4m4kxxl9ii5f7bs8gwihcih0ydzkv5bh0jx1s22g3bbkvkr0")) + ("pkg-config" ,pkg-config) + ("vulkan-headers" ,vulkan-headers)))) + (home-page "https://github.com/bkaradzic/bgfx") + (synopsis "Cross-platform, graphics API agnostic, rendering library") + (description "bgfx is a cross-platform, graphics API agnostic, +'Bring Your Own Engine/Framework' style rendering library supporting Direct3D, +OpenGL, Metal, Vulkan and WebGL.") + (license (list license:bsd-2 license:cc0))))) -- 2.33.0