From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: Add openttd-engine Date: Thu, 14 Apr 2016 12:04:39 +0300 Message-ID: <87oa9c1ryw.fsf@gmail.com> References: <570C2836.7030100@fripost.org> <20160412010929.GA22784@jasmine> <570D0C58.5050905@fripost.org> <87d1puivr2.fsf@gmail.com> <20160412182458.GB3241@jasmine> <570DAA4B.2000409@fripost.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqdCg-0004ET-Aj for guix-devel@gnu.org; Thu, 14 Apr 2016 05:04:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqdCc-0008WI-2r for guix-devel@gnu.org; Thu, 14 Apr 2016 05:04:46 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:34413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqdCb-0008WB-Ll for guix-devel@gnu.org; Thu, 14 Apr 2016 05:04:42 -0400 Received: by mail-lf0-x242.google.com with SMTP id e190so11121787lfe.1 for ; Thu, 14 Apr 2016 02:04:41 -0700 (PDT) In-Reply-To: <570DAA4B.2000409@fripost.org> (albin@fripost.org's message of "Wed, 13 Apr 2016 04:09:15 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Albin Cc: guix-devel@gnu.org 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