From patchwork Wed Nov 30 03:59:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Atlas X-Patchwork-Id: 44979 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 128FD27BBE9; Wed, 30 Nov 2022 12:16:31 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 56D0C27BBEB for ; Wed, 30 Nov 2022 12:16:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0M0d-0005jd-IJ; Wed, 30 Nov 2022 07:16:15 -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 1p0IGB-0006Px-Op for guix-patches@gnu.org; Wed, 30 Nov 2022 03:16:39 -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 1p0IGB-0005PI-GL for guix-patches@gnu.org; Wed, 30 Nov 2022 03:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0IGB-0003XQ-CV for guix-patches@gnu.org; Wed, 30 Nov 2022 03:16:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59716] [PATCH] Add tes3mp Resent-From: Michal Atlas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Nov 2022 08:16:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59716 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59716@debbugs.gnu.org Cc: Michal Atlas X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166979616113563 (code B ref -1); Wed, 30 Nov 2022 08:16:03 +0000 Received: (at submit) by debbugs.gnu.org; 30 Nov 2022 08:16:01 +0000 Received: from localhost ([127.0.0.1]:59467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0IG8-0003Wh-Np for submit@debbugs.gnu.org; Wed, 30 Nov 2022 03:16:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:33494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0EqD-0001FM-SY for submit@debbugs.gnu.org; Tue, 29 Nov 2022 23:37:04 -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 1p0EqD-0000gT-Lu for guix-patches@gnu.org; Tue, 29 Nov 2022 23:37:01 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0EqA-0005GK-Sb for guix-patches@gnu.org; Tue, 29 Nov 2022 23:37:01 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 568DC240026 for ; Wed, 30 Nov 2022 05:36:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669783015; bh=vteGYpE2Zaq3l3q9UDnTNYNaZIXTxTLN1DUF9UQjl5M=; h=From:To:Cc:Subject:Date:From; b=pARe0fQ/D67v1ljUBNgJYhlfPNW866cGTU/an365DbZ51DU3ZUvpQEAhiTQ1ccq8V udOg+oLWV9aAK26SEiIye6R4fQnRcK4C091TgFb00bmpxMp3iAdHl5lpDWFb9zKSWj qCDuHP39E5mTGMzKcDAjhgDliS3HLOjaq4LbvOw494kt3AzZCqHZsuUMA3f2+aGpvV XQAJE1mFzNLTPioZWGtbBsN6AD7kEwOHkz+p1CeI6xS4XB/PDGmbkiNNwti6J8907B IwzfvttfhXBYD/mb4877gcUEGogRWDbEz0Wy8zWngkNemS7whQFwVydZJMbhYVQKNQ bQezpM91MekeA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NMRHp4ZLLz6tnj; Wed, 30 Nov 2022 05:36:54 +0100 (CET) From: Michal Atlas Date: Wed, 30 Nov 2022 03:59:07 +0000 Message-Id: <20221130035903.30800-1-michal_atlas+git@posteo.net> MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.65; envelope-from=michal_atlas+git@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 30 Nov 2022 03:16:00 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 30 Nov 2022 07:16:04 -0500 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/game-development.scm (tes3mp-server, tes3mp, tes3mp-corescripts, crabnet): New variables * gnu/packages/game-development.scm (tes3mp-common-arguments): New private variable Hello, here is a patch to add Morrowind Multiplayer packages. I wasn't sure if the client and server should be outputs of one package, or separated, but there were enough differences, so I added them separately. The server setup is also not entirely plug&play so I figured I'd mention that in the description, I'm unsure as to where else to put it, and it should be included, since the original wiki isn't excellent and doesn't talk about the option of running the binary from a different directory than the data is in. Lastly, I'm unsure if the set-default-server-home phase should exist, either the server starts and then kicks a player the moment they are supposed to be saved to disk (since the store isn't writeable), or the server just errors out right away if the default config isn't overriden, neither sounds like a good outcome, I guess we shouldn't include it since it might end up being confusing. Hopefully this patch isn't too bad. Cheers! --- gnu/packages/game-development.scm | 180 ++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) base-commit: b4be83b6ac7e2139bec5d3eaafcf8af6cbe50856 diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 66d0ca316f..8136b22b3e 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -53,6 +53,8 @@ (define-module (gnu packages game-development) #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix utils) + #:use-module (guix build-system) + #:use-module (guix build-system copy) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -66,6 +68,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages build-tools) #:use-module (gnu packages compression) #:use-module (gnu packages check) + #:use-module (gnu packages commencement) #:use-module (gnu packages curl) #:use-module (gnu packages documentation) #:use-module (gnu packages fltk) @@ -75,6 +78,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages fribidi) #:use-module (gnu packages dbm) #:use-module (gnu packages gawk) + #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -2838,3 +2842,179 @@ (define-public recastnavigation progresses the level, or you may regenerate tiles as the world changes.") (home-page "https://github.com/recastnavigation/recastnavigation") (license license:zlib)))) + +(define-public crabnet + (package + (name "crabnet") + (version "1.001") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TES3MP/CrabNet") + (commit "19e66190e83f53bcdcbcd6513238ed2e54878a21"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0l7sqz35jb5m40zqm82wpy1wvdwpjq4h7a5i9yyyk8174j8qk1jq")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f)) + (synopsis "CrabNet is a TES3MP specific fork of RakNet") + (description "CrabNet is a cross platform, open source, +C++ networking engine for game programmers") + (home-page "https://github.com/TES3MP/CrabNet") + (license license:bsd-2))) + +(define-public tes3mp-corescripts + (package + (name "tes3mp-corescripts") + (version "0.8.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TES3MP/CoreScripts") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01p64494gsqyxx3v2nya5lfj9xyqz3bcviap257x2c0isapx4gzj")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan #~`(("data" "/share/tes3mp/data") + ("lib" "/share/tes3mp/lib") + ("scripts" "/share/tes3mp/scripts")))) + (synopsis "Serverside Lua scripts used to implement core functionality in TES3MP") + (description "These are the scripts used to implement most +of the essential server logic in TES3MP, +including gameplay adjustments for multiplayer +as well as state saving and loading") + (home-page "https://github.com/TES3MP/CoreScripts") + (license license:expat))) + +(define tes3mp-common-arguments + #~(list "-DBUILD_OPENCS=OFF" + "-DBUILD_BSATOOL=OFF" + "-DBUILD_ESMTOOL=OFF" + "-DBUILD_ESSIMPORTER=OFF" + "-DBUILD_LAUNCHER=OFF" + "-DBUILD_MWINIIMPORTER=OFF" + "-DBUILD_MYGUI_PLUGIN=OFF" + "-DBUILD_NIFTEST=OFF" + "-DBUILD_WIZARD=OFF" + (string-append + "-DLuaJit_INCLUDE_DIR=" + #$(file-append + luajit + (string-append "/include/luajit-" + (package-version luajit)))) + (string-append + "-DRakNet_LIBRARY_DEBUG=" + #$(file-append crabnet "/build/lib/libRakNetLibStatic.a")) + "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON")) + +(define-public tes3mp-server + (package + (name "tes3mp-server") + (version "0.8.1") + (propagated-inputs (list tes3mp-corescripts)) + (inputs (list + boost + crabnet + lua-5.1 + luajit + openscenegraph + sdl2 + lz4 + ;; OpenGl and SDL2 are hard dependencies even for the server + ;; unless we do some patching + mesa + recastnavigation)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TES3MP/TES3MP") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "09gd1zia27fa5phz0xx375y89rdsvf9pgfmw4n38pp108gh6002c")))) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'set-default-server-home + (lambda _ + ; This lets the server always at least start up + (substitute* "files/tes3mp/tes3mp-server-default.cfg" + (("home = ./server") + (string-append + "home = " + #$(file-append tes3mp-corescripts "/share/tes3mp"))))))) + #:configure-flags + #~(cons* "-DBUILD_OPENMW_MP=ON" + "-DBUILD_BROWSER=OFF" + "-DBUILD_OPENMW=OFF" + #$tes3mp-common-arguments))) + (build-system (build-system-with-c-toolchain + cmake-build-system `(("toolchain" ,gcc-toolchain-8)))) + (synopsis "Multiplayer for OpenMW, a reimplementation of +The Elder Scrolls 3: Morrowind's engine (Server Package)") + (description "TES3MP is a project adding multiplayer functionality to OpenMW, +an open-source game engine that supports playing +\"The Elder Scrolls III: Morrowind\" by Bethesda Softworks. +To run the server copy /share/tes3mp/ into $XDG_CONFIG_HOME/openmw/ +(must be writeable), +then copy /etc/openmw/tes3mp-server-default.cfg into this new directory +under the name tes3mp-server.cfg. +Set home to the $XDG_CONFIG_HOME/openmw/ directory, now run tes3mp-server and enjoy. +Note that all server data is kept in this directory.") + (home-page "tes3mp.com") + (license license:gpl3))) + +(define-public tes3mp + (package + (name "tes3mp") + (version "0.8.1") + (source (package-source tes3mp-server)) + (build-system cmake-build-system) + (inputs (list + boost + bullet + crabnet + ffmpeg + lz4 + mesa + mygui + openal + openscenegraph + qtbase-5 + recastnavigation + sdl2)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + ;; The check always fails and reports + ;; version too old + (add-before 'configure 'remove-ffmpeg-version-check + (lambda _ + (substitute* "CMakeLists.txt" + (("NOT FFVER_OK") + "FFVER_OK"))))) + #:tests? #f + #:configure-flags + #~(cons* "-DBUILD_OPENMW_MP=OFF" + "-DBUILD_OPENMW=ON" + "-DBUILD_BROWSER=ON" + #$tes3mp-common-arguments))) + (synopsis "Multiplayer for OpenMW, a reimplementation of +The Elder Scrolls 3: Morrowind's engine (Client Package)") + (description "TES3MP is a project adding multiplayer functionality to OpenMW, +an open-source game engine that supports playing +\"The Elder Scrolls III: Morrowind\" by Bethesda Softworks. +For the setup wizard and general openmw tooling, use the openmw package.") + (home-page "tes3mp.com") + (license license:gpl3)))