From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: [PATCH] gnu: Add laby. Date: Sun, 06 Mar 2016 23:01:42 +0100 Message-ID: <87twkjmfjt.fsf@drakenvlieg.flower> References: <87egcleiig.fsf@gnu.org> <87fux1y0vg.fsf@dustycloud.org> <20160211221839.73cf23b5@debian-netbook> <87k2madh1x.fsf@gnu.org> <20160212180905.GA8954@debian> <87pow19gii.fsf@gnu.org> <20160213084329.GA10278@debian> <878u2oaeh4.fsf@gnu.org> <20160213141621.GA1915@debian> <87h9hc8h0f.fsf@gnu.org> <20160306192722.GB20309@solar> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acgkX-0007Hz-5B for guix-devel@gnu.org; Sun, 06 Mar 2016 17:02:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acgkT-00012S-TO for guix-devel@gnu.org; Sun, 06 Mar 2016 17:02:05 -0500 In-Reply-To: <20160306192722.GB20309@solar> (Andreas Enge's message of "Sun, 6 Mar 2016 20:27:22 +0100") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andreas Enge Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Andreas Enge writes: > I am afraid that my digression on unison has made us forget laby. If I > remember well, you had a package more or less ready? Could you maybe > send the patch again? Thanks for the ping. It was hanging on gdkpixbuf svg image loading. That does not work for me. I added a workaround patch to generate pngs. Then I looked into gtk+-2 and librsvg... I thought the svg loading problem in gtk+-2 was something that I introduced, but it turns out that no svg images load at all for me. (I ran guix's emacs and turned-on emacs's toolbar.) So, I am kind of stuck and am waiting for more insight into the svg problem. Meanwhile, find what works for me attached. I intend to get rid of the png patch again when svg works. Greetings, Jan --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-laby.patch Content-Transfer-Encoding: quoted-printable >From 1ba0936f1bce648d13c0c7da40f545431aac2388 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 7 Feb 2016 12:57:40 +0100 Subject: [PATCH] gnu: Add laby. * gnu/packages/patches/laby-make-install.patch: New file. * gnu/packages/patches/laby-make-png.patch: New file. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/games.scm (laby): New variable. --- gnu-system.am | 2 ++ gnu/packages/games.scm | 45 ++++++++++++++++++++++++= ++++ gnu/packages/patches/laby-make-install.patch | 25 ++++++++++++++++ gnu/packages/patches/laby-make-png.patch | 27 +++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 gnu/packages/patches/laby-make-install.patch create mode 100644 gnu/packages/patches/laby-make-png.patch diff --git a/gnu-system.am b/gnu-system.am index fd9795e..f3b5504 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -541,6 +541,8 @@ dist_patch_DATA =3D \ gnu/packages/patches/jasper-CVE-2016-1867.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ + gnu/packages/patches/laby-make-png.patch \ + gnu/packages/patches/laby-make-install.patch \ gnu/packages/patches/ldc-disable-tests.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/liba52-enable-pic.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7eb0e7a..aa74665 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -14,6 +14,7 @@ ;;; Copyright =C2=A9 2015, 2016 Alex Kost ;;; Copyright =C2=A9 2015 Paul van der Walt ;;; Copyright =C2=A9 2015 Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer +;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,9 +57,11 @@ #:use-module (gnu packages libcanberra) #:use-module (gnu packages libunwind) #:use-module (gnu packages haskell) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages mp3) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages xorg) @@ -1891,3 +1894,45 @@ and a game metadata scraper.") (description "The Emilia Pinball Project is a pinball simulator. There are only two levels to play with, but they are very addictive.") (license license:gpl2))) + +(define-public laby + (package + (name "laby") + (version "0.6.4") + (source + (origin (method url-fetch) + (uri (string-append + "https://github.com/sgimenez/laby/tarball/" + name "-" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "113ip48308ps3lsw427xswgx3wdanils43nyal9n4jr6bcx1bj2j")) + (patches (list (search-patch "laby-make-install.patch") + (search-patch "laby-make-png.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("imagemagick" ,imagemagick))) + (inputs + `(("lablgtk" ,lablgtk) + ("ocaml" ,ocaml) + ("ocaml-findlib" ,ocaml-findlib))) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + (add-before + 'build 'setenv + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((lablgtk (assoc-ref inputs "lablgtk"))) + (setenv "LD_LIBRARY_PATH" + (string-append lablgtk "/lib/ocaml/stublibs= ")))))) + #:tests? #f ; no 'check' target + #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs "= out")) + "all" "png"))) + (home-page "https://sgimenez.github.io/laby/") + (synopsis "Programming game") + (description "Learn programming, playing with ants and spider webs ;-) +Your robot ant can be programmed in many languages: OCaml, Python, C, C++, +Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experien= ced +programmers may also add their own favorite language.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/laby-make-install.patch b/gnu/packages/pa= tches/laby-make-install.patch new file mode 100644 index 0000000..3e956be --- /dev/null +++ b/gnu/packages/patches/laby-make-install.patch @@ -0,0 +1,25 @@ +From e9896b8951f9faf1f76a3b45be6e70d0aeb30a73 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Sat, 15 Nov 2014 17:48:18 +0100 +Subject: [PATCH] Add make install. + +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index ca18c1e..65af31b 100644 +--- a/Makefile 2016-02-09 21:34:01.883660009 +0100 ++++ b/Makefile 2016-02-09 21:34:30.672150679 +0100 +@@ -19,3 +19,11 @@ + @git archive --prefix=3D"$(PROJECT_ARCHIVE)/" HEAD \ + | gzip >_dist/"$(PROJECT_ARCHIVE)".tar.gz + @echo archive stored in "_dist/$(PROJECT_ARCHIVE).tar.gz" ++ ++PREFIX=3D/usr/local ++install: ++ strip laby ++ mkdir -p $(PREFIX)/bin ++ cp laby $(PREFIX)/bin/laby ++ mkdir -p $(PREFIX)/share/laby ++ tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- diff --git a/gnu/packages/patches/laby-make-png.patch b/gnu/packages/patche= s/laby-make-png.patch new file mode 100644 index 0000000..6851e4a --- /dev/null +++ b/gnu/packages/patches/laby-make-png.patch @@ -0,0 +1,27 @@ +From 6d3c05e25f2b5f231abf5bb4af4bc0b06455b0e4 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Thu, 11 Feb 2016 18:30:19 +0100 +Subject: [PATCH] Add make png. + +--- + Makefile | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Makefile b/Makefile +index 5d9d733..f54d09b 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,3 +27,10 @@ install: + cp laby $(PREFIX)/bin/laby + mkdir -p $(PREFIX)/share/laby + tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- ++ ++SVG:=3D$(wildcard data/tiles/*.svg) ++PNG:=3D$(SVG:%.svg=3D%.png) ++png: $(PNG) ++ ++%.png: %.svg ++ convert $^ $@ +--=20 +2.1.4 + --=20 2.6.3 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--