From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kIrRLJxJh2Pk+QAAbAwnHQ (envelope-from ) for ; Wed, 30 Nov 2022 13:16:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kDblK5xJh2N1AQAAG6o9tA (envelope-from ) for ; Wed, 30 Nov 2022 13:16:28 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5A94D3858B for ; Wed, 30 Nov 2022 13:16:28 +0100 (CET) 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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669810588; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1GOLPrS3Mh4npRv709ojdZuTMzrqiN4jcGqHiLA0le4=; b=EHs6LtNq2MUHkYriPtNtUt6ium/JtpWOs4JaRkt1TpaLZQa4O0nH0tEnCSaHJ8ZNjSVldl LaWiibc+NBtmMsIA0F+vDXJS1Vys4Pq9RocXxbs9MEGJeb/u6cFeqUiR+oCmX9xtiN8EHr apmS4ssu2vN5sdsshKVjDRcWCbu+zelEMto6dYm9UfDTN5l7sKEdOU3H3jv/GIcu6YoVL2 M7/h+lBfPesMEG8m62tinDA+Z5O3Cw8/HPGT2sL27Rba+ExT0CKLaYnB7TWl/xv8oq4T68 I0TNFrr0oB0mPeGRZzLzoRfKCoVIzD2k8dZ0dGR1Zij5OrKBqNqVTj6K+Wp67w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669810588; a=rsa-sha256; cv=none; b=QG9bqVsscqor+69grMyiyFqdeHiQBiIFL7QTk8vAIKxs/oBgnM7jEbt4oyPPaZlKlMnIYe NEUemDlbo2VpfuLNBvoNVqV0rCDovimMzreNmE1bgRMF019090VRewyHJyYtwu07e+9oub +yMFffmzwc8RaHxNlMOj5QgnWYSeemG+UpeMpxO0e0ARQ3/Q0PzcnMDlrQByF2uzwWomkx bopD/fOuPXw7EmaRgii8/3SDDJhxriLJiKeb5XZ1Nyjr9GMN/1buvdUarvr9iWmIcxmo1T jZqY1NfsIfqC/niWubEglI6GnJCreL4qO/ox99a57a7/Vv0tz4dX0EpMNJv9uQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="pARe0fQ/"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="pARe0fQ/"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5A94D3858B X-Spam-Score: 6.24 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3ASOr/iqUcaZ * 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(+) 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))) base-commit: b4be83b6ac7e2139bec5d3eaafcf8af6cbe50856 -- 2.38.1