Package: guix-patches;
Reported by: Adam Faiz <adam.faiz <at> disroot.org>
Date: Tue, 6 Sep 2022 14:55:02 UTC
Severity: normal
Tags: patch
Merged with 74609
Done: Efraim Flashner <efraim <at> flashner.co.il>
Bug is archived. No further changes may be made.
Message #55 received at 57625 <at> debbugs.gnu.org (full text, mbox):
From: Adam Faiz <adam.faiz <at> disroot.org> To: 57625 <at> debbugs.gnu.org Cc: Maxime Devos <maximedevos <at> telenet.be> Subject: [PATCH v3 3/4] gnu: Add pnet. Date: Mon, 26 Jun 2023 21:23:41 +0800
From 515d886c02492bc390db39330baefa6806349e20 Mon Sep 17 00:00:00 2001 Message-Id: <515d886c02492bc390db39330baefa6806349e20.1687784497.git.adam.faiz <at> disroot.org> In-Reply-To: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz <at> disroot.org> References: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz <at> disroot.org> From: AwesomeAdam54321 <adam.faiz <at> disroot.org> Date: Fri, 18 Nov 2022 08:42:13 +0800 Subject: [PATCH v3 3/4] gnu: Add pnet. * gnu/packages/dotgnu.scm (pnet): New variable. --- gnu/packages/dotgnu.scm | 98 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm index 7d59496f22..283168c5c0 100644 --- a/gnu/packages/dotgnu.scm +++ b/gnu/packages/dotgnu.scm @@ -24,9 +24,11 @@ (define-module (gnu packages dotgnu) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) #:use-module (gnu packages bdw-gc) - #:use-module (gnu packages libffi)) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex)) (define-public treecc (package @@ -48,3 +50,97 @@ (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 + "mirror://savannah/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")) + (for-each delete-file (find-files "." "Makefile\\.in$")) + (for-each delete-file (find-files "." "_grammar\\.(c|h)$")) + (for-each delete-file (find-files "." "_scanner\\.(c|h)$")) + ; Fix to not require bundled dependencies + (substitute* "configure.in" + (("FFILIBS='.*libffi.a'") "FFILIBS='-lffi'") + (("GCLIBS='.*libgc.a'") "GCLIBS='-lgc'") + ; AC_SEARCH_LIBJIT checks hardcoded header locations + (("search_libjit=true") + (string-append "search_libjit=false\n" + "JIT_LIBS=-ljit"))) + (substitute* "Makefile.am" + (("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/thread.c" + ; Maybe GC_CreateThread can be used as replacement? + (("result = GC_run_thread.*;") + "result = thread_func(arg);")) + (substitute* (list "codegen/Makefile.am" + "cscc/bf/Makefile.am" + "cscc/csharp/Makefile.am" + "cscc/c/Makefile.am" + "cscc/java/Makefile.am") + ; Generated files aren't prerequisites + (("TREECC_OUTPUT =.*") "")) + (substitute* "cscc/csharp/cs_grammar.y" + (("YYLEX") "yylex()")) + (substitute* "cscc/common/cc_main.h" + (("CCPreProc CCPreProcessorStream;" all) + (string-append "extern " all))) + (substitute* "csdoc/scanner.c" + (("int\ttoken;" all) + (string-append "extern " all))))))) + (build-system gnu-build-system) + (native-inputs + (list autoconf + automake + bison + flex + libtool + libatomic-ops + treecc)) + (inputs + (list libgc + libgc-all-headers + libjit)) + (arguments + (list #:configure-flags + #~(list + (string-append + "CPPFLAGS=-I" #$(this-package-input "libgc") "/include/gc" + " -I" #$(this-package-input "libgc-all-headers") "/include/private") + "--with-jit"))) + (native-search-paths + (list (search-path-specification + (variable "CSCC_LIB_PATH") + (files (list "lib/cscc/lib"))))) + (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html") + (synopsis "Compiler 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.40.1
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.