GNU bug report logs - #76673
[PATCH] gnu: Add opensludge.

Previous Next

Package: guix-patches;

Reported by: Adam Faiz <adam.faiz <at> disroot.org>

Date: Sun, 2 Mar 2025 04:15:03 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 76673 AT debbugs.gnu.org.

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#76673; Package guix-patches. (Sun, 02 Mar 2025 04:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adam Faiz <adam.faiz <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 02 Mar 2025 04:15:04 GMT) Full text and rfc822 format available.

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

From: Adam Faiz <adam.faiz <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 宋文武 <iyzsong <at> envs.net>
Subject: [PATCH] gnu: Add opensludge.
Date: Sun, 2 Mar 2025 12:14:10 +0800
From 0300d45e1508ba1e763e07c71f202ba54180e368 Mon Sep 17 00:00:00 2001
Message-ID: <0300d45e1508ba1e763e07c71f202ba54180e368.1740888495.git.adam.faiz <at> disroot.org>
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Sun, 2 Mar 2025 12:00:30 +0800
Subject: [PATCH] gnu: Add opensludge.

* gnu/packages/patches/opensludge-support-datadir-variable.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/game-development.scm (opensludge): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/game-development.scm             | 51 +++++++++++++++++++
 .../opensludge-support-datadir-variable.patch | 33 ++++++++++++
 3 files changed, 85 insertions(+)
 create mode 100644 gnu/packages/patches/opensludge-support-datadir-variable.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2ea3763d40..b7401b794d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1958,6 +1958,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/openscad-with-cgal-5.3.patch		\
   %D%/packages/patches/openscad-with-cgal-5.4.patch		\
   %D%/packages/patches/opensles-add-license-file.patch			\
+  %D%/packages/patches/opensludge-support-datadir-variable.patch	\
   %D%/packages/patches/openssl-1.1-c-rehash-in.patch		\
   %D%/packages/patches/openssl-3.0-c-rehash-in.patch		\
   %D%/packages/patches/openssl-hurd64.patch			\
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index e014089c23..00b76ac21f 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2955,6 +2955,57 @@ (define-public instead
             (files '("share/instead/games")))))
     (license license:expat)))
 
