[PATCH] gnu: open-adventure: Update to 1.8.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Nicolas Goaziou
Severity
normal
N
N
Nicolas Goaziou wrote on 14 Jul 2020 16:44
(address . guix-patches@gnu.org)
20200714144424.20954-1-mail@nicolasgoaziou.fr
* gnu/packages/games.scm (open-adventure): Update to 1.8.
[arguments]: Re-activate parallel build. Remove configure phase altogether.
[native-inputs]: Remove linenoise and python. Add libedit, python-wrapper,
and pkg-config.
[description]: Slight rewording.

The package is erroneously versioned as 2.5, which refers to the last release
of the original game. However, this is a forward-port with its own versioning
scheme.
---
gnu/packages/games.scm | 116 +++++++++++++++++++----------------------
1 file changed, 53 insertions(+), 63 deletions(-)

Toggle diff (131 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5de6dbf4ac..7cc3048ee8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6342,71 +6342,61 @@ at their peak of economic growth and military prowess.
license:mpl2.0
license:zlib))))
-;; There have been no official releases.
(define-public open-adventure
- (let* ((commit "d43854f0f6bb8e9eea7fbce80348150e7e7fc34d")
- (revision "2"))
- (package
- (name "open-adventure")
- (version (string-append "2.5-" revision "." (string-take commit 7)))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gitlab.com/esr/open-adventure")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "08bwrvf4axb1rsfd6ia1fddsky9pc1p350vjskhaakg2czc6dsk0"))))
- (build-system gnu-build-system)
- (arguments
- `(#:make-flags (list "CC=gcc")
- #:parallel-build? #f ; not supported
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Linenoise is meant to be included, so we have to
- ;; copy it into the working directory.
- (let* ((linenoise (assoc-ref inputs "linenoise"))
- (noisepath (string-append linenoise "/include/linenoise"))
- (out (assoc-ref outputs "out")))
- (copy-recursively noisepath "linenoise"))
- #t))
- (add-before 'build 'use-echo
- (lambda _
- (substitute* "tests/Makefile"
- (("/bin/echo") (which "echo")))
- #t))
- (add-after 'build 'build-manpage
- (lambda _
- ;; This target is missing a dependency
- (substitute* "Makefile"
- ((".adoc.6:" line)
- (string-append line " advent.adoc")))
- (invoke "make" ".adoc.6")))
- ;; There is no install target
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (man (string-append out "/share/man/man6")))
- (install-file "advent" bin)
- (install-file "advent.6" man))
- #t)))))
- (native-inputs
- `(("asciidoc" ,asciidoc)
- ("linenoise" ,linenoise)
- ("python" ,python)
- ("python-pyyaml" ,python-pyyaml)))
- (home-page "https://gitlab.com/esr/open-adventure")
- (synopsis "Colossal Cave Adventure")
- (description "The original Colossal Cave Adventure from 1976 was the
-origin of all text adventures, dungeon-crawl (computer) games, and
-computer-hosted roleplaying games. This is the last version released by
+ (package
+ (name "open-adventure")
+ (version "1.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/esr/open-adventure")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "12h1n6n4g6izsyb8b3iqxqmhv3sa9ipwnc8ycqn9qsrs2601ry32"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-before 'build 'use-echo
+ (lambda _
+ (substitute* "tests/Makefile"
+ (("/bin/echo") (which "echo")))
+ #t))
+ (add-after 'build 'build-manpage
+ (lambda _
+ ;; This target is missing a dependency
+ (substitute* "Makefile"
+ ((".adoc.6:" line)
+ (string-append line " advent.adoc")))
+ (invoke "make" ".adoc.6")))
+ ;; There is no install target.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (man (string-append out "/share/man/man6")))
+ (install-file "advent" bin)
+ (install-file "advent.6" man))
+ #t)))))
+ (native-inputs
+ `(("asciidoc" ,asciidoc)
+ ("libedit" ,libedit)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-wrapper)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page "https://gitlab.com/esr/open-adventure")
+ (synopsis "Colossal Cave Adventure")
+ (description
+ "The original Colossal Cave Adventure from 1976 was the origin of all
+text adventures, dungeon-crawl (computer) games, and computer-hosted
+roleplaying games. This is a forward port of the last version released by
Crowther & Woods, its original authors, in 1995. It has been known as
-\"adventure 2.5\" and \"430-point adventure\".")
- (license license:bsd-2))))
+``adventure 2.5'' and ``430-point adventure''.")
+ (license license:bsd-2)))
(define-public tome4
(package
--
2.27.0
L
L
Ludovic Courtès wrote on 21 Jul 2020 18:37
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 42354@debbugs.gnu.org)
87r1t4n7so.fsf@gnu.org
Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

Toggle quote (10 lines)
> * gnu/packages/games.scm (open-adventure): Update to 1.8.
> [arguments]: Re-activate parallel build. Remove configure phase altogether.
> [native-inputs]: Remove linenoise and python. Add libedit, python-wrapper,
> and pkg-config.
> [description]: Slight rewording.
>
> The package is erroneously versioned as 2.5, which refers to the last release
> of the original game. However, this is a forward-port with its own versioning
> scheme.

Oh weird. As it stands, ‘guix upgrade’ would not upgrade it because the
new version number is lower than the old one.

But perhaps we can define an open-adventure 2.5 package marked as
superseded by 1.8.

Apart from that, LGTM!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 7 Sep 2020 15:59
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 42354@debbugs.gnu.org)
87wo15hell.fsf@gnu.org
Ping!

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (24 lines)
> Hi,
>
> Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
>
>> * gnu/packages/games.scm (open-adventure): Update to 1.8.
>> [arguments]: Re-activate parallel build. Remove configure phase altogether.
>> [native-inputs]: Remove linenoise and python. Add libedit, python-wrapper,
>> and pkg-config.
>> [description]: Slight rewording.
>>
>> The package is erroneously versioned as 2.5, which refers to the last release
>> of the original game. However, this is a forward-port with its own versioning
>> scheme.
>
> Oh weird. As it stands, ‘guix upgrade’ would not upgrade it because the
> new version number is lower than the old one.
>
> But perhaps we can define an open-adventure 2.5 package marked as
> superseded by 1.8.
>
> Apart from that, LGTM!
>
> Thanks,
> Ludo’.
N
N
Nicolas Goaziou wrote on 7 Sep 2020 21:24
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42354@debbugs.gnu.org)
87mu21qtkd.fsf@nicolasgoaziou.fr
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (3 lines)
>> But perhaps we can define an open-adventure 2.5 package marked as
>> superseded by 1.8.

I don't know how to do the above. Do you have any pointer?

Regards,
--
Nicolas Goaziou
L
L
Ludovic Courtès wrote on 8 Sep 2020 17:46
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 42354@debbugs.gnu.org)
875z8op8yo.fsf@gnu.org
Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

Toggle quote (7 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>>> But perhaps we can define an open-adventure 2.5 package marked as
>>> superseded by 1.8.
>
> I don't know how to do the above. Do you have any pointer?

Yes, see ‘deprecated-package’.

HTH!

Ludo’.
N
N
Nicolas Goaziou wrote on 9 Sep 2020 21:39
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42354@debbugs.gnu.org)
87363qn3il.fsf@nicolasgoaziou.fr
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (13 lines)
> Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>>> But perhaps we can define an open-adventure 2.5 package marked as
>>>> superseded by 1.8.
>>
>> I don't know how to do the above. Do you have any pointer?
>
> Yes, see ‘deprecated-package’.
>
> HTH!

But you cannot deprecate a specific version of a package with this
function, or can you?

I think you lost me here, sorry.

Regards,
--
Nicolas Goaziou
L
L
Ludovic Courtès wrote on 10 Sep 2020 09:46
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 42354@debbugs.gnu.org)
87sgbqjcq5.fsf@gnu.org
Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

Toggle quote (7 lines)
>> Yes, see ‘deprecated-package’.
>>
>> HTH!
>
> But you cannot deprecate a specific version of a package with this
> function, or can you?

Ah well, not exactly with this function, you’re right, but I think you
can do something like:

(define-public open-adventure-1.8
(package
(inherit open-adventure)
(version "1.8")
(properties `((superseded . ,open-adventure)))))

That way “guix install open-adventure@1.8” will emit a deprecation
warning and install the other one.

HTH!

Ludo’.
N
N
Nicolas Goaziou wrote on 13 Sep 2020 15:46
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42354@debbugs.gnu.org)
87tuw1g56c.fsf@nicolasgoaziou.fr
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (12 lines)
> Ah well, not exactly with this function, you’re right, but I think you
> can do something like:
>
> (define-public open-adventure-1.8
> (package
> (inherit open-adventure)
> (version "1.8")
> (properties `((superseded . ,open-adventure)))))
>
> That way “guix install open-adventure@1.8” will emit a deprecation
> warning and install the other one.

Thank you. However, wouldn't this do the exact opposite to what we want
to achieve?

We want to
- "guix install open-adventure" and get open-adventure 1.8, not 2.5,
- "guix upgrade open-adventure" and have open-adventure 1.8 override
2.5.

Do you mean this instead?

(define-public open-adventure-2.5
(package
(inherit open-adventure)
(version "1.8")
(properties `((superseded . ,open-adventure)))))

Meanwhile, I updated Open adventure to 1.9 in my patch.

Regards,
--
Nicolas Goaziou
L
L
Ludovic Courtès wrote on 13 Sep 2020 22:58
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 42354@debbugs.gnu.org)
87363lbdic.fsf@gnu.org
Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

