1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages logo)
20 #:use-module (gnu packages qt)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (guix build-system gnu))
33 (uri (string-append "https://qlogo.org/assets/sources/QLogo-"
37 "0cpyj1ji6hjy7zzz05672f0j6fr0mwpc1y3sq36hhkv2fkpidw22"))))
38 (build-system gnu-build-system)
40 `(("qtbase" ,qtbase)))
43 (modify-phases %standard-phases
45 (lambda* (#:key outputs #:allow-other-keys)
46 (substitute* "QLogo.pro"
47 (("target\\.path = /usr/bin")
48 (string-append "target.path = "
49 (assoc-ref outputs "out") "/bin")))
50 (invoke "qmake" "QLogo.pro")))
51 ;; The check phase rebuilds the source for tests. So, it needs to be
52 ;; run after the install phase has installed the outputs of the build
55 (add-after 'install 'check
57 ;; Clean files created by the build phase.
58 (invoke "make" "clean")
59 ;; QLogo tries to create its "dribble file" in the home
60 ;; directory. So, set HOME.
61 (setenv "HOME" "/tmp")
62 ;; Build and run tests.
63 (invoke "qmake" "TestQLogo.pro")
64 (invoke "make" "-j" (number->string (parallel-job-count)))
65 (invoke "./testqlogo"))))))
66 (home-page "https://qlogo.org")
67 (synopsis "Logo interpreter using Qt and OpenGL")
68 (description "QLogo is an interpreter for the Logo language written in C++
69 using Qt and OpenGL. Specifically, it mimics, as reasonably as possible, the
70 UCBLogo interpreter.")
71 (license license:gpl2+)))