From 6ab1890aba1fd9b1f3a2dc46f1d7ec183452617d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 7 Nov 2025 23:09:26 +0900 Subject: [PATCH] gnu: squeak-vm: Fix build and modernize definition. * gnu/packages/smalltalk.scm (squeak-vm) [source]: Switch to the no-mp3 tarball (the bundled mp3 library no longer builds). {patches}: Apply patch. {snippet}: Delete trailing #t. [arguments]: Use gexp. Delete trailing #t. {#:configure-flags}: New argument. {#:phases} : Delete phase. : New phase. : Remove phase override. Change-Id: I1c786eba0b2846edcf3d98bd3f9d7c388c669497 --- gnu/local.mk | 1 + gnu/packages/smalltalk.scm | 55 +++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/gnu/local.mk b/gnu/local.mk index bf605632252d83660b58678b1211b2d6d7e27c6e..abc28926efee2a547e58c7c01f3907b4d1d139cc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2077,6 +2077,7 @@ dist_patch_DATA = \ %D%/packages/patches/smalltalk-multiplication-overflow.patch \ %D%/packages/patches/soci-mysql-ddl-types.patch \ %D%/packages/patches/sqlite-hurd.patch \ + %D%/packages/patches/squeak-vm-gcc-14-fix.patch \ %D%/packages/patches/stepmania-ffmpeg-compat.patch \ %D%/packages/patches/stk-5.0.1-fix-typo.patch \ %D%/packages/patches/strace-readlink-tests.patch \ diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm index f6f22a14a046e4798632d9fe21a2e455f730a4ee..b6de66b2d95647fe885b64468cd2e494e5cac77d 100644 --- a/gnu/packages/smalltalk.scm +++ b/gnu/packages/smalltalk.scm @@ -229,9 +229,9 @@ such as ones for networking and GUI programming.") (origin (method url-fetch) (uri (string-append "http://squeakvm.org/unix/release/" - "Squeak-" version "-src.tar.gz")) + "Squeak-" version "-src-no-mp3.tar.gz")) (sha256 - (base32 "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix")) + (base32 "01miyjpka9x24xsp4j54mm9zjiaci670sss50qvd94y5q2iq9cx7")) (modules '((guix build utils))) (snippet ;; Make builds bit-reproducible. @@ -243,8 +243,29 @@ such as ones for networking and GUI programming.") "ux_version = \"GNU\";\n")) (substitute* "unix/vm/config.cmake" (("\\(VM_BUILD_STRING.*") - "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")")) - #t)))) + "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")")))) + (patches (search-patches "squeak-vm-gcc-14-fix.patch")))) + (build-system cmake-build-system) + (arguments + (list #:tests? #f ;no check target + #:configure-flags + #~(list (string-append "-DVM_HOST=" #$(nix-system->gnu-triplet + (or (%current-target-system) + (%current-system)))) + (string-append "-DVM_VERSION=" #$version) + "-DCMAKE_VERBOSE_MAKEFILE=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "unix"))) + (add-after 'chdir 'remove-hardcoded-PATH + (lambda _ + ;; Remove hard-coded FHS PATH entries. + (substitute* '("cmake/squeak.in" + "cmake/squeak.sh.in") + (("^PATH=.*") ""))))))) + (native-inputs (list pkg-config)) (inputs (list alsa-lib dbus @@ -253,32 +274,6 @@ such as ones for networking and GUI programming.") libxrender mesa pulseaudio)) - (native-inputs - (list pkg-config)) - (build-system cmake-build-system) - (arguments - `(#:tests? #f ;no check target - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'remove-hardcoded-PATH - (lambda _ - ;; Remove hard-coded FHS PATH entries. - (substitute* '("unix/cmake/squeak.in" - "unix/cmake/squeak.sh.in") - (("^PATH=.*") "")) - #t)) - (add-before 'configure 'enter-build-directory - (lambda _ - (mkdir "build") - (chdir "build") - #t)) - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (invoke "../unix/cmake/configure" - (string-append "--prefix=" out) - "--without-quartz") - #t)))))) (synopsis "Smalltalk programming language and environment") (description "Squeak is a full-featured implementation of the Smalltalk programming language and environment based on (and largely compatible with)