From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id PDAxKjKFh2N7OwAAbAwnHQ (envelope-from ) for ; Wed, 30 Nov 2022 17:30:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EIoyKTKFh2O9SQAAauVa8A (envelope-from ) for ; Wed, 30 Nov 2022 17:30:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6D528B060 for ; Wed, 30 Nov 2022 17:30:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0PyI-0002qe-A3; Wed, 30 Nov 2022 11:30:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0PyF-0002qO-TJ for guix-patches@gnu.org; Wed, 30 Nov 2022 11:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0PyF-0007kR-44 for guix-patches@gnu.org; Wed, 30 Nov 2022 11:30:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0PyE-0006wb-Vj for guix-patches@gnu.org; Wed, 30 Nov 2022 11:30:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59726] [PATCH 1/2] gnu: g-wrap: Build with Guile 3.0. Resent-From: Z572 <873216071@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Nov 2022 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59726 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59726@debbugs.gnu.org Received: via spool by 59726-submit@debbugs.gnu.org id=B59726.166982579126652 (code B ref 59726); Wed, 30 Nov 2022 16:30:02 +0000 Received: (at 59726) by debbugs.gnu.org; 30 Nov 2022 16:29:51 +0000 Received: from localhost ([127.0.0.1]:33742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Py3-0006vj-1m for submit@debbugs.gnu.org; Wed, 30 Nov 2022 11:29:51 -0500 Received: from [203.205.251.84] (port=33601 helo=out203-205-251-84.mail.qq.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1p0Pxz-0006vV-KS for 59726@debbugs.gnu.org; Wed, 30 Nov 2022 11:29:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1669825779; bh=8Wt7ErSXyj4aC2rOg1pg5tCV2L9nqFsEU4SGm0S7TNo=; h=From:To:Subject:Date:In-Reply-To:References; b=VuEpf0L7SZ4lWkz8yWPY+xjfiZnvx7tX+H90cON2wMsZSQ+XEdpvJaBb+CMNbfDAX Zxmqj6Z7WPsW/+OML6allY734ElCgsqTpjNx9r8EXrjFF14jjVkxQKAeiYQqkX4d6W JmhtZgeYKNhxWxfkPce7cR9zsbQMFHhvKMP3B8CQ= Received: from localhost.localdomain ([112.10.216.37]) by newxmesmtplogicsvrszc2-1.qq.com (NewEsmtp) with SMTP id 76613884; Thu, 01 Dec 2022 00:29:38 +0800 X-QQ-mid: xmsmtpt1669825778tnc12bzqs Message-ID: X-QQ-XMAILINFO: OQhZ3T0tjf0avu7lwhYsLks0nvgFmDesjeumCa2fnsQWCbYEIatbROdWv9igix CIdLeoBlZqPYJZVf62Oz7qrp0RdSNXmtIg48vY5sf9t93W7JvpO/VcF+HF69I5swUuQdK9g29sxs j4DfH4bIsp26DkKumK7jYs69ex6XX8Ee6P9a6HHFbs4/mke8hFhz2N4O3ePz+wBgpHm+F6m+f0CC sHmOz6ChI+43yJ44QUMv9kfC9nYxDvqUlw8po6/0Eo7tl+wjbnguFMXneLrNz5qvysZGMZatXcWp 723L/WV4dhO5x0Vm7ICxgVWCVwJh5VuXYsFhj/+DDo8uYymM7lwo1iFbb9eBmG9eCLUF29w99zMO k1Qd4lZ0wZwx8OqfcLSN87dwGPBuQEkY+/Gf/3gFbSV/MB7a0/DVyF2xzhmDgyP0M0SU43MliA69 YE0wCogitbDEe2QtxqvHhG7Iw045tlorfaknnjsR4z7Ee8mgkirqYUKTTw9Tw1VmAA3uNB+Hzuqo tEfcEGeaps3+VcsDY5+Gd1DAoph/vfG5aixl9Xx60eu77E19A1EcFknC6Zy9uG78u+CFejiOOADd vINZTI0jS67vkKJR+UxD1keB0oxtHpanA8amPi1PGZdpqF2j69YPwofU7fmUXZN1ZBoSVUw7NXWP mhJabL2iGBkHI0/z5fWh2U4hoefn21O3eeQA2OK8u971VWcR78fyrys97iYvdeVSeoEfzS14DRpl xD2ZR3LRfh0PxRMqHZWMuyT7itYI4JgDMiFveT+vlI3k97bRJZ/HGVzMlFYAtPkvmDlKhhyDMj8I TmrJ4qwytYG/EmnDjxucT4RpB3ncY02lfGKh60V93avpGb+1nPs204in97xHFmc4wy5i3VPX9mq4 HAqlR5mF5Kr2IW8VjhWxwX2v7tn775mSf7l8LGOj6DL7eFUS4JNSYVrt4Ba0jIkA== Date: Thu, 1 Dec 2022 00:29:37 +0800 X-OQ-MSGID: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Z572 <873216071@qq.com> X-ACL-Warn: , Z572 via Guix-patches From: Z572 via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669825842; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8Wt7ErSXyj4aC2rOg1pg5tCV2L9nqFsEU4SGm0S7TNo=; b=iBOxdfAmK1+wQDXb4RjpQdXU/YWtc87UiMneyKw80fwQNzML3fui9+Rz7cpstrkxGqGgCJ CSbLj6Ko6wMzo1c7HjrkI5sey+7+iDDSOS7tkGds9isVXnMePn7/2eXc/ppbK99fUJLjRl xOYVExm95xZeCMR+XzT0GNAGh9iugDBDFfuv4SesF/9I8f8tTIuH8rUZZ9uwOkkiMUFSJF SgJhW9aYGz6sTOmT/M676RVqkcDMmvzqBn+AzPdPqExGp1hmTt0OqQZhw84l2HPnMMcRFG HGkcijTvOAs8U/LilUQIwEQs3qfTGFkWvAifxyDV5jSGSUH5pQyW6iwCwHtv7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669825842; a=rsa-sha256; cv=none; b=HUI/yCkdVdNNhnB8CLCG4ytbGBTX1EXYqhfniQ4DK7KjIj4I2YRNUIeNnZrB8Xox4xGR1q xlyQFxZ7RlYrYE6qqGh2leALZe4YAyHC9CRel4Poj7YjedfrCnHL0ZFxvOPMKCGhzDbITI BdbgV0OxUokZI+o5GMbgzVhFeAegTtMPWOF03qrXUXivjSz9WOmuAFtEgHI2DFbEUF2YQX 0gse1UlzGq8Wgmo4nN5PKZJdvpRezcsfSmM2qz17wPB311798BWEM6rLUSCKbNs7x5jczY CA1L3DqzrqpMcDLZcg0YRxU6WgkJvhb5tj6mEBxWITtW+uzTV4veFxY/94DoDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=VuEpf0L7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.56 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=VuEpf0L7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6D528B060 X-Spam-Score: -4.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: HoxOfMmBf5OW * 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