Toggle quote (28 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ah well, not exactly with this function, you’re right, but I think you
>> can do something like:
>>
>> (define-public open-adventure-1.8
>> (package
>> (inherit open-adventure)
>> (version "1.8")
>> (properties `((superseded . ,open-adventure)))))
>>
>> That way “guix install open-adventure@1.8” will emit a deprecation
>> warning and install the other one.
>
> Thank you. However, wouldn't this do the exact opposite to what we want
> to achieve?
>
> We want to
> - "guix install open-adventure" and get open-adventure 1.8, not 2.5,
> - "guix upgrade open-adventure" and have open-adventure 1.8 override
> 2.5.
>
> Do you mean this instead?
>
> (define-public open-adventure-2.5
> (package
> (inherit open-adventure)
> (version "1.8")
^
Should be 2.5.

Toggle quote (2 lines)
> (properties `((superseded . ,open-adventure)))))

That way, “guix upgrade open-adventure” will “downgrade” to 1.8 if
you currently have 2.5.

Ludo’.
N
N
N
Nicolas Goaziou wrote on 26 Nov 2020 18:38
(address . 42354-done@debbugs.gnu.org)
87mtz481da.fsf@nicolasgoaziou.fr
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (2 lines)
> Subject: [PATCH] gnu: open-adventure: Update to 1.9.

Applied. Closing.
Closed
?