From patchwork Tue Sep 6 15:53:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 42256 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C5B8827BBEA; Tue, 6 Sep 2022 17:07:01 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F3DD727BBE9 for ; Tue, 6 Sep 2022 17:07:00 +0100 (BST) Received: from localhost ([::1]:57270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVb6K-0002BX-61 for patchwork@mira.cbaines.net; Tue, 06 Sep 2022 12:07:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVatm-0004KJ-3i for guix-patches@gnu.org; Tue, 06 Sep 2022 11:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVatl-0001sh-Q2 for guix-patches@gnu.org; Tue, 06 Sep 2022 11:54:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVatl-0007US-M0 for guix-patches@gnu.org; Tue, 06 Sep 2022 11:54:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57625] WIP: gnu: Add pnet. References: <9d424667-868f-03f2-c521-8c10e106d6d3@disroot.org> In-Reply-To: <9d424667-868f-03f2-c521-8c10e106d6d3@disroot.org> Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Sep 2022 15:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57625 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57625@debbugs.gnu.org Received: via spool by 57625-submit@debbugs.gnu.org id=B57625.166247963728776 (code B ref 57625); Tue, 06 Sep 2022 15:54:01 +0000 Received: (at 57625) by debbugs.gnu.org; 6 Sep 2022 15:53:57 +0000 Received: from localhost ([127.0.0.1]:52434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVatg-0007U3-JU for submit@debbugs.gnu.org; Tue, 06 Sep 2022 11:53:57 -0400 Received: from knopi.disroot.org ([178.21.23.139]:59836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVate-0007Ts-M3 for 57625@debbugs.gnu.org; Tue, 06 Sep 2022 11:53:55 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 14A95400E1 for <57625@debbugs.gnu.org>; Tue, 6 Sep 2022 17:53:53 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id F3wmVhlrG1Uv for <57625@debbugs.gnu.org>; Tue, 6 Sep 2022 17:53:51 +0200 (CEST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662479629; bh=YB93nVoZDXr6/VMXtFmVpnT0s7yIjCaYtYjLrNYKRJo=; h=Date:To:From:Subject; b=EMNLRXym/t9BkokLNIL3tHTPEBIbPkE4ztotpNWScrbsQrCeYW0jj+IMgxJX3HONT CjzBsw+OzzFpIqtC7ArrzGqehudUNStdzEpGb5+Ne4jBvlSGoXlovS7cTkiNoW0cpY WSu3U5WJUQyfXyYzHTwu+/KzE2KZCqGr14HwmCG/TqUseY8U3AQ9IeA1NR5TDERQH5 lpRT/ge68FewbcTFoEEuCJfA9bHKzltQdbFT0gisdAvXfGHRC3zGk4LVvD7hntxk+J HiDQjxzV+7M9qtOLsSTu2xeb4mhAE45b+sIRDr+yCfTZSP0BWAibWYiS7pJmuxIUXk nBpvEqoG5vJfg== Date: Tue, 6 Sep 2022 23:53:44 +0800 Mime-Version: 1.0 Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 06 Sep 2022 12:04:31 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches X-Patchwork-Original-From: Adam Faiz via Guix-patches via From: Adam Faiz X-getmail-retrieved-from-mailbox: Patches From c1283813b73f0fd076f4007851d25db99ee2fe7a Mon Sep 17 00:00:00 2001 From: AwesomeAdam54321 Date: Tue, 6 Sep 2022 16:04:09 +0800 Subject: [PATCH 3/3] WIP: gnu: Add pnet. * gnu/packages/dotgnu.scm (pnet): New variable. --- gnu/packages/dotgnu.scm | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) + ; Maybe GC_CreateThread can be used as replacement? + (("result = GC_run_thread.*;") + "result = thread_func(arg);"))))))) + (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html") + (synopsis "Bootstrap 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. The initial target +platform is GNU/Linux, with other platforms to follow in the future.") + (license license:gpl2+))) diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm index 14e11b3653..976c4f1f15 100644 --- a/gnu/packages/dotgnu.scm +++ b/gnu/packages/dotgnu.scm @@ -50,3 +50,69 @@ (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")))) + (build-system gnu-build-system) + (native-inputs (list automake autoconf libatomic-ops)) + (inputs (list treecc libffi libgc libgc-private-headers-for-pnet)) + (arguments + (list #:configure-flags + #~(list + (string-append "CPPFLAGS=-I" #$libffi "/include/ffi" + " -I" #$libgc "/include/gc" + " -I" #$libgc-private-headers-for-pnet "/include/private")) + #:make-flags + #~(list (string-append "GCLIBS=")) ; libgc is already in the linker path + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unbundle-dependencies + (lambda _ + (for-each delete-file-recursively '("libffi" "libgc")))) + (add-before 'configure 'fix-makefile + (lambda _ + (substitute* "configure.in" ; Fix missing reference to RANLIB + (("AC_PROG_MAKE_SET") + "AC_PROG_MAKE_SET\nAC_PROG_RANLIB")) + (substitute* "Makefile.am" ; Fix to not require bundled dependencies + (("OPT_SUBDIRS \\+= lib.*") "")) + ; Fix bug where codegen/*.c files aren't compiled in install + (substitute* "codegen/Makefile.in" + (("$(MAKE) $(AM_MAKEFLAGS) install-am") + "$(MAKE) $(AM_MAKEFLAGS) install-am\n\t.c.o $(TREECC_SRCOUT)")) + (invoke "autoconf") + (invoke "aclocal") + (invoke "automake" "--add-missing") + (invoke "automake"))) + (add-before 'build 'fix-headers + (lambda _ + (substitute* "support/hb_gc.c" + (("#include .*/libgc/include/gc.h.") "#include ") + (("#include .*/libgc/include/gc_typed.h.") "#include ")) + (substitute* "support/pt_defs.c" + (("#include ") + "#include \n#include ")))) + (add-after 'fix-headers 'replace-removed-libgc-function + (lambda _ + (substitute* "support/thread.c"