From: Z572 via Guix-patches via <guix-patches@gnu.org>
To: 59726@debbugs.gnu.org
Subject: [bug#59726] [PATCH 1/2] gnu: g-wrap: Build with Guile 3.0.
Date: Thu, 1 Dec 2022 00:29:37 +0800 [thread overview]
Message-ID: <tencent_3816FE1F9A0E6E7947095C2DDDE6742A5606@qq.com> (raw)
In-Reply-To: <cover.1669825268.git.873216071@qq.com>
* gnu/packages/guile-xyz.scm(g-wrap)[source]: Modify configure to add Guile
3.0 support. move Modify configure guilemoduledir to it. dons't use removed
api.
[inputs]: add Guile 3.0, indent.
[native-inputs]: add Guile 3.0.
[propagated-inputs]: add libffi, remove guile-2.2.
[arguments]:
<#:configure-flags>: remove it.
<#:parallel-build?>: set it to #f.
<#:make-flags>: set it to '("GUILE_AUTO_COMPILE=0)".
<#:phases>: add set-indent-program-path phase, remove pre-configure phase.
---
gnu/packages/guile-xyz.scm | 51 ++++++++++++++++++++++++++------------
1 file changed, 35 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index b1620618eb..a0b5964072 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -71,6 +71,7 @@ (define-module (gnu packages guile-xyz)
#:use-module (gnu packages avahi)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages code)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
@@ -2135,25 +2136,43 @@ (define-public g-wrap
version ".tar.gz"))
(sha256
(base32
- "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
+ "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; allow guile 3.0
+ (substitute* "configure"
+ (("2\\.2 2\\.0")
+ "3.0 2.2 2.0"))
+ (substitute* (find-files "." "^Makefile.in$")
+ (("guilemoduledir =.*guile/site" all)
+ (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
+ ;; don't use removed api
+ (substitute* "guile/g-wrap/guile-runtime.c"
+ (("scm_class_([a-z]+)" all first)
+ (string-append
+ "scm_c_public_ref(\"oop goops\",\"<"
+ first ">\")"))
+ (("scm_memory_error\\(func_name\\)")
+ "scm_report_out_of_memory()"))))))
(build-system gnu-build-system)
- (native-inputs
- (list pkg-config))
+ (native-inputs (list pkg-config guile-3.0))
(propagated-inputs
- (list guile-2.2 guile-lib))
- (inputs
- (list libffi))
+ (list guile-lib
+ ;; Required by pc file
+ libffi))
+ (inputs (list libffi indent guile-3.0))
(arguments
- `(#:configure-flags '("--disable-Werror")
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'pre-configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* (find-files "." "^Makefile.in$")
- (("guilemoduledir =.*guile/site" all)
- (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
- #t))))))
+ `(#:parallel-build? #f ;not supported
+ ;; TODO: compile go files.
+ #:make-flags '("GUILE_AUTO_COMPILE=0")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'set-indent-program-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "g-wrap/util.scm"
+ (("indent \\~S")
+ (string-append (search-input-file inputs
+ "/bin/indent")
+ " ~S"))))))))
(synopsis "Generate C bindings for Guile")
(description "G-Wrap is a tool and Guile library for generating function
wrappers for inter-language calls. It currently only supports generating Guile
--
2.38.1
next parent reply other threads:[~2022-11-30 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1669825268.git.873216071@qq.com>
2022-11-30 16:29 ` Z572 via Guix-patches via [this message]
2022-12-02 22:03 ` [bug#59726] [PATCH 0/2] gnu: g-wrap: Build with Guile 3.0 Ludovic Courtès
[not found] ` <875yesdfhz.fsf@qq.com>
2022-12-03 9:04 ` bug#59726: " Z572 via Guix-patches via
2022-11-30 16:29 ` [bug#59726] [PATCH 2/2] gnu: g-wrap: Use gexp Z572 via Guix-patches via
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=tencent_3816FE1F9A0E6E7947095C2DDDE6742A5606@qq.com \
--to=guix-patches@gnu.org \
--cc=59726@debbugs.gnu.org \
--cc=873216071@qq.com \
/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).