unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#63435] Add vcmi 1.2.1 to games.scm
@ 2023-05-11  5:43 Vagrant Cascadian
  2023-05-11 17:17 ` Liliana Marie Prikler
  0 siblings, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-11  5:43 UTC (permalink / raw)
  To: 63435; +Cc: liliana.prikler, iyzsong, liliana.prikler, iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 1089 bytes --]

X-Debbugs-Cc: liliana.prikler@gmail.com, iyzsong@envs.net

The attached patch adds "vcmi", which is in many ways very similar to
the "fheroes2" package, in that it (currently) requires external
non-free assets, but the game engine itself is GPL2. They also both use
assets from the same game lineage (heroes of might and magic).

I struggled to get the tests to work, and they do not seem to be
terribly well maintained upstream. They are even disabled by default by
upstream. I did some very brief manual "testing" that it actually works,
at least!

I had successfully built with various qt*@6 packages, but they are not
currently building; it seems to support qt*@5 too.

Some things failed to build with gcc-11, so I tried gcc-12 and it
worked!

We probably want to try to apply Debian's "privacy-breach" patch to
disable phoning home, as well as the reproducible builds patch and some
additional reproducibility patches I am working on, but figured I would
submit the package to guix for review now, in case anyone else wants to
join me down this rabbit hole...


live well,
  vagrant

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-vcmi-1.2.1.patch --]
[-- Type: text/x-diff, Size: 3477 bytes --]

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

FIXME review debian patches:
  https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/patches/disable-privacy-breach
  https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/patches/reproducible.patch
  ...and secrent as-yet-unsubmitted reproducibility patches...
  https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/patches/minizip_maxu32

X-Debbugs-Cc: liliana.prikler@gmail.com, iyzsong@envs.net

* gnu/packages/games.scm (vcmi): New variable.
---
 gnu/packages/games.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2e3994543a..c2b60037cc 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -199,6 +199,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)
@@ -11169,6 +11170,53 @@ (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)
+                    (recursive? #t)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1nx3i078cxkak2ci514pf4pgi5269mp08njynsg35pin4yp3fn0p"))))
+    (build-system cmake-build-system)
+    (arguments
+     ;; 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
+                         ;; Build errors with gcc-11
+                         gcc-12
+                         ;; googletest ; needed for tests, but tests are disabled
+                         libxkbcommon
+                         luajit
+                         minizip
+                         pkg-config
+                         python
+                         ;; qtbase and qttools @6 not currently buildable but may work ok
+                         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 Heroes of Might and
+Magic III (aka HOMM3) 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")

base-commit: e2eb43f945fd467e9b55a4b3c91cd186cf32e268
-- 
2.39.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-11  5:43 [bug#63435] Add vcmi 1.2.1 to games.scm Vagrant Cascadian
@ 2023-05-11 17:17 ` Liliana Marie Prikler
  2023-05-11 21:48   ` Vagrant Cascadian
  0 siblings, 1 reply; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-05-11 17:17 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435; +Cc: iyzsong

Am Mittwoch, dem 10.05.2023 um 22:43 -0700 schrieb Vagrant Cascadian:
> X-Debbugs-Cc: liliana.prikler@gmail.com, iyzsong@envs.net
> 
> The attached patch adds "vcmi", which is in many ways very similar to
> the "fheroes2" package, in that it (currently) requires external
> non-free assets, but the game engine itself is GPL2. They also both
> use assets from the same game lineage (heroes of might and magic).
Not my favourite kind of game, I must say, but under crapitalism you
get what you pay for.

> I struggled to get the tests to work, and they do not seem to be
> terribly well maintained upstream. They are even disabled by default
> by upstream. I did some very brief manual "testing" that it actually
> works, at least!
The comment you put in the source is fine for me.

> I had successfully built with various qt*@6 packages, but they are
> not currently building; it seems to support qt*@5 too.
> 
> Some things failed to build with gcc-11, so I tried gcc-12 and it
> worked!
Can you elaborate what things?  I doubt it makes elaborate use of
C++20/23 features, does it?

> We probably want to try to apply Debian's "privacy-breach" patch to
> disable phoning home, as well as the reproducible builds patch and
> some additional reproducibility patches I am working on, but figured
> I would submit the package to guix for review now, in case anyone
> else wants to join me down this rabbit hole...
Well, it won't be added to Guix without such patches, so someone needs
to go down this rabbit hole.

> +    (native-inputs (list boost
The following lines get very long, consider breaking before (list
> +                         ffmpeg
> +                         ;; Build errors with gcc-11
> +                         gcc-12
> +                         ;; googletest ; needed for tests, but tests
> are disabled
> +                         libxkbcommon
> +                         luajit
> +                         minizip
> +                         pkg-config
> +                         python
> +                         ;; qtbase and qttools @6 not currently
> buildable but may work ok
> +                         qtbase-5
> +                         qttools-5
> +                         sdl2
> +                         sdl2-mixer
> +                         sdl2-image
> +                         sdl2-ttf
> +                         tbb
> +                         vulkan-headers
> +                         zlib))

> +     "@code{vcmi} is an implementation of Heroes of Might and
> +Magic III (aka HOMM3) game engine.  It requires assets and game
> resources to
> +play; it will look for them at @file{~/.local/share/vcmi} folder.")
Use an @acronym or just spell it out.

Cheers




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-11 17:17 ` Liliana Marie Prikler
@ 2023-05-11 21:48   ` Vagrant Cascadian
  2023-05-11 23:07     ` Vagrant Cascadian
  0 siblings, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-11 21:48 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong

[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]

On 2023-05-11, Liliana Marie Prikler wrote:
> Am Mittwoch, dem 10.05.2023 um 22:43 -0700 schrieb Vagrant Cascadian:
>> I had successfully built with various qt*@6 packages, but they are
>> not currently building; it seems to support qt*@5 too.
>> 
>> Some things failed to build with gcc-11, so I tried gcc-12 and it
>> worked!
> Can you elaborate what things?  I doubt it makes elaborate use of
> C++20/23 features, does it?

Well, just retried with the default gcc, and it worked this time! so I
guess I will just switch the next patch iteration back to the default
gcc...


>> We probably want to try to apply Debian's "privacy-breach" patch to
>> disable phoning home, as well as the reproducible builds patch and
>> some additional reproducibility patches I am working on, but figured
>> I would submit the package to guix for review now, in case anyone
>> else wants to join me down this rabbit hole...
> Well, it won't be added to Guix without such patches, so someone needs
> to go down this rabbit hole.

Will try applying some of those patches now...


>> +    (native-inputs (list boost
> The following lines get very long, consider breaking before (list
>> +                         ffmpeg
>> +                         ;; Build errors with gcc-11
>> +                         gcc-12
>> +                         ;; googletest ; needed for tests, but tests
...
>> +                         zlib))

While I share your opinion, I tried changing it in various ways, and
"guix style" changed it right back. I do not really want to fight with
"guix style" too much... even if I disagree a bit with the results.


>> +     "@code{vcmi} is an implementation of Heroes of Might and
>> +Magic III (aka HOMM3) game engine.  It requires assets and game
>> resources to
>> +play; it will look for them at @file{~/.local/share/vcmi} folder.")
> Use an @acronym or just spell it out.

Presuming you mean "(aka HOMM3)" ... honestly, maybe best to just drop
it entirely; I am not sure it adds much.


Thanks for the review!


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-11 21:48   ` Vagrant Cascadian
@ 2023-05-11 23:07     ` Vagrant Cascadian
  2023-05-12  1:47       ` Liliana Marie Prikler
  0 siblings, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-11 23:07 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 1343 bytes --]

On 2023-05-11, Vagrant Cascadian wrote:
> On 2023-05-11, Liliana Marie Prikler wrote:
>> Am Mittwoch, dem 10.05.2023 um 22:43 -0700 schrieb Vagrant Cascadian:
>>> We probably want to try to apply Debian's "privacy-breach" patch to
>>> disable phoning home, as well as the reproducible builds patch and
>>> some additional reproducibility patches I am working on, but figured
>>> I would submit the package to guix for review now, in case anyone
>>> else wants to join me down this rabbit hole...
>> Well, it won't be added to Guix without such patches, so someone needs
>> to go down this rabbit hole.

Applied the privacy-breach patch, the maxu32/minizip patch was no longer
relevent, and the reproducible builds patches only affect documentation,
which is not currently provided in this package (there are no upstream
rules to build vcmimanual.tex into any documentation).


>>> +     "@code{vcmi} is an implementation of Heroes of Might and
>>> +Magic III (aka HOMM3) game engine.  It requires assets and game
>>> resources to
>>> +play; it will look for them at @file{~/.local/share/vcmi} folder.")
>> Use an @acronym or just spell it out.
>
> Presuming you mean "(aka HOMM3)" ... honestly, maybe best to just drop
> it entirely; I am not sure it adds much.

Dropped it.


V2 patch attached.


Thanks for reviewing!


live well,
  vagrant

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-vcmi-1.2.1.patch --]
[-- Type: text/x-diff, Size: 4903 bytes --]

From b46fad945222a64b8d73b35e2c0d57a017987235 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Sun, 7 May 2023 17:43:33 -0700
Subject: [PATCH] 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 patches.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/games.scm                        | 47 +++++++++++++++++++
 .../patches/vcmi-disable-privacy-breach.patch | 21 +++++++++
 3 files changed, 69 insertions(+)
 create mode 100644 gnu/packages/patches/vcmi-disable-privacy-breach.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 73db48f720..d5034300ef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2028,6 +2028,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 bae79ee48b..ace32959b6 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)
@@ -11187,6 +11188,52 @@ (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)
+                    (recursive? #t)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1nx3i078cxkak2ci514pf4pgi5269mp08njynsg35pin4yp3fn0p"))
+              (patches (search-patches "vcmi-disable-privacy-breach.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     ;; 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
+                         ;; googletest ; needed for tests, but tests are disabled
+                         libxkbcommon
+                         luajit
+                         minizip
+                         pkg-config
+                         python
+                         ;; qtbase and qttools @6 not currently buildable but may work ok
+                         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 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",

base-commit: d07342b16612cfdffad6a7b3504b74e0d95d551f
-- 
2.39.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-11 23:07     ` Vagrant Cascadian
@ 2023-05-12  1:47       ` Liliana Marie Prikler
  2023-05-12  6:17         ` Vagrant Cascadian
  0 siblings, 1 reply; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-05-12  1:47 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435; +Cc: iyzsong

Am Donnerstag, dem 11.05.2023 um 16:07 -0700 schrieb Vagrant Cascadian:

> +(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)
> +                    (recursive? #t)))
Can we do without the recursive checkout?
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "1nx3i078cxkak2ci514pf4pgi5269mp08njynsg35pin4yp3fn0p"))
> +              (patches (search-patches "vcmi-disable-privacy-
> breach.patch"))))
IIRC the reproducible builds patch is still missing, right?

> +    (native-inputs (list boost
Guix style is, like, a suggestion that can be wrong.  You are allowed
to fight it when the result of doing so is demonstrably better.

Cheers




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-12  1:47       ` Liliana Marie Prikler
@ 2023-05-12  6:17         ` Vagrant Cascadian
  2023-05-12 20:53           ` Liliana Marie Prikler
  0 siblings, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-12  6:17 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong

[-- Attachment #1: Type: text/plain, Size: 3183 bytes --]

On 2023-05-12, Liliana Marie Prikler wrote:
> Am Donnerstag, dem 11.05.2023 um 16:07 -0700 schrieb Vagrant Cascadian:
>
>> +(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)
>> +                    (recursive? #t)))
> Can we do without the recursive checkout?

There is one component still used with the recursive
checkout. ... AI/Fuzzy* I think? I do not know if it could be built
independently, but I have not seriously looked into it.

If tests were enabled, the googletest stuff might be needed; it was a
bit unclear to me if the googletest packaged in guix could
work. Regardless, tests are disabled upstream... so if there is a way to
only download one and not the other, I guess that would save some
bandwith.

I *think* those are the only two things pulled in.


>> +              (file-name (git-file-name name version))
>> +              (sha256
>> +               (base32
>> +               
>> "1nx3i078cxkak2ci514pf4pgi5269mp08njynsg35pin4yp3fn0p"))
>> +              (patches (search-patches "vcmi-disable-privacy-
>> breach.patch"))))
> IIRC the reproducible builds patch is still missing, right?

The Debian package implements building man pages and documentation
outside of the upstream build system...

It did not seem worth patching something that was not used to build
anything... the reproducible builds patch(es) only apply to
documentation which is not part of the upstream build process, so I left
it out of this iteration.

That said...

Building vcmimanual.tex appears to be a one-liner, pulling in some tex
related dependencies:

  https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/rules#L56

And generating manpages used help2man and some templates debian ships:

  https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/rules#L46-48

Not sure if the manpages are worth the effort, or if the manual is worth
the larger dependency tree...


>> +    (native-inputs (list boost
> Guix style is, like, a suggestion that can be wrong.  You are allowed
> to fight it when the result of doing so is demonstrably better.

I get that ... but I also like just being able to run guix style and not
having to make those judgement calls. Because other things guix style
may change that are a good idea and it is really difficult to pick and
choose which things to revert and which to keep over time...

There are some things I think guix style does wrong(in particular, I
always prefer one input per line to make diffs easier to read), but I do
not hold strong opinions on guile coding style and just prefer to
concede to guix style and bear with the results.

I am also not strongly opinionated (it goes both ways, I guess!)... so
for clarity, are you saying you would prefer:

  (native-inputs
    (list
      boost
      ...
or:

  (native-inputs
    (list boost
          ...

or something else?


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-12  6:17         ` Vagrant Cascadian
@ 2023-05-12 20:53           ` Liliana Marie Prikler
  2023-05-13  1:33             ` Vagrant Cascadian
  0 siblings, 1 reply; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-05-12 20:53 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435; +Cc: iyzsong

Am Donnerstag, dem 11.05.2023 um 23:17 -0700 schrieb Vagrant Cascadian:
> On 2023-05-12, Liliana Marie Prikler wrote:
> > Am Donnerstag, dem 11.05.2023 um 16:07 -0700 schrieb Vagrant
> > Cascadian:
> > 
> > > +(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)
> > > +                    (recursive? #t)))
> > Can we do without the recursive checkout?
> 
> There is one component still used with the recursive
> checkout. ... AI/Fuzzy* I think? I do not know if it could be built
> independently, but I have not seriously looked into it.
fuzzylite can be taken from the system which is the preferred approach.

> 
> If tests were enabled, the googletest stuff might be needed; it was a
> bit unclear to me if the googletest packaged in guix could
> work. Regardless, tests are disabled upstream... so if there is a way
> to only download one and not the other, I guess that would save some
> bandwith.
> 
> I *think* those are the only two things pulled in.
Not that it matters if we aren't building tests, but googletest can and
should be unbundled.  There's a fair number of packages already setting
a precedent.

> > > +              (file-name (git-file-name name version))
> > > +              (sha256
> > > +               (base32
> > > +               
> > > "1nx3i078cxkak2ci514pf4pgi5269mp08njynsg35pin4yp3fn0p"))
> > > +              (patches (search-patches "vcmi-disable-privacy-
> > > breach.patch"))))
> > IIRC the reproducible builds patch is still missing, right?
> 
> The Debian package implements building man pages and documentation
> outside of the upstream build system...
> 
> It did not seem worth patching something that was not used to build
> anything... the reproducible builds patch(es) only apply to
> documentation which is not part of the upstream build process, so I
> left it out of this iteration.
> 
> That said...
> 
> Building vcmimanual.tex appears to be a one-liner, pulling in some
> tex related dependencies:
> 
>  
> https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/rules#L56
> 
> And generating manpages used help2man and some templates debian
> ships:
> 
>  
> https://salsa.debian.org/games-team/vcmi/-/blob/master/debian/rules#L46-48
> 
> Not sure if the manpages are worth the effort, or if the manual is
> worth the larger dependency tree...
Fair enough, if it can be left without, let's do without (unless you
really want to build the manpage).  Alternatively, you can pull the
inputs in, but phrase the (build-documentation ...) phase in a way that
those inputs can be dropped if someone values their disk space.

> > > +    (native-inputs (list boost
> > Guix style is, like, a suggestion that can be wrong.  You are
> > allowed
> > to fight it when the result of doing so is demonstrably better.
> 
> I get that ... but I also like just being able to run guix style and
> not having to make those judgement calls. Because other things guix
> style may change that are a good idea and it is really difficult to
> pick and choose which things to revert and which to keep over time...
> 
> There are some things I think guix style does wrong(in particular, I
> always prefer one input per line to make diffs easier to read), but I
> do not hold strong opinions on guile coding style and just prefer to
> concede to guix style and bear with the results.
> 
> I am also not strongly opinionated (it goes both ways, I guess!)...
> so for clarity, are you saying you would prefer:
> 
>   (native-inputs
>     (list
>       boost
>       ...
> or:
> 
>   (native-inputs
>     (list boost
>           ...
> 
> or something else?
The latter.  If it ever comes to needing (list on its own line you
better have a good explanation for that or fix your comments so that
they don't go overboard.


Cheers




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-12 20:53           ` Liliana Marie Prikler
@ 2023-05-13  1:33             ` Vagrant Cascadian
  2023-05-13  1:35               ` Vagrant Cascadian
  2023-05-13  6:12               ` [bug#63435] " Liliana Marie Prikler
  0 siblings, 2 replies; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-13  1:33 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 1896 bytes --]

On 2023-05-12, Liliana Marie Prikler wrote:
> Am Donnerstag, dem 11.05.2023 um 23:17 -0700 schrieb Vagrant Cascadian:
>> On 2023-05-12, Liliana Marie Prikler wrote:
>> > Am Donnerstag, dem 11.05.2023 um 16:07 -0700 schrieb Vagrant
>> > Cascadian:
>> > 
>> > > +(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)
>> > > +                    (recursive? #t)))
>> > Can we do without the recursive checkout?
>> 
>> There is one component still used with the recursive
>> checkout. ... AI/Fuzzy* I think? I do not know if it could be built
>> independently, but I have not seriously looked into it.
> fuzzylite can be taken from the system which is the preferred approach.

Attached is fuzzylite as it's own package.


>> > > +    (native-inputs (list boost
>> > Guix style is, like, a suggestion that can be wrong.  You are
>> > allowed
>> > to fight it when the result of doing so is demonstrably better.
...
>> I am also not strongly opinionated (it goes both ways, I guess!)...
>> so for clarity, are you saying you would prefer:
>> 
>>   (native-inputs
>>     (list
>>       boost
>>       ...
>> or:
>> 
>>   (native-inputs
>>     (list boost
>>           ...
>> 
>> or something else?
> The latter.  If it ever comes to needing (list on its own line you
> better have a good explanation for that or fix your comments so that
> they don't go overboard.

...and will send an updated vcmi with this depending on fuzzylite
shortly.

live well,
  vagrant

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-fuzzylite-6.0.patch --]
[-- Type: text/x-diff, Size: 11873 bytes --]

From 6514e69a082ca9c268677d7c04d858d0fdf07a11 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Fri, 12 May 2023 16:18:18 -0700
Subject: [PATCH 1/2] gnu: Add fuzzylite 6.0.

* gnu/packages/games.scm (fuzzylite): New variable.
* gnu/packages/patches/fuzzylite-relative-path-in-tests.patch: New patch.
* gnu/packages/patches/fuzzylite-use-catch2.patch: New patch.
* gnu/packages/patches/fuzzylite-when-testing-large-float-numbers-for-equ.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add patches.
---
 gnu/local.mk                                  |   3 +
 gnu/packages/games.scm                        |  31 +++
 .../fuzzylite-relative-path-in-tests.patch    |  15 ++
 .../patches/fuzzylite-use-catch2.patch        | 184 ++++++++++++++++++
 ...-testing-large-float-numbers-for-equ.patch |  30 +++
 5 files changed, 263 insertions(+)
 create mode 100644 gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
 create mode 100644 gnu/packages/patches/fuzzylite-use-catch2.patch
 create mode 100644 gnu/packages/patches/fuzzylite-when-testing-large-float-numbers-for-equ.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d31b40f3bf..89791bea69 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1149,6 +1149,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/freeimage-unbundle.patch		\
   %D%/packages/patches/fuse-glibc-2.34.patch			\
   %D%/packages/patches/fuse-overlapping-headers.patch		\
+  %D%/packages/patches/fuzzylite-relative-path-in-tests.patch	\
+  %D%/packages/patches/fuzzylite-use-catch2.patch		\
+  %D%/packages/patches/fuzzylite-when-testing-large-float-numbers-for-equ.patch	\
   %D%/packages/patches/fxdiv-system-libraries.patch		\
   %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch	\
   %D%/packages/patches/ganeti-disable-version-symlinks.patch	\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index bae79ee48b..4395476af3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3557,6 +3557,37 @@ (define-public freedink
               ("bash" ,bash)))
     (native-inputs '())))
 
+(define-public fuzzylite
+  (package
+    (name "fuzzylite")
+    (version "6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fuzzylite/fuzzylite")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0yay0qc81x0irlvxqpy7jywjxpkmpjabdhq2hdh28r9z85wp2nwb"))
+              (patches (search-patches "fuzzylite-use-catch2.patch"
+                        "fuzzylite-when-testing-large-float-numbers-for-equ.patch"
+                        "fuzzylite-relative-path-in-tests.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'switch-to-fuzzylite-dir
+                    (lambda _
+                      (chdir "fuzzylite"))))))
+    (native-inputs (list catch2))
+    (home-page "https://www.fuzzylite.com/")
+    (synopsis "fuzzy logic control binary")
+    (description
+     "fuzzylite is a fuzzy logic control library which allows one
+to easily create fuzzy logic controllers in a few steps utilizing
+object-oriented programming.")
+    (license license:gpl3)))
+
 (define-public xboard
   (package
     (name "xboard")
diff --git a/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch b/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
new file mode 100644
index 0000000000..1a03238246
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
@@ -0,0 +1,15 @@
+Workaround https://github.com/fuzzylite/fuzzylite/issues/85
+
+diff --git a/fuzzylite/test/BenchmarkTest.cpp b/fuzzylite/test/BenchmarkTest.cpp
+index f868ec29..464d394d 100644
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -30,7 +30,7 @@ namespace fl {
+     }
+ 
+     TEST_CASE("Benchmarks from FLD files", "[benchmark][fld]") {
+-        std::string path = "../../examples/";
++        std::string path = "../examples/";
+         typedef std::pair<std::string, int > Example;
+         std::vector<Example> examples;
+         examples.push_back(Example("mamdani/AllTerms", int(1e4)));
diff --git a/gnu/packages/patches/fuzzylite-use-catch2.patch b/gnu/packages/patches/fuzzylite-use-catch2.patch
new file mode 100644
index 0000000000..e4aa13a98b
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-use-catch2.patch
@@ -0,0 +1,184 @@
+Origin: https://salsa.debian.org/debian/fuzzylite/-/blob/debian/6.0+dfsg-6/debian/patches/fix-tests2.patch
+From: Ferdinand Thiessen <rpm@fthiessen.de>
+Date: Mon, 31 Jan 2022 16:06:19 GMT
+Subject: Replace Catch with Catch2 and require C++11 for tests
+Origin: vendor, https://github.com/fuzzylite/fuzzylite/issues/94
+Bug-Debian: http://bugs.debian.org/1017155
+
+--- a/fuzzylite/CMakeLists.txt
++++ b/fuzzylite/CMakeLists.txt
+@@ -194,7 +194,9 @@ if(FL_BUILD_BINARY)
+ endif(FL_BUILD_BINARY)
+ 
+ if(FL_BUILD_TESTS)
++    find_package(Catch2)
+     add_executable(fl-test ${fl-headers} ${fl-tests})
++    target_link_libraries(fl-test Catch2::Catch2)
+     set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests)
+     set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests IMPORT_PREFIX tmp-) #To prevent LNK1149 in Windows
+     set_target_properties(fl-test PROPERTIES DEBUG_POSTFIX -debug)
+--- a/fuzzylite/test/activation/ThresholdTest.cpp
++++ b/fuzzylite/test/activation/ThresholdTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -16,7 +16,7 @@
+ 
+ #include "fl/Benchmark.h"
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ #include <vector>
+--- a/fuzzylite/test/hedge/HedgeFunctionTest.cpp
++++ b/fuzzylite/test/hedge/HedgeFunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/FldExporterTest.cpp
++++ b/fuzzylite/test/imex/FldExporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/FllImporterTest.cpp
++++ b/fuzzylite/test/imex/FllImporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/RScriptExporterTest.cpp
++++ b/fuzzylite/test/imex/RScriptExporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ #include <fstream>
+ 
+--- a/fuzzylite/test/MainTest.cpp
++++ b/fuzzylite/test/MainTest.cpp
+@@ -16,7 +16,7 @@
+  
+ #define CATCH_CONFIG_RUNNER
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ 
+ #include "fl/Headers.h"
+ 
+--- a/fuzzylite/test/norm/NormFunctionTest.cpp
++++ b/fuzzylite/test/norm/NormFunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/QuickTest.cpp
++++ b/fuzzylite/test/QuickTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/AggregatedTest.cpp
++++ b/fuzzylite/test/term/AggregatedTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/DiscreteTest.cpp
++++ b/fuzzylite/test/term/DiscreteTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/FunctionTest.cpp
++++ b/fuzzylite/test/term/FunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/TrapezoidTest.cpp
++++ b/fuzzylite/test/term/TrapezoidTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/TriangleTest.cpp
++++ b/fuzzylite/test/term/TriangleTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/variable/VariableTest.cpp
++++ b/fuzzylite/test/variable/VariableTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ #include <algorithm>    // std::random_shuffle
diff --git a/gnu/packages/patches/fuzzylite-when-testing-large-float-numbers-for-equ.patch b/gnu/packages/patches/fuzzylite-when-testing-large-float-numbers-for-equ.patch
new file mode 100644
index 0000000000..47403605dd
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-when-testing-large-float-numbers-for-equ.patch
@@ -0,0 +1,30 @@
+Origin: https://salsa.debian.org/debian/fuzzylite/-/blob/debian/6.0+dfsg-6/debian/patches/when-testing-large-float-numbers-for-equ.patch
+From: Johannes 'josch' Schauer <josch@debian.org>
+Date: Sun, 3 Feb 2019 10:33:22 +0100
+X-Dgit-Generated: 6.0+dfsg-2 80960ae38da9db032dfbfec6405398653e8205ff
+Subject: when testing large float numbers for equality, use a larger epsilon
+
+
+---
+
+--- fuzzylite-6.0+dfsg.orig/fuzzylite/test/BenchmarkTest.cpp
++++ fuzzylite-6.0+dfsg/fuzzylite/test/BenchmarkTest.cpp
+@@ -96,7 +96,17 @@ namespace fl {
+         CHECK(Op::isEq(1.0, Benchmark::convert(1000.0, Benchmark::MilliSeconds, Benchmark::Seconds)));
+         FL_LOG(Benchmark::convert(1000.0, Benchmark::MilliSeconds, Benchmark::Seconds));
+ 
+-        CHECK(Op::isEq(35e9, Benchmark::convert(35, Benchmark::Seconds, Benchmark::NanoSeconds)));
++        scalar eps =
++#ifndef __i386__
++            fuzzylite::macheps();
++#else
++            // on i386, due to the 80bit x87 register, double floating point
++            // numbers are handled differently and thus the difference between
++            // 35e9 and the result of Benchmark::convert() will be 2.179e-6,
++            // which is greater than the default epsilon of 1e-6.
++            1e-5;
++#endif
++        CHECK(Op::isEq(35e9, Benchmark::convert(35, Benchmark::Seconds, Benchmark::NanoSeconds), eps));
+         CHECK(Op::isEq(35, Benchmark::convert(35e9, Benchmark::NanoSeconds, Benchmark::Seconds)));
+     }
+ 
-- 
2.39.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-13  1:33             ` Vagrant Cascadian
@ 2023-05-13  1:35               ` Vagrant Cascadian
  2023-05-13  6:16                 ` Liliana Marie Prikler
  2023-05-13  6:12               ` [bug#63435] " Liliana Marie Prikler
  1 sibling, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-13  1:35 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 431 bytes --]

On 2023-05-12, Vagrant Cascadian wrote:
> On 2023-05-12, Liliana Marie Prikler wrote:
>> Am Donnerstag, dem 11.05.2023 um 23:17 -0700 schrieb Vagrant Cascadian:
>>> On 2023-05-12, Liliana Marie Prikler wrote:
>>> > Am Donnerstag, dem 11.05.2023 um 16:07 -0700 schrieb Vagrant
>>> > Cascadian:
...
> ...and will send an updated vcmi with this depending on fuzzylite
> shortly.

And the updated vcmi attached.

live well,
  vagrant


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0002-gnu-Add-vcmi-1.2.1.patch --]
[-- Type: text/x-diff, Size: 4660 bytes --]

From 813871d233700f7d9662aa9108b8dfc1e12e4d91 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 89791bea69..ac0137290d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2032,6 +2032,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 4395476af3..d6a663abc6 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
+     ;; 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))
+    (native-inputs
+     (list boost
+           ffmpeg
+           fuzzylite
+           ;; googletest ; needed for tests, but tests are disabled
+           libxkbcommon
+           luajit
+           minizip
+           pkg-config
+           python
+           ;; qtbase and qttools @6 not currently buildable but may work ok
+           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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-13  1:33             ` Vagrant Cascadian
  2023-05-13  1:35               ` Vagrant Cascadian
@ 2023-05-13  6:12               ` Liliana Marie Prikler
  2023-05-14 19:50                 ` Vagrant Cascadian
  1 sibling, 1 reply; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-05-13  6:12 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435; +Cc: iyzsong

Hi,

Am Freitag, dem 12.05.2023 um 18:33 -0700 schrieb Vagrant Cascadian:

> +  %D%/packages/patches/fuzzylite-relative-path-in-tests.patch	\
> +  %D%/packages/patches/fuzzylite-use-catch2.patch		\
> +  %D%/packages/patches/fuzzylite-when-testing-large-float-numbers-
> for-equ.patch	
Prefer names that don't blow up the file name, e.g. "fuzzylite-fix-
test", "fuzzylite-soften-float-equality", or "fuzzylite-workaround-
issue-N" – although I'm not sure whether we have a precedent for the
latter.

> +              (patches (search-patches "fuzzylite-use-catch2.patch"
> +                        "fuzzylite-when-testing-large-float-numbers-
> for-equ.patch"
> +                        "fuzzylite-relative-path-in-tests.patch"))))
This doesn't appear properly indented.

> +    (synopsis "fuzzy logic control binary")
Capitalize the first word.  IIRC we also allow title case for proper
names and such, but I don't think that'd be necessary here.

> +     "fuzzylite is a fuzzy logic control library which allows one
> +to easily create fuzzy logic controllers in a few steps utilizing
> +object-oriented programming.")
Proper sentences start with an uppercase letter.  The convention is to
use @-constructs when the package name prohibits that.  You can also
cheat via "This package provides ..."

> +    (license license:gpl3)))
No +?

> fuzzylite is a registered trademark of FuzzyLite Limited.
Perhaps also look into their trademark policy then, if they have any.

> +-#include "test/catch.hpp"
> ++#include "catch2/catch.hpp"
Use <catch2/catch.hpp> to signal that this is a system header.

Cheers




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-13  1:35               ` Vagrant Cascadian
@ 2023-05-13  6:16                 ` Liliana Marie Prikler
  2023-05-14 19:52                   ` Vagrant Cascadian
  0 siblings, 1 reply; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-05-13  6:16 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435; +Cc: iyzsong

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.  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.

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

Cheers




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-13  6:12               ` [bug#63435] " Liliana Marie Prikler
@ 2023-05-14 19:50                 ` Vagrant Cascadian
  0 siblings, 0 replies; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-14 19:50 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 2068 bytes --]

On 2023-05-13, Liliana Marie Prikler wrote:
> Am Freitag, dem 12.05.2023 um 18:33 -0700 schrieb Vagrant Cascadian:
>
>> +  %D%/packages/patches/fuzzylite-relative-path-in-tests.patch	\
>> +  %D%/packages/patches/fuzzylite-use-catch2.patch		\
>> +  %D%/packages/patches/fuzzylite-when-testing-large-float-numbers-
>> for-equ.patch	
> Prefer names that don't blow up the file name, e.g. "fuzzylite-fix-
> test", "fuzzylite-soften-float-equality", or "fuzzylite-workaround-
> issue-N" – although I'm not sure whether we have a precedent for the
> latter.

Went with fuzzylite-soften-float-equality. Thanks!


>> +              (patches (search-patches "fuzzylite-use-catch2.patch"
>> +                        "fuzzylite-when-testing-large-float-numbers-
>> for-equ.patch"
>> +                        "fuzzylite-relative-path-in-tests.patch"))))
> This doesn't appear properly indented.

guix style strikes again! Fixed.


>> +    (synopsis "fuzzy logic control binary")
> Capitalize the first word.  IIRC we also allow title case for proper
> names and such, but I don't think that'd be necessary here.

Fixed.


>> +     "fuzzylite is a fuzzy logic control library which allows one
>> +to easily create fuzzy logic controllers in a few steps utilizing
>> +object-oriented programming.")
> Proper sentences start with an uppercase letter.  The convention is to
> use @-constructs when the package name prohibits that.  You can also
> cheat via "This package provides ..."

Went with the cheat. :)


>> +    (license license:gpl3)))
> No +?

I do not see any "or any later version" or similar wording anywhere, no.


>> fuzzylite is a registered trademark of FuzzyLite Limited.
> Perhaps also look into their trademark policy then, if they have any.

Have not found one...


>> +-#include "test/catch.hpp"
>> ++#include "catch2/catch.hpp"
> Use <catch2/catch.hpp> to signal that this is a system header.

I tried applying this, but it failed to build... left it out of this
revision.


live well,
  vagrant

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-fuzzylite-6.0.patch --]
[-- Type: text/x-diff, Size: 11847 bytes --]

From e17f53eaf5f5ff1e347686e96a403501f2386737 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Fri, 12 May 2023 16:18:18 -0700
Subject: [PATCH 1/2] gnu: Add fuzzylite 6.0.

* gnu/packages/games.scm (fuzzylite): New variable.
* gnu/packages/patches/fuzzylite-relative-path-in-tests.patch: New patch.
* gnu/packages/patches/fuzzylite-use-catch2.patch: New patch.
* gnu/packages/patches/fuzzylite-soften-float-equality.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add patches.
---
 gnu/local.mk                                  |   3 +
 gnu/packages/games.scm                        |  31 +++
 .../fuzzylite-relative-path-in-tests.patch    |  15 ++
 .../fuzzylite-soften-float-equality.patch     |  30 +++
 .../patches/fuzzylite-use-catch2.patch        | 184 ++++++++++++++++++
 5 files changed, 263 insertions(+)
 create mode 100644 gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
 create mode 100644 gnu/packages/patches/fuzzylite-soften-float-equality.patch
 create mode 100644 gnu/packages/patches/fuzzylite-use-catch2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 012ce84d2d..dd6e3641a1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1149,6 +1149,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/freeimage-unbundle.patch		\
   %D%/packages/patches/fuse-glibc-2.34.patch			\
   %D%/packages/patches/fuse-overlapping-headers.patch		\
+  %D%/packages/patches/fuzzylite-relative-path-in-tests.patch	\
+  %D%/packages/patches/fuzzylite-use-catch2.patch		\
+  %D%/packages/patches/fuzzylite-soften-float-equality.patch	\
   %D%/packages/patches/fxdiv-system-libraries.patch		\
   %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch	\
   %D%/packages/patches/ganeti-disable-version-symlinks.patch	\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index d1e2248588..49d1431d99 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3557,6 +3557,37 @@ (define-public freedink
               ("bash" ,bash)))
     (native-inputs '())))
 
+(define-public fuzzylite
+  (package
+    (name "fuzzylite")
+    (version "6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fuzzylite/fuzzylite")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0yay0qc81x0irlvxqpy7jywjxpkmpjabdhq2hdh28r9z85wp2nwb"))
+              (patches (search-patches "fuzzylite-use-catch2.patch"
+                                       "fuzzylite-soften-float-equality.patch"
+                                       "fuzzylite-relative-path-in-tests.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'switch-to-fuzzylite-dir
+                    (lambda _
+                      (chdir "fuzzylite"))))))
+    (native-inputs (list catch2))
+    (home-page "https://www.fuzzylite.com/")
+    (synopsis "Fuzzy logic control binary")
+    (description
+     "This package provides fuzzylite, a fuzzy logic control library which
+allows one to easily create fuzzy logic controllers in a few steps utilizing
+object-oriented programming.")
+    (license license:gpl3)))
+
 (define-public xboard
   (package
     (name "xboard")
diff --git a/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch b/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
new file mode 100644
index 0000000000..1a03238246
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
@@ -0,0 +1,15 @@
+Workaround https://github.com/fuzzylite/fuzzylite/issues/85
+
+diff --git a/fuzzylite/test/BenchmarkTest.cpp b/fuzzylite/test/BenchmarkTest.cpp
+index f868ec29..464d394d 100644
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -30,7 +30,7 @@ namespace fl {
+     }
+ 
+     TEST_CASE("Benchmarks from FLD files", "[benchmark][fld]") {
+-        std::string path = "../../examples/";
++        std::string path = "../examples/";
+         typedef std::pair<std::string, int > Example;
+         std::vector<Example> examples;
+         examples.push_back(Example("mamdani/AllTerms", int(1e4)));
diff --git a/gnu/packages/patches/fuzzylite-soften-float-equality.patch b/gnu/packages/patches/fuzzylite-soften-float-equality.patch
new file mode 100644
index 0000000000..47403605dd
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-soften-float-equality.patch
@@ -0,0 +1,30 @@
+Origin: https://salsa.debian.org/debian/fuzzylite/-/blob/debian/6.0+dfsg-6/debian/patches/when-testing-large-float-numbers-for-equ.patch
+From: Johannes 'josch' Schauer <josch@debian.org>
+Date: Sun, 3 Feb 2019 10:33:22 +0100
+X-Dgit-Generated: 6.0+dfsg-2 80960ae38da9db032dfbfec6405398653e8205ff
+Subject: when testing large float numbers for equality, use a larger epsilon
+
+
+---
+
+--- fuzzylite-6.0+dfsg.orig/fuzzylite/test/BenchmarkTest.cpp
++++ fuzzylite-6.0+dfsg/fuzzylite/test/BenchmarkTest.cpp
+@@ -96,7 +96,17 @@ namespace fl {
+         CHECK(Op::isEq(1.0, Benchmark::convert(1000.0, Benchmark::MilliSeconds, Benchmark::Seconds)));
+         FL_LOG(Benchmark::convert(1000.0, Benchmark::MilliSeconds, Benchmark::Seconds));
+ 
+-        CHECK(Op::isEq(35e9, Benchmark::convert(35, Benchmark::Seconds, Benchmark::NanoSeconds)));
++        scalar eps =
++#ifndef __i386__
++            fuzzylite::macheps();
++#else
++            // on i386, due to the 80bit x87 register, double floating point
++            // numbers are handled differently and thus the difference between
++            // 35e9 and the result of Benchmark::convert() will be 2.179e-6,
++            // which is greater than the default epsilon of 1e-6.
++            1e-5;
++#endif
++        CHECK(Op::isEq(35e9, Benchmark::convert(35, Benchmark::Seconds, Benchmark::NanoSeconds), eps));
+         CHECK(Op::isEq(35, Benchmark::convert(35e9, Benchmark::NanoSeconds, Benchmark::Seconds)));
+     }
+ 
diff --git a/gnu/packages/patches/fuzzylite-use-catch2.patch b/gnu/packages/patches/fuzzylite-use-catch2.patch
new file mode 100644
index 0000000000..e4aa13a98b
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-use-catch2.patch
@@ -0,0 +1,184 @@
+Origin: https://salsa.debian.org/debian/fuzzylite/-/blob/debian/6.0+dfsg-6/debian/patches/fix-tests2.patch
+From: Ferdinand Thiessen <rpm@fthiessen.de>
+Date: Mon, 31 Jan 2022 16:06:19 GMT
+Subject: Replace Catch with Catch2 and require C++11 for tests
+Origin: vendor, https://github.com/fuzzylite/fuzzylite/issues/94
+Bug-Debian: http://bugs.debian.org/1017155
+
+--- a/fuzzylite/CMakeLists.txt
++++ b/fuzzylite/CMakeLists.txt
+@@ -194,7 +194,9 @@ if(FL_BUILD_BINARY)
+ endif(FL_BUILD_BINARY)
+ 
+ if(FL_BUILD_TESTS)
++    find_package(Catch2)
+     add_executable(fl-test ${fl-headers} ${fl-tests})
++    target_link_libraries(fl-test Catch2::Catch2)
+     set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests)
+     set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests IMPORT_PREFIX tmp-) #To prevent LNK1149 in Windows
+     set_target_properties(fl-test PROPERTIES DEBUG_POSTFIX -debug)
+--- a/fuzzylite/test/activation/ThresholdTest.cpp
++++ b/fuzzylite/test/activation/ThresholdTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -16,7 +16,7 @@
+ 
+ #include "fl/Benchmark.h"
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ #include <vector>
+--- a/fuzzylite/test/hedge/HedgeFunctionTest.cpp
++++ b/fuzzylite/test/hedge/HedgeFunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/FldExporterTest.cpp
++++ b/fuzzylite/test/imex/FldExporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/FllImporterTest.cpp
++++ b/fuzzylite/test/imex/FllImporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/RScriptExporterTest.cpp
++++ b/fuzzylite/test/imex/RScriptExporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ #include <fstream>
+ 
+--- a/fuzzylite/test/MainTest.cpp
++++ b/fuzzylite/test/MainTest.cpp
+@@ -16,7 +16,7 @@
+  
+ #define CATCH_CONFIG_RUNNER
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ 
+ #include "fl/Headers.h"
+ 
+--- a/fuzzylite/test/norm/NormFunctionTest.cpp
++++ b/fuzzylite/test/norm/NormFunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/QuickTest.cpp
++++ b/fuzzylite/test/QuickTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/AggregatedTest.cpp
++++ b/fuzzylite/test/term/AggregatedTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/DiscreteTest.cpp
++++ b/fuzzylite/test/term/DiscreteTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/FunctionTest.cpp
++++ b/fuzzylite/test/term/FunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/TrapezoidTest.cpp
++++ b/fuzzylite/test/term/TrapezoidTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/TriangleTest.cpp
++++ b/fuzzylite/test/term/TriangleTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/variable/VariableTest.cpp
++++ b/fuzzylite/test/variable/VariableTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ #include <algorithm>    // std::random_shuffle

base-commit: b3adba7b5ef3bb56509710b1596225017f1342cc
-- 
2.39.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-13  6:16                 ` Liliana Marie Prikler
@ 2023-05-14 19:52                   ` Vagrant Cascadian
  2023-05-15 18:31                     ` Liliana Marie Prikler
  0 siblings, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-14 19:52 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 811 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0002-gnu-Add-vcmi-1.2.1.patch --]
[-- Type: text/x-diff, Size: 4685 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-14 19:52                   ` Vagrant Cascadian
@ 2023-05-15 18:31                     ` Liliana Marie Prikler
  2023-05-15 19:07                       ` Vagrant Cascadian
  2023-07-03  2:50                       ` Vagrant Cascadian
  0 siblings, 2 replies; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-05-15 18:31 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435; +Cc: iyzsong

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





^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-15 18:31                     ` Liliana Marie Prikler
@ 2023-05-15 19:07                       ` Vagrant Cascadian
  2023-07-03  2:50                       ` Vagrant Cascadian
  1 sibling, 0 replies; 17+ messages in thread
From: Vagrant Cascadian @ 2023-05-15 19:07 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#63435] Add vcmi 1.2.1 to games.scm
  2023-05-15 18:31                     ` Liliana Marie Prikler
  2023-05-15 19:07                       ` Vagrant Cascadian
@ 2023-07-03  2:50                       ` Vagrant Cascadian
  2023-07-09  5:36                         ` bug#63435: " Liliana Marie Prikler
  1 sibling, 1 reply; 17+ messages in thread
From: Vagrant Cascadian @ 2023-07-03  2:50 UTC (permalink / raw)
  To: Liliana Marie Prikler, 63435; +Cc: iyzsong


[-- Attachment #1.1: Type: text/plain, Size: 364 bytes --]

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 see, not a convention I am used to! Switched to XXX: ...

Updated patches attached.

live well,
  vagrant

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-fuzzylite-6.0.patch --]
[-- Type: text/x-diff, Size: 11847 bytes --]

From 2986a66a3bc7044e3c5f33b894a71551b4eef32d Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Fri, 12 May 2023 16:18:18 -0700
Subject: [PATCH 1/2] gnu: Add fuzzylite 6.0.

* gnu/packages/games.scm (fuzzylite): New variable.
* gnu/packages/patches/fuzzylite-relative-path-in-tests.patch: New patch.
* gnu/packages/patches/fuzzylite-use-catch2.patch: New patch.
* gnu/packages/patches/fuzzylite-soften-float-equality.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add patches.
---
 gnu/local.mk                                  |   3 +
 gnu/packages/games.scm                        |  31 +++
 .../fuzzylite-relative-path-in-tests.patch    |  15 ++
 .../fuzzylite-soften-float-equality.patch     |  30 +++
 .../patches/fuzzylite-use-catch2.patch        | 184 ++++++++++++++++++
 5 files changed, 263 insertions(+)
 create mode 100644 gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
 create mode 100644 gnu/packages/patches/fuzzylite-soften-float-equality.patch
 create mode 100644 gnu/packages/patches/fuzzylite-use-catch2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e65888a044..9ec550355c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1157,6 +1157,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/freeimage-unbundle.patch		\
   %D%/packages/patches/fuse-glibc-2.34.patch			\
   %D%/packages/patches/fuse-overlapping-headers.patch		\
+  %D%/packages/patches/fuzzylite-relative-path-in-tests.patch	\
+  %D%/packages/patches/fuzzylite-use-catch2.patch		\
+  %D%/packages/patches/fuzzylite-soften-float-equality.patch	\
   %D%/packages/patches/fxdiv-system-libraries.patch		\
   %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch	\
   %D%/packages/patches/ganeti-disable-version-symlinks.patch	\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 83704dd720..d2bd448f99 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3643,6 +3643,37 @@ (define-public freedink
               ("bash" ,bash)))
     (native-inputs '())))
 
+(define-public fuzzylite
+  (package
+    (name "fuzzylite")
+    (version "6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fuzzylite/fuzzylite")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0yay0qc81x0irlvxqpy7jywjxpkmpjabdhq2hdh28r9z85wp2nwb"))
+              (patches (search-patches "fuzzylite-use-catch2.patch"
+                                       "fuzzylite-soften-float-equality.patch"
+                                       "fuzzylite-relative-path-in-tests.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'switch-to-fuzzylite-dir
+                    (lambda _
+                      (chdir "fuzzylite"))))))
+    (native-inputs (list catch2))
+    (home-page "https://www.fuzzylite.com/")
+    (synopsis "Fuzzy logic control binary")
+    (description
+     "This package provides fuzzylite, a fuzzy logic control library which
+allows one to easily create fuzzy logic controllers in a few steps utilizing
+object-oriented programming.")
+    (license license:gpl3)))
+
 (define-public xboard
   (package
     (name "xboard")
diff --git a/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch b/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
new file mode 100644
index 0000000000..1a03238246
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-relative-path-in-tests.patch
@@ -0,0 +1,15 @@
+Workaround https://github.com/fuzzylite/fuzzylite/issues/85
+
+diff --git a/fuzzylite/test/BenchmarkTest.cpp b/fuzzylite/test/BenchmarkTest.cpp
+index f868ec29..464d394d 100644
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -30,7 +30,7 @@ namespace fl {
+     }
+ 
+     TEST_CASE("Benchmarks from FLD files", "[benchmark][fld]") {
+-        std::string path = "../../examples/";
++        std::string path = "../examples/";
+         typedef std::pair<std::string, int > Example;
+         std::vector<Example> examples;
+         examples.push_back(Example("mamdani/AllTerms", int(1e4)));
diff --git a/gnu/packages/patches/fuzzylite-soften-float-equality.patch b/gnu/packages/patches/fuzzylite-soften-float-equality.patch
new file mode 100644
index 0000000000..47403605dd
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-soften-float-equality.patch
@@ -0,0 +1,30 @@
+Origin: https://salsa.debian.org/debian/fuzzylite/-/blob/debian/6.0+dfsg-6/debian/patches/when-testing-large-float-numbers-for-equ.patch
+From: Johannes 'josch' Schauer <josch@debian.org>
+Date: Sun, 3 Feb 2019 10:33:22 +0100
+X-Dgit-Generated: 6.0+dfsg-2 80960ae38da9db032dfbfec6405398653e8205ff
+Subject: when testing large float numbers for equality, use a larger epsilon
+
+
+---
+
+--- fuzzylite-6.0+dfsg.orig/fuzzylite/test/BenchmarkTest.cpp
++++ fuzzylite-6.0+dfsg/fuzzylite/test/BenchmarkTest.cpp
+@@ -96,7 +96,17 @@ namespace fl {
+         CHECK(Op::isEq(1.0, Benchmark::convert(1000.0, Benchmark::MilliSeconds, Benchmark::Seconds)));
+         FL_LOG(Benchmark::convert(1000.0, Benchmark::MilliSeconds, Benchmark::Seconds));
+ 
+-        CHECK(Op::isEq(35e9, Benchmark::convert(35, Benchmark::Seconds, Benchmark::NanoSeconds)));
++        scalar eps =
++#ifndef __i386__
++            fuzzylite::macheps();
++#else
++            // on i386, due to the 80bit x87 register, double floating point
++            // numbers are handled differently and thus the difference between
++            // 35e9 and the result of Benchmark::convert() will be 2.179e-6,
++            // which is greater than the default epsilon of 1e-6.
++            1e-5;
++#endif
++        CHECK(Op::isEq(35e9, Benchmark::convert(35, Benchmark::Seconds, Benchmark::NanoSeconds), eps));
+         CHECK(Op::isEq(35, Benchmark::convert(35e9, Benchmark::NanoSeconds, Benchmark::Seconds)));
+     }
+ 
diff --git a/gnu/packages/patches/fuzzylite-use-catch2.patch b/gnu/packages/patches/fuzzylite-use-catch2.patch
new file mode 100644
index 0000000000..e4aa13a98b
--- /dev/null
+++ b/gnu/packages/patches/fuzzylite-use-catch2.patch
@@ -0,0 +1,184 @@
+Origin: https://salsa.debian.org/debian/fuzzylite/-/blob/debian/6.0+dfsg-6/debian/patches/fix-tests2.patch
+From: Ferdinand Thiessen <rpm@fthiessen.de>
+Date: Mon, 31 Jan 2022 16:06:19 GMT
+Subject: Replace Catch with Catch2 and require C++11 for tests
+Origin: vendor, https://github.com/fuzzylite/fuzzylite/issues/94
+Bug-Debian: http://bugs.debian.org/1017155
+
+--- a/fuzzylite/CMakeLists.txt
++++ b/fuzzylite/CMakeLists.txt
+@@ -194,7 +194,9 @@ if(FL_BUILD_BINARY)
+ endif(FL_BUILD_BINARY)
+ 
+ if(FL_BUILD_TESTS)
++    find_package(Catch2)
+     add_executable(fl-test ${fl-headers} ${fl-tests})
++    target_link_libraries(fl-test Catch2::Catch2)
+     set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests)
+     set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests IMPORT_PREFIX tmp-) #To prevent LNK1149 in Windows
+     set_target_properties(fl-test PROPERTIES DEBUG_POSTFIX -debug)
+--- a/fuzzylite/test/activation/ThresholdTest.cpp
++++ b/fuzzylite/test/activation/ThresholdTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -16,7 +16,7 @@
+ 
+ #include "fl/Benchmark.h"
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ #include <vector>
+--- a/fuzzylite/test/hedge/HedgeFunctionTest.cpp
++++ b/fuzzylite/test/hedge/HedgeFunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/FldExporterTest.cpp
++++ b/fuzzylite/test/imex/FldExporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/FllImporterTest.cpp
++++ b/fuzzylite/test/imex/FllImporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/imex/RScriptExporterTest.cpp
++++ b/fuzzylite/test/imex/RScriptExporterTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ #include <fstream>
+ 
+--- a/fuzzylite/test/MainTest.cpp
++++ b/fuzzylite/test/MainTest.cpp
+@@ -16,7 +16,7 @@
+  
+ #define CATCH_CONFIG_RUNNER
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ 
+ #include "fl/Headers.h"
+ 
+--- a/fuzzylite/test/norm/NormFunctionTest.cpp
++++ b/fuzzylite/test/norm/NormFunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/QuickTest.cpp
++++ b/fuzzylite/test/QuickTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/AggregatedTest.cpp
++++ b/fuzzylite/test/term/AggregatedTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/DiscreteTest.cpp
++++ b/fuzzylite/test/term/DiscreteTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/FunctionTest.cpp
++++ b/fuzzylite/test/term/FunctionTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/TrapezoidTest.cpp
++++ b/fuzzylite/test/term/TrapezoidTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/term/TriangleTest.cpp
++++ b/fuzzylite/test/term/TriangleTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ namespace fl {
+--- a/fuzzylite/test/variable/VariableTest.cpp
++++ b/fuzzylite/test/variable/VariableTest.cpp
+@@ -14,7 +14,7 @@
+  fuzzylite is a registered trademark of FuzzyLite Limited.
+  */
+ 
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ 
+ #include <algorithm>    // std::random_shuffle

base-commit: 6cdab8fd09ffb1de169ad30f0b4edd4c9c00a201
-- 
2.39.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-vcmi-1.2.1.patch --]
[-- Type: text/x-diff, Size: 4679 bytes --]

From 818fb9cc3b8f31009d9c540555c63b4f894d5335 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 9ec550355c..b421e458c8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2053,6 +2053,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 d2bd448f99..c42b68fa58 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -202,6 +202,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)
@@ -11304,6 +11305,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
+           ;; XXX: 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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* bug#63435: Add vcmi 1.2.1 to games.scm
  2023-07-03  2:50                       ` Vagrant Cascadian
@ 2023-07-09  5:36                         ` Liliana Marie Prikler
  0 siblings, 0 replies; 17+ messages in thread
From: Liliana Marie Prikler @ 2023-07-09  5:36 UTC (permalink / raw)
  To: Vagrant Cascadian, 63435-done; +Cc: iyzsong

Am Sonntag, dem 02.07.2023 um 19:50 -0700 schrieb Vagrant Cascadian:
> 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 see, not a convention I am used to! Switched to XXX: ...
> 
> Updated patches attached.
Pushed with slightly edited commit messages.

Cheers




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-07-09  5:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11  5:43 [bug#63435] Add vcmi 1.2.1 to games.scm Vagrant Cascadian
2023-05-11 17:17 ` Liliana Marie Prikler
2023-05-11 21:48   ` Vagrant Cascadian
2023-05-11 23:07     ` Vagrant Cascadian
2023-05-12  1:47       ` Liliana Marie Prikler
2023-05-12  6:17         ` Vagrant Cascadian
2023-05-12 20:53           ` Liliana Marie Prikler
2023-05-13  1:33             ` Vagrant Cascadian
2023-05-13  1:35               ` Vagrant Cascadian
2023-05-13  6:16                 ` Liliana Marie Prikler
2023-05-14 19:52                   ` Vagrant Cascadian
2023-05-15 18:31                     ` Liliana Marie Prikler
2023-05-15 19:07                       ` Vagrant Cascadian
2023-07-03  2:50                       ` Vagrant Cascadian
2023-07-09  5:36                         ` bug#63435: " Liliana Marie Prikler
2023-05-13  6:12               ` [bug#63435] " Liliana Marie Prikler
2023-05-14 19:50                 ` Vagrant Cascadian

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).