diff mbox series

[bug#63435] Add vcmi 1.2.1 to games.scm

Message ID 87fs7yn10z.fsf@wireframe
State New
Headers show
Series [bug#63435] Add vcmi 1.2.1 to games.scm | expand

Commit Message

Vagrant Cascadian May 14, 2023, 7:52 p.m. UTC
On 2023-05-13, Liliana Marie Prikler wrote:
> Am Freitag, dem 12.05.2023 um 18:35 -0700 schrieb Vagrant Cascadian:
>
>> +     ;; Test suites do not seem well supported upstream and are
>> disabled by default.
>> +     ;; Pass -DENABLE_TEST to configure to enable.
>> +     `(#:configure-flags '("-DFORCE_BUNDLED_FL=OFF")
>> +       #:tests? #f))
> Readjust your comment, it's misaligned now.

Fixed.


> Also, prefer
>   (list #:configure-flags #~(list "-DFORCE_BUNDLED_FL=OFF")
>         #:tests? #f)
> so that people after you won't have to convert it to G-Expressions.

Thanks! Applied.


>> +           ;; qtbase and qttools @6 not currently buildable but may
>> work ok
> Prefer ";; XXX: Build currently fails with qtbase-6 and qttools-6".

Also applied. Used "fuzzylite" for XXX...


live well,
  vagrant

Comments

Liliana Marie Prikler May 15, 2023, 6:31 p.m. UTC | #1
Am Sonntag, dem 14.05.2023 um 12:52 -0700 schrieb Vagrant Cascadian:
> Also applied. Used "fuzzylite" for XXX...
Is the failure due to fuzzylite?  Actually, XXX is a marker for
incomplete code like TODO.

Cheers
Vagrant Cascadian May 15, 2023, 7:07 p.m. UTC | #2
On 2023-05-15, Liliana Marie Prikler wrote:
> Am Sonntag, dem 14.05.2023 um 12:52 -0700 schrieb Vagrant Cascadian:
>> Also applied. Used "fuzzylite" for XXX...
> Is the failure due to fuzzylite?  Actually, XXX is a marker for
> incomplete code like TODO.

I would be fine with prefixing it with TODO or whatever else makes
sense!

... although to make any sense out of this, a little more background ...

I am fairly sure I successfully built with qtbase@6 and qttools@6 in
earlier iterations while developing the initial patch... but at the time
of the original patch submission, qtbase@6 itself was failing to build,
which is why i switched to qtbase@5 ... but whatever made qtbase@6 build
successfully now fails to build vcmi!

Whee.

So the original comment was arguably confusing and the need to even have
a comment at all has since entirely changed context (e.g. went from
qtbase@6 failing to build to vcmi failing to build with qtbase@6)!

I am not entirely sure that makes any more sense now, but I have some
small hope. :)


live well,
  vagrant
diff mbox series

Patch

From 2794eb077c325ad366667927e58cead23924fbc9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Sun, 7 May 2023 17:43:33 -0700
Subject: [PATCH 2/2] gnu: Add vcmi 1.2.1.

* gnu/packages/games.scm (vcmi): New variable.
* gnu/packages/patches/vcmi-disable-privacy-breach.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/games.scm                        | 49 +++++++++++++++++++
 .../patches/vcmi-disable-privacy-breach.patch | 21 ++++++++
 3 files changed, 71 insertions(+)
 create mode 100644 gnu/packages/patches/vcmi-disable-privacy-breach.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index dd6e3641a1..6ada6196be 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2031,6 +2031,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/vboot-utils-fix-format-load-address.patch	\
   %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch	\
   %D%/packages/patches/vboot-utils-skip-test-workbuf.patch	\
+  %D%/packages/patches/vcmi-disable-privacy-breach.patch	\
   %D%/packages/patches/vinagre-newer-freerdp.patch             \
   %D%/packages/patches/vinagre-newer-rdp-parameters.patch      \
   %D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch	\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 49d1431d99..525e4a1c7b 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -201,6 +201,7 @@  (define-module (gnu packages games)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages squirrel)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages terminals)
   #:use-module (gnu packages texinfo)
@@ -11218,6 +11219,54 @@  (define-public fheroes2
 play; it will look for them at @file{~/.local/share/fheroes2} folder.")
     (license license:gpl2)))
 
+(define-public vcmi
+  (package
+    (name "vcmi")
+    (version "1.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/vcmi/vcmi")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0f3fk1fc2wb7f2j4pxz89dzr8zjnrdh435mijia483a3bq59w7pk"))
+              (patches (search-patches "vcmi-disable-privacy-breach.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags #~(list "-DFORCE_BUNDLED_FL=OFF")
+           ;; Test suites do not seem well supported upstream and are disabled by default.
+           ;; Pass -DENABLE_TEST to configure to enable.
+           #:tests? #f))
+    (native-inputs
+     (list boost
+           ffmpeg
+           fuzzylite
+           ;; googletest ; needed for tests, but tests are disabled
+           libxkbcommon
+           luajit
+           minizip
+           pkg-config
+           python
+           ;; fuzzylite: Build currently fails with qtbase-6 and qttools-6
+           qtbase-5
+           qttools-5
+           sdl2
+           sdl2-mixer
+           sdl2-image
+           sdl2-ttf
+           tbb
+           vulkan-headers
+           zlib))
+    (home-page "https://vcmi.eu/")
+    (synopsis "Turn-based strategy game engine")
+    (description
+     "@code{vcmi} is an implementation of the Heroes of Might and
+Magic III game engine.  It requires assets and game resources to
+play; it will look for them at @file{~/.local/share/vcmi} folder.")
+    (license license:gpl2)))
+
 (define-public apricots
   (package
     (name "apricots")
diff --git a/gnu/packages/patches/vcmi-disable-privacy-breach.patch b/gnu/packages/patches/vcmi-disable-privacy-breach.patch
new file mode 100644
index 0000000000..c03bc66119
--- /dev/null
+++ b/gnu/packages/patches/vcmi-disable-privacy-breach.patch
@@ -0,0 +1,21 @@ 
+Origin: https://salsa.debian.org/games-team/vcmi/-/blob/debian/1.1.0+dfsg-1/debian/patches/disable-privacy-breach
+From: Johannes Schauer <josch@debian.org>
+Subject: do not check remote repositories on startup by default
+Forwarded: not-needed
+
+--- a/config/schemas/settings.json
++++ b/config/schemas/settings.json
+@@ -401,11 +401,11 @@
+ 				},
+ 				"autoCheckRepositories" : {
+ 					"type" : "boolean",
+-					"default" : true
++					"default" : false
+ 				},
+ 				"updateOnStartup" : {
+ 					"type" : "boolean",
+-					"default" : true
++					"default" : false
+ 				},
+ 				"updateConfigUrl" : {
+ 					"type" : "string",
-- 
2.39.2