GNU bug report logs - #50217
[PATCH] gnu: Add c2ffi-11.0.0.

Previous Next

Package: guix-patches;

Reported by: muradm <mail <at> muradm.net>

Date: Thu, 26 Aug 2021 21:08:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#50217: closed ([PATCH] gnu: Add c2ffi-11.0.0.)
Date: Thu, 03 Mar 2022 20:36:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 03 Mar 2022 20:34:31 +0000
with message-id <87zgm6zsdj.fsf <at> kitej>
and subject line Re: [bug#50217] [PATCH v9] gnu: Add c2ffi.
has caused the debbugs.gnu.org bug report #50217,
regarding [PATCH] gnu: Add c2ffi-11.0.0.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
50217: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50217
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: muradm <mail <at> muradm.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add c2ffi-11.0.0.
Date: Fri, 27 Aug 2021 00:07:12 +0300
* 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 <brettg <at> gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse <at> meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg <at> raghavgururajan.name>
+;;; Copyright © 2021 muradm <mail <at> muradm.net>
 
 ;;;
 ;;; 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



[Message part 3 (message/rfc822, inline)]
From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Attila Lendvai <attila <at> lendvai.name>
Cc: 50217-done <at> debbugs.gnu.org
Subject: Re: [bug#50217] [PATCH v9] gnu: Add c2ffi.
Date: Thu, 03 Mar 2022 20:34:31 +0000
[Message part 4 (text/plain, inline)]
Patch pushed as 8c303758590e368fc6a67bfff8dd1721e70afd93.
I just slightly modified the commit message.
Thanks.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.