From patchwork Wed Nov 30 23:31:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Atlas X-Patchwork-Id: 44987 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 EB54327BBEC; Thu, 1 Dec 2022 10:33:00 +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=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 6F96C27BBE9 for ; Thu, 1 Dec 2022 10:32:59 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0gs4-0004Wk-EZ; Thu, 01 Dec 2022 05:32:50 -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 1p0grL-0004Q7-8S for guix-patches@gnu.org; Thu, 01 Dec 2022 05:32:27 -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 1p0grK-0003wV-Vx for guix-patches@gnu.org; Thu, 01 Dec 2022 05:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0grK-0007WT-Sg for guix-patches@gnu.org; Thu, 01 Dec 2022 05:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59716] [PATCH] Add tes3mp References: <20221130035903.30800-1-michal_atlas+git@posteo.net> In-Reply-To: <20221130035903.30800-1-michal_atlas+git@posteo.net> Resent-From: Michal Atlas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Dec 2022 10:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59716 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59716@debbugs.gnu.org Cc: Michal Atlas Received: via spool by 59716-submit@debbugs.gnu.org id=B59716.166989068228879 (code B ref 59716); Thu, 01 Dec 2022 10:32:02 +0000 Received: (at 59716) by debbugs.gnu.org; 1 Dec 2022 10:31:22 +0000 Received: from localhost ([127.0.0.1]:38839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0gqd-0007Vh-Vi for submit@debbugs.gnu.org; Thu, 01 Dec 2022 05:31:22 -0500 Received: from mout01.posteo.de ([185.67.36.65]:46117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Y0t-000692-En for 59716@debbugs.gnu.org; Wed, 30 Nov 2022 20:05:21 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0BBE7240026 for <59716@debbugs.gnu.org>; Thu, 1 Dec 2022 02:05:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669856713; bh=zo2DrUeKcNjekKihrv2UoidlJtpJXDOn0/uGoaFIHmU=; h=From:To:Cc:Subject:Date:From; b=Jn80YVZL/d4CMz3mVf81SkxF5CCQaEchZX24Ka4r4wR4NhQtRDq3sBgqyxOdH8HW3 TIE3Z37w1trzZKMTUktpS8w/Pb1Jyc5FvX5AHw5gDkJbeCokV5eepRArfdUb/oSpZ9 z+1i3LzdMy60gp84V0p7m+Hd7i4vgpC6HhIQEYrSibj9l3RB/l6l6eHmHSqLxmJZbq 42YCSPUDaUQ0iBrPLJlMDpgDCOip90s2D5cuVaiN5lGxkX/0JdFmvbaxFEcQoQV3mA 9tAlFZ3n5ylkvnuuSmxfYi5F18vhQ2lfKKg95QqJIuce+7j8ibyx6E5eSEiX2XnWtJ pHli2Juont+TA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NMyY33SHBz6tmP; Thu, 1 Dec 2022 02:05:10 +0100 (CET) From: Michal Atlas Date: Wed, 30 Nov 2022 23:31:44 +0000 Message-Id: <20221130233139.13425-1-michal_atlas+git@posteo.net> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 01 Dec 2022 05:31:18 -0500 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/game-development.scm (set-openmw-commit-version): New private-variable * gnu/packages/game-development.scm (set-commit-version): New phase in tes3mp and tes3mp-server --- Sorry, I didn't notice that the official release tarball was from tag `tes3mp-0.8.1` and not `0.8.1`. On that note, I forced in version information to be able to connect to standard 0.8.1 server instances from the binary release. They'd refuse connection due to "version mismatch" otherwise. Hardcoding the COMMITHASH is certainly ugly, but the TAGHASH probably needs to be as well anyways, since cmake normally generates it by running `git rev-list --tags --max-count=1` on the repo, which I'm not sure if we want to do or can do in the build itself, this at least ensures that the correct tag is always chosen. Cheers. --- gnu/packages/game-development.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) base-commit: b4be83b6ac7e2139bec5d3eaafcf8af6cbe50856 prerequisite-patch-id: d05b134d12be8b8184cd42f0d7cd435b0718894f diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 8136b22b3e..d1de36f93d 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -2914,6 +2914,16 @@ (define tes3mp-common-arguments #$(file-append crabnet "/build/lib/libRakNetLibStatic.a")) "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON")) +(define set-openmw-commit-version + #~(substitute* "CMakeLists.txt" + ;; Used for version compatibility checks + ;; Commit the project was built with + (("set\\(OPENMW_VERSION_COMMITHASH \"\"\\)") + "set(OPENMW_VERSION_COMMITHASH \"68954091c54d0596037c4fb54d2812313b7582a1\")") + ;; points to 0.8.0 in 0.8.1 Release + (("set\\(OPENMW_VERSION_TAGHASH \"\"\\)") + "set(OPENMW_VERSION_TAGHASH \"000e8724cacaf0176f6220de111ca45098807e78\")"))) + (define-public tes3mp-server (package (name "tes3mp-server") @@ -2935,16 +2945,18 @@ (define-public tes3mp-server (method git-fetch) (uri (git-reference (url "https://github.com/TES3MP/TES3MP") - (commit version))) + (commit (string-append "tes3mp-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "09gd1zia27fa5phz0xx375y89rdsvf9pgfmw4n38pp108gh6002c")))) + "16k3l2ky0wciy0xaxxm1kvl1z3725l6ikirldiycjhrvrkidbxpk")))) (arguments (list #:tests? #f #:phases #~(modify-phases %standard-phases + (add-before 'configure 'set-commit-version + (lambda _ #$set-openmw-commit-version)) (add-before 'configure 'set-default-server-home (lambda _ ; This lets the server always at least start up @@ -2997,6 +3009,8 @@ (define-public tes3mp (list #:phases #~(modify-phases %standard-phases + (add-before 'configure 'set-commit-version + (lambda _ #$set-openmw-commit-version)) ;; The check always fails and reports ;; version too old (add-before 'configure 'remove-ffmpeg-version-check