Message ID | e2109bb2-0065-1af4-cf7c-68bad8e987fe@disroot.org |
---|---|
State | New |
Headers | show |
Series | [bug#64787,v1,1/2] gnu: Add scummc. | expand |
Am Samstag, dem 22.07.2023 um 23:30 +0800 schrieb Adam Faiz: > From 4ae5c4a4de15f4fb7fcd165e3e619e356051b049 Mon Sep 17 00:00:00 > 2001 > Message-ID: > <4ae5c4a4de15f4fb7fcd165e3e619e356051b049.1690039034.git.adam.faiz@di > sroot.org> > In-Reply-To: > <ae75dfc3f9fa840f014b23809132540b955e189b.1690039034.git.adam.faiz@di > sroot.org> > References: > <ae75dfc3f9fa840f014b23809132540b955e189b.1690039034.git.adam.faiz@di > sroot.org> > From: AwesomeAdam54321 <adam.faiz@disroot.org> > Date: Sat, 22 Jul 2023 15:38:48 +0800 > Subject: [PATCH v1 2/2] gnu: Add openquest. > > * gnu/packages/games.scm (openquest): New variable. > --- Note: tagging revisions as v1 appears to mess with mumi, so don't. > gnu/packages/games.scm | 62 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 62 insertions(+) > > diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm > index c388314771..39fbfc195f 100644 > --- a/gnu/packages/games.scm > +++ b/gnu/packages/games.scm > @@ -5094,6 +5094,68 @@ (define openrct2-objects > "openrct2-objects is a set of objects for OpenRCT2.") > (license license:gpl3+))) > > +(define-public openquest > + (package > + (name "openquest") > + (version "1.0") > + (source (package-source scummc)) You should replicate the source here. The source field is not lazy, which means it can lead to breakages when stuff goes cross modules. > + (build-system gnu-build-system) > + (arguments > + (substitute-keyword-arguments (package-arguments scummc) > + ((#:make-flags _) > + #~(list "SCC=scc" > + "SLD=sld" > + "COST=cost" > + "CHAR=char" > + "SOUN=soun")) > + ((#:phases phases) > + #~(modify-phases #$phases > + (replace 'build > + (lambda* (#:key make-flags #:allow-other-keys) > + (with-directory-excursion "examples/openquest" > + (apply invoke "make" "tentacle" make-flags)))) > + (add-after 'install 'install-executable > + (lambda* (#:key inputs #:allow-other-keys) > + ;; Create standalone executable. > + (let* ((bash (search-input-file inputs "/bin/bash")) > + (share (string-append #$output > "/examples/openquest")) > + (scummvm (search-input-file inputs > "/bin/scummvm")) > + (bin (string-append #$output "/bin")) > + (executable (string-append bin > "/openquest"))) > + (mkdir-p bin) > + (with-output-to-file executable > + (lambda () > + (format #t "#!~a~%" bash) > + (format #t > + "exec ~a --path=~a tentacle~%" > + scummvm share))) > + (chmod executable #o755)))) > + (add-after 'install-executable 'install-desktop-file > + (lambda _ > + ;; Create desktop file. There is no official icon, > + ;; but the main character of the game is a good > choice. > + (let ((apps (string-append #$output > "/share/applications"))) > + (mkdir-p apps) > + (make-desktop-entry-file > + (string-append apps "/openquest.desktop") > + #:name "OpenQuest" > + #:generic-name "OpenQuest" > + #:exec (string-append #$output "/bin/openquest") > + #:icon (string-append #$output > "/examples/openquest/graphics/zob/frames/stand_S.bmp") > + #:categories '("AdventureGame" "Game" > "RolePlaying") > + #:keywords '("game" "adventure" "roleplaying" > "2D" "sci-fi") > + #:comment '((#f "Simple 2D point and click > adventure game")))))))))) > + (native-inputs > + (modify-inputs (package-native-inputs scummc) > + (prepend scummc))) > + (inputs > + (list bash scummvm)) > + (home-page "https://www.scummvm.org") > + (synopsis "Simple 2D point and click adventure game") > + (description "OpenQuest is a two room adventure game > +that follows two aliens who come to Earth in search of a stolen > artifact.") > + (license license:gpl2+))) > + Cheers
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index c388314771..39fbfc195f 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -5094,6 +5094,68 @@ (define openrct2-objects "openrct2-objects is a set of objects for OpenRCT2.") (license license:gpl3+))) +(define-public openquest + (package + (name "openquest") + (version "1.0") + (source (package-source scummc)) + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments scummc) + ((#:make-flags _) + #~(list "SCC=scc" + "SLD=sld" + "COST=cost" + "CHAR=char" + "SOUN=soun")) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (with-directory-excursion "examples/openquest" + (apply invoke "make" "tentacle" make-flags)))) + (add-after 'install 'install-executable + (lambda* (#:key inputs #:allow-other-keys) + ;; Create standalone executable. + (let* ((bash (search-input-file inputs "/bin/bash")) + (share (string-append #$output "/examples/openquest")) + (scummvm (search-input-file inputs "/bin/scummvm")) + (bin (string-append #$output "/bin")) + (executable (string-append bin "/openquest"))) + (mkdir-p bin) + (with-output-to-file executable + (lambda () + (format #t "#!~a~%" bash) + (format #t + "exec ~a --path=~a tentacle~%" + scummvm share))) + (chmod executable #o755)))) + (add-after 'install-executable 'install-desktop-file + (lambda _ + ;; Create desktop file. There is no official icon, + ;; but the main character of the game is a good choice. + (let ((apps (string-append #$output "/share/applications"))) + (mkdir-p apps) + (make-desktop-entry-file + (string-append apps "/openquest.desktop") + #:name "OpenQuest" + #:generic-name "OpenQuest" + #:exec (string-append #$output "/bin/openquest") + #:icon (string-append #$output "/examples/openquest/graphics/zob/frames/stand_S.bmp") + #:categories '("AdventureGame" "Game" "RolePlaying") + #:keywords '("game" "adventure" "roleplaying" "2D" "sci-fi") + #:comment '((#f "Simple 2D point and click adventure game")))))))))) + (native-inputs + (modify-inputs (package-native-inputs scummc) + (prepend scummc))) + (inputs + (list bash scummvm)) + (home-page "https://www.scummvm.org") + (synopsis "Simple 2D point and click adventure game") + (description "OpenQuest is a two room adventure game +that follows two aliens who come to Earth in search of a stolen artifact.") + (license license:gpl2+))) + (define-public openrct2 (package (name "openrct2")
From 4ae5c4a4de15f4fb7fcd165e3e619e356051b049 Mon Sep 17 00:00:00 2001 Message-ID: <4ae5c4a4de15f4fb7fcd165e3e619e356051b049.1690039034.git.adam.faiz@disroot.org> In-Reply-To: <ae75dfc3f9fa840f014b23809132540b955e189b.1690039034.git.adam.faiz@disroot.org> References: <ae75dfc3f9fa840f014b23809132540b955e189b.1690039034.git.adam.faiz@disroot.org> From: AwesomeAdam54321 <adam.faiz@disroot.org> Date: Sat, 22 Jul 2023 15:38:48 +0800 Subject: [PATCH v1 2/2] gnu: Add openquest. * gnu/packages/games.scm (openquest): New variable. --- gnu/packages/games.scm | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+)