+(define-public opensludge
+  (let ((commit "a247b3669d41b3c2de0d06b88fc3e21ad4898a47")
+        (revision "0"))
+  (package
+    (name "opensludge")
+    (version (git-version "2.2.2" revision commit))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/opensludge/opensludge")
+             (commit commit)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1kl763j98398y1cbj36m45jbkwir7nj4wrq2sb6gl9vx90ipvsyg"))
+       (patches (search-patches "opensludge-support-datadir-variable.patch"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin
+            (substitute* "configure.ac"
+              (("openal") "libmodplug libmpg123 openal"))))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "--enable-devkit")
+           #:make-flags
+           #~(list "CXXFLAGS=-g")))
+    (native-inputs (list autoconf automake pkg-config))
+    (inputs
+     (list alure
+           dumb
+           flac
+           openal
+           glew
+           glib
+           gtk+-2
+           gtkglext
+           libmodplug
+           libogg
+           libpng
+           libvorbis
+           libvpx
+           mpg123
+           sdl12-compat))
+    (synopsis "Adventure game engine")
+    (description
+     "SLUDGE is a game development toolkit for making point-and-click style
+adventure games.")
+    (home-page "https://opensludge.github.io/")
+    (license license:gpl3+))))
+
 (define-public openvr
   (package
     (name "openvr")
diff --git a/gnu/packages/patches/opensludge-support-datadir-variable.patch b/gnu/packages/patches/opensludge-support-datadir-variable.patch
new file mode 100644
index 0000000000..05cd88ec71
--- /dev/null
+++ b/gnu/packages/patches/opensludge-support-datadir-variable.patch
@@ -0,0 +1,33 @@
+From 6ec17f5595def22b0f7e4c2020571d3bd631e6dc Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
+Date: Sun, 2 Mar 2025 09:53:31 +0800
+Subject: [PATCH] opensludge: Support SLUDGE_DATADIR environment variable.
+
+This patch is from the Robin's Rescue game, and rebased on the latest
+commit:
+https://gitlab.com/Cheeseness/robins-rescue/-/raw/master/sludge/source_changes/main.cpp.diff
+---
+ source/Engine/main.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/source/Engine/main.cpp b/source/Engine/main.cpp
+index d3b9951..1418bbc 100755
+--- a/source/Engine/main.cpp
++++ b/source/Engine/main.cpp
+@@ -298,7 +298,12 @@ int main(int argc, char *argv[]) try
+ #ifdef __APPLE__
+ 	// bundleFolder is set in applicationDidFinishLaunching.
+ #elif defined __unix__
+-	bundleFolder = copyString(DATADIR);	// DATADIR is defined in the Makefile.
++	bundleFolder = getenv("SLUDGE_DATADIR");
++	if (bundleFolder == NULL)
++	  {
++	    bundleFolder = copyString(DATADIR);     // DATADIR is defined in the Makefile.
++	    fprintf(stderr, "SLUDGE_DATADIR not found, defaulting to %s\n", bundleFolder);
++	  }
+ #else
+ 	bundleFolder = copyString(argv[0]);
+ 	int lastSlash = -1;
+-- 
+2.46.0
+

base-commit: 4b5f0408e66392ab745dc0f7830732217d88f17d
-- 
2.46.0




Information forwarded to guix-patches <at> gnu.org:
bug#76673; Package guix-patches. (Sun, 02 Mar 2025 04:35:02 GMT) Full text and rfc822 format available.

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

From: Adam Faiz <adam.faiz <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 宋文武 <iyzsong <at> envs.net>
Subject: [PATCH v1] gnu: Add opensludge.
Date: Sun, 2 Mar 2025 12:33:49 +0800
From fbc30833380544ce6db791046dca575923cd5e75 Mon Sep 17 00:00:00 2001
Message-ID: <fbc30833380544ce6db791046dca575923cd5e75.1740889796.git.adam.faiz <at> disroot.org>
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Sun, 2 Mar 2025 12:00:30 +0800
Subject: [PATCH v1] gnu: Add opensludge.

* gnu/packages/patches/opensludge-support-datadir-variable.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/game-development.scm (opensludge): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/game-development.scm             | 51 +++++++++++++++++++
 .../opensludge-support-datadir-variable.patch | 33 ++++++++++++
 3 files changed, 85 insertions(+)
 create mode 100644 gnu/packages/patches/opensludge-support-datadir-variable.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2ea3763d40..b7401b794d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1958,6 +1958,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/openscad-with-cgal-5.3.patch		\
   %D%/packages/patches/openscad-with-cgal-5.4.patch		\
   %D%/packages/patches/opensles-add-license-file.patch			\
+  %D%/packages/patches/opensludge-support-datadir-variable.patch	\
   %D%/packages/patches/openssl-1.1-c-rehash-in.patch		\
   %D%/packages/patches/openssl-3.0-c-rehash-in.patch		\
   %D%/packages/patches/openssl-hurd64.patch			\
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index e014089c23..364aac79c3 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2955,6 +2955,57 @@ (define-public instead
             (files '("share/instead/games")))))
     (license license:expat)))
 
+(define-public opensludge
+  (let ((commit "a247b3669d41b3c2de0d06b88fc3e21ad4898a47")
+        (revision "0"))
+  (package
+    (name "opensludge")
+    (version (git-version "2.2.2" revision commit))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/opensludge/opensludge")
+             (commit commit)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1kl763j98398y1cbj36m45jbkwir7nj4wrq2sb6gl9vx90ipvsyg"))
+       (patches (search-patches "opensludge-support-datadir-variable.patch"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin
+            (substitute* "configure.ac"
+              (("openal") "flac libmodplug libmpg123 openal"))))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "--enable-devkit")
+           #:make-flags
+           #~(list "CXXFLAGS=-g")))
+    (native-inputs (list autoconf automake pkg-config))
+    (inputs
+     (list alure
+           dumb
+           flac
+           openal
+           glew
+           glib
+           gtk+-2
+           gtkglext
+           libmodplug
+           libogg
+           libpng
+           libvorbis
+           libvpx
+           mpg123
+           sdl12-compat))
+    (synopsis "Adventure game engine")
+    (description
+     "SLUDGE is a game development toolkit for making point-and-click style
+adventure games.")
+    (home-page "https://opensludge.github.io/")
+    (license license:gpl3+))))
+
 (define-public openvr
   (package
     (name "openvr")
diff --git a/gnu/packages/patches/opensludge-support-datadir-variable.patch b/gnu/packages/patches/opensludge-support-datadir-variable.patch
new file mode 100644
index 0000000000..05cd88ec71
--- /dev/null
+++ b/gnu/packages/patches/opensludge-support-datadir-variable.patch
@@ -0,0 +1,33 @@
+From 6ec17f5595def22b0f7e4c2020571d3bd631e6dc Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
+Date: Sun, 2 Mar 2025 09:53:31 +0800
+Subject: [PATCH] opensludge: Support SLUDGE_DATADIR environment variable.
+
+This patch is from the Robin's Rescue game, and rebased on the latest
+commit:
+https://gitlab.com/Cheeseness/robins-rescue/-/raw/master/sludge/source_changes/main.cpp.diff
+---
+ source/Engine/main.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/source/Engine/main.cpp b/source/Engine/main.cpp
+index d3b9951..1418bbc 100755
+--- a/source/Engine/main.cpp
++++ b/source/Engine/main.cpp
+@@ -298,7 +298,12 @@ int main(int argc, char *argv[]) try
+ #ifdef __APPLE__
+ 	// bundleFolder is set in applicationDidFinishLaunching.
+ #elif defined __unix__
+-	bundleFolder = copyString(DATADIR);	// DATADIR is defined in the Makefile.
++	bundleFolder = getenv("SLUDGE_DATADIR");
++	if (bundleFolder == NULL)
++	  {
++	    bundleFolder = copyString(DATADIR);     // DATADIR is defined in the Makefile.
++	    fprintf(stderr, "SLUDGE_DATADIR not found, defaulting to %s\n", bundleFolder);
++	  }
+ #else
+ 	bundleFolder = copyString(argv[0]);
+ 	int lastSlash = -1;
+-- 
+2.46.0
+

base-commit: 4b5f0408e66392ab745dc0f7830732217d88f17d
-- 
2.46.0




This bug report was last modified 205 days ago.

Previous Next


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