From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 62550@debbugs.gnu.org
Cc: 62550-done@debbugs.gnu.org, mirai@makinata.eu,
Yovan Naumovski <yovan@gorski.stream>
Subject: [bug#62550] [PATCH v2] gnu: Add alienblaster.
Date: Fri, 21 Apr 2023 10:59:27 +0200 [thread overview]
Message-ID: <87a5z1626o.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <20230331160346.25800-1-yovan@gorski.stream> (Yovan Naumovski via Guix-patches via's message of "Fri, 31 Mar 2023 19:03:46 +0300")
Hello,
Yovan Naumovski via Guix-patches via <guix-patches@gnu.org> writes:
> * gnu/packages/games.scm (alienblaster): New variable.
Thank you. I applied your patch with the following changes.
> + (uri (string-append "http://www.schwardtnet.de/alienblaster/archives/"
> + name "-" version ".tgz"))
I replaced name with alienblaster.
> + (sha256
> + (base32
> + "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
> + (build-system gnu-build-system)
> + (inputs (list sdl sdl-mixer))
Nitpick: I moved inputs after arguments… out of habit.
> + (arguments
> + (list
> + #:tests? #f ; no tests
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'fix-sdl-paths
> + (lambda _
> + (let ((share (string-append #$output "/share")))
> + ;; fix name and append path to SDL_mixer.h
Nitpick: I used proper capitalization and typography (missing final
full stop).
> + (substitute* "src/Makefile"
> + (("GAME_NAME=alienBlaster")
> + "GAME_NAME=alienblaster")
> + (("SDL_FLAGS=\\$\\(shell sdl-config --cflags\\)" line)
> + (string-append line " -I" #$sdl-mixer "/include/SDL")))
I replace #$sdl-mixer with #$(this-package-inputs "sdl-mixer") for
compatibility with package transformations.
> + ;; substitute relative paths in .cfg and source/header files
Nitpick: Here too, I slightly reformatted the comment.
> + (substitute* (find-files "./cfg")
> + (("(\\./)?images") (string-append share "/images")))
> + (substitute* (list "src/global.h" "src/global.cc")
> + (("./images") (string-append share "/images"))
> + (("./sound") (string-append share "/sound"))
> + (("./cfg") (string-append share "/cfg"))))))
> +
> + (delete 'configure)
> +
> + (replace 'install
> + (lambda _
> + (let ((bin (string-append #$output "/bin")))
> + (install-file "alienblaster" bin)
> + (for-each
> + (lambda (dir)
> + (copy-recursively dir (string-append #$output "/share/" dir)))
> + '("images" "sound" "cfg")))
> + #t)))))
I removed the trailing #T, which is not necessary in new package style.
Regards,
--
Nicolas Goaziou
prev parent reply other threads:[~2023-04-21 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 19:26 [bug#62550] [PATCH] gnu: Add alienblaster Yovan Naumovski via Guix-patches via
2023-03-31 10:41 ` Bruno Victal
2023-03-31 16:03 ` [bug#62550] [PATCH v2] " Yovan Naumovski via Guix-patches via
2023-04-21 8:59 ` Nicolas Goaziou [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5z1626o.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=62550-done@debbugs.gnu.org \
--cc=62550@debbugs.gnu.org \
--cc=mirai@makinata.eu \
--cc=yovan@gorski.stream \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).