unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Remco van 't Veer <remco@remworks.net>
To: 56322@debbugs.gnu.org, Maxime Devos <maximedevos@telenet.be>
Cc: Remco van 't Veer <remco@remworks.net>
Subject: bug#56322: [PATCH] gnu: ruby: regenerate parse.c
Date: Thu, 25 Aug 2022 12:45:10 +0200	[thread overview]
Message-ID: <20220825104510.17727-1-remco@remworks.net> (raw)
In-Reply-To: <e0e7e2a1e4c687a426d208e0f745b83eb3b12235.camel@telenet.be>

* gnu/packages/ruby.scm (baseruby, ruby-2.7): Use bootstrap baseruby to regenerate parse.c
---
 gnu/packages/ruby.scm | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e98814da6d..8de6cda257 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -161,7 +161,16 @@ (define-public ruby-2.7
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"))))
+                "0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"))
+              (snippet `(begin
+                          ;; Remove bundled libffi
+                          (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+                          ;; Trigger bootstap
+                          (delete-file "configure")
+                          (delete-file "aclocal.m4")
+                          ;; Trigger rebuild of parse.c from parse.y
+                          (delete-file "parse.c")
+                          #t))))
     (arguments
      `(#:test-target "test"
        #:configure-flags '("--enable-shared") ;dynamic linking
@@ -181,7 +190,24 @@ (define-public ruby-2.7
                                      "test/ruby/test_system.rb"
                                      "tool/rbinstall.rb")
                         (("/bin/sh")
-                         (which "sh"))) #t)))))))
+                         (which "sh"))) #t)))))
+    (native-inputs (list autoconf automake baseruby bison))))
+
+(define baseruby ;; used to build ruby by parser generator
+  (package
+    (inherit ruby-2.7)
+    (name "baseruby")
+    (source (origin
+              (inherit (package-source ruby-2.7))
+              ;; override snippet to not include deletion of bundled parse.c
+              (snippet `(begin
+                          ;; Remove bundled libffi
+                          (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+                          ;; Trigger bootstap
+                          (delete-file "configure")
+                          (delete-file "aclocal.m4")
+                          #t))))
+    (native-inputs (list autoconf automake))))
 
 (define-public ruby-3.0
   (package
-- 
2.37.2





  parent reply	other threads:[~2022-08-25 10:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 11:15 bug#56322: Ruby packaging issues Maxime Devos
2022-08-24 15:24 ` Remco van 't Veer
2022-08-24 18:38   ` Maxime Devos
2022-08-25 10:44     ` Remco van 't Veer
2022-08-24 18:41   ` Maxime Devos
2022-08-24 15:27 ` bug#56322: [PATCH 0/2] " Remco van 't Veer
2022-08-24 15:27   ` bug#56322: [PATCH 1/2] gnu: ruby: trigger autotools bootstrap Remco van 't Veer
2022-08-24 15:27   ` bug#56322: [PATCH 2/2] gnu: ruby: fix unbundling of libffi for inheriting rubies Remco van 't Veer
2022-08-25 10:45 ` Remco van 't Veer [this message]
2022-10-08 10:01 ` bug#56322: Debbug 56322, Ruby packaging issues, ping? Remco van 't Veer
2022-10-09  9:15   ` Maxime Devos
2022-10-10  5:05     ` Remco van 't Veer
2022-10-10 10:27       ` Maxime Devos
2022-10-12 13:35         ` bug#56322: [PATCH core-updates 0/3] Ruby packaging issues Remco van 't Veer
2022-10-12 13:35           ` bug#56322: [PATCH core-updates 1/3] gnu: ruby: trigger autotools bootstrap Remco van 't Veer
2022-10-12 13:35           ` bug#56322: [PATCH core-updates 2/3] gnu: ruby: fix unbundling of libffi for inheriting rubies Remco van 't Veer
2022-10-12 13:35           ` bug#56322: [PATCH core-updates 3/3] gnu: ruby: regenerate parse.c Remco van 't Veer

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20220825104510.17727-1-remco@remworks.net \
    --to=remco@remworks.net \
    --cc=56322@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).