gnu: libretro-lowresnx: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / smalltalk.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages smalltalk)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages assembly)
31 #:use-module (gnu packages audio)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages fontutils)
36 #:use-module (gnu packages gl)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages libffi)
39 #:use-module (gnu packages libsigsegv)
40 #:use-module (gnu packages linux)
41 #:use-module (gnu packages multiprecision)
42 #:use-module (gnu packages pkg-config)
43 #:use-module (gnu packages pulseaudio)
44 #:use-module (gnu packages xorg))
45
46 (define-public smalltalk
47 (package
48 (name "smalltalk")
49 (version "3.2.91")
50 (source
51 (origin
52 (method url-fetch)
53 ;; XXX: Revert to mirror://gnu with the next release of Smalltalk.
54 (uri (string-append "https://alpha.gnu.org/gnu/smalltalk/smalltalk-"
55 version ".tar.xz"))
56 (sha256
57 (base32
58 "1zb2h5cbz1cwybqjl24lflw359lwj7sjvvhwb4x6miypzhwq4qh0"))
59 ;; XXX: To be removed with the next release of Smalltalk.
60 (patches (search-patches "smalltalk-multiplication-overflow.patch"))))
61 (build-system gnu-build-system)
62 (native-inputs
63 `(("pkg-config" ,pkg-config)
64 ;; XXX: To be removed with the next release of Smalltalk.
65 ("autoconf" ,autoconf)
66 ("automake" ,automake)
67 ("libtool" ,libtool)))
68 ;; TODO: These optional dependencies raise the closure size to ~1 GiB
69 ;; from the current ~100 MiB, although some of them might be very
70 ;; useful for end users:
71 ;; - freeglut
72 ;; - glib
73 ;; - gobject-introspection
74 ;; - gtk+-2
75 ;; - tcl/tk
76 ;; - SDL (sdl-union)
77 ;; - sqlite
78 ;; - zlib
79 (inputs
80 `(("gmp" ,gmp)
81 ("libffi" ,libffi)
82 ("libltdl" ,libltdl)
83 ("libsigsegv" ,libsigsegv)
84 ("lightning" ,lightning)
85 ("zip" ,zip)))
86 (arguments
87 `(#:phases
88 (modify-phases %standard-phases
89 ;; XXX: To be removed with the next release of Smalltalk.
90 ;; The overflow patch modifies configure.ac, therefore remove
91 ;; old configure script and enforce an autoreconf.
92 (add-before 'bootstrap 'remove-unpatched-configure
93 (lambda _
94 (delete-file "configure")
95 #t))
96 ;; XXX: To be removed with the next release of Smalltalk.
97 ;; We don't want to regenerate the info files.
98 (add-after 'build 'keep-generated-info-manual
99 (lambda _
100 (for-each (lambda (file)
101 (invoke "touch" file))
102 (find-files "doc" "\\.info"))
103 #t))
104 (add-before 'configure 'fix-libc
105 (lambda _
106 (let ((libc (assoc-ref %build-inputs "libc")))
107 (substitute* "libc.la.in"
108 (("@LIBC_SO_NAME@") "libc.so")
109 (("@LIBC_SO_DIR@") (string-append libc "/lib"))))
110 #t)))))
111 (home-page "http://smalltalk.gnu.org/")
112 (synopsis "Smalltalk environment")
113 (description
114 "GNU Smalltalk is a free implementation of the Smalltalk language. It
115 implements the ANSI standard for the language and also includes extra classes
116 such as ones for networking and GUI programming.")
117 (license license:gpl2+)))
118
119 (define-public squeak-vm
120 (package
121 (name "squeak-vm")
122 (version "4.10.2.2614")
123 (source
124 (origin
125 (method url-fetch)
126 (uri (string-append "http://squeakvm.org/unix/release/"
127 "Squeak-" version "-src.tar.gz"))
128 (sha256
129 (base32 "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix"))
130 (modules '((guix build utils)))
131 (snippet
132 ;; Make builds bit-reproducible.
133 '(begin
134 (substitute* "unix/cmake/verstamp"
135 (("vm_date=.*")
136 "vm_date = \"1970-01-01\";\n")
137 (("ux_version=.*")
138 "ux_version = \"GNU\";\n"))
139 (substitute* "unix/vm/config.cmake"
140 (("\\(VM_BUILD_STRING.*")
141 "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")"))
142 #t))))
143 (inputs
144 `(("alsa-lib" ,alsa-lib)
145 ("dbus" ,dbus)
146 ("freetype" ,freetype)
147 ("libffi" ,libffi)
148 ("libxrender" ,libxrender)
149 ("mesa" ,mesa)
150 ("pulseaudio" ,pulseaudio)))
151 (native-inputs
152 `(("pkg-config" ,pkg-config)))
153 (build-system cmake-build-system)
154 (arguments
155 `(#:tests? #f ;no check target
156 #:phases
157 (modify-phases %standard-phases
158 (add-after 'unpack 'remove-hardcoded-PATH
159 (lambda _
160 ;; Remove hard-coded FHS PATH entries.
161 (substitute* '("unix/cmake/squeak.in"
162 "unix/cmake/squeak.sh.in")
163 (("^PATH=.*") ""))
164 #t))
165 (add-before 'configure 'enter-build-directory
166 (lambda _
167 (mkdir "build")
168 (chdir "build")
169 #t))
170 (replace 'configure
171 (lambda* (#:key outputs #:allow-other-keys)
172 (let ((out (assoc-ref outputs "out")))
173 (invoke "../unix/cmake/configure"
174 (string-append "--prefix=" out)
175 "--without-quartz")
176 #t))))))
177 (synopsis "Smalltalk programming language and environment")
178 (description "Squeak is a full-featured implementation of the Smalltalk
179 programming language and environment based on (and largely compatible with)
180 the original Smalltalk-80 system. Squeak has very powerful 2- and 3-D
181 graphics, sound, video, MIDI, animation and other multimedia capabilities. It
182 also includes a customisable framework for creating dynamic HTTP servers and
183 interactively extensible Web sites.")
184 (home-page "http://squeakvm.org/")
185 (license license:x11)))