emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50217: closed ([PATCH] gnu: Add c2ffi-11.0.0.)


From: GNU bug Tracking System
Subject: bug#50217: closed ([PATCH] gnu: Add c2ffi-11.0.0.)
Date: Thu, 03 Mar 2022 20:36:02 +0000

Your message dated Thu, 03 Mar 2022 20:34:31 +0000
with message-id <87zgm6zsdj.fsf@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@gnu.org.)


-- 
50217: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50217
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- 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@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 muradm <mail@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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#50217] [PATCH v9] gnu: Add c2ffi. Date: Thu, 03 Mar 2022 20:34:31 +0000
Patch pushed as 8c303758590e368fc6a67bfff8dd1721e70afd93.
I just slightly modified the commit message.
Thanks.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]