Commit | Line | Data |
---|---|---|
e48f80cb AI |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
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. | |
10 | ;;; | |
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. | |
15 | ;;; | |
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/>. | |
18 | ||
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)) | |
25 | ||
26 | (define-public qlogo | |
27 | (package | |
28 | (name "qlogo") | |
29 | (version "0.92") | |
30 | (source | |
31 | (origin | |
32 | (method url-fetch) | |
33 | (uri (string-append "https://qlogo.org/assets/sources/QLogo-" | |
34 | version ".tgz")) | |
35 | (sha256 | |
36 | (base32 | |
37 | "0cpyj1ji6hjy7zzz05672f0j6fr0mwpc1y3sq36hhkv2fkpidw22")))) | |
38 | (build-system gnu-build-system) | |
39 | (inputs | |
40 | `(("qtbase" ,qtbase))) | |
41 | (arguments | |
42 | `(#:phases | |
43 | (modify-phases %standard-phases | |
44 | (replace 'configure | |
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 | |
53 | ;; phase. | |
54 | (delete 'check) | |
55 | (add-after 'install 'check | |
56 | (lambda _ | |
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+))) |