From patchwork Sun Dec 8 03:48:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smith X-Patchwork-Id: 34648 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 5ACAC27BBEE; Sun, 8 Dec 2024 03:50:41 +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.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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=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 122F227BBE2 for ; Sun, 8 Dec 2024 03:50:38 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tK8JA-00028Y-OS; Sat, 07 Dec 2024 22:50:12 -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 1tK8J8-000277-NK for guix-patches@gnu.org; Sat, 07 Dec 2024 22:50:10 -0500 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 1tK8J8-00041t-Ec for guix-patches@gnu.org; Sat, 07 Dec 2024 22:50:10 -0500 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=IQ7dnGXZN/HOqGtin1kOHUprJDWs+4eylEEdl6HCv7w=; b=cv5xJfPqXPmoWA+e1SyOMJ4dpwr/zLsKt9/O0ljdqqa1rg+9qS6P1oBA8INo1zRAHaJISYTqcJdeVU3Sit185Tk5Iim49tU06lN0j/enc2ABojiXlWWUCplQCt7wzTrjpkeLth/0iQIb/kQx8TknoeHw0AcOC3RY53nJUckK4HJK2sOf1lEY0Y+J515FIB/W8ueM4s2hzAgTsNlXLiiEJsRme/NEL/iDuqgvyzOjN9N80LPUKc/5SckZBw8q8A4jcNAoyQ+f96EmLEYFNlOgLPFg84vwzY8Nddynk9I9XPcEXuNSBF95aQpm/aWAlEhgl60ciTxzZ+9t/kVZj2HrSg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tK8J1-0006Nh-FL; Sat, 07 Dec 2024 22:50:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#73287] [PATCH v4 3/3] gnu: Add trenchbroom. Resent-From: James Smith Original-Sender: "Debbugs-submit" Resent-CC: adam.faiz@disroot.org, liliana.prikler@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Sun, 08 Dec 2024 03:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73287 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73287@debbugs.gnu.org Cc: James Smith , Adam Faiz , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-Xcc: Adam Faiz , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= Received: via spool by 73287-submit@debbugs.gnu.org id=B73287.173362975524432 (code B ref 73287); Sun, 08 Dec 2024 03:50:03 +0000 Received: (at 73287) by debbugs.gnu.org; 8 Dec 2024 03:49:15 +0000 Received: from localhost ([127.0.0.1]:49217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tK8IE-0006Lv-Qk for submit@debbugs.gnu.org; Sat, 07 Dec 2024 22:49:15 -0500 Received: from layka.disroot.org ([178.21.23.139]:41100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tK8IA-0006LT-Es for 73287@debbugs.gnu.org; Sat, 07 Dec 2024 22:49:11 -0500 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0F7F124C9D; Sun, 8 Dec 2024 04:49:10 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Wn09lc6fJTYD; Sun, 8 Dec 2024 04:49:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1733629745; bh=jf+7jVanQ7Gp0hvd9PbYaTxE/ATEz/gWAu99GgI6LcM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UGWekQinXMYkB69UlQHwTjBCwPzy1wrLdrmWWI6X0SLKdtH+NBnVa4toFJ6Lm+687 iXQo7g8UNPaJxkjA0fM4coKk3NDeGPXdymm8IrQIHyvYj/i4vshQuA5NDXClKEvoV+ CHgc8ujn3ZrmzTIA4QOAaClIaLIUfgIqn4d82CcFARIpGon4sjxbpi/7SJdQDTLOh2 hzfg08uIHe6ML1j9WJVNiRscJahV2linGXXK67eL3tik8wqvMMrOrM+izph5qZCZkF 3ZTuei/E6J+tpvEGKslUVQ5qDZMowS1Xv2Eo46SPWw14vt2wuAAKHzujxNAVrJ/f+8 guati8j0OylCA== Date: Sat, 7 Dec 2024 20:48:32 -0700 Message-ID: <7b762e62ff9523102189f3f3b4c251d1b38ef826.1733629326.git.jsubuntuxp@disroot.org> In-Reply-To: <1358ec328b7c9a2452e2dd139d8cf203a83d6184.1733629326.git.jsubuntuxp@disroot.org> References: <1358ec328b7c9a2452e2dd139d8cf203a83d6184.1733629326.git.jsubuntuxp@disroot.org> 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: James Smith X-ACL-Warn: , James Smith via Guix-patches X-Patchwork-Original-From: James Smith via Guix-patches via From: James Smith 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/game-development.scm: (trenchbroom): New variable. Change-Id: I50691b1db2010cd8c2c7f04bdfd80278b9e14aed --- gnu/packages/game-development.scm | 93 +++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 2aee26593c..1bc6e8fa49 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -92,12 +92,14 @@ (define-module (gnu packages game-development) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages lua) #:use-module (gnu packages m4) + #:use-module (gnu packages maths) #:use-module (gnu packages mp3) #:use-module (gnu packages multiprecision) #:use-module (gnu packages music) @@ -105,6 +107,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages networking) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pretty-print) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-build) @@ -123,6 +126,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages texinfo) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages web) @@ -680,6 +684,95 @@ (define-public tiled ;; under BSD-2. (license license:gpl2+))) +(define-public trenchbroom + (package + (name "trenchbroom") + (version "2024.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TrenchBroom/TrenchBroom") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1xysz7rkjy11wp9sshdqllmlw8qb65f1zlljpw3q22483szwzxnb")))) + (build-system cmake-build-system) + (arguments + (list #:configure-flags + #~(list "-DCMAKE_BUILD_TYPE=Release" "-G" "Unix Makefiles" + "-DCMAKE_PREFIX_PATH=cmake/packages" + (string-append "-DFREEIMAGE_INCLUDE_PATH=" + #$freeimage "/include") + (string-append "-DFREEIMAGE_LIBRARY=" + #$freeimage "/lib/libfreeimage.so") + (string-append "-Dfreetype_INCLUDE_DIR=" + #$freetype "/include/freetype2") + (string-append "-Dfreetype_LIBRARY=" + #$freetype "/lib/libfreetype.so")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-build-system + (lambda _ + (substitute* "CMakeLists.txt" + (("set\\(CMAKE_TOOLCHAIN_FILE") + "#set(CMAKE_TOOLCHAIN_FILE")) + (substitute* "app/CMakeLists.txt" + (("/usr") #$output)))) + (add-before 'build 'set-environment-variables + (lambda _ + ;; Set home so fontconfig can write cache. + (setenv "HOME" (getenv "TEMP")) + ;; Set QT platform for offscreen rendering. + (setenv "QT_QPA_PLATFORM" "offscreen") + (setenv "XDG_RUNTIME_DIR" (getenv "TEMP")))) + (add-after 'install 'wrap-trenchbroom + (lambda _ + (wrap-program (string-append #$output "/bin/trenchbroom") + ;; TrenchBroom needs $XDG_DATA_DIRS set to find game + ;; configs. + `("XDG_DATA_DIRS" ":" prefix + (,(string-append #$output "/share"))) + ;; TrenchBroom also doesn't work well with Wayland backend. + '("QT_QPA_PLATFORM" = ("xcb"))))) + (add-after 'install 'install-desktop-file + (lambda _ + (make-desktop-entry-file + (string-append #$output "/share/applications/" + #$(package-name this-package) ".desktop") + #:name "TrenchBroom" + #:comment #$(package-synopsis this-package) + #:exec #$name + #:icon #$name + #:categories '("Development") + #:keywords '("quake" "level" "editor"))))) + #:tests? #f)) ; No tests. + (inputs + (list assimp + bash-minimal + catch2 + fmt + freeglut + freeimage + freetype + glew + glm + glu + libxxf86vm + mesa + miniz + qtbase-5 + qtsvg-5 + tinyxml2)) + (native-inputs (list git pandoc python p7zip)) + (home-page "https://kristianduske.com/trenchbroom/") + (synopsis "Cross-platform level editor for Quake-engine based games") + (description "TrenchBroom is a cross-platform level editor for +Quake-engine based games. It supports Quake, Quake 2, Hexen 2, as well as +other games. TrenchBroom provides many simple and advanced tools to create +complex and interesting levels.") + (license license:gpl3+))) + (define-public tsukundere (package (name "tsukundere")