From patchwork Sun Aug 29 03:16:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 32353 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 52F6C27BBE1; Sun, 29 Aug 2021 04:18:12 +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 B1EAA27BBE3 for ; Sun, 29 Aug 2021 04:18:11 +0100 (BST) Received: from localhost ([::1]:48378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKBKk-0003Hp-N3 for patchwork@mira.cbaines.net; Sat, 28 Aug 2021 23:18:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKBKc-0003GN-Lj for guix-patches@gnu.org; Sat, 28 Aug 2021 23:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKBKc-0000lq-E5 for guix-patches@gnu.org; Sat, 28 Aug 2021 23:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKBKc-0001Sg-AO for guix-patches@gnu.org; Sat, 28 Aug 2021 23:18:02 -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:18:02 +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.16302070305556 (code B ref 50054); Sun, 29 Aug 2021 03:18:02 +0000 Received: (at 50054) by debbugs.gnu.org; 29 Aug 2021 03:17:10 +0000 Received: from localhost ([127.0.0.1]:55243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKBJd-0001R5-99 for submit@debbugs.gnu.org; Sat, 28 Aug 2021 23:17:10 -0400 Received: from mail-io1-f41.google.com ([209.85.166.41]:37447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKBJX-0001Qp-Rs for 50054@debbugs.gnu.org; Sat, 28 Aug 2021 23:17:00 -0400 Received: by mail-io1-f41.google.com with SMTP id b7so14873216iob.4 for <50054@debbugs.gnu.org>; Sat, 28 Aug 2021 20:16:55 -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=tbmHiuNtm8bA8CG+Mfn2oG2Z5us2akPQWQL9jVUI3IQ=; b=PL9JzuDAFmftXBxoOxKxrFcOLipsNA9gY35tNcPRzhjyJo3tsAZgGZiajQUJ+itAWV AHAp9+MVftwfaRzICaCL3uag3iMKUY+/osK+pnVpqBYqfoqKG/uZ+vO89bcXVuGkCpPV MMPoju9PZR0913Scu7pnQpYPHhjYdenyoQJoACChyGHqZtYfEaDbbf9qleXo39LrzYLX eBTMyDToeg3BGR77N2Zs75UyuqzjO+xcz12sJBkavICJPi9gwfOf7NA0S3DtDawL/WQ8 giGapmpk3ihqPtyr2TY2rk6jZeFJAuvuQDMFMPI19hQimHKCvWmyVsQ/2qyBwqXYf4MK IKkQ== 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=tbmHiuNtm8bA8CG+Mfn2oG2Z5us2akPQWQL9jVUI3IQ=; b=Z8NqpG1BWVZ8OErL3KEOfpecb/RuGlT93nXNCm58B+QNpFwDXss82fKIGch0lE33HY RBSzv000TJfjoy5/o4nt2EUVXAIYNIP9lXobC9oglwcVdViMK2LDAvqERuPHMzztLnBM 5zTKJVIq3JoGRKqBvjU817r3RmcFUJBjgaEy+g1H7F4cX3cvJDBFx+SZfLGF5FEs4all n7PAe7vFFchMo7dnDJDL8dklO/2AjnRp2mXHXrL84QvlXnlkSHWX2h0pB4NEulIIIfdZ xs8iV9DLD7OMUmwqoBdtKDI4SYXZ/tJSqGpzKx1qO1qu3p6xXZyqSQyUXW6HfxmYERh3 9NMQ== X-Gm-Message-State: AOAM530qZiHoULtQ2IPaTVidgxa07926boojhF0AlKkJJxQc4tTFNaB1 mPjSf+i7wxKO5zw16aw3titqUB6/OHFQX5yAb8qOTZgRtNA= X-Google-Smtp-Source: ABdhPJzwR65sc/hJlIRUfks4ZVCSn8sVi0r5qwp3iUuDmCKuLs+X1jOICgXPTb0w7hCndLHfBgcUmXMAKbKWa4wv5O0= X-Received: by 2002:a02:5442:: with SMTP id t63mr15039903jaa.7.1630207009993; Sat, 28 Aug 2021 20:16:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andy Tai Date: Sat, 28 Aug 2021 20:16:13 -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 source rather than replying 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 12fa8bfe0766d493c0a2aeb01490e2513d6b709b 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..ba3d401311 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