GNU bug report logs - #44039
[PATCH] gnu: Add slade.

Previous Next

Package: guix-patches;

Reported by: James Smith <jsubuntuxp <at> disroot.org>

Date: Fri, 16 Oct 2020 18:45:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44039 in the body.
You can then email your comments to 44039 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Fri, 16 Oct 2020 18:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Smith <jsubuntuxp <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 16 Oct 2020 18:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: James Smith <jsubuntuxp <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: James Smith <jsubuntuxp <at> disroot.org>
Subject: [PATCH] gnu: Add slade.
Date: Fri, 16 Oct 2020 11:43:33 -0700
* gnu/packages/game-development.scm (slade): New variable.
---
 gnu/packages/game-development.scm | 56 ++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 96ed2f9da4..55d60d03a3 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar <at> araneo.si>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;; Copyright © 2020 James Smith <jsubuntuxp <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,7 +38,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages game-development)
-  #:use-module (srfi srfi-1)
+  #:use-module ((srfi srfi-1) #:hide (zip))
   #:use-module (ice-9 match)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -94,6 +95,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -2505,3 +2507,55 @@ fully dynamic omnidirectional shadows, global illumination, HDR lighting,
 deferred shading, morphological / temporal / multisample anti-aliasing, and
 much more.")
       (license license:zlib))))
+
+(define-public slade
+  (package
+    (name "slade")
+    (version "3.1.12a")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sirjuddington/SLADE")
+             (commit version)))
+       (sha256 (base32 "1q37pqibnrbdd7zjx7h2kfi0q9nc63cc96q9ya4x3fvsrf64n6yd"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+       (list "-DWX_GTK3=ON" "-DNO_WEBVIEW=ON"
+             (string-append "-DWITH_WXPATH="
+                            (assoc-ref %build-inputs "wxwidgets") "/bin")
+             (string-append "-DwxWidgets_LIBRARIES="
+                            (assoc-ref %build-inputs "wxwidgets") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'patch-gdk-backend
+           ;; Set GDK_BACKEND to x11 to prevent crash on Wayland.
+           ;; See https://github.com/sirjuddington/SLADE/issues/1097 for details.
+           (lambda* _
+             (wrap-program
+                 (string-append (assoc-ref %outputs "out") "/bin/slade")
+               `("GDK_BACKEND" "" = (,"x11")))
+             #t)))
+       #:tests? #f))
+    (inputs
+     `(("curl" ,curl)
+       ("fluidsynth" ,fluidsynth)
+       ("freeimage" ,freeimage)
+       ("ftgl" ,ftgl)
+       ("glew" ,glew)
+       ("gtk+" ,gtk+)
+       ("sfml" ,sfml)
+       ("wxwidgets" ,wxwidgets-3.1)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("which" ,which)
+       ("zip" ,zip)))
+    (home-page "https://slade.mancubus.net")
+    (synopsis "Doom game data editor")
+    (description "SLADE3 is a modern editor for Doom-engine based games and
+source ports.  It has the ability to view, modify, and write many different game-
+specific formats, and even convert between some of them, or from/to other generic
+formats such as PNG.")
+    (license license:gpl2)))
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Fri, 16 Oct 2020 21:08:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: James Smith <jsubuntuxp <at> disroot.org>
Cc: guix-patches <at> gnu.org, 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Fri, 16 Oct 2020 23:07:46 +0200
[Message part 1 (text/plain, inline)]
James,

Thanks for the patch!

James Smith 写道:
> +(define-public slade

Let's keep modules vaguely alphabetical.  Could you move this 
above ‘tiled’?

> +         (add-after 'install 'patch-gdk-backend

Nitpick: it's not patching anything.

> +           ;; Set GDK_BACKEND to x11 to prevent crash on 
> Wayland.
> +           ;; See 
> https://github.com/sirjuddington/SLADE/issues/1097 for details.
> +           (lambda* _

No need for lambda* over lambda when you're not using any of its 
extended features....

> +                 (string-append (assoc-ref %outputs "out") 
> "/bin/slade")

...however, you *could* use its keyword arguments to get rid of 
this ugly %outputs pseudo-global.  See below.

> +               `("GDK_BACKEND" "" = (,"x11")))

This works but the "" and , are redundant.

All in all, the phase can be rewritten as:

        (add-after 'install 'wrap-with-x11-gdk-backend
          ;; Set GDK_BACKEND to x11 to prevent crash on Wayland. 
          See
          ;; https://github.com/sirjuddington/SLADE/issues/1097 
          for details.
          (lambda* (#:key outputs #:allow-other-keys)
            (wrap-program
                (string-append (assoc-ref outputs "out") 
                "/bin/slade")
              '("GDK_BACKEND" = ("x11")))
            #t)))

> +       #:tests? #f))

Are there no tests at all?  If so, note in a comment:

      #:tests? #f))                    ; no test suite

Same if there are tests but they're broken or pointless (linting 
etc.).

There's one more problem:

 set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X -UN=UTF8 -9 -r \
   "${CMAKE_BINARY_DIR}/slade.pk3" .)

Even zip -X won't create an identical archive on every run.  There 
doesn't seem to be an option to do so.  The result:

 --- /gnu/store/aaa-slade-3.1.12a/share/slade3/slade.pk3
 +++ /gnu/store/bbb-slade-3.1.12a/share/slade3/slade.pk3
  Zip file size: 3624588 bytes, number of entries: 768
 -drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:17 html/
 -drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:17 config/
 -drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:17 config/colours/
 +drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:31 html/
 +drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:31 config/
 +drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:31 config/colours/

This is not ideal: Guix aims for reproducible builds.

The following made multiple builds on one machine identical, but 
was not consistent between file systems, probably due to readdir 
order:

+ (add-before 'build 'reset-slade.pk3-timestamps
+   ;; This appears sufficient to make slade.pk3 reproducible.
+   (lambda _
+     (invoke "find" "../source/dist/res" "-exec" "touch"
+             "--no-dereference" "-t" "197001010000.00" "{}" 
"+")))

I suppose I could try using find to sort the files before invoking 
zip, or something.  Thoughts?

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Fri, 16 Oct 2020 21:08:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Fri, 16 Oct 2020 21:15:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org>
Cc: James Smith <jsubuntuxp <at> disroot.org>, 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Fri, 16 Oct 2020 23:14:35 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches via 写道:
> All in all, the phase can be rewritten as:

Grumble:
[Message part 2 (text/plain, inline)]
        (add-after 'install 'patch-gdk-backend
          ;; Set GDK_BACKEND to x11 to prevent crash on Wayland. 
          See
          ;; https://github.com/sirjuddington/SLADE/issues/1097 
          for details.
          (lambda* (#:key outputs #:allow-other-keys)
            (wrap-program
                (string-append (assoc-ref outputs "out") 
                "/bin/slade")
              '("GDK_BACKEND" = ("x11")))
            #t)))
[Message part 3 (text/plain, inline)]
Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Fri, 16 Oct 2020 21:15:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Sat, 17 Oct 2020 00:43:01 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: James Smith <jsubuntuxp <at> disroot.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: guix-patches <at> gnu.org, James Smith <jsubuntuxp <at> disroot.org>,
 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Sat, 17 Oct 2020 00:41:50 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Tobias,

On Fri, 16 Oct 2020 14:07:46 -0700,
Tobias Geerinckx-Rice wrote:

>  
>> +(define-public slade
>> 
> Let's keep modules vaguely alphabetical.  Could you move this above
> 
> ‘tiled’?
> 
Sure thing, I didn't see anything in the manual about sorting alphabetically and
other definitions weren't in order either.

>  
>> +         (add-after 'install 'patch-gdk-backend
>> 
> Nitpick: it's not patching anything.
> 
Now that you point that out, patch wasn't the word I was looking for.

>  
>> +               `("GDK_BACKEND" "" = (,"x11")))
>> 
> This works but the "" and , are redundant.
> 
Thanks for pointing that out, I didn't see any existing examples doing it that
way.

> All in all, the phase can be rewritten as:
> 
> (add-after 'install 'wrap-with-x11-gdk-backend
> 
> ;; Set GDK_BACKEND to x11 to prevent crash on Wayland.
> 
> See
> 
> ;; https://github.com/sirjuddington/SLADE/issues/1097
> 
> for details.
> 
> (lambda* (#:key outputs #:allow-other-keys)
> 
> (wrap-program
> 
> (string-append (assoc-ref outputs "out")
> 
> "/bin/slade")
> 
> '("GDK_BACKEND" = ("x11")))
> 
> #t)))
> 
Done.

>  
>> +       #:tests? #f))
>> 
> Are there no tests at all?  If so, note in a comment:
> 
> #:tests? #f))                    ; no test suite
> 
Yeah, no tests.

> There's one more problem:
> 
> set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X -UN=UTF8 -9 -r \
> 
> "${CMAKE_BINARY_DIR}/slade.pk3" .)
> 
> Even zip -X won't create an identical archive on every run.  There
> 
> doesn't seem to be an option to do so.  The result:
> 
> --- /gnu/store/aaa-slade-3.1.12a/share/slade3/slade.pk3
> 
> +++ /gnu/store/bbb-slade-3.1.12a/share/slade3/slade.pk3
> 
> Zip file size: 3624588 bytes, number of entries: 768
> 
> -drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:17 html/
> 
> -drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:17 config/
> 
> -drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:17 config/colours/
> 
> +drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:31 html/
> 
> +drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:31 config/
> 
> +drwxr-xr-x  3.0 unx  0 b- stor 20-Oct-16 19:31 config/colours/
> 
> This is not ideal: Guix aims for reproducible builds.
> 
I didn't think to check zip-compressed files.

> The following made multiple builds on one machine identical, but was
> 
> not consistent between file systems, probably due to readdir order:
> 
> + (add-before 'build 'reset-slade.pk3-timestamps
> 
> +   ;; This appears sufficient to make slade.pk3 reproducible.
> 
> +   (lambda _
> 
> +     (invoke "find" "../source/dist/res" "-exec" "touch"
> 
> +             "--no-dereference" "-t" "197001010000.00" "{}" "+")))
> 
> I suppose I could try using find to sort the files before invoking
> 
> zip, or something.  Thoughts?
> 
Unless there's a better way, let's do that.

Thanks for your help,

James Smith

[v2-0001-gnu-Add-slade.patch (text/plain, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Sat, 17 Oct 2020 00:43:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Wed, 28 Oct 2020 14:55:02 GMT) Full text and rfc822 format available.

Message #26 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: James Smith <jsubuntuxp <at> disroot.org>, 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Wed, 28 Oct 2020 15:54:31 +0100
Hi,

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> The following made multiple builds on one machine identical, but was
> not consistent between file systems, probably due to readdir order:
>
> + (add-before 'build 'reset-slade.pk3-timestamps
> +   ;; This appears sufficient to make slade.pk3 reproducible.
> +   (lambda _
> +     (invoke "find" "../source/dist/res" "-exec" "touch"
> +             "--no-dereference" "-t" "197001010000.00" "{}" "+")))

It’s surprising that this is necessary because the ‘unpack’ phase copies
the source directory preserving the mtime of files and since those files
are in the store, their mtime is 1:

        ;; Preserve timestamps (set to the Epoch) on the copied tree so that
        ;; things work deterministically.
        (copy-recursively source "."
                          #:keep-mtime? #t)

Thoughts?

Anyhow, we can probably push v2.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Thu, 29 Oct 2020 08:16:02 GMT) Full text and rfc822 format available.

Message #29 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: James Smith <jsubuntuxp <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, James Smith <jsubuntuxp <at> disroot.org>,
 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Thu, 29 Oct 2020 02:49:58 +0000 (UTC)
I have a couple of questions since I'm new to this sort of thing:
1. Do I need to rebase first?
2. If I do, are there any final changes needed?

James Smith





Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Thu, 29 Oct 2020 23:41:02 GMT) Full text and rfc822 format available.

Message #32 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: James Smith <jsubuntuxp <at> gmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, James Smith <jsubuntuxp <at> disroot.org>,
 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Fri, 30 Oct 2020 00:39:54 +0100
Hi,

James Smith <jsubuntuxp <at> gmail.com> skribis:

> I have a couple of questions since I'm new to this sort of thing:
> 1. Do I need to rebase first?
> 2. If I do, are there any final changes needed?

Like I wrote, it seems that v2 mostly fits the bill.  The only potential
issue as I see it is the new ‘reset-slade.pk3-timestamps’ phase: I don’t
see what effect it has, like I wrote, so I wonder if it’s necessary.

Tobias, WDYT?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Fri, 30 Oct 2020 09:39:02 GMT) Full text and rfc822 format available.

Message #35 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 44039 <at> debbugs.gnu.org, James Smith <jsubuntuxp <at> disroot.org>,
 James Smith <jsubuntuxp <at> gmail.com>
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Fri, 30 Oct 2020 10:38:42 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès 写道:
> Like I wrote, it seems that v2 mostly fits the bill.  The only 
> potential
> issue as I see it is the new ‘reset-slade.pk3-timestamps’ phase: 
> I don’t
> see what effect it has, like I wrote, so I wonder if it’s 
> necessary.

I need more information to have any opinion :-)

What are you looking at to gauge its effects?  You seem to be 
claiming it has none for you, is that correct?

I build on tmpfs BTW.  Perhaps other file systems could introduce 
more ‘fun’.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Sat, 31 Oct 2020 10:02:02 GMT) Full text and rfc822 format available.

Message #38 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 44039 <at> debbugs.gnu.org, James Smith <jsubuntuxp <at> disroot.org>,
 James Smith <jsubuntuxp <at> gmail.com>
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Sat, 31 Oct 2020 11:01:36 +0100
Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> Ludovic Courtès 写道:
>> Like I wrote, it seems that v2 mostly fits the bill.  The only
>> potential
>> issue as I see it is the new ‘reset-slade.pk3-timestamps’ phase: I
>> don’t
>> see what effect it has, like I wrote, so I wonder if it’s necessary.
>
> I need more information to have any opinion :-)
>
> What are you looking at to gauge its effects?  You seem to be claiming
> it has none for you, is that correct?

I didn’t test it, I’m just noticing that (1) the checkout in the store
has timestamps set to 1, and (2) the ‘unpack’ phase preserves timestamps
when it copies it.

So this phase could only have an effect on files created between the
‘unpack’ phase and the ‘build’ phase I think, unless I’m overlooking
something.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Sat, 15 May 2021 22:16:02 GMT) Full text and rfc822 format available.

Message #41 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: James Smith <jsubuntuxp <at> gmail.com>
To: 44039 <at> debbugs.gnu.org
Subject: Re: [bug#44039] [PATCH] gnu: Add slade.
Date: Sat, 15 May 2021 13:52:34 -0700
Hi,

Has it been decided on whether it's neccessary to use
'reset-slade.pk3-timestamps' yet?

Thanks,
James Smith




Information forwarded to guix-patches <at> gnu.org:
bug#44039; Package guix-patches. (Sat, 18 Sep 2021 17:53:02 GMT) Full text and rfc822 format available.

Message #44 received at 44039 <at> debbugs.gnu.org (full text, mbox):

From: James Smith <jsubuntuxp <at> disroot.org>
To: 44039 <at> debbugs.gnu.org
Cc: James Smith <jsubuntuxp <at> disroot.org>
Subject: [PATCH v3] gnu: Add slade.
Date: Sat, 18 Sep 2021 10:47:12 -0700
* gnu/packages/game-development.scm (slade): New variable.
---
I noticed there was a new release for slade, so I updated the patch and made some minor tweaks to it.

James Smith

 gnu/packages/game-development.scm | 64 ++++++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 40807450ea..7e1f9f4b39 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;; Copyright © 2021 Dmitry Polyakov <polyakov <at> liltechdude.xyz>
+;;; Copyright © 2020-2021 James Smith <jsubuntuxp <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,7 +40,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages game-development)
-  #:use-module (srfi srfi-1)
+  #:use-module ((srfi srfi-1) #:hide (zip))
   #:use-module (ice-9 match)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -55,6 +56,7 @@
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages check)
@@ -99,6 +101,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -447,6 +450,65 @@ GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
 support.")
     (license license:gpl3+)))
 
+(define-public slade
+  (package
+    (name "slade")
+    (version "3.1.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sirjuddington/SLADE")
+             (commit version)))
+       (sha256 (base32 "009yc5m6y074wfalvwbrnv2zsmaf9yhbi8hzgs973di0zqnqv011"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+       (list "-DWX_GTK3=ON" "-DNO_WEBVIEW=ON"
+             (string-append "-DWITH_WXPATH="
+                            (assoc-ref %build-inputs "wxwidgets") "/bin")
+             (string-append "-DwxWidgets_LIBRARIES="
+                            (assoc-ref %build-inputs "wxwidgets") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'reset-slade.pk3-timestamps
+           ;; This is neccessary to make slade reproducible.
+           (lambda _
+             (invoke "find" "../source/dist/res" "-exec" "touch"
+                     "--no-dereference" "-t" "197001010000.00" "{}"
+                     "+")))
+         (add-after 'install 'wrap-with-x11-gdk-backend
+           ;; Set GDK_BACKEND to x11 to prevent crash on Wayland.
+           ;; See https://github.com/sirjuddington/SLADE/issues/1097 for details.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program
+                 (string-append (assoc-ref outputs "out")
+                                "/bin/slade")
+               '("GDK_BACKEND" = ("x11"))))))
+       #:tests? #f)) ;; No test suite.
+    (inputs
+     `(("bash" ,bash-minimal)
+       ("curl" ,curl)
+       ("fluidsynth" ,fluidsynth)
+       ("freeimage" ,freeimage)
+       ("ftgl" ,ftgl)
+       ("glew" ,glew)
+       ("gtk+" ,gtk+)
+       ("sfml" ,sfml)
+       ("wxwidgets" ,wxwidgets-3.1)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("which" ,which)
+       ("zip" ,zip)))
+    (home-page "https://slade.mancubus.net")
+    (synopsis "Doom game data editor")
+    (description "SLADE3 is a modern editor for Doom-engine based games and
+source ports.  It has the ability to view, modify, and write many different game-
+specific formats, and even convert between some of them, or from/to other generic
+formats such as PNG.")
+    (license license:gpl2)))
+
 (define-public tiled
   (package
     (name "tiled")
-- 
2.33.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 22 Sep 2021 14:22:02 GMT) Full text and rfc822 format available.

Notification sent to James Smith <jsubuntuxp <at> disroot.org>:
bug acknowledged by developer. (Wed, 22 Sep 2021 14:22:03 GMT) Full text and rfc822 format available.

Message #49 received at 44039-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: James Smith <jsubuntuxp <at> disroot.org>
Cc: 44039-done <at> debbugs.gnu.org
Subject: Re: bug#44039: [PATCH] gnu: Add slade.
Date: Wed, 22 Sep 2021 16:21:04 +0200
Hi,

James Smith <jsubuntuxp <at> disroot.org> skribis:

> * gnu/packages/game-development.scm (slade): New variable.

Applied, thanks!

After investigating, I found that the ‘reset-slade.pk3-timestamps’ was
necessary due to <https://bugs.gnu.org/44741>, fixed on ‘core-updates’,
so I added a comment mentioning it.

BTW, note that we’d normally use ‘find-files’ & co. instead of invoking
the ‘find’ command.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 21 Oct 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.