guix-patches
[Top][All Lists]
Advanced

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

[bug#57625] [PATCH v1 03/03] WIP : gnu: Add pnet.


From: Adam Faiz
Subject: [bug#57625] [PATCH v1 03/03] WIP : gnu: Add pnet.
Date: Fri, 18 Nov 2022 17:28:42 +0800

On 11/18/22 17:20, Adam Faiz wrote:
From bfccb84dee219d100bea8fdcaaf4b2fde4be7f3a Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 18 Nov 2022 08:42:13 +0800
Subject: [PATCH 03/10] WIP : gnu: Add pnet.

* gnu/packages/dotgnu.scm (pnet): New variable.
---
 gnu/packages/dotgnu.scm | 87 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
index ad3b6c74e5..f8603173bc 100644
--- a/gnu/packages/dotgnu.scm
+++ b/gnu/packages/dotgnu.scm
@@ -48,3 +48,90 @@ (define-public treecc
and other language-based tools. It manages the generation of code to handle
 abstract syntax trees and operations upon the trees.")
     (license license:gpl2+)))
+
+(define-public pnet
+  (package
+    (name "pnet")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+ "https://download.savannah.gnu.org/releases/dotgnu-pnet/pnet-";
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1fsi8nkgvawjib2n4kyygfhfr31637bin84xkmr0apvsavihld7i"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (for-each delete-file-recursively '("libffi" "libgc"))
+                   (for-each delete-file '("compile"
+                                           "configure"
+                                           "config.guess"
+                                           "config.sub"
+                                           "depcomp"
+                                           "install-sh"
+                                           "ltconfig"
+                                           "ltcf-c.sh"
+                                           "ltmain.sh"
+                                           "Makefile.in"))
+                   (for-each (lambda (dir)
+ (delete-file (string-append dir "/Makefile.in")))
+                             (list "clrwrap"
+                                   "codegen"
+                                   "coremul"
+                                   "csant"
+                                   "cscc"
+                                   "csdoc"
+                                   "doc"
+                                   "dumpasm"
+                                   "engine"
+                                   "ilalink"
+                                   "ilasm"
+                                   "ildasm"
+                                   "ildd"
+                                   "ilfind"
+                                   "ilgac"
+                                   "ilheader"
+                                   "ilnative"
+                                   "ilranlib"
+                                   "ilsize"
+                                   "ilstrip"
+                                   "image"
+                                   "include"
+                                   "profiles"
+                                   "resgen"
+                                   "samples"
+                                   "support"
+                                   "tests"))
+ (substitute* "Makefile.am" ; Fix to not require bundled dependencies
+                     (("OPT_SUBDIRS \\+= lib.*") ""))
+                   (substitute* "support/hb_gc.c"
+ (("#include .*/libgc/include/gc.h.") "#include <gc.h>") + (("#include .*/libgc/include/gc_typed.h.") "#include <gc_typed.h>"))
+                   (substitute* "support/pt_defs.c"
+                     (("#include <errno.h>")
+ "#include <errno.h>\n#define GC_H 0\n#define GC_PTHREADS 1\n#include <gc_pthread_redirects.h>"))
+                   (substitute* "support/thread.c"
+                     ; Maybe GC_CreateThread can be used as replacement?
+                     (("result = GC_run_thread.*;")
+                      "result = thread_func(arg);"))))))
+    (build-system gnu-build-system)
+    (native-inputs (list autoconf automake libtool libatomic-ops))
+    (inputs (list treecc libffi libgc libgc-all-headers))
+    (arguments
+     (list #:configure-flags
+           #~(list
+ (string-append "CPPFLAGS=-I" #$(this-package-input "libffi") "/include/ffi" + " -I" #$(this-package-input "libgc") "/include/gc" + " -I" #$(this-package-input "libgc-all-headers") "/include/private"))
+           #:make-flags
+ #~(list (string-append "GCLIBS=")) ; libgc is already in the linker path
+                   ))
+    (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html";)
+    (synopsis "Compiler and libraries for the C# programming language")
+    (description
+     "The goal of this project is to build a suite of free software tools
+to build and execute .NET applications, including a C# compiler,
+assembler, disassembler, and runtime engine.")
+    (license license:gpl2+)))
--
2.38.0





reply via email to

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