guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: Add openttd-engine


From: Alex Kost
Subject: Re: [PATCH] gnu: Add openttd-engine
Date: Thu, 14 Apr 2016 12:04:39 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Albin (2016-04-13 05:09 +0300) wrote:

> Here is a new patch for OpenTTD.
>
> I have
>
> * changed the name to openttd-engine (so that we can later add game data
> as companion packages),

I'm going to make this 'openttd-engine' variable private and to add the
following lines after it (I'm not sure if I should do it in a separate
commit):

--8<---------------cut here---------------start------------->8---
;; TODO Add 'openttd-opengfx' and 'openttd-opensfx' packages and make
;; 'openttd' a wrapper around them.  The engine is playable by itself,
;; but it asks a user to download graphics if it's not found.

(define-public openttd
  (package
    (inherit openttd-engine)
    (name "openttd")))
--8<---------------cut here---------------end--------------->8---

So you are welcome to add these graphics/sound packages if you wish :-)

> * removed the "Unix"->"GNU" hack,
> * enabled 'lzo',
> * added more licenses,
> * rephrased a few comments,
> * modified the commit message.

OK, thanks for your great work on this package!

I'm going to commit it in a day or two if there will be no other
comments.

No need to resend the patch, I will adjust it as I mentioned and also
for the following nitpicks:

[...]
> +(define-public openttd-engine
> +  (package
> +    (name "openttd-engine")
> +    (version "1.6.0")
> +    (source
> +     (origin (method url-fetch)
> +             (uri (string-append "http://binaries.openttd.org/releases/";
> +                                 version "/openttd-" version 
> "-source.tar.xz"))
> +             (sha256
> +              (base32
> +               "1cjf9gz7d0sn7893wv9d00q724sxv3d81bgb0c5f5ppz2ssyc4jc"))
> +             (modules '((guix build utils)))
> +             (snippet
> +              '(begin
> +                 ;; The DOS port contains proprietary software.
> +                 (delete-file-recursively "os/dos")))))

No need to use 'begin' here.

> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f ;; no "check" target.

It is a convention to use ";" for marginal comments and ";;" for
comments that are placed on separate lines.

> +       #:phases
> +       (modify-phases %standard-phases
> +         ;; The build process fails if the configure script is passed the
> +         ;; option "--enable-fast-install".
> +         (replace 'configure
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (lzo (assoc-ref inputs "lzo")))
> +               (zero?
> +                (system* "./configure"
> +                         (string-append "--prefix=" out)
> +                         ;; Provide the "lzo" path.
> +                         (string-append "--with-liblzo2="
> +                                        lzo "/lib/liblzo2.a")
> +                         ;; Put the symlink to the binary in
> +                         ;; ".guix-profile/bin/".

I prefer your previous commentary:

;; Put the binary in 'bin' instead of 'games'.

> +                         "--binary-dir=bin"))))))))
> +    (native-inputs `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("allegro" ,allegro-4)
> +       ("fontconfig" ,fontconfig)
> +       ("freetype" ,freetype)
> +       ("icu4c" ,icu4c)
> +       ("libpng" ,libpng)
> +       ("lzo" ,lzo)
> +       ("sdl" ,sdl)
> +       ("xz" ,xz)
> +       ("zlib" ,zlib)))
> +    (synopsis "Transportation economics simulator")
> +    (description "OpenTTD is a game in which you transport goods and
> +passengers by land, water and air.  It is a re-implementation of Transport
> +Tycoon Deluxe with many enhancements including multiplayer mode,
> +internationalization support, conditional orders and the ability to clone,
> +autoreplace and autoupdate vehicles.")
> +    (home-page "http://openttd.org/";)
> +    ;; This package is GPLv2, except for a few files located in
> +    ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib
> +    ;; licenses.  In addition, this software contains an in-game downloader
> +    ;; from which the user may find non-functional data licensed under
> +    ;; different terms.
> +    (license (list license:bsd-3 license:gpl2 license:lgpl2.1+ 
> license:zlib))))
> +
>  (define-public pinball
>    (package
>      (name "pinball")

-- 
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]