GNU bug report logs - #62550
[PATCH] gnu: Add alienblaster.

Previous Next

Package: guix-patches;

Reported by: Yovan Naumovski <yovan <at> gorski.stream>

Date: Thu, 30 Mar 2023 19:28:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 62550 <at> debbugs.gnu.org
Cc: 62550-done <at> debbugs.gnu.org, mirai <at> makinata.eu, Yovan Naumovski <yovan <at> gorski.stream>
Subject: [bug#62550] [PATCH v2] gnu: Add alienblaster.
Date: Fri, 21 Apr 2023 10:59:27 +0200
Hello,

Yovan Naumovski via Guix-patches via <guix-patches <at> 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




This bug report was last modified 2 years and 31 days ago.

Previous Next


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