all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 69918@debbugs.gnu.org
Cc: dziltener@lyrion.ch, ngraves@ngraves.fr
Subject: [bug#69918] [PATCH v2] gnu: Add pharo-vm.
Date: Mon, 20 May 2024 14:49:18 +0200	[thread overview]
Message-ID: <20240520124921.7417-1-ngraves@ngraves.fr> (raw)
In-Reply-To: <163fe58d525795ccdb3f24960655f036@lyrion.ch>

* gnu/packages/smalltalk.scm (pharo-vm): New variable.

Change-Id: I7238a8e1e4602192a85772ef2f35081d267ec892
---
 gnu/packages/smalltalk.scm | 67 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 66 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm
index 64146813d1f..a27237ef815 100644
--- a/gnu/packages/smalltalk.scm
+++ b/gnu/packages/smalltalk.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2024 Daniel Ziltener <dziltener@lyrion.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
 
 (define-module (gnu packages smalltalk)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
@@ -36,13 +38,17 @@ (define-module (gnu packages smalltalk)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #: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))
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xdisorg))
 
 (define-public smalltalk
   (package
@@ -184,3 +190,62 @@ (define-public squeak-vm
 interactively extensible Web sites.")
     (home-page "http://squeakvm.org/")
     (license license:x11)))
+
+(define-public pharo-vm
+  (package
+    (name "pharo-vm")
+    (version "10.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/source/PharoVM-" version "-32b2be5-Linux-x86_64-c-src.tar.gz"))
+       (sha256
+        (base32
+         "1hbkvfrw57sz5nw48z64789yjcry9l1am4hmkndy9dd6i06n2c2n"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list
+         (string-append "-DPHARO_LIBRARY_PATH=" #$output "/lib")
+         "-DGENERATED_SOURCE_DIR=."
+         "-DALWAYS_INTERACTIVE=on"
+         "-DBUILD_IS_RELEASE=on"
+         "-DGENERATE_VMMAKER=off"  ; FIXME: bootstrap chain to resolve
+         "-DGENERATE_SOURCES=off"  ; FIXME: properly generate sources
+         "-DFEATURE_COMPILE_GNUISATION=on"
+         "-DBUILD_BUNDLE=off"
+         "-DWITHOUT_DEPENDENCIES=on"
+         (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
+         ;; add libraries of the project itself to rpath
+         (string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib")
+         "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
+      #:tests? #false  ; no tests
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-rpath
+            (lambda _
+              (substitute* "cmake/Linux.cmake"
+                (("set\\(CMAKE_C_FLAGS \"\\$\\{CMAKE_C_FLAGS\\}\
+ -Wl,-rpath=\\.\"\\)")
+                 ""))))
+          (add-after 'install 'really-install
+            (lambda _
+              (install-file "./build/vm/pharo"
+                            (string-append #$output "/bin"))
+              (for-each
+               (lambda (file)
+                 (install-file file (string-append #$output "/lib")))
+               (find-files "./build/vm" "\\.so")))))))
+    (inputs
+     (list libffi
+           libgit2
+           cairo
+           freetype
+           pixman
+           libpng
+           util-linux))
+    (synopsis "This is the VM used by Pharo")
+    (home-page "https://www.pharo.org")
+    (description "This is the VM used by Pharo.")
+    (license license:expat)))
-- 
2.41.0





      parent reply	other threads:[~2024-05-20 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 15:36 [bug#69918] [PATCH] gnu: smalltalk: add pharo-vm 10.1.1 Daniel Ziltener via Guix-patches via
2024-05-20 12:36 ` Nicolas Graves via Guix-patches via
2024-05-20 12:49 ` Nicolas Graves via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240520124921.7417-1-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=69918@debbugs.gnu.org \
    --cc=dziltener@lyrion.ch \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.