From: Michal Atlas <michal_atlas+git@posteo.net>
To: 59716@debbugs.gnu.org
Cc: Michal Atlas <michal_atlas+git@posteo.net>
Subject: [bug#59716] [PATCH] Add tes3mp
Date: Wed, 30 Nov 2022 23:31:44 +0000 [thread overview]
Message-ID: <20221130233139.13425-1-michal_atlas+git@posteo.net> (raw)
In-Reply-To: <20221130035903.30800-1-michal_atlas+git@posteo.net>
* 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(-)
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
base-commit: b4be83b6ac7e2139bec5d3eaafcf8af6cbe50856
prerequisite-patch-id: d05b134d12be8b8184cd42f0d7cd435b0718894f
--
2.38.1
prev parent reply other threads:[~2022-12-01 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 3:59 [bug#59716] [PATCH] Add tes3mp Michal Atlas
2022-11-30 23:31 ` Michal Atlas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221130233139.13425-1-michal_atlas+git@posteo.net \
--to=michal_atlas+git@posteo.net \
--cc=59716@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).