From patchwork Tue Oct 29 01:40:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 69608 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 E2A0727BBE9; Tue, 29 Oct 2024 01:42:19 +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=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,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 B3A5327BBE2 for ; Tue, 29 Oct 2024 01:42:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5bFG-0001sH-4D; Mon, 28 Oct 2024 21:42:06 -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 1t5bFE-0001s5-KI for guix-patches@gnu.org; Mon, 28 Oct 2024 21:42:04 -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 1t5bFE-0007Q4-C1 for guix-patches@gnu.org; Mon, 28 Oct 2024 21:42:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=uFL93tOKUhR2y8kZgSNDINz4llx/Ji6KFxmjj1lW8c4=; b=M+ysQ2jMaKiZ1RKEH74MLRZS9b3YIg827oYpn+Bwk+eLmhvW9PX0LVGQDHVJRdlivKl01FgT4KdacX7K+6adicl0uOXCbAMmJa8xZY3Zw0uCpFMui+UPX5C71KDNNVwzL0LoyqEauBb5QI5i74YvS7hZvoVrMTbrI3lrosP4ZzTkuLpoTaDJDgr6nA86birytz7JqOxp57sorcyk+/OSpB+U3wI9baVufz9oa9boGoCyCoFkT69SC+r7uFSa00n4Ax5l0tl0CafjkhPYd836kNcirYndm9P5SiUd0snTjIWYKEi9o4pKmXNmlJ2jEHtO+b7lofs6mCuwsQshOIvcAA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5bFE-0000Wo-6R for guix-patches@gnu.org; Mon, 28 Oct 2024 21:42:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74075] [PATCH v2 4/5] gnu: ogre: Add support for Wayland, Vulkan and Bullet. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Oct 2024 01:42:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74075@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 74075-submit@debbugs.gnu.org id=B74075.17301661041973 (code B ref 74075); Tue, 29 Oct 2024 01:42:04 +0000 Received: (at 74075) by debbugs.gnu.org; 29 Oct 2024 01:41:44 +0000 Received: from localhost ([127.0.0.1]:55298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5bEt-0000Vg-UB for submit@debbugs.gnu.org; Mon, 28 Oct 2024 21:41:44 -0400 Received: from mail-oo1-f41.google.com ([209.85.161.41]:55580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5bEr-0000Uw-HE for 74075@debbugs.gnu.org; Mon, 28 Oct 2024 21:41:42 -0400 Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5e5a0519d00so2301200eaf.3 for <74075@debbugs.gnu.org>; Mon, 28 Oct 2024 18:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730166035; x=1730770835; 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=uFL93tOKUhR2y8kZgSNDINz4llx/Ji6KFxmjj1lW8c4=; b=j1qXeLN8E5XXCzfO9tj17tHI14sgd7fWx+F+XLrd4Qxba/zW9dNYiNWEvIMqOfC8Gm kyNvsTLWMTWABy9MOqeGqmylS2hHDS8WAoiBgN5sDn5m2mq//H1Lhl/QdhzcNFESIWxQ 5x/FBTDi96q4Ouvj//8GlnZuO3rddFKmgEmCYIRNwYT8HsgIE+chGlRFsyS7r4Qx27mg XjWmqCArb/81BzR8j6ZvJl5H/OlRiDig6hEg7563veiKDm10+PH/6wa/8LVrWrE+p8uB 2yvHhUC+dyRm4ERYlLV81DmgXOJ3/kgMruhBeyR+EFLfqgb6MOslSKUtBj3GR9jbyQEZ IYRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730166035; x=1730770835; 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=uFL93tOKUhR2y8kZgSNDINz4llx/Ji6KFxmjj1lW8c4=; b=itXWBGn9l578a1DturhpqfwPwZwBhykUyJpXpRhW2t5yJmXvB/Nfd05UwyRe90so5g vn6NUN5pSxjPzEXadrzAXp9QM93yHGuNVIRwTR9iNyIInAWTgrjhHqrc5BzZ+9I+gFpe k3QFKUDrvqNRLlnmx4XNfxcvt6WgD7IStKs6ynNqrpf9D3YZOpx6bmgnjaPglpkMD+Aj F7fTvjyEpkH7wLVpSL/FdsYLqYnHzginuQrpEOs31zCfCu9676cEjZriDNuiEzJ86xtk 0AjIb30QU2tS8/y9eg1+gUMJDQfltm+NOLFX99DOKyCsmsif+vrWThkxs3ffEB2YsxCX xenw== X-Gm-Message-State: AOJu0Yza830KCl34MrdkeccHncCXXI1wH/sS5ZncecTngsGWZsNZa3SM 1GfzaidnPdZzn5e2AGQixyMWahBtmYJqf7JH5dXONXaCmrFnwPTkLnjOoimU X-Google-Smtp-Source: AGHT+IFsbPd4tbJSZITkaqp2kRTzO4h/0InBAYkRbFebaJpl9/e3fAPGHznDsBMh5/Gd2prP2goJwg== X-Received: by 2002:a05:6870:1cd:b0:25d:ff4c:bc64 with SMTP id 586e51a60fabf-29051af0f90mr7836001fac.6.1730166035226; Mon, 28 Oct 2024 18:40:35 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7edc866906dsm6401968a12.10.2024.10.28.18.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 18:40:34 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 29 Oct 2024 10:40:07 +0900 Message-ID: <41ab210b8582c7f709734d71fb30188ef120badb.1730166008.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.46.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/patches/ogre-glslang.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/graphics.scm (ogre): Apply patch. [configure-flags]: Add -DOGRE_BUILD_RENDERSYSTEM_VULKAN=ON. [native-inputs]: Add vulkan-headers. [inputs]: Add bullet, glslang, spirv-tools and wayland. Change-Id: I77f8964f36facd40f48a80006cfaa0a17c7971e5 --- (no changes since v1) gnu/local.mk | 1 + gnu/packages/graphics.scm | 11 ++++++-- gnu/packages/patches/ogre-glslang.patch | 36 +++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ogre-glslang.patch diff --git a/gnu/local.mk b/gnu/local.mk index c432685775..ac53887aa3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1836,6 +1836,7 @@ dist_patch_DATA = \ %D%/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch \ %D%/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch \ %D%/packages/patches/ocaml-4.09-multiple-definitions.patch \ + %D%/packages/patches/ogre-glslang.patch \ %D%/packages/patches/omake-fix-non-determinism.patch \ %D%/packages/patches/oneko-remove-nonfree-characters.patch \ %D%/packages/patches/onionshare-cli-async-mode.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 7659bec27d..bde89b487b 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -1185,7 +1185,8 @@ (define-public ogre (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0l5rlxk2jiz8sb5w4bd8xvyzrmwnas27sxzkar7xc5azs1x2vgxf")))) + (base32 "0l5rlxk2jiz8sb5w4bd8xvyzrmwnas27sxzkar7xc5azs1x2vgxf")) + (patches (search-patches "ogre-glslang.patch")))) (build-system cmake-build-system) (arguments (list @@ -1218,6 +1219,7 @@ (define-public ogre (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath) "-DIMGUI_DIR=../imgui-source" "-DOGRE_BUILD_DEPENDENCIES=OFF" + "-DOGRE_BUILD_RENDERSYSTEM_VULKAN=ON" "-DOGRE_BUILD_TESTS=TRUE" "-DOGRE_INSTALL_DOCS=TRUE" "-DOGRE_INSTALL_SAMPLES=TRUE" @@ -1228,16 +1230,21 @@ (define-public ogre ("googletest" ,googletest) ("pkg-config" ,pkg-config) ("python" ,python) + ("vulkan-headers" ,vulkan-headers) ("xorg-server-for-tests" ,xorg-server-for-tests))) (inputs - (list freeimage + (list bullet + freeimage freetype + glslang libxaw libxrandr libxt mesa pugixml sdl2 + spirv-tools + wayland zlib)) (synopsis "Scene-oriented, flexible 3D engine written in C++") (description diff --git a/gnu/packages/patches/ogre-glslang.patch b/gnu/packages/patches/ogre-glslang.patch new file mode 100644 index 0000000000..a0711f8ead --- /dev/null +++ b/gnu/packages/patches/ogre-glslang.patch @@ -0,0 +1,36 @@ +From ab1a39e0610c737993ef605559d9b7998a975666 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Tue, 29 Oct 2024 09:52:48 +0900 +Subject: [PATCH] build/glslang: Fix build when OSDependent library is missing. + +The OSDependent glslang library is only available when it is built as +a static library, not a shared one; look for the library but do not +fail the build when it doesn't exist. + +Fixes: +--- + PlugIns/GLSLang/CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/PlugIns/GLSLang/CMakeLists.txt b/PlugIns/GLSLang/CMakeLists.txt +index bfe03d9b8..7de816939 100644 +--- a/PlugIns/GLSLang/CMakeLists.txt ++++ b/PlugIns/GLSLang/CMakeLists.txt +@@ -19,7 +19,11 @@ elseif(DEFINED ENV{VULKAN_SDK}) + target_link_directories(Plugin_GLSLangProgramManager PUBLIC $ENV{VULKAN_SDK}/lib) + target_link_libraries(Plugin_GLSLangProgramManager PUBLIC OgreMain shaderc_combined) + else() +- set(GLSLANG_LIBS glslang OSDependent SPIRV SPIRV-Tools-opt SPIRV-Tools) ++ set(GLSLANG_LIBS glslang SPIRV SPIRV-Tools-opt SPIRV-Tools) ++ find_library(GLSLANG_OSDependent OSDependent) ++ if(GLSLANG_OGLCompiler) ++ set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_OSDependent}) ++ endif() + find_library(GLSLANG_HLSL HLSL) + if(GLSLANG_HLSL) + set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_HLSL}) + +base-commit: edb3d26fa6fa2a40498e80db03e2c0e17c51d46d +-- +2.46.0 +