From unknown Wed Jun 18 00:28:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50217 <50217@debbugs.gnu.org> To: bug#50217 <50217@debbugs.gnu.org> Subject: Status: [PATCH] gnu: Add c2ffi-11.0.0. Reply-To: bug#50217 <50217@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:28:26 +0000 retitle 50217 [PATCH] gnu: Add c2ffi-11.0.0. reassign 50217 guix-patches submitter 50217 muradm severity 50217 normal tag 50217 patch moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 17:07:31 2021 Received: (at submit) by debbugs.gnu.org; 26 Aug 2021 21:07:31 +0000 Received: from localhost ([127.0.0.1]:50622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJMat-0000a3-4u for submit@debbugs.gnu.org; Thu, 26 Aug 2021 17:07:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:37712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJMar-0000Zw-A1 for submit@debbugs.gnu.org; Thu, 26 Aug 2021 17:07:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJMar-0004dT-57 for guix-patches@gnu.org; Thu, 26 Aug 2021 17:07:25 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:34665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJMap-0003Fg-8l for guix-patches@gnu.org; Thu, 26 Aug 2021 17:07:24 -0400 Received: by mail-wm1-x332.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so6240486wmh.1 for ; Thu, 26 Aug 2021 14:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=lC82ne9/uG8crC2mtW3Bb7SFFd0IE6QxAoy+Nd+dmxM=; b=pOUPuS4FXS5ugzVZUu7IMj9jXcHilSJcx+G4Z9EjMO4te54UFJk50I9Yi/gR3RxR/A hC96ewc8Hg2W/YmtbRPRujlhM2EuISlMhEd97mDHFYKIgDykPZQxvVCq0Do7PpjvRoKJ kqPNbYmQLTIPrKKhSslfS4BqUS0nM0GkOlU+RRGYXtR0KWyp61V3cfWH6kjLqpj4Iiyr sNIywyoMguS1/nvnPRi6PcYwv7T5ncXNu2y1D6zMFlt+O6nE3lsopmTjO1EYFjIXKlUP 5NEfVquX9J8Enwnl9n1P1CUGwEKQ137oBNWCqP/x6QnbrsdLNQd+cXW7zOt3rQCLEQ5f OzZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=lC82ne9/uG8crC2mtW3Bb7SFFd0IE6QxAoy+Nd+dmxM=; b=pnF2SfUxZJp9h3DbmDGC30L+CCqkF+wXsWlXCuXqbNNZXjnQZSBHhRH5GhEcy7yjQ9 qcf+izGAohjs69qnkQ9M9653wiB62vPRSRgAiYsdYiZGKsTdHTvI1goOMUMwVvQH7lOk OSPr1J5CApXTpRJgFJPIbqJjsgfTwvwJOkz1GtZwFsLXzTm+YSP7NPXg3YEUn6wJ15T7 vS5tGwZAPNDXJf3B1RR829L9gPGST6vVnmh5eNjvvxF9APLqYBn4rhro5zsRSS7JHihx qLHybpweq6NqZZ8p0DfEI47kuOyNSOZFKUJrDLKXCNtUQC7qDZbj2/aiykxv8kDqEsm9 bOUA== X-Gm-Message-State: AOAM530im78NEr2ktoqqryBtbMrna47V++3UtFKZJKsPGUZZigbGc7HG qVdoV9qVIfXJEpIvS//orqTB49aEfOv2nQ== X-Google-Smtp-Source: ABdhPJxxtPmf6D6Z4cx9QWqtYdv28/gLXpjSKOqPNV0EZ7MN24wWnHRyWM5+IQ2IBvVqcH5NkPUd9A== X-Received: by 2002:a1c:27c5:: with SMTP id n188mr16263494wmn.126.1630012040452; Thu, 26 Aug 2021 14:07:20 -0700 (PDT) Received: from localhost.localdomain ([31.142.89.82]) by smtp.gmail.com with ESMTPSA id y11sm5308777wru.0.2021.08.26.14.07.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 14:07:19 -0700 (PDT) From: muradm To: guix-patches@gnu.org Subject: [PATCH] gnu: Add c2ffi-11.0.0. Date: Fri, 27 Aug 2021 00:07:12 +0300 Message-Id: <20210826210712.31273-1-mail@muradm.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2a00:1450:4864:20::332; envelope-from=mail@muradm.net; helo=mail-wm1-x332.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/cpp.scm (c2ffi): New variable. --- gnu/packages/cpp.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index ba921fac11..f2663b7e6e 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Milkey Mouse ;;; Copyright © 2021 Raghav Gururajan +;;; Copyright © 2021 muradm ;;; ;;; This file is part of GNU Guix. @@ -1250,3 +1251,43 @@ of reading and writing XML.") (description "Jsonnet is a templating language extending JSON syntax with variables, conditions, functions and more.") (license license:asl2.0))) + +(define-public c2ffi + (package + (name "c2ffi") + (home-page "https://github.com/rpav/c2ffi") + (version "11.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "llvm-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17j73yb6v3lfvwwicl2f3yg141iz2dk1rf874qzqs5bkq64ldjsj")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; cmake-build-system default cmake version + (("VERSION 3.17") "VERSION 3.16.5") + ;; guix seems to be packaging LLVM libs separately + ;; thus -lLLVM is not working, every used library should + ;; be specified explicitly + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; llvm-11 at least seems to be built without RTTI + ;; llvm-12 on the other hand specifies -DLLVM_REQUIRES_RTTI=1 + ;; may fail with this flag when c2ffi for llvm-12 released + ;; https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:tests? #f)) + (inputs + `(("clang" ,clang-11) + ("llvm" ,llvm-11))) + (synopsis "Clang-based FFI wrapper generator") + (description "tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces.") + (license license:gpl2))) -- 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 20:12:30 2021 Received: (at 50217) by debbugs.gnu.org; 27 Aug 2021 00:12:30 +0000 Received: from localhost ([127.0.0.1]:50784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJPTt-0005B2-Uj for submit@debbugs.gnu.org; Thu, 26 Aug 2021 20:12:30 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:45691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJPTo-0005Am-9U for 50217@debbugs.gnu.org; Thu, 26 Aug 2021 20:12:25 -0400 Received: by mail-wr1-f43.google.com with SMTP id n5so7611845wro.12 for <50217@debbugs.gnu.org>; Thu, 26 Aug 2021 17:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=M5Fp3PCEuVhvSQk72bj9TiOp1h0o09H3cv1t1ut2xfE=; b=1lLwoYwzgeJIYg1Hk9yoooB8pwvxBIgGJDUsUTlkxN0cgxTXEmfVvUkr0ZpdN6aGt4 cNzvfkzV7XnyWXNiNLlFpL2YA/xxnc47Rohffj6Ob3deQtr4992EXXdXAKbx2dJqtaup 4j9FfFsi3Ag+qz2oBkZ++PaBgY1Ed7WJSENxJMxqSn41Zvg6QHShQgEOGJ9amK3tpZju hENgvrc1bu6m4Yob/ee6YTkwAcDnjRw95CGuswiJR/pCvYk97a/OZt5G7HfTHOmODZBd 3MZlUFWhCMlhEPa3RNXND0whfmfE3BFoKlmb9kFyeD3m1r0+yIxHz/MXdCLY87k7dc2m jR2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M5Fp3PCEuVhvSQk72bj9TiOp1h0o09H3cv1t1ut2xfE=; b=CmW826fBXaddTsS9nZTvuFI3khn6/NRHQZPCHaC6gDiniQvptpS3HLNlNz64F6CRFA 1zm3I3sM8pt/WQKCUFKqSmr2YDw1W9jlDANQpx7SGLGAOTtHgsWdgbqQzoLrcDqPMRG9 TZqnIn/8Kt99lty5ptA9ErC2cXgDfw92Ks9qaRTnk2pnJ33dGrYZbPHWGeXUssuMQFEY GvXHnNSbvdtE8QW45br9Vsxpwx9WpKXXP2VBSpWeVWgmo85dPOvFWmvbhMRk9sBp0Pt9 HkmxxvFarpfpM/iB1Jy+MqJ7X+ZfEpLWIRu/J40AwAJ3ouSEcFA33wW2DmnI5AkUi7d/ vlcg== X-Gm-Message-State: AOAM532L7MMbi67rRw5pUH7MhzPnXInafI/G88yRTe0QF5887QYzUS97 O9CI/+YZkaaRlNRP0K9g1XsX4tOL9gA2uQ== X-Google-Smtp-Source: ABdhPJwcezyKPKFB5GNh1SKl4gsIkFCNwNsZZIpTugXJwQn1S+iq5goeMk9qqwEUFV0uFP7PEBWolQ== X-Received: by 2002:adf:c785:: with SMTP id l5mr7063566wrg.360.1630023133987; Thu, 26 Aug 2021 17:12:13 -0700 (PDT) Received: from localhost.localdomain ([31.142.89.82]) by smtp.gmail.com with ESMTPSA id a133sm9540083wme.5.2021.08.26.17.12.12 for <50217@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 17:12:13 -0700 (PDT) From: muradm To: 50217@debbugs.gnu.org Subject: [PATCH v2] gnu: Add c2ffi-11.0.0. Date: Fri, 27 Aug 2021 03:12:07 +0300 Message-Id: <20210827001207.4105-1-mail@muradm.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210826210712.31273-1-mail@muradm.net> References: <20210826210712.31273-1-mail@muradm.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50217 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/cpp.scm (c2ffi): New variable. --- gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index ba921fac11..239e87bf84 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Milkey Mouse ;;; Copyright © 2021 Raghav Gururajan +;;; Copyright © 2021 muradm ;;; ;;; This file is part of GNU Guix. @@ -1250,3 +1251,42 @@ of reading and writing XML.") (description "Jsonnet is a templating language extending JSON syntax with variables, conditions, functions and more.") (license license:asl2.0))) + +(define-public c2ffi + (let ((commit "f50243926a0afb589de1078a073ac08910599582") + (revision "1") + (c2ffi-sha256 "17j73yb6v3lfvwwicl2f3yg141iz2dk1rf874qzqs5bkq64ldjsj")) + (package + (name "c2ffi") + (home-page "https://github.com/rpav/c2ffi") + (version (git-version "11.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (file-name (git-file-name name version)) + (sha256 (base32 c2ffi-sha256)) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; cmake-build-system default cmake version + (("VERSION 3.17") "VERSION 3.16.5") + ;; guix seems to be packaging LLVM libs separately + ;; thus -lLLVM is not working, every used library should + ;; be specified explicitly + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; llvm-11 at least seems to be built without RTTI + ;; llvm-12 on the other hand specifies -DLLVM_REQUIRES_RTTI=1 + ;; may fail with this flag when c2ffi for llvm-12 released + ;; https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:tests? #f)) + (inputs + `(("clang" ,clang-11) + ("llvm" ,llvm-11))) + (synopsis "Clang-based FFI wrapper generator") + (description "tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces.") + (license license:gpl2)))) -- 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 10:06:40 2021 Received: (at 50217) by debbugs.gnu.org; 7 Sep 2021 14:06:40 +0000 Received: from localhost ([127.0.0.1]:57238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNbkF-0004gB-Gg for submit@debbugs.gnu.org; Tue, 07 Sep 2021 10:06:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNbk2-0004ff-DI for 50217@debbugs.gnu.org; Tue, 07 Sep 2021 10:06:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50494) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNbjx-0002BA-7Q; Tue, 07 Sep 2021 10:06:21 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35366 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNbjw-0004gG-Uz; Tue, 07 Sep 2021 10:06:21 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: muradm Subject: Re: bug#50217: [PATCH] gnu: Add c2ffi-11.0.0. References: <20210826210712.31273-1-mail@muradm.net> <20210827001207.4105-1-mail@muradm.net> Date: Tue, 07 Sep 2021 16:06:18 +0200 In-Reply-To: <20210827001207.4105-1-mail@muradm.net> (muradm's message of "Fri, 27 Aug 2021 03:12:07 +0300") Message-ID: <87r1e04h0l.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50217 Cc: 50217@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, muradm skribis: > * gnu/packages/cpp.scm (c2ffi): New variable. Overall LGTM, modulo the following minor issues: [...] > +(define-public c2ffi > + (let ((commit "f50243926a0afb589de1078a073ac08910599582") > + (revision "1") > + (c2ffi-sha256 "17j73yb6v3lfvwwicl2f3yg141iz2dk1rf874qzqs5bkq64ld= jsj")) Normally, we only provide upstream releases. If you think we need this specific commit, could you add a comment explaining why? Please leave the base32 sha256 string where it=E2=80=99s used, within the (base32 =E2=80=A6) expression (it=E2=80=99s a macro that decodes base32 at compile-time.) > + #:tests? #f)) It would be best to run tests. Alternatively, if this is not feasible, please add a comment explaining why we=E2=80=99re skipping them. > + (synopsis "Clang-based FFI wrapper generator") > + (description "tool for extracting definitions from C, C++, and > +Objective C headers for use with foreign function call interfaces.") Please write full sentences, as per . > + (license license:gpl2)))) Is it GPLv2-only? Unless it=E2=80=99s explicitly stated, it=E2=80=99s prob= ably GPLv2-or-later (=E2=80=98license:gpl2+=E2=80=99). Could you send an updated patch? Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 24 07:54:33 2021 Received: (at control) by debbugs.gnu.org; 24 Sep 2021 11:54:34 +0000 Received: from localhost ([127.0.0.1]:56816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTjmj-0005uN-Oo for submit@debbugs.gnu.org; Fri, 24 Sep 2021 07:54:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTjmh-0005u6-SV for control@debbugs.gnu.org; Fri, 24 Sep 2021 07:54:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44282) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTjma-0007Xx-Fb for control@debbugs.gnu.org; Fri, 24 Sep 2021 07:54:24 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60442 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTjma-0003Mi-6y for control@debbugs.gnu.org; Fri, 24 Sep 2021 07:54:24 -0400 Date: Fri, 24 Sep 2021 13:54:23 +0200 Message-Id: <877df6p4sw.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #50217 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 50217 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 25 11:17:57 2021 Received: (at 50217) by debbugs.gnu.org; 25 Oct 2021 15:17:57 +0000 Received: from localhost ([127.0.0.1]:43994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf1jU-0003ro-GE for submit@debbugs.gnu.org; Mon, 25 Oct 2021 11:17:57 -0400 Received: from mail-ed1-f41.google.com ([209.85.208.41]:44829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf1jS-0003ra-QF for 50217@debbugs.gnu.org; Mon, 25 Oct 2021 11:17:51 -0400 Received: by mail-ed1-f41.google.com with SMTP id a26so836027edy.11 for <50217@debbugs.gnu.org>; Mon, 25 Oct 2021 08:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zt5No0ZVzTiU/0Jj+xXw1t9o6Jl6oDMiuj7gUC+LdYQ=; b=iA0VFadD5h3a/gRvtivhhnATkmoDueoW/St5LmPVf2aLUDCIq0ok3whjRbMabCWXN6 +AanuW7OGOPn5PYGb6vM+dx+Q3PD9Zmf/1HiU1I0WNaoGgU7xiHvOuGbnmEa+SXSMemJ UnHQCoOSfs2a0dNDdEYAETxgm0h5ENM+idSYrxgQ2gesyEeuwYn7AegcGWZRO6/ZwwZK jkte208gGeNc+zhH5LFFEn56elNiAhEPGsU1RU7mnswNTBmhenlFhiKWE+aeJUInE1nk 88rh0HRbO8QT0OGpIqrpQ4HNcFXRoZ2wds8d3kF7NymcQlPgMM7lP0NCmDhNaru5fRfH edNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=zt5No0ZVzTiU/0Jj+xXw1t9o6Jl6oDMiuj7gUC+LdYQ=; b=13tyaV7DeEn/EEBW4uMn97k+l1fOrjmjhnXCeFINj9qg7iHQbb96Y6juBV/XLc4EFu vWCJyvYWQqZa1rfmVvtSmbqERRw4GUx/doVJOXmx7Y2O9YHyj9MyhA0BEP5r317fBNE0 Jcmx+PS2cjH6zQo/Vih5Lya9YLC5uMFHNeU+w+yIe9WoJAWFrde+frTXn0onDJrWHB27 foM7Gk8D9TJadN9tAvwo/Bln11/FbhAw6UoXKDTx5C4M+b+wiEbtWwljDCY8tI3Q+Ns1 4UpqNx0l79IfNcnPw9C//fi9wwcQO8xyYqOY8HVBX+0005n6PQ7IetL9igkfGZFRKhHq c/9w== X-Gm-Message-State: AOAM5335/1LflVLs8wZtfQ2msokinADqDDEkH4H9KqZIOe90+EmU77Mo Rz/k4COmXIaalIdPUz5ySAFwKLCyLcA= X-Google-Smtp-Source: ABdhPJzf1vJ68XoG1X9pQQqONv1BcXe25XPRoryBK/gWlDOBfHolegKo61lQueyOr0jNf0MXJVDWAw== X-Received: by 2002:a17:906:7ce:: with SMTP id m14mr23536710ejc.513.1635175010683; Mon, 25 Oct 2021 08:16:50 -0700 (PDT) Received: from lelap.lan (catv-89-132-208-37.catv.broadband.hu. [89.132.208.37]) by smtp.gmail.com with ESMTPSA id r19sm1435819edo.77.2021.10.25.08.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 08:16:49 -0700 (PDT) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v2] gnu: Add c2ffi. Date: Mon, 25 Oct 2021 17:14:06 +0200 Message-Id: <20211025151405.12198-1-attila@lendvai.name> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- as muradm didn't respond, i took the liberty to addressed the concerns. i don't know how to credit the original author, so feel free to fix that part. let me know if there's anything else to fix. gnu/packages/cpp.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 643b85a8db..08df093f92 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -18,6 +18,8 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Milkey Mouse ;;; Copyright © 2021 Raghav Gururajan +;;; Copyright © 2021 muradm +;;; Copyright © 2021 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1398,3 +1400,49 @@ (define-public simdjson validation.") (home-page "https://github.com/simdjson/simdjson") (license license:asl2.0))) + +(define-public c2ffi + (let ((commit "f50243926a0afb589de1078a073ac08910599582") + (revision "1")) + (package + (name "c2ffi") + (home-page "https://github.com/rpav/c2ffi") + ;; Upstream has no releases, only one branch per LLVM release. Let's put + ;; the LLVM version into the version string, use a revision as a + ;; human-readable differentiation of the versions that gets imported + ;; into Guix, and also use the commit hash to be specific. + (version (git-version "11.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (file-name (git-file-name name version)) + (sha256 (base32 "17j73yb6v3lfvwwicl2f3yg141iz2dk1rf874qzqs5bkq64ldjsj")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; cmake-build-system default cmake version + (("VERSION 3.17") "VERSION 3.16.5") + ;; guix seems to be packaging LLVM libs separately + ;; thus -lLLVM is not working, every used library should + ;; be specified explicitly + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; llvm-11 at least seems to be built without RTTI + ;; llvm-12 on the other hand specifies -DLLVM_REQUIRES_RTTI=1 + ;; may fail with this flag when c2ffi for llvm-12 released + ;; https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + ;; Upstream has no tests. + #:tests? #f)) + (inputs + `(("clang" ,clang-11) + ("llvm" ,llvm-11))) + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+)))) -- 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 12 12:14:50 2022 Received: (at 50217) by debbugs.gnu.org; 12 Jan 2022 17:14:50 +0000 Received: from localhost ([127.0.0.1]:58866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7hCu-0005cr-G5 for submit@debbugs.gnu.org; Wed, 12 Jan 2022 12:14:49 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:46951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7hCp-0005cU-JV for 50217@debbugs.gnu.org; Wed, 12 Jan 2022 12:14:42 -0500 Received: by mail-wr1-f44.google.com with SMTP id l25so5411318wrb.13 for <50217@debbugs.gnu.org>; Wed, 12 Jan 2022 09:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9B6FIR0lUiN/MPATitoSI82bdL+aHVDbeEZuZCfgiUY=; b=MZfOyWukkChfprZmvzdC5ILO5moJsoCY48UkWLyb2ziD5NIORvQc6q1uLD11UGV+i3 hwk9ujl4a0Eolf6iioxMCDNggTYj9rlCaeUPVYBOzsebaYVqrfG2LF1QDUJSce4KtX0d bhI8p6nrAbkkk0/FmJiryiQGOwxvS6Qfq53CvQD0xJvhkpmzAcj8cd4t2t2izlBMHxRw 22XCAhRfGk1TVJNVvD33Ow6Zyvf2D4iDc4wstbpE/MpXTzi1VrdmxR+y3lG3ANK2j4um zqjgl3f8n3FkakzLGvS6YFCK4pJj9Cbxe0Wpe8sTM9mVsGA53tDG97mb6zzdsnpplSF5 1ARA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=9B6FIR0lUiN/MPATitoSI82bdL+aHVDbeEZuZCfgiUY=; b=xoMeRolkyWJJ0SqJrtspcdY6ApBO1F5MBHJYuiPL58syWkh7I+cCz+fAp9ZPf9t1jJ 9x19Y5+z1Ln2HfCxGRmZ4H9kI7kkXHTCp6fO7TpUsgs4RMMnigF20NqOnzarKLyJ2XpQ cj2Dz0A5Y3ROrDuP5nxcgeM/CYmifsiLzi6cHB91Txz8uCJ59L7n5SWs9cQ5wQlv5yvg Mc/ftfv1AO8bxTACYMbvhNaSxN5/8yspyMKrJjrEF7Dtz58uOslA18aUQgHvgfQIJZix dBmzcN2ffPqypQo/tr20KoMs8tnDM3c3d7ujahK36wBVAnrZXKi43NVLaW1rosuUWFa2 EQYQ== X-Gm-Message-State: AOAM5336H1xUab94PaDcu+Z5ERbJTz6Yb/nce3j283H8GgfZDjXvc9rQ +5wgG0FoH8hKasE9DY6ALRaXM86qiw/HQA== X-Google-Smtp-Source: ABdhPJwh1PDbk+MEmM7Jq1lf3r99ptUk+LnLw0/MVmk1WnNjmaC0XYfuuPQa0pRw9mBqNjqBwLL3sg== X-Received: by 2002:a05:6000:1d91:: with SMTP id bk17mr595950wrb.684.1642007673512; Wed, 12 Jan 2022 09:14:33 -0800 (PST) Received: from lelap.home ([2a02:120b:2c72:1dc0:2e07:56d9:2bb8:283d]) by smtp.gmail.com with ESMTPSA id r132sm777876wma.34.2022.01.12.09.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 09:14:32 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v3] gnu: Add c2ffi. Date: Wed, 12 Jan 2022 18:13:31 +0100 Message-Id: <20220112171329.22695-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v3 converts the input lists to the new format. Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (attila.lendvai[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.44 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.44 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v3 converts the input lists to the new format. Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (attila.lendvai[at]gmail.com) 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v3 converts the input lists to the new format. gnu/packages/cpp.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 718fb20652..d7e2ff49e5 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -22,6 +22,8 @@ ;;; Copyright © 2021 Nicolò Balzarotti ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Nikolay Korotkiy +;;; Copyright © 2021 muradm +;;; Copyright © 2021 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1452,3 +1454,48 @@ (define-public simdjson validation.") (home-page "https://github.com/simdjson/simdjson") (license license:asl2.0))) + +(define-public c2ffi + (let ((commit "f50243926a0afb589de1078a073ac08910599582") + (revision "1")) + (package + (name "c2ffi") + (home-page "https://github.com/rpav/c2ffi") + ;; Upstream has no releases, only one branch per LLVM release. Let's put + ;; the LLVM version into the version string, use a revision as a + ;; human-readable differentiation of the versions that gets imported + ;; into Guix, and also use the commit hash to be specific. + (version (git-version "11.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (file-name (git-file-name name version)) + (sha256 (base32 "17j73yb6v3lfvwwicl2f3yg141iz2dk1rf874qzqs5bkq64ldjsj")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; guix seems to be packaging LLVM libs separately + ;; thus -lLLVM is not working, every used library should + ;; be specified explicitly + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; llvm-11 at least seems to be built without RTTI + ;; llvm-12 on the other hand specifies -DLLVM_REQUIRES_RTTI=1 + ;; may fail with this flag when c2ffi for llvm-12 released + ;; https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + ;; Upstream has no tests. + #:tests? #f)) + (native-inputs + (list clang-11 llvm-11)) + (inputs + (list clang-11 llvm-11)) + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+)))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 07:34:23 2022 Received: (at 50217) by debbugs.gnu.org; 14 Feb 2022 12:34:23 +0000 Received: from localhost ([127.0.0.1]:40102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJaYc-0005xd-F9 for submit@debbugs.gnu.org; Mon, 14 Feb 2022 07:34:23 -0500 Received: from mail-ej1-f53.google.com ([209.85.218.53]:35778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJaYX-0005xN-R7 for 50217@debbugs.gnu.org; Mon, 14 Feb 2022 07:34:17 -0500 Received: by mail-ej1-f53.google.com with SMTP id qk11so16719175ejb.2 for <50217@debbugs.gnu.org>; Mon, 14 Feb 2022 04:34:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k1FthZ2dyTvjdd+BD/L/D3sPr1peuKwSei5VRn239Ww=; b=OR31aF72gc1U4gM7Ah4rE8bhPk+RoWHQEkKijoYKz/u7BcKdJozwUJU6FOnZrniya3 BtbD1y0wb7XQWz0p/3DNEG156C4DZI9f6sBj/2/rIegporxVjBHkIWbla3Ou3VNU0/iY bG3oVa/0TnMTOVN2iOTdBeQXFuJfFwnBpvMl/UPTjwGIsN0vrZIHvwfvUdEck+wcQVjE sz1g1x7HsAAW9ONHZnM7jJIMRlTYILQ0/FFHPC4GTVUwEa8xdLO1uv9VVwad/ZcSkhvL RuC74pkjVc+6xbFMtZ/Ww6UDYgRgb+SlbTPekxlkh8Kyg9xFvj/wyuk9zTC+QNz5LZns pE0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=k1FthZ2dyTvjdd+BD/L/D3sPr1peuKwSei5VRn239Ww=; b=8MGm0RqgAY2O1B8VospGgwu+ZU1D47uWv5WcasfxxXpiaqHzQIOyYAyCaHfexV+3VJ zUJ7dtwyATKLEI5ayDilm17l8B4ma6vU8OcyL4KFZ3uZUTZlZ13noMxwFUBAccIPM4rW p+NfQYl18OF1E1IN1o7HEbTep1kcz+IMH7Q8SewAFcCE6YIVLFvXKUJ3+vAQdqWp6wyG xyJnWv+u0ORxNIUKBAbexBQjqGQM6W/knafnV0EykuQ+5CRdLWooC1txjnogGy62xh41 5oeVMqJGgZiFEFo3Cw2VHEQFBzHQaiFP1oPWzpGiLhE73yAlAE3u30c31Xtv+b09BvdW Ec5g== X-Gm-Message-State: AOAM531wz03R69elhhyXEDfBkBh4f6Q4SvqrwgESwqx/Lid27ziV+KIq roIsOc6mDbvz/qZcaAS//gqsmuFVEDk= X-Google-Smtp-Source: ABdhPJyMvboj9sEzXaJXPTYCOb8r5Z99hlklgT23Aw2FwV9PWnMCNL9Mc0/ANMEoY8cPAifvYTCF2Q== X-Received: by 2002:a17:906:729d:: with SMTP id b29mr8329598ejl.471.1644842047793; Mon, 14 Feb 2022 04:34:07 -0800 (PST) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id q10sm10641214ejn.3.2022.02.14.04.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 04:34:06 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v4] gnu: Add c2ffi. Date: Mon, 14 Feb 2022 13:31:13 +0100 Message-Id: <20220214123112.20135-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- new in v4: - rebase to master - upstream introduced releases, so let's use git tags - use LLVM 12 - add a trivial test that invokes c2ffi --help gnu/packages/cpp.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 86138531c0..b394c8e515 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -25,6 +25,8 @@ ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent +;;; Copyright © 2021 muradm +;;; Copyright © 2021 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1717,3 +1719,48 @@ (define-public bloomberg-bde multi-threaded applications and network applications.") (home-page "https://github.com/bloomberg/bde") (license license:asl2.0)))) + +(define-public c2ffi + (let ((git-tag "12.0.0.0")) + (package + (name "c2ffi") + (home-page "https://github.com/rpav/c2ffi") + (version (string-append "v" git-tag)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; guix seems to be packaging LLVM libs separately + ;; thus -lLLVM is not working, every used library should + ;; be specified explicitly + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; If LLVM was built without RTTI, we need to also be built without + ;; it. See: https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./bin/c2ffi" "--help")))))) + (native-inputs + (list clang-12 llvm-12)) + (inputs + (list clang-12 llvm-12)) + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+)))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 10:30:24 2022 Received: (at 50217) by debbugs.gnu.org; 14 Feb 2022 15:30:24 +0000 Received: from localhost ([127.0.0.1]:42330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJdJ2-0003pu-Ah for submit@debbugs.gnu.org; Mon, 14 Feb 2022 10:30:24 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:40422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJdIz-0003ph-UU for 50217@debbugs.gnu.org; Mon, 14 Feb 2022 10:30:22 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id v3WL2600B4UW6Th013WLQ8; Mon, 14 Feb 2022 16:30:20 +0100 Message-ID: Subject: Re: [bug#50217] [PATCH v4] gnu: Add c2ffi. From: Maxime Devos To: Attila Lendvai , 50217@debbugs.gnu.org Date: Mon, 14 Feb 2022 16:30:14 +0100 In-Reply-To: <20220214123112.20135-1-attila@lendvai.name> References: <20210826210712.31273-1-mail@muradm.net> <20220214123112.20135-1-attila@lendvai.name> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-XO8hAdwGF9j4o2oxvzq9" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644852620; bh=I+JmScZIreCthF8jWoGMq2lRx+gZd0noCnGep3f85Us=; h=Subject:From:To:Date:In-Reply-To:References; b=m/3uxSpu6lD4506gT5Maz/lCeDXp/gFEe+8ZZDDoduHm+J0sxwwZ1KJCYmlfaC+8n o0PEHuRniooWq0MhgreiCRTNOvWb0JL3GhNA6nFGWSkBTV5KS4GgSIloCNVzls6QAi rA466YBP+oTXcTP6Lu4oquiJt/yA147CTpFGcMRlupFtXn1zgNHD2WNTZDcdq80aLz 4QH/TnRVHNxE4YRApLhravTR9Lc3UYWfx68KoQnn0BW9zS4Jn0WPlg3JQz3FW3Hbm8 Eg6tozEFDXd6M/LYQOlpigOvOxdIb5O6Jxu21TaVz4Pumaah1ETdnU6g1roU4mskSE AjcExISwb2jgg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50217 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-XO8hAdwGF9j4o2oxvzq9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 QXR0aWxhIExlbmR2YWkgc2NocmVlZiBvcCBtYSAxNC0wMi0yMDIyIG9tIDEzOjMxIFsrMDEwMF06 Cj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgIChyZXBsYWNlICdjaGVjawo+ICvCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqAgKGxhbWJkYSBfCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKGlu dm9rZSAiLi9iaW4vYzJmZmkiICItLWhlbHAiKSkpKSkpCgpGb3IgY3Jvc3MtY29tcGlsaW5nIGMy ZmZpLCB0aGlzIG5lZWRzIHRvIHJlc3BlY3QgIzp0ZXN0cz8sIGJlY2F1c2UKdGVzdHMgY2Fubm90 IGJlIHJ1biB3aGVuIGNyb3NzLWNvbXBpbGluZy4gIFRoaXMgd291bGQgYmUgZGV0ZWN0ZWQgYnkK Ii4vcHJlLWluc3QtZW52IGd1aXggbGludCIuCgpHcmVldGluZ3MsCk1heGltZS4K --=-XO8hAdwGF9j4o2oxvzq9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgp1hhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nVBAP4yiV5mW4cEZVsbGqPjm8DvFEr2 o3gE58+B5TlrGXnqwwEA93KvIU/6pdEkV2eGA81qlvigCk1CeF1xb7VoJMqe7gA= =iRdS -----END PGP SIGNATURE----- --=-XO8hAdwGF9j4o2oxvzq9-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 10:34:18 2022 Received: (at 50217) by debbugs.gnu.org; 14 Feb 2022 15:34:18 +0000 Received: from localhost ([127.0.0.1]:42335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJdMn-0003wD-Ra for submit@debbugs.gnu.org; Mon, 14 Feb 2022 10:34:18 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:32976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJdMm-0003w5-D8 for 50217@debbugs.gnu.org; Mon, 14 Feb 2022 10:34:17 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by michel.telenet-ops.be with bizsmtp id v3aE2600K4UW6Th063aEpS; Mon, 14 Feb 2022 16:34:14 +0100 Message-ID: Subject: Re: [bug#50217] [PATCH v4] gnu: Add c2ffi. From: Maxime Devos To: Attila Lendvai , 50217@debbugs.gnu.org Date: Mon, 14 Feb 2022 16:34:14 +0100 In-Reply-To: <20220214123112.20135-1-attila@lendvai.name> References: <20210826210712.31273-1-mail@muradm.net> <20220214123112.20135-1-attila@lendvai.name> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-3cxFwYmvQsGjgfAsjvRK" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644852855; bh=F5ZkGf78QxR8WIq9MgdvXhzoWhNjTVYf3NBqXZaA1PY=; h=Subject:From:To:Date:In-Reply-To:References; b=W32GNRPa+OOZX1lM+10niDe6Mba4qPwXe9rUP40ppape4W25wL8OyG6Qwy6iYmJIH wDYQI4+eSF5hKwZmiuCFhEB26G9ypZckfcZvj0J4jc6ZkPiwba3SLsW+vx71J10vcu tj+URtddsFt4f4P7CAMWdojZ+2XgWx4dOMGcCWoU85eDDigkiKRHlJGAoqs46O2ywb 7a1cjBtZztWReLkdEEgosMzkCdimdFuxZ3Gmabdc5zZJ6OPkDwp/KbG+RpOsfC41rB QJq0Fohgc2vrnFZ0IOSCfgLoOThWSv985rfzRQ/givBIoxp/WAVFXK4pfJ4Nz6dqYv m0KcUfU8KW3/w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50217 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-3cxFwYmvQsGjgfAsjvRK Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 QXR0aWxhIExlbmR2YWkgc2NocmVlZiBvcCBtYSAxNC0wMi0yMDIyIG9tIDEzOjMxIFsrMDEwMF06 Cj4gK8KgIChsZXQgKChnaXQtdGFnICIxMi4wLjAuMCIpKQo+ICvCoMKgwqAgKHBhY2thZ2UKPiAr wqDCoMKgwqDCoCAobmFtZSAiYzJmZmkiKQo+ICvCoMKgwqDCoMKgIChob21lLXBhZ2UgImh0dHBz Oi8vZ2l0aHViLmNvbS9ycGF2L2MyZmZpIikKPiArwqDCoMKgwqDCoCAodmVyc2lvbiAoc3RyaW5n LWFwcGVuZCAidiIgZ2l0LXRhZykpCj4gK8KgwqDCoMKgwqAgKHNvdXJjZQo+ICvCoMKgwqDCoMKg wqAgKG9yaWdpbgo+ICvCoMKgwqDCoMKgwqDCoMKgIChtZXRob2QgZ2l0LWZldGNoKQo+ICvCoMKg wqDCoMKgwqDCoMKgICh1cmkgKGdpdC1yZWZlcmVuY2UKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoCAodXJsIGhvbWUtcGFnZSkKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAo Y29tbWl0IHZlcnNpb24pKSkKCklzbid0IGl0IHRoZSBvdGhlciB3YXkgYXJvdW5kPyAgTG9va2lu ZyBhdCB0aGUgZ2l0IHJlcG8sIHRoZSBnaXQgdGFnIGlzCnYxMi4wLjAuMCwgbm90IDEyLjAuMC4w LCBhbmQgR3VpeCBzdHJpcHMgdmVyc2lvbiBwcmVmaXhlcyBsaWtlICJ2IiwgIlYiCmFuZCAidmVy c2lvbi0iLiAgQWxzbywgSUlVQywgdGhlIGN1cnJlbnQgY29uc2Vuc3VzIGlzIHRoYXQgaG9tZSBw YWdlcwphbmQgc291cmNlIGdpdCByZXBvcyBhcmUgc2VwYXJhdGUgdGhpbmdzLCBldmVuIGlmIHNv bWV0aW1lcyB0aGVpciBVUkwKY29pbmNpZGVzLCBzbyB0aGUgVVJMIG1heSBuZWVkIHRvIGJlIGNv cGllZCBpbnRvIHRoZSAndXJsJyBmaWVsZC4KCkdyZWV0aW5ncywKTWF4aW1lLgo= --=-3cxFwYmvQsGjgfAsjvRK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgp2dhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jEkAPwMsBZzvJT3LJmlxaNtlndrmbHh dxS+bGQE8IxGb5NlOwD/XUHkQRChejnjylvQYbzrxoFAcu5JdE/uXIKg0NspWgU= =IO93 -----END PGP SIGNATURE----- --=-3cxFwYmvQsGjgfAsjvRK-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 10:41:47 2022 Received: (at 50217) by debbugs.gnu.org; 14 Feb 2022 15:41:47 +0000 Received: from localhost ([127.0.0.1]:42340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJdU3-000492-Jn for submit@debbugs.gnu.org; Mon, 14 Feb 2022 10:41:47 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:34540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJdTz-00048e-K8 for 50217@debbugs.gnu.org; Mon, 14 Feb 2022 10:41:46 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id v3hh2600S4UW6Th013hhhb; Mon, 14 Feb 2022 16:41:41 +0100 Message-ID: <3831b49aabb202978ca3f33cdcb2a0db868a50d9.camel@telenet.be> Subject: Re: [bug#50217] [PATCH v4] gnu: Add c2ffi. From: Maxime Devos To: Attila Lendvai , 50217@debbugs.gnu.org Date: Mon, 14 Feb 2022 16:41:41 +0100 In-Reply-To: <20220214123112.20135-1-attila@lendvai.name> References: <20210826210712.31273-1-mail@muradm.net> <20220214123112.20135-1-attila@lendvai.name> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+MUUdLX4dYWVj7lIQPxl" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644853301; bh=W9j4noaf7RpRBTcqPtyVDHaGpOKxzhgWFDqR6CxuTrc=; h=Subject:From:To:Date:In-Reply-To:References; b=kV5ZvEib1IDwcwX9ZtHMzf8br1RI85KSyw9lQ17gLXSl8La3jkQlEmU9SxpbwueYd Oo72qNgjF2dJ22+2zX0iJplrMjosO1UmgNXUNZnMxOBn+jVZvaLmmUUGcm3ssiKBi7 C2kMh5E75Q7poM1++xBf8zHGHNT0jAQS/oZf/joik308+QOJMh7Ti9BP2UeT05qlK4 bywiq9tUV7Ptoy1LUxafj1vzqp5OS+UWbLh/TI6PDf48b6IoCWo/ds2ge8WczZ6WLn 5J9al/mI49XPqClkylyZYZd0tXpa4wHLxSjgmXwhTMZnRzbLCM4ftQ3k4VkUPrcY6U s+YjWkXverRMw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50217 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-+MUUdLX4dYWVj7lIQPxl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attila Lendvai schreef op ma 14-02-2022 om 13:31 [+0100]: > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (native-inputs > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list clang-12 llvm-12)) Is clang (the C compiler) required to compile c2fii, or would the usual gcc suffice? If the former, I would add a comment ;; only supports compilation with clang, gcc does not work here or the like. Is the version of clang and LLVM used for compiling c2ffi important? If not, I would write (native-inputs (list clang llvm)) such that the default clang and LLVM version in Guix is used. Greetings, Maxime. --=-+MUUdLX4dYWVj7lIQPxl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgp4NRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qIYAQDQkNGw0CrDkroWSqy4KxTHKALa GPAAuGEtotqpjtMfAgD9EF4xPPRfme0I3Z0VQOBJWPBvxYLY7YkR/KGQab4n3QI= =6jya -----END PGP SIGNATURE----- --=-+MUUdLX4dYWVj7lIQPxl-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 13:44:46 2022 Received: (at 50217) by debbugs.gnu.org; 15 Feb 2022 18:44:47 +0000 Received: from localhost ([127.0.0.1]:46398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK2oa-0000t2-Bc for submit@debbugs.gnu.org; Tue, 15 Feb 2022 13:44:46 -0500 Received: from mail-ed1-f52.google.com ([209.85.208.52]:37670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK2oY-0000sn-CG for 50217@debbugs.gnu.org; Tue, 15 Feb 2022 13:44:39 -0500 Received: by mail-ed1-f52.google.com with SMTP id q17so963834edd.4 for <50217@debbugs.gnu.org>; Tue, 15 Feb 2022 10:44:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=npDJlUgWEtEWZCm6IDLdwdJl3O/XrgRwd5htXwGfSRU=; b=ZP2y3VdJH3Dt3Tx/tog07nYfdkuzKqseMkrqCB/EU8bKGggOJmOWF8jBGOn55DEbLa wfhicxo3fAVaFBz3+58x5Ds/mjOINwVUzPJeQmyI2D5mMDQbUDVI03BNAa7NKUYL4ead bca4pqE7BAfVTivhWEQ5g19u/6xkbEDntWAqrEyAanctXZwYnAi3jUmFu4/oyQx5jSut x8xvO+PmlE9/tF51Mr6QjQrNGlw3zZpWtu5nt1D/A47Y2soh4zgLakbB+E7Vtn5L3AAe 6H+QIhcGoVpJA07vsG1HBIJ2DabFVh6PGENb9Eajrtc7yF8uA4cHM9QvqaztWsX9cgCF TwNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=npDJlUgWEtEWZCm6IDLdwdJl3O/XrgRwd5htXwGfSRU=; b=5BL0cUvr1xumEsKt61ZNlnRKWe4+zm3FIdWscQz85laTBMeuFBXeSPQcpT/v7RtQWx I53oLB++OPKCKAljnXAMA/xMS3Cc8IVzZ7zONJ97hDXGGzvDGZD4ICmaOrt/r9iwGbHN UFOGjls1eBNcYxyuVA+RGHijCZA1bCMXIRXDzPy6v4/Qmu5oHUVfYrI87zNbBgZtPQzX UPGjbShLVQKEWb91tfc3138SdBIHORczzXICZeMzC9mhlGLwSXtFkGVqOhZRfOqH1PrH CfB7ZZQMRxdHgAvh6xeAYFfJ2rMgkXad2VrgyS8yGYBNcG/VYyzrWUuUkC67GJrXphj1 RAZg== X-Gm-Message-State: AOAM532ypAXBAnDjbIajxZIJOUFjNAwXTKyWFCyyTYTkk/LiQgxl06/q QXOLagS65CAuPFYNb3/x5xTnBn/qbLc= X-Google-Smtp-Source: ABdhPJw9NVayY4jO4laSnEzDNCe0HDVjEEhhPuGXhdWWKPeLdOncxJRGJdxAYz/lyYz2VuKgFf7e4Q== X-Received: by 2002:a05:6402:2058:: with SMTP id bc24mr327066edb.106.1644950672233; Tue, 15 Feb 2022 10:44:32 -0800 (PST) Received: from localhost.localdomain ([2a02:ab88:3710:7c80:9130:5abf:96b3:dc0c]) by smtp.gmail.com with ESMTPSA id m15sm305882edd.78.2022.02.15.10.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 10:44:31 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v5] gnu: Add c2ffi. Date: Tue, 15 Feb 2022 19:43:08 +0100 Message-Id: <20220215184307.5436-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- thank you for the excellent suggestions Maxime! and sorry for being sloppy with guix lint and others! v5 should address everything that you pointed out. gnu/packages/cpp.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 86138531c0..bc6d69e225 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -25,6 +25,8 @@ ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent +;;; Copyright © 2021 muradm +;;; Copyright © 2021 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1717,3 +1719,47 @@ (define-public bloomberg-bde multi-threaded applications and network applications.") (home-page "https://github.com/bloomberg/bde") (license license:asl2.0)))) + +(define-public c2ffi + (package + (name "c2ffi") + (version "12.0.0.0") ; The first element is the Clang/LLVM version + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rpav/c2ffi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; Guix seems to be packaging LLVM libs separately thus -lLLVM + ;; won't work, every used library must be specified explicitly. + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; If LLVM was built without RTTI, we need to also be built without + ;; it. See: https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./bin/c2ffi" "--help"))))))) + (native-inputs + (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir` + (inputs + (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so + (home-page "https://github.com/rpav/c2ffi") + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 14:52:41 2022 Received: (at 50217) by debbugs.gnu.org; 15 Feb 2022 19:52:41 +0000 Received: from localhost ([127.0.0.1]:46526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK3sJ-00054q-1n for submit@debbugs.gnu.org; Tue, 15 Feb 2022 14:52:41 -0500 Received: from mail-ed1-f48.google.com ([209.85.208.48]:46641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK3sH-00054a-Bo for 50217@debbugs.gnu.org; Tue, 15 Feb 2022 14:52:34 -0500 Received: by mail-ed1-f48.google.com with SMTP id m17so48800edc.13 for <50217@debbugs.gnu.org>; Tue, 15 Feb 2022 11:52:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9BvoTmPxst7A+4J8GUVSOnKMWESn05C57NKZfNfocZs=; b=YAD1uYFMv2GXpM7A6A+8OZ1xNn2YI4njGfsMCw4xIo2KSBvr7oQ7Mrk0Wt1VtjgxPA bVETD2NpZwC+FusWKdTIteqN9JRXD+1s7HLXFSnTf7SRpyWYDVqW/q1oX0t0hIi3vzJ+ kjCmzqR7cDDV+jFI46QQ2XindHFLWhPH8WniD8UwKS3Wm8XanVA3P31I9nrWITRdHjbi CJ3K7Hn6m3BFo3CgyYgqvQM4adcaOw836bWB4TTDiEnhiOlR3GQjqrCwUepbEa1+2A5A wpd8AndGnFiJkpLC9jzlHtN24syzrkMmxqm6I8xONz6yJJY/Au7WTJ+fkG55a2Hd2RDO pwFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=9BvoTmPxst7A+4J8GUVSOnKMWESn05C57NKZfNfocZs=; b=w1aGrfnbreC6/whXVPY5UMK9oOaAyiAuFQE+1iGYcQe7v/W6kdx3qp4LU35TcO6NYm J6fH8xlKDXY273onbD4lJbNdhaUUn1z/rVZBrUTvs7FF0lm2gOKSdyLsOAKtNuQMb5FW bcZqZUUpLsU2gn8d4zv+xAQIcmjTXtAgnIQfrevSDfWiPTSCWGlJeGW4fTxYRwknWvGh /3YAAtfSpPcGNqXtgMlIdAcHHMFQRdJ4fMPjbFIQ7m/8w1uuO1qjfr/Ci9xqGYt/fw8o 50LCOyN8U72j9FOv86DEihfNDx+pJZlJ4nBisrgRSlojLBHfpfubRS5s1cwDCd2ehVpL XiCQ== X-Gm-Message-State: AOAM533Q7SzN6WaqrghN7p9sfWPt48fiVeJyavZ0tF59ma9J9lUTt9ro AJmFCNNK0cx7dnC4MemiTVJ1/OImmTU= X-Google-Smtp-Source: ABdhPJzZhEsRQWWujdFCun3FifHdbGrJRqTc4jK8OVjkfip9lY1xLBbrqpSkRL/cz91bjgvCysVQGw== X-Received: by 2002:a05:6402:d0d:: with SMTP id eb13mr581350edb.186.1644954747316; Tue, 15 Feb 2022 11:52:27 -0800 (PST) Received: from localhost.localdomain ([2a02:ab88:3710:7c80:9130:5abf:96b3:dc0c]) by smtp.gmail.com with ESMTPSA id m12sm452597edd.9.2022.02.15.11.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 11:52:26 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v6] gnu: Add c2ffi. Date: Tue, 15 Feb 2022 20:51:47 +0100 Message-Id: <20220215195146.25660-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v6: add a comment to clarify the versioning scheme. gnu/packages/cpp.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 86138531c0..6e690b593d 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -25,6 +25,8 @@ ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent +;;; Copyright © 2021 muradm +;;; Copyright © 2021 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1717,3 +1719,49 @@ (define-public bloomberg-bde multi-threaded applications and network applications.") (home-page "https://github.com/bloomberg/bde") (license license:asl2.0)))) + +(define-public c2ffi + (package + (name "c2ffi") + ;; As per the c2ffi README: the first three elements are encoding the + ;; required Clang/LLVM version, and the last one is the c2ffi revision. + (version "12.0.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rpav/c2ffi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; Guix seems to be packaging LLVM libs separately thus -lLLVM + ;; won't work, every used library must be specified explicitly. + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; If LLVM was built without RTTI, we need to also be built without + ;; it. See: https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./bin/c2ffi" "--help"))))))) + (native-inputs + (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir` + (inputs + (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so + (home-page "https://github.com/rpav/c2ffi") + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 04:18:34 2022 Received: (at 50217) by debbugs.gnu.org; 1 Mar 2022 09:18:34 +0000 Received: from localhost ([127.0.0.1]:35425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyeJ-0001qN-TD for submit@debbugs.gnu.org; Tue, 01 Mar 2022 04:18:34 -0500 Received: from mail-ed1-f52.google.com ([209.85.208.52]:41640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyeI-0001q6-BO for 50217@debbugs.gnu.org; Tue, 01 Mar 2022 04:18:27 -0500 Received: by mail-ed1-f52.google.com with SMTP id w3so21084236edu.8 for <50217@debbugs.gnu.org>; Tue, 01 Mar 2022 01:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nU+d9Rke0Vm6vLulVm08vPHvxOmp2r1KkZ6ByeXurFA=; b=nEqVAOy691vV0rfGKF52xEgHvynWIpGPvXtH70vKYf9v5hiM+uJzoAsAPpCEFj86OL yCv/nf1vYfXz0TEwr+wn7NjlKAM8b+kXlQJZ5cwytwDD8KFTQRfQjm8wGlIoMn/bZiHj x1EgZYvp5bA+24ZUm0iWLuOVFh532Z0/rijW89LrXIclayRRk1By77dqpck4iUtgEdWs fzTu33FtMbJGF48abGzYXTLVN2ev1f1k2vcTKJKq9jsT+1Y+yzQtEaS4CFcXB9cFWcg4 9KveIIvYJFf91Nf5Qp4awKVFkKfesrrb82xULj8SeYAyNlQ/UXckgsroPVjmOqbmngFQ ihoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=nU+d9Rke0Vm6vLulVm08vPHvxOmp2r1KkZ6ByeXurFA=; b=aegdNF5YFy7ERsFc/ETfObY0g5jDnsOmXhvTkIvGjlnrSIkJbCWirc0iilGtIcpUw0 v9LVtox+71e1m5T/RTPjTLftPL22nkVyCjPs0IYRNQ8kROlCh2hsUZOcWieerrJ+NnDv gAqcnreet8QYIGMh/sgLmuKyHwAfYJLIc9USI9VXl68GTgtLvUriU6HmSg35Su2wpdFN emO5C+FdYs0/Yh0VfbNTegyNqoQ+2xCIuvCRDmrLoIn/QzCGxRIgcljZBucF/ai/EhnJ wjsvylPQBsldzXBEQ7ojdq9c/pXPP8Zj3q7LyX+fgapT5LkuCx1Ydbtjnk7Hl/1n0m+N o66w== X-Gm-Message-State: AOAM532Zj6Pb4J4f9mchOCwsKBrZ1/XoPqP9ZhxOVveDrs1aYXLAvK8v SlHgBXkBXLXBqBg9fW5IsFJig2llsUk= X-Google-Smtp-Source: ABdhPJzeVJ1D/DsjwStWoI/5KJERH6MgmqlZ++BQFq7jPfpQiJxcM/Y60V6FDFDyI3ulkj+CuhZr2w== X-Received: by 2002:a05:6402:270a:b0:410:a3a4:ba06 with SMTP id y10-20020a056402270a00b00410a3a4ba06mr23139288edd.293.1646126300484; Tue, 01 Mar 2022 01:18:20 -0800 (PST) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id w11-20020a056402128b00b00412ec3f5f74sm6970714edv.62.2022.03.01.01.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:18:20 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v7] gnu: Add c2ffi. Date: Tue, 1 Mar 2022 10:17:26 +0100 Message-Id: <20220301091725.4972-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v7: rebased on master once again. gnu/packages/cpp.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index de6b529302..f00dc22eab 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -26,6 +26,8 @@ ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent ;;; Copyright © 2022 Efraim Flashner +;;; Copyright © 2022 muradm +;;; Copyright © 2022 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1721,3 +1723,49 @@ (define-public bloomberg-bde multi-threaded applications and network applications.") (home-page "https://github.com/bloomberg/bde") (license license:asl2.0)))) + +(define-public c2ffi + (package + (name "c2ffi") + ;; As per the c2ffi README: the first three elements are encoding the + ;; required Clang/LLVM version, and the last one is the c2ffi revision. + (version "12.0.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rpav/c2ffi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; Guix seems to be packaging LLVM libs separately thus -lLLVM + ;; won't work, every used library must be specified explicitly. + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; If LLVM was built without RTTI, we need to also be built without + ;; it. See: https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./bin/c2ffi" "--help"))))))) + (native-inputs + (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir` + (inputs + (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so + (home-page "https://github.com/rpav/c2ffi") + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 04:22:04 2022 Received: (at 50217) by debbugs.gnu.org; 1 Mar 2022 09:22:04 +0000 Received: from localhost ([127.0.0.1]:35432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyhi-0001w2-0E for submit@debbugs.gnu.org; Tue, 01 Mar 2022 04:22:04 -0500 Received: from mail-ej1-f48.google.com ([209.85.218.48]:45847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyhg-0001vp-5S for 50217@debbugs.gnu.org; Tue, 01 Mar 2022 04:21:56 -0500 Received: by mail-ej1-f48.google.com with SMTP id qa43so3600439ejc.12 for <50217@debbugs.gnu.org>; Tue, 01 Mar 2022 01:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4nZtA+HyGswhkFi+w39yP2JK8eF46Xy+9VtKs62N/+s=; b=AUxnq3SknmbjDSrVPCeNQrfLlAVWiuZVeD7nglCxcNNgPjHPgCRz/mtmxJK/d7rshm YoORwChywESy24WmDaUwnUXsEZ43kwJL4EiL2lkIEKXGKTQxLldn7ZpNf4AICCWyP7hx nk2XwmPVfCt9cTJtt3pfiX3/Jgi0aHM+/WZ1RIlAMBg/dzeV60oUVk3L8R+s1qcc+70A Aht+/nLD4Dt1k6QoRNItLzt3yY8B70odkhPScJL+YwNQCiG6PsMxHcWILTnXxrKHVQxn xaOBNraF+4wP8IPNve1JjNJSCsnWYkHCnED8ahzOsnycudO8CqizfQ+u2z991KYtIXZu KdZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=4nZtA+HyGswhkFi+w39yP2JK8eF46Xy+9VtKs62N/+s=; b=gyZk1emQ80R0AuIxmcNkIvUrQKUFck4gOqEqBlxMrDTv7qYm9D4vJQDXnkYWO4NHGp pgvsh4QZzYCYjmtoUkloOlV9/x90l+jpqOByiZnxAiOdxCDCndWpYHCH4fTbF4iTSetj QxlWdwqHkM3nGgJcsaZr6BTyqPN97ShnonbxEOUwciz3IZmdRljnAw7TvNYxF5vOaxRc 5icK0pu0aEXK7An82zId4Lu7J62T1l7UaArN5LvZfvaVV7I6KghR/KU/6x/aO3YsRMWz arNQFe0NQ2UUHYrDf86RMc0R+sSF+YZIGyKBb1gzt4aFMCaEnQmDGOF1luWZh4SpQOvD N4jA== X-Gm-Message-State: AOAM533tRDoNmd1o5G4dis5dBPWr4Gh0w/ONnuLAWJz7GXselL0BOhV+ o+rYeeO/aqHe8qJDgYiRSA0vzmqSxbs= X-Google-Smtp-Source: ABdhPJyb/+7VxP07GT6CS1mJ+1PUp9NlFa9tzTcI1zsB983XmM/kTNyq6QTn1Qt70RuB3KHRcjgThw== X-Received: by 2002:a17:906:255a:b0:6ce:3732:6f5f with SMTP id j26-20020a170906255a00b006ce37326f5fmr18190369ejb.565.1646126510528; Tue, 01 Mar 2022 01:21:50 -0800 (PST) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id p14-20020a05640210ce00b00413211746d4sm6893284edu.51.2022.03.01.01.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:21:50 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v8] gnu: Add c2ffi. Date: Tue, 1 Mar 2022 10:21:12 +0100 Message-Id: <20220301092110.6199-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v8: fix formatting. gnu/packages/cpp.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index de6b529302..82b17e916a 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -26,6 +26,8 @@ ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent ;;; Copyright © 2022 Efraim Flashner +;;; Copyright © 2022 muradm +;;; Copyright © 2022 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -1721,3 +1723,49 @@ (define-public bloomberg-bde multi-threaded applications and network applications.") (home-page "https://github.com/bloomberg/bde") (license license:asl2.0)))) + +(define-public c2ffi + (package + (name "c2ffi") + ;; As per the c2ffi README: the first three elements are encoding the + ;; required Clang/LLVM version, and the last one is the c2ffi revision. + (version "12.0.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rpav/c2ffi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; Guix seems to be packaging LLVM libs separately thus -lLLVM + ;; won't work, every used library must be specified explicitly. + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; If LLVM was built without RTTI, we need to also be built without + ;; it. See: https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./bin/c2ffi" "--help"))))))) + (native-inputs + (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir` + (inputs + (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so + (home-page "https://github.com/rpav/c2ffi") + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 13:37:54 2022 Received: (at 50217) by debbugs.gnu.org; 3 Mar 2022 18:37:54 +0000 Received: from localhost ([127.0.0.1]:43755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPqKj-0006c2-TL for submit@debbugs.gnu.org; Thu, 03 Mar 2022 13:37:54 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:35796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPqKh-0006bp-KT for 50217@debbugs.gnu.org; Thu, 03 Mar 2022 13:37:48 -0500 Received: by mail-wm1-f54.google.com with SMTP id v2-20020a7bcb42000000b0037b9d960079so5878913wmj.0 for <50217@debbugs.gnu.org>; Thu, 03 Mar 2022 10:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+vC5J2xxFCHvHpyIQZ8TwMAsT5gtNPfT3PDL2gyDOsA=; b=JxCH1m0J6eeCbYOi1MWN0ERUdlCEuGtQFzuKBQhdjSuRmvzxiVYS/R53AHW2KvZz/v Su8LynSVqBoZl1YYpBcWBtt9HOYOxaDeAlOKObCyqXFTnvDWQrtkRdJxbCZ375gfgj8w JavU7fn17nWvqFEvTHJTFkFfIYOc48/6kzMW0Q7nN8Xs2b8wPkYRmwfRgEJYIC3S4/8e 0jOCaDT2BCP8fmB0A6NJbQN1y9YtjBwPG2tZnYQWhBb8hOThpE/8tPeoZuI3cBOGI8CA ARB6G8uQ4HvRlr1gSrP2UTH7grZMwsux4cl1MnrAdbPFZ//SnOO3t+rDhR3S4m7B2lM1 Z4Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=+vC5J2xxFCHvHpyIQZ8TwMAsT5gtNPfT3PDL2gyDOsA=; b=YPWsAKbZ6VrYHGK8dbwbLeFTMHkAgZfj0qnn2DKvlQYII2rXJcId/Wbv7JHKBDsHgM jiJ5QDRsM9ueFYRTUXWJNVYgLWL2Wt0dxbLUkbHc8igaN/2LF/CaN9WWDC/SfUfcXvAU i7QPIefGlJ08GVjsOb6UhbjNRN49n+TvxpSQDNkZgd/sYJqdeVTr73zcoAAk6z+r1f7J z9hd2n1KNFRORkJGhcNqJD+iRaPhyI4pjT7iREToWIpBHfx/o0Gv0kds/2nz/FbCbl01 DZVwRkZJGVAvcmumC2jZsabpV963PYe4SAEHDa3LgGQBJuLw2w5BhwPKdOb9VaOEy8YC 4Ipg== X-Gm-Message-State: AOAM530m8BSMoaeWHyEgRDXQpduotlyFsXPq9XI+p8BTMrJmpT7bCz1m 9A8D+MgatXU6hjdFsTe+I/4g2OSCRSQ= X-Google-Smtp-Source: ABdhPJyFk0FvPuSkv84xfQ2lqp8GJz9mQgv8VAVXv2gWXoWtoRI8znJ7ctSMa0uGfAHd5HoNs3IRpg== X-Received: by 2002:a05:600c:384b:b0:381:10bc:9e43 with SMTP id s11-20020a05600c384b00b0038110bc9e43mr4860801wmr.181.1646332661586; Thu, 03 Mar 2022 10:37:41 -0800 (PST) Received: from localhost.localdomain ([2a02:ab88:3710:7c80:9130:5abf:96b3:dc0c]) by smtp.gmail.com with ESMTPSA id 9-20020a05600c268900b00381394d74a1sm2783207wmt.9.2022.03.03.10.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 10:37:41 -0800 (PST) From: Attila Lendvai To: 50217@debbugs.gnu.org Subject: [PATCH v9] gnu: Add c2ffi. Date: Thu, 3 Mar 2022 19:36:28 +0100 Message-Id: <20220303183627.29296-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50217 Cc: Attila Lendvai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Orignial work by muradm , fixes by Attila Lendvai. * gnu/packages/cpp.scm (c2ffi): New variable. --- v9 is a rebase once again. this time moving the package definition to an alphabetical point to avoid frequent conflicts with other additions. gnu/packages/cpp.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 06d22088f6..c37df93bda 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -26,6 +26,8 @@ ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent ;;; Copyright © 2022 Efraim Flashner +;;; Copyright © 2022 muradm +;;; Copyright © 2022 Attila Lendvai ;;; ;;; This file is part of GNU Guix. ;;; @@ -227,6 +229,52 @@ (define-public c++-gsl (home-page "https://github.com/microsoft/GSL/") (license license:expat))) +(define-public c2ffi + (package + (name "c2ffi") + ;; As per the c2ffi README: the first three elements are encoding the + ;; required Clang/LLVM version, and the last one is the c2ffi revision. + (version "12.0.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rpav/c2ffi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy")) + (modules '((guix build utils))) + (snippet + '(substitute* "CMakeLists.txt" + ;; Guix seems to be packaging LLVM libs separately thus -lLLVM + ;; won't work, every used library must be specified explicitly. + (("c2ffi PUBLIC clang-cpp LLVM") + "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \ +LLVMOption LLVMBitReader LLVMProfileData"))))) + (build-system cmake-build-system) + (arguments + '(;; If LLVM was built without RTTI, we need to also be built without + ;; it. See: https://stackoverflow.com/q/11904519 + #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./bin/c2ffi" "--help"))))))) + (native-inputs + (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir` + (inputs + (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so + (home-page "https://github.com/rpav/c2ffi") + (synopsis "Clang-based FFI wrapper generator") + (description "@code{c2ffi} is a tool for extracting definitions from C, C++, and +Objective C headers for use with foreign function call interfaces. It uses the +@code{Clang/LLVM} infrastructure to extract the data, and emits it in various formats, +including @code{json}.") + (license license:gpl2+))) + (define-public libzen (package (name "libzen") -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 15:35:46 2022 Received: (at 50217-done) by debbugs.gnu.org; 3 Mar 2022 20:35:46 +0000 Received: from localhost ([127.0.0.1]:43861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPsAs-00015o-IB for submit@debbugs.gnu.org; Thu, 03 Mar 2022 15:35:46 -0500 Received: from mout02.posteo.de ([185.67.36.66]:36165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPsAq-00015a-Mj for 50217-done@debbugs.gnu.org; Thu, 03 Mar 2022 15:35:45 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6D96E240101 for <50217-done@debbugs.gnu.org>; Thu, 3 Mar 2022 21:35:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1646339738; bh=kLq8Cn/dE0Neb5K2DrkyXUt3K2QVk9LKtuDncCKxiek=; h=From:To:Cc:Subject:Date:From; b=cEzroRI+PRKQ9Ny2BpOqhKUgRN2oUXt9877dQbJvljIT6IQ8B5PPiLxTjaU0fkwa+ udSGdo835YPsHd6BPeXNOzXe2CHLP8b1QcnJR05CwJYK71esYgHwzlbtyDXoNIG3PU /ckqXgeOThzHu7dzIYFij1AQvkiQWjq+IUij2H1nJ2te1b7PmfvOQ2el7nq1yDhJ5y CIngVnmgin90vm6SufWXkBlQmeRIiKCfHjAiguqoFriJMGfqbgksauq6g1MhMc117v HvL0Dug5WnEVBtg2L/Z0+BX0TKuZOJclmbK6oRKFnSUtJsYgMCfFvxz77iuWjfxWEA sNpc0xvSejlWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4K8jRY41pPz9rxL; Thu, 3 Mar 2022 21:35:37 +0100 (CET) References: <20210826210712.31273-1-mail@muradm.net> <20220303183627.29296-1-attila@lendvai.name> From: Guillaume Le Vaillant To: Attila Lendvai Subject: Re: [bug#50217] [PATCH v9] gnu: Add c2ffi. Date: Thu, 03 Mar 2022 20:34:31 +0000 In-reply-to: <20220303183627.29296-1-attila@lendvai.name> Message-ID: <87zgm6zsdj.fsf@kitej> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50217-done Cc: 50217-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Patch pushed as 8c303758590e368fc6a67bfff8dd1721e70afd93. I just slightly modified the commit message. Thanks. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYiEmmA8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j+kaQD+PeFQim1GZFgxHuhI6ufCjShCfnzVvR4w0cES Qbskji8A/A1CYq8zCP7M0FcciyjE1do0Y4IHnFhzf1wCDnRzPWXR =aH1/ -----END PGP SIGNATURE----- --=-=-=-- From unknown Wed Jun 18 00:28:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Apr 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator