From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KGWaIyI+il+1ewAA0tVLHw (envelope-from ) for ; Sat, 17 Oct 2020 00:43:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UHl2HyI+il//TwAAbx9fmQ (envelope-from ) for ; Sat, 17 Oct 2020 00:43:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C1DFE9404C5 for ; Sat, 17 Oct 2020 00:43:13 +0000 (UTC) Received: from localhost ([::1]:44970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTaJU-0002Ok-Q5 for larch@yhetil.org; Fri, 16 Oct 2020 20:43:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTaJK-0002OW-A0 for guix-patches@gnu.org; Fri, 16 Oct 2020 20:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTaJK-0005Is-0G for guix-patches@gnu.org; Fri, 16 Oct 2020 20:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kTaJJ-0003lz-Um for guix-patches@gnu.org; Fri, 16 Oct 2020 20:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44039] [PATCH] gnu: Add slade. Resent-From: James Smith Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Oct 2020 00:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44039 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 44039@debbugs.gnu.org, jsubuntuxp@disroot.org X-Debbugs-Original-Cc: guix-patches@gnu.org, James Smith , 44039@debbugs.gnu.org Received: via spool by 44039-submit@debbugs.gnu.org id=B44039.160289532214411 (code B ref 44039); Sat, 17 Oct 2020 00:43:01 +0000 Received: (at 44039) by debbugs.gnu.org; 17 Oct 2020 00:42:02 +0000 Received: from localhost ([127.0.0.1]:32977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTaII-0003k2-Ez for submit@debbugs.gnu.org; Fri, 16 Oct 2020 20:42:02 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTaIF-0003js-Sd for 44039@debbugs.gnu.org; Fri, 16 Oct 2020 20:41:57 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8B85D51C76; Sat, 17 Oct 2020 02:41:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cDXnHwY_xjJH; Sat, 17 Oct 2020 02:41:52 +0200 (CEST) Date: Sat, 17 Oct 2020 00:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1602895312; bh=t7Ptn66AQUShh5Vqto8D/cOxXPKh4Ysw+vWb1Kh93bA=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=bpHJ0kEyrGckzQWF3Ubhhf9LU6ibDTV1nTZOsAODh5CHIcmdXX2NW3XcyHOMriJr5 9rShnBQczlXJqHQRE0WPJWzu2lf7j7Wrv3SK5DShPuYfWbSUehxMLoHlbNUdntbliv mODsESsl0dICbAKf/QdiprXL2EoMi71xVYU6WBos1024LlK8ykiO2wpSyYqN1NR0Ts BKztfplPuKnEYlQY8IMVZUffavqI1LvOcuJOS9GY3FwuoHbLNhLJidGMyBfiuLniaR Qb8Kh1ru/vmfPWj4LGpOOhU497WgQQsB6+XHQ4cNi4yJUZA6WBjy8huipAIYPpSnIt lSpMvkMyclYGw== From: James Smith Message-ID: <0f10b54f-81a1-4de4-af81-7cb06ac0c865@disroot.org> In-Reply-To: <87zh4lanh9.fsf@nckx> References: <20201016184333.1445-1-jsubuntuxp@disroot.org> <87zh4lanh9.fsf@nckx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_32_214994488.1602895310600" X-Correlation-ID: <0f10b54f-81a1-4de4-af81-7cb06ac0c865@disroot.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=disroot.org header.s=mail header.b=bpHJ0kEy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disroot.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: Nl3DaUGvqeLg ------=_Part_32_214994488.1602895310600 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Tobias, On Fri, 16 Oct 2020 14:07:46 -0700, Tobias Geerinckx-Rice wrote: > =20 >> +(define-public slade >>=20 > Let's keep modules vaguely alphabetical.=C2=A0 Could you move this above >=20 > =E2=80=98tiled=E2=80=99? >=20 Sure thing, I didn't see anything in the manual about sorting alphabeticall= y and other definitions weren't in order either. > =20 >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (add-after 'install 'p= atch-gdk-backend >>=20 > Nitpick: it's not patching anything. >=20 Now that you point that out, patch wasn't the word I was looking for. > =20 >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 `("GDK_BACKEND" "" =3D (,"x11"))) >>=20 > This works but the "" and , are redundant. >=20 Thanks for pointing that out, I didn't see any existing examples doing it t= hat way. > All in all, the phase can be rewritten as: >=20 > (add-after 'install 'wrap-with-x11-gdk-backend >=20 > ;; Set GDK_BACKEND to x11 to prevent crash on Wayland. >=20 > See >=20 > ;; https://github.com/sirjuddington/SLADE/issues/1097 >=20 > for details. >=20 > (lambda* (#:key outputs #:allow-other-keys) >=20 > (wrap-program >=20 > (string-append (assoc-ref outputs "out") >=20 > "/bin/slade") >=20 > '("GDK_BACKEND" =3D ("x11"))) >=20 > #t))) >=20 Done. > =20 >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:tests? #f)) >>=20 > Are there no tests at all?=C2=A0 If so, note in a comment: >=20 > #:tests? #f))=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ; no test suite >=20 Yeah, no tests. > There's one more problem: >=20 > set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X -UN=3DUTF8 -9 -r \ >=20 > "${CMAKE_BINARY_DIR}/slade.pk3" .) >=20 > Even zip -X won't create an identical archive on every run.=C2=A0 There >=20 > doesn't seem to be an option to do so.=C2=A0 The result: >=20 > --- /gnu/store/aaa-slade-3.1.12a/share/slade3/slade.pk3 >=20 > +++ /gnu/store/bbb-slade-3.1.12a/share/slade3/slade.pk3 >=20 > Zip file size: 3624588 bytes, number of entries: 768 >=20 > -drwxr-xr-x=C2=A0 3.0 unx=C2=A0 0 b- stor 20-Oct-16 19:17 html/ >=20 > -drwxr-xr-x=C2=A0 3.0 unx=C2=A0 0 b- stor 20-Oct-16 19:17 config/ >=20 > -drwxr-xr-x=C2=A0 3.0 unx=C2=A0 0 b- stor 20-Oct-16 19:17 config/colours/ >=20 > +drwxr-xr-x=C2=A0 3.0 unx=C2=A0 0 b- stor 20-Oct-16 19:31 html/ >=20 > +drwxr-xr-x=C2=A0 3.0 unx=C2=A0 0 b- stor 20-Oct-16 19:31 config/ >=20 > +drwxr-xr-x=C2=A0 3.0 unx=C2=A0 0 b- stor 20-Oct-16 19:31 config/colours/ >=20 > This is not ideal: Guix aims for reproducible builds. >=20 I didn't think to check zip-compressed files. > The following made multiple builds on one machine identical, but was >=20 > not consistent between file systems, probably due to readdir order: >=20 > + (add-before 'build 'reset-slade.pk3-timestamps >=20 > +=C2=A0=C2=A0 ;; This appears sufficient to make slade.pk3 reproducible. >=20 > +=C2=A0=C2=A0 (lambda _ >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0 (invoke "find" "../source/dist/res" "-exec" "to= uch" >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= "--no-dereference" "-t" "197001010000.00" "{}" "+"))) >=20 > I suppose I could try using find to sort the files before invoking >=20 > zip, or something.=C2=A0 Thoughts? >=20 Unless there's a better way, let's do that. Thanks for your help, James Smith ------=_Part_32_214994488.1602895310600 Content-Type: text/plain; charset=UTF-8; name=v2-0001-gnu-Add-slade.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=v2-0001-gnu-Add-slade.patch >From 5035bc25a050ce6f81538000b59df05fb02b7e65 Mon Sep 17 00:00:00 2001 From: James Smith Date: Fri, 16 Oct 2020 11:24:14 -0700 Subject: [PATCH v2] gnu: Add slade. * gnu/packages/game-development.scm (slade): New variable. --- gnu/packages/game-development.scm | 63 ++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-developm= ent.scm index 96ed2f9da4..807b37b4e6 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -20,6 +20,7 @@ ;;; Copyright =C2=A9 2020 Nicolas Goaziou ;;; Copyright =C2=A9 2020 Timotej Lazar ;;; Copyright =C2=A9 2020 Giacomo Leidi +;;; Copyright =C2=A9 2020 James Smith ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,7 +38,7 @@ ;;; along with GNU Guix. If not, see . =20 (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) @@ -441,6 +443,65 @@ GUI toolkit, lighting and physics frameworks and @code= {Tiled} TMX format support.") (license license:gpl3+))) =20 +(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 "1q37pqibnrbdd7zjx7h2kfi0q9nc63cc96q9ya4x3fvsrf64n6= yd")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + '(#:configure-flags + (list "-DWX_GTK3=3DON" "-DNO_WEBVIEW=3DON" + (string-append "-DWITH_WXPATH=3D" + (assoc-ref %build-inputs "wxwidgets") "/bin") + (string-append "-DwxWidgets_LIBRARIES=3D" + (assoc-ref %build-inputs "wxwidgets") "/lib")) + #:phases + (modify-phases %standard-phases + (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" "{}" + "+"))) + (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 d= etails. + (lambda* (#:key outputs #:allow-other-keys) + (wrap-program + (string-append (assoc-ref outputs "out") + "/bin/slade") + '("GDK_BACKEND" =3D ("x11"))) + #t))) + #:tests? #f)) ;; No test suite. + (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 an= d +source ports. It has the ability to view, modify, and write many differen= t 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") --=20 2.28.0 ------=_Part_32_214994488.1602895310600--