summaryrefslogtreecommitdiff
path: root/gnu/packages/smalltalk.scm
diff options
context:
space:
mode:
authorMiguel Ángel Arruga Vivas <rosen644835@gmail.com>2020-12-28 10:36:48 +0100
committerMiguel Ángel Arruga Vivas <rosen644835@gmail.com>2021-01-05 12:51:12 +0100
commite3281657c8a97e32169fcc7e178f3fbbab7c88b7 (patch)
tree64ec0fc16e2dd79130784e67d2ecd688b9ecbc10 /gnu/packages/smalltalk.scm
parentc25285b6a155365a73c1f84e42397b2cd01d3023 (diff)
downloadguix-patches-e3281657c8a97e32169fcc7e178f3fbbab7c88b7.tar
guix-patches-e3281657c8a97e32169fcc7e178f3fbbab7c88b7.tar.gz
gnu: smalltalk: Fix integer multiplication overflow.
* gnu/local.mk (dist_patch_DATA): Add Smalltalk patch. * gnu/packages/patches/smalltalk-multiplication-overflow.patch: Patch from upstream commit 72ada189aba0283c551ead16635c1983968080b8. * gnu/packages/smalltalk.scm (smalltalk): Use patch and link with gmp and lightning libraries instead of the included source.
Diffstat (limited to 'gnu/packages/smalltalk.scm')
-rw-r--r--gnu/packages/smalltalk.scm47
1 files changed, 42 insertions, 5 deletions
diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm
index 5d35f563e2..742a9b89c4 100644
--- a/gnu/packages/smalltalk.scm
+++ b/gnu/packages/smalltalk.scm
@@ -26,6 +26,8 @@
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -36,6 +38,7 @@
#:use-module (gnu packages libffi)
#:use-module (gnu packages libsigsegv)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages multiprecision)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages xorg))
@@ -51,18 +54,52 @@
version ".tar.xz"))
(sha256
(base32
- "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1"))))
+ "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1"))
+ ;; XXX: To be removed with the next release of Smalltalk.
+ (patches (search-patches "smalltalk-multiplication-overflow.patch"))))
(build-system gnu-build-system)
(native-inputs
- `(("libffi" ,libffi)
+ `(("pkg-config" ,pkg-config)
+ ;; XXX: To be removed with the next release of Smalltalk.
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ ;; TODO: These optional dependencies raise the closure size to ~1 GiB
+ ;; from the current ~100 MiB, although some of them might be very
+ ;; useful for end users:
+ ;; - freeglut
+ ;; - glib
+ ;; - gobject-introspection
+ ;; - gtk+-2
+ ;; - tcl/tk
+ ;; - SDL (sdl-union)
+ ;; - sqlite
+ ;; - zlib
+ (inputs
+ `(("gmp" ,gmp)
+ ("libffi" ,libffi)
("libltdl" ,libltdl)
("libsigsegv" ,libsigsegv)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("zip" ,zip)))
+ ("lightning" ,lightning)
+ ("zip" ,zip)))
(arguments
`(#:phases
(modify-phases %standard-phases
+ ;; XXX: To be removed with the next release of Smalltalk.
+ ;; The overflow patch modifies configure.ac, therefore remove
+ ;; old configure script and enforce an autoreconf.
+ (add-before 'bootstrap 'remove-unpatched-configure
+ (lambda _
+ (delete-file "configure")
+ #t))
+ ;; XXX: To be removed with the next release of Smalltalk.
+ ;; We don't want to regenerate the info files.
+ (add-after 'build 'keep-generated-info-manual
+ (lambda _
+ (for-each (lambda (file)
+ (invoke "touch" file))
+ (find-files "doc" "\\.info"))
+ #t))
(add-before 'configure 'fix-libc
(lambda _
(let ((libc (assoc-ref %build-inputs "libc")))