GNU bug report logs - #57625
gnu: Add pnet.

Previous Next

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57625 in the body.
You can then email your comments to 57625 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 14:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adam Faiz <adam.faiz <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 06 Sep 2022 14:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] WIP: Add pnet.
Date: Tue, 6 Sep 2022 16:48:01 +0800
Hello everyone,

The patch to add pnet from DotGNU is a work in progress. Currently it 
fails to build because pnet-0.8.0/support/pt_defs.c has undefined 
references to the GC_pthread_* functions, even after I added 
<gc_pthread_redirects.h> to its included headers.




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 15:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: [PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.
Date: Tue, 6 Sep 2022 23:34:19 +0800
From feec1f999877de9ae411653c76bbf144cc6c7b2d Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Tue, 6 Sep 2022 14:08:33 +0800
Subject: [PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.

* gnu/packages/bdw-gc.scm (libgc-private-headers-for-pnet): New private 
variable.
---
 gnu/packages/bdw-gc.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 268f0703b8..3bf2a8f2f6 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages bdw-gc)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages hurd))
@@ -122,6 +123,41 @@ (define-public libgc/back-pointers
        ,@(package-arguments libgc)))
     (synopsis "The BDW garbage collector, with back-pointer tracking")))

+(define-public libgc-private-headers-for-pnet
+  (hidden-package
+   (package
+     (name "libgc-private-headers")
+     (version (package-version libgc))
+     (source (origin
+               (method url-fetch)
+               (uri (string-append 
"https://github.com/ivmai/bdwgc/releases"
+                                   "/download/v" version "/gc-" version 
".tar.gz"))
+               (sha256
+                (base32
+                 "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3"))))
+     (build-system copy-build-system)
+     (arguments
+      '(#:install-plan
+        '(("include/config.h.in" "include/private/config.h")
+          ("include/gc_tiny_fl.h" "include/private/gc_tiny_fl.h")
+          ("include/gc_mark.h" "include/private/gc_mark.h")
+          ("include/private/gcconfig.h" "include/private/gcconfig.h")
+          ("include/private/gc_hdrs.h" "include/private/gc_hdrs.h")
+          ("include/private/gc_atomic_ops.h" 
"include/private/gc_atomic_ops.h")
+          ("include/private/gc_locks.h" "include/private/gc_locks.h")
+          ("include/private/gc_priv.h" "include/private/gc_priv.h"))
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'fix-includes
+            (lambda _
+              (substitute* "include/private/gc_priv.h"
+                (("#include .*/gc_tiny_fl.h") "#include <gc_tiny_fl.h>")
+                (("#include .*/gc_mark.h") "#include <gc_mark.h>")))))))
+     (synopsis "Private headers of libgc for pnet")
+     (description "Private headers in libgc that are used in pnet.")
+     (home-page "https://www.hboehm.info/gc/")
+     (license (x11-style (string-append home-page "license.txt"))))))
+
 (define-public libatomic-ops
   (package
     (name "libatomic-ops")

base-commit: 9fa3e90789203109f6f86ab41b48c65f15451d4e
-- 
2.37.2






Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 15:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: [PATCH 2/3] gnu: Add treecc.
Date: Tue, 6 Sep 2022 23:39:54 +0800
From 72b17b99a7318626dd41db831201c9df64e4defd Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Tue, 6 Sep 2022 15:51:16 +0800
Subject: [PATCH 2/3] gnu: Add treecc.

* gnu/packages/dotgnu.scm: New file.
---
 gnu/packages/dotgnu.scm | 52 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 gnu/packages/dotgnu.scm

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
new file mode 100644
index 0000000000..14e11b3653
--- /dev/null
+++ b/gnu/packages/dotgnu.scm
@@ -0,0 +1,52 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dotgnu)
+  #:use-module ((guix licenses)
+                #:prefix license:)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu))
+
+(define-public treecc
+  (package
+    (name "treecc")
+    (version "0.3.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+ 
"https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.gnu.org/software/dotgnu/")
+    (synopsis "Abstract syntax tree compiler compiler")
+    (description
+     "The treecc program is designed to assist in the development of 
compilers
+and other language-based tools.  It manages the generation of code to 
handle
+abstract syntax trees and operations upon the trees.")
+    (license license:gpl2+)))
-- 
2.37.2





Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 15:54:01 GMT) Full text and rfc822 format available.

Message #14 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: WIP: gnu: Add pnet.
Date: Tue, 6 Sep 2022 23:53:44 +0800
From c1283813b73f0fd076f4007851d25db99ee2fe7a Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
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(+)

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 
<gc.h>")
+                     (("#include .*/libgc/include/gc_typed.h.") 
"#include <gc_typed.h>"))
+                   (substitute* "support/pt_defs.c"
+                     (("#include <errno.h>")
+                      "#include <errno.h>\n#include 
<gc_pthread_redirects.h>"))))
+               (add-after 'fix-headers 'replace-removed-libgc-function
+                 (lambda _
+                   (substitute* "support/thread.c"
+                     ; 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+)))
-- 
2.37.2



I also could use help with the (substitute* "codegen/Makefile.in" ...) 
part, since I don't know how what the proper regexp is to make it match.




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 16:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Adam Faiz <adam.faiz <at> disroot.org>, 57625 <at> debbugs.gnu.org
Subject: Re: [bug#57625] [PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.
Date: Tue, 6 Sep 2022 18:55:56 +0200
[Message part 1 (text/plain, inline)]
On 06-09-2022 17:34, Adam Faiz via Guix-patches via wrote:
> +(define-public libgc-private-headers-for-pnet
> +  (hidden-package
> +   (package
> +     (name "libgc-private-headers")
> +     (version (package-version libgc))
> +     (source (origin
> +               (method url-fetch)
> +               (uri (string-append 
> "https://github.com/ivmai/bdwgc/releases"
> +                                   "/download/v" version "/gc-" 
> version ".tar.gz"))
> +               (sha256
> +                (base32
> + "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3")))) 

Try (source (package-source libgc)) instead.  That way, the hash and URL 
remains correct even if libgc is updated.

        '(("include/config.h.in" "include/private/config.h")

I'd think you need to install include/config.h instead (*).

+     (license (x11-style (string-append home-page "license.txt"))))))

(license (package-license libgc)), in case the license of libgc ever 
changes.

(*) Untested proposal:

(define-public libgc-all-headers ; TODO(core-updates) merge into libgc
  (package
    (inherit libgc)
    (name "libgc-all-headers")
    (outputs "out")
    (arguments
      (append (package-arguments libgc)
        (list #:imported-modules
               '((guix build gnu-build-system) (guix build 
copy-build-system))
               #:phases
               #~(modify-phases
                       (add-after 'install 'delete-library
                         (lambda _
                           (delete-file-recursively (string-append 
#$output "/lib"))))
                       (add-after 'install 'delete-private-header
                         (lambda _
                           (delete-file-recursively (string-append 
#$output "/lib"))))
                       (add-after 'install 'install-private
                         (lambda arguments
                           ((@ (guix build copy-build-system) install)
                            (append (list #:install-plan 
'(("include/config.h" [...]) [...]))
                                          arguments))))))))
    (synopsis ...)
    (description ...)))

Also, why a hidden package?

Greetings,
Maxime.


[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 17:24:02 GMT) Full text and rfc822 format available.

Message #20 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Adam Faiz <adam.faiz <at> disroot.org>, 57625 <at> debbugs.gnu.org
Subject: Re: [bug#57625] WIP: gnu: Add pnet.
Date: Tue, 6 Sep 2022 19:23:03 +0200
[Message part 1 (text/plain, inline)]
On 06-09-2022 17:53, Adam Faiz via Guix-patches via wrote:
> From c1283813b73f0fd076f4007851d25db99ee2fe7a Mon Sep 17 00:00:00 2001
> From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
> 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(+)
>
> 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"))

Do #$(this-package-input "libgc") instead of #$libgc. That way, package 
transformations can take effect. Likewise for 
libgc-private-headers-for-pnet.

> + #: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"))))

Move this delete-file-recursively two to a source snippet. From 
(guix)Snippets versus Phases:

> Origin snippets are
> typically used to remove unwanted files such as bundled libraries, [...]

> + (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")))

This can be simplified -- after the 'unpack' phase, insert a phase that 
deletes 'configure'. Another phase will automatically call autoconf and 
the rest. Even better would be to delete it in a snippet, to avoid the 
result of "guix build --source" containing non-source code.

If you do that, you might as well remove 'compile', 'compile.guess', 
'depcomp', 'install-sh', 'ltconfig', 'Makefile.in', 'ltcf-c.sh', 
'ltmain.sh' too. There are also various Makefile.in in subdirectories, 
you can find them with (find-files "." "Makefile\\.in").

> + (add-before 'build 'fix-headers
> +                 (lambda _
> +                   (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#include 
> <gc_pthread_redirects.h>"))))
> +               (add-after 'fix-headers 'replace-removed-libgc-function
> +                 (lambda _
> +                   (substitute* "support/thread.c"
> +                     ; Maybe GC_CreateThread can be used as replacement?
> +                     (("result = GC_run_thread.*;")
> +                      "result = thread_func(arg);")))))))

If my proposal of deleting libffi and libgc in a snippet is followed, 
then I think these substitutions (and the change to codegen/Makefile.in, 
Makefile.am and configure.in) should be moved as well to the snippet. 
From (guix)Snippets versus Phases:

> The source derived
> from an origin (*) should produce a source that can be used to build the
> package on any system that the upstream package supports (i.e., act as
> the corresponding source).
(*): this is the result of "./pre-inst-env guix build --source pnet"

> + (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
> +    (synopsis "Bootstrap compiler and libraries for the C# 
> programming language")
Where can I find the information that it's a 'Bootstrap compiler' and 
not just a compiler?
> + (description
> +     "The goal of this project is to build a suite of Free Software 
> tools
Why is 'free sofware' capitalised?
> +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.")

Given that DotGNU has been decommissioned, I think the future goals 
aren't relevant anymore. How about:

"DotGNU Portable.NET is an implementation of .NET.  It can build and execute
.NET applications, including a C# compiler, assembler, disassembler,
and runtime engine."

instead?  If it turns out it doesn't support GNU/Hurd, we have a 
'supported-systems' field to encode that information in, duplicating it 
in the description in unnecessary.

> + (license license:gpl2+)))

Greetings,
Maxime

[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Tue, 06 Sep 2022 18:08:01 GMT) Full text and rfc822 format available.

Message #23 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Adam Faiz <adam.faiz <at> disroot.org>, 57625 <at> debbugs.gnu.org
Subject: Re: [bug#57625] [PATCH 2/3] gnu: Add treecc.
Date: Tue, 6 Sep 2022 20:07:33 +0200
[Message part 1 (text/plain, inline)]
On 06-09-2022 17:39, Adam Faiz via Guix-patches via wrote:
>
> +  (package
> +    (name "treecc")
> +    (version "0.3.10")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> + "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
> +                    version ".tar.gz"))
> +              (sha256
> +               (base32
> + "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay")))) 

Similarly to pnet, configure, Makefile.in, ..., config.sub and 
config.guess need to be regenerated too.

config.sub and config.guess are particularly important, old versions 
don't support new architectures. E.g., the bundled config.sub does not 
support aarch64.

Greetings,
Maxime

[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Wed, 07 Sep 2022 02:49:02 GMT) Full text and rfc822 format available.

Message #26 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: Re: [bug#57625] [PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.
Date: Wed, 7 Sep 2022 10:48:45 +0800
On 9/7/22 00:55, Maxime Devos wrote:
> Also, why a hidden package? 
> Greetings,
> Maxime.
I wasn't sure if the package would be useful being exposed to the user 
interface, since it's specific to pnet's needs.

> (*) Untested proposal:
> 
> (define-public libgc-all-headers ; TODO(core-updates) merge into libgc
>   (package
>     (inherit libgc)
>     (name "libgc-all-headers")
>     (outputs "out")
>     (arguments
>       (append (package-arguments libgc)
>         (list #:imported-modules
>                '((guix build gnu-build-system) (guix build copy-build-system))
>                #:phases
>                #~(modify-phases
>                        (add-after 'install 'delete-library
>                          (lambda _
>                            (delete-file-recursively (string-append #$output "/lib"))))

>                        (add-after 'install 'delete-private-header
>                          (lambda _
>                            (delete-file-recursively (string-append #$output "/lib"))))
Why is 'delete-private-header the same as 'delete-library?
Was it a typo, and supposed to delete something else("include/private"?)
>                        (add-after 'install 'install-private
>                          (lambda arguments
>                            ((@ (guix build copy-build-system) install)
>                             (append (list #:install-plan '(("include/config.h" [...]) [...]))
>                                           arguments))))))))
>     (synopsis ...)
>     (description ...)))
Thanks, this looks much better than what I wrote. I didn't know how I 
could inherit it from libgc. I can use this in the V1 for this patch.




Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 24 Sep 2022 13:16:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Fri, 18 Nov 2022 09:16:02 GMT) Full text and rfc822 format available.

Message #31 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: [PATCH v1 01/03] gnu: Add libgc-all-headers.
Date: Fri, 18 Nov 2022 17:15:02 +0800
From 6e3a2e2cb6d206c0dd9104968e3d98011b4bb3bb Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Fri, 18 Nov 2022 07:39:38 +0800
Subject: [PATCH v1 01/03] gnu: Add libgc-all-headers.

* gnu/packages/bdw-gc.scm (libgc-all-headers): New variable.
---
 gnu/packages/bdw-gc.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
Total 22 documents matching your query.

1. [bug#56807] [PATCH] [WIP] Update Julia to 1.8.0 (score: 212)
index c812248e86..442d917168 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -26,7 +26,9 @@ (define-module (gnu packages bdw-gc)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system copy)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages hurd))

@@ -90,6 +92,33 @@ (define-public libgc

    (license (x11-style (string-append home-page "license.txt")))))

+(define-public libgc-all-headers ; TODO(core-updates) merge into libgc
+  (package
+    (inherit libgc)
+    (name "libgc-all-headers")
+    (outputs '("out"))
+    (build-system copy-build-system)
+    (arguments
+             (list #:install-plan
+                   #~'(("include/config.h.in" "include/private/config.h")
+                     ("include/gc_tiny_fl.h" 
"include/private/gc_tiny_fl.h")
+                     ("include/gc_mark.h" "include/private/gc_mark.h")
+                     ("include/private/gcconfig.h" 
"include/private/gcconfig.h")
+                     ("include/private/gc_hdrs.h" 
"include/private/gc_hdrs.h")
+                     ("include/private/gc_atomic_ops.h" 
"include/private/gc_atomic_ops.h")
+                     ("include/private/gc_locks.h" 
"include/private/gc_locks.h")
+                     ("include/private/gc_priv.h" 
"include/private/gc_priv.h"))
+                   #:phases
+                   #~(modify-phases %standard-phases
+                       (add-before 'install 'fix-headers
+                         (lambda _
+                           (with-directory-excursion "include/private"
+                             (substitute* "gc_priv.h"
+                               (("#include .*/gc_tiny_fl.h.") "#include 
<gc_tiny_fl.h>")
+                               (("#include .*/gc_mark.h.") "#include 
<gc_mark.h>"))))))))
+    (synopsis "Headers of libgc")
+    (description "All headers of libgc")))
+
 ;; TODO: Add a static output in libgc in the next rebuild cycle.
 (define-public libgc/static-libs
   (package/inherit
-- 
2.38.0




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Fri, 18 Nov 2022 09:21:02 GMT) Full text and rfc822 format available.

Message #34 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: [PATCH v1 02/03] gnu: Add treecc.
Date: Fri, 18 Nov 2022 17:20:30 +0800
On 11/18/22 17:15, Adam Faiz wrote:
From 38a45d7451442a4905cab043adb5f3a514929495 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Fri, 18 Nov 2022 08:31:56 +0800
Subject: [PATCH v1 02/03] gnu: Add treecc.

* gnu/packages/dotgnu.scm: New file.
---
 gnu/packages/dotgnu.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 gnu/packages/dotgnu.scm

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
new file mode 100644
index 0000000000..ad3b6c74e5
--- /dev/null
+++ b/gnu/packages/dotgnu.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dotgnu)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses)
+                #:prefix license:)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages libffi))
+
+(define-public treecc
+  (package
+    (name "treecc")
+    (version "0.3.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+ 
"https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.gnu.org/software/dotgnu/")
+    (synopsis "Abstract syntax tree compiler compiler")
+    (description
+     "The treecc program is designed to assist in the development of 
compilers
+and other language-based tools.  It manages the generation of code to 
handle
+abstract syntax trees and operations upon the trees.")
+    (license license:gpl2+)))
-- 
2.38.0




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Fri, 18 Nov 2022 09:29:02 GMT) Full text and rfc822 format available.

Message #37 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: Re: [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 <at> 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




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Sat, 19 Nov 2022 10:34:01 GMT) Full text and rfc822 format available.

Message #40 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: [PATCH v2 1/3] gnu: Add libgc-all-headers.
Date: Sat, 19 Nov 2022 18:33:28 +0800
From 5ddddd9a24d9b319e722984e19ab26ba02779752 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Fri, 18 Nov 2022 07:39:38 +0800
Subject: [PATCH v2 1/3] gnu: Add libgc-all-headers.

* gnu/packages/bdw-gc.scm (libgc-all-headers): New variable.
---
 gnu/packages/bdw-gc.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index c812248e86..947a50f738 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -26,7 +26,9 @@ (define-module (gnu packages bdw-gc)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system copy)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages hurd))

@@ -90,6 +92,33 @@ (define-public libgc

    (license (x11-style (string-append home-page "license.txt")))))

+(define-public libgc-all-headers ; TODO(core-updates) merge into libgc
+  (package
+    (inherit libgc)
+    (name "libgc-all-headers")
+    (outputs '("out"))
+    (build-system copy-build-system)
+    (arguments
+             (list #:install-plan
+                   #~'(("include/config.h.in" "include/private/config.h")
+                     ("include/gc_tiny_fl.h" 
"include/private/gc_tiny_fl.h")
+                     ("include/gc_mark.h" "include/private/gc_mark.h")
+                     ("include/private/gcconfig.h" 
"include/private/gcconfig.h")
+                     ("include/private/gc_hdrs.h" 
"include/private/gc_hdrs.h")
+                     ("include/private/gc_atomic_ops.h" 
"include/private/gc_atomic_ops.h")
+                     ("include/private/gc_locks.h" 
"include/private/gc_locks.h")
+                     ("include/private/gc_priv.h" 
"include/private/gc_priv.h"))
+                   #:phases
+                   #~(modify-phases %standard-phases
+                       (add-before 'install 'fix-headers
+                         (lambda _
+                           (with-directory-excursion "include/private"
+                             (substitute* "gc_priv.h"
+                               (("#include .*/gc_tiny_fl.h.") "#include 
<gc_tiny_fl.h>")
+                               (("#include .*/gc_mark.h.") "#include 
<gc_mark.h>"))))))))
+    (synopsis "Headers of libgc")
+    (description "All headers of libgc.")))
+
 ;; TODO: Add a static output in libgc in the next rebuild cycle.
 (define-public libgc/static-libs
   (package/inherit
-- 
2.38.1




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Sat, 19 Nov 2022 10:36:01 GMT) Full text and rfc822 format available.

Message #43 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: [PATCH v2 2/3] gnu: Add treecc.
Date: Sat, 19 Nov 2022 18:35:31 +0800
From 27fb538641db2bb29928422a87c69e6d774a85ca Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Fri, 18 Nov 2022 08:31:56 +0800
Subject: [PATCH v2 2/3] gnu: Add treecc.

* gnu/packages/dotgnu.scm: New file.
---
 gnu/packages/dotgnu.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 gnu/packages/dotgnu.scm

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
new file mode 100644
index 0000000000..ad3b6c74e5
--- /dev/null
+++ b/gnu/packages/dotgnu.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dotgnu)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses)
+                #:prefix license:)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages libffi))
+
+(define-public treecc
+  (package
+    (name "treecc")
+    (version "0.3.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+ 
"https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.gnu.org/software/dotgnu/")
+    (synopsis "Abstract syntax tree compiler compiler")
+    (description
+     "The treecc program is designed to assist in the development of 
compilers
+and other language-based tools.  It manages the generation of code to 
handle
+abstract syntax trees and operations upon the trees.")
+    (license license:gpl2+)))
-- 
2.38.1




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Sat, 19 Nov 2022 10:38:02 GMT) Full text and rfc822 format available.

Message #46 received at 57625 <at> debbugs.gnu.org (full text, mbox):

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 57625 <at> debbugs.gnu.org
Subject: Re: [PATCH v2 3/3] gnu: Add pnet.
Date: Sat, 19 Nov 2022 18:37:39 +0800
From 832c95bc06cbb55f8456cf174e617052b2ec4131 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Fri, 18 Nov 2022 08:42:13 +0800
Subject: [PATCH v2 3/3] WIP : gnu: Add pnet.

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

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
index ad3b6c74e5..3efa3b1f3c 100644
--- a/gnu/packages/dotgnu.scm
+++ b/gnu/packages/dotgnu.scm
@@ -48,3 +48,62 @@ (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 delete-file (find-files "." "Makefile\\.in"))
+                   (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.1




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Mon, 26 Jun 2023 13:18:02 GMT) Full text and rfc822 format available.

Message #49 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 1/4] gnu: Add libgc-all-headers.
Date: Mon, 26 Jun 2023 21:17:14 +0800
From 94149f940fc7dd3c052cfa9765933303abb7a4ee Mon Sep 17 00:00:00 2001
Message-Id: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz <at> disroot.org>
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Fri, 18 Nov 2022 07:39:38 +0800
Subject: [PATCH v3 1/4] gnu: Add libgc-all-headers.

* gnu/packages/bdw-gc.scm (libgc-all-headers): New variable.
---
 gnu/packages/bdw-gc.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 5ff4649716..a1a046ad9d 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -27,7 +27,9 @@ (define-module (gnu packages bdw-gc)
   #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system copy)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages hurd))
 
@@ -107,6 +109,33 @@ (define-public libgc
 
    (license (x11-style (string-append home-page "license.txt")))))
 
+(define-public libgc-all-headers ; TODO(core-updates) merge into libgc
+  (package
+    (inherit libgc)
+    (name "libgc-all-headers")
+    (outputs '("out"))
+    (build-system copy-build-system)
+    (arguments
+             (list #:install-plan
+                   #~'(("include/config.h.in" "include/private/config.h")
+                     ("include/gc_tiny_fl.h" "include/private/gc_tiny_fl.h")
+                     ("include/gc_mark.h" "include/private/gc_mark.h")
+                     ("include/private/gcconfig.h" "include/private/gcconfig.h")
+                     ("include/private/gc_hdrs.h" "include/private/gc_hdrs.h")
+                     ("include/private/gc_atomic_ops.h" "include/private/gc_atomic_ops.h")
+                     ("include/private/gc_locks.h" "include/private/gc_locks.h")
+                     ("include/private/gc_priv.h" "include/private/gc_priv.h"))
+                   #:phases
+                   #~(modify-phases %standard-phases
+                       (add-before 'install 'fix-headers
+                         (lambda _
+                           (with-directory-excursion "include/private"
+                             (substitute* "gc_priv.h"
+                               (("#include .*/gc_tiny_fl.h.") "#include <gc_tiny_fl.h>")
+                               (("#include .*/gc_mark.h.") "#include <gc_mark.h>"))))))))
+    (synopsis "Headers of libgc")
+    (description "All headers of libgc.")))
+
 ;; TODO: Add a static output in libgc in the next rebuild cycle.
 (define-public libgc/static-libs
   (package/inherit

base-commit: f25529b08e356f89ca7cecc44295085531a8faba
-- 
2.40.1




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Mon, 26 Jun 2023 13:21:02 GMT) Full text and rfc822 format available.

Message #52 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 2/4] gnu: Add treecc.
Date: Mon, 26 Jun 2023 21:20:09 +0800
From 2623ee59df8fd2c73a16deb98b455d7330e06a08 Mon Sep 17 00:00:00 2001
Message-Id: <2623ee59df8fd2c73a16deb98b455d7330e06a08.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:31:56 +0800
Subject: [PATCH v3 2/4] gnu: Add treecc.

* gnu/packages/dotgnu.scm: New file.
---
 gnu/packages/dotgnu.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 gnu/packages/dotgnu.scm

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
new file mode 100644
index 0000000000..7d59496f22
--- /dev/null
+++ b/gnu/packages/dotgnu.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dotgnu)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses)
+                #:prefix license:)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages libffi))
+
+(define-public treecc
+  (package
+    (name "treecc")
+    (version "0.3.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://savannah/dotgnu-pnet/"
+                    "treecc-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.gnu.org/software/dotgnu/")
+    (synopsis "Abstract syntax tree compiler compiler")
+    (description
+     "The treecc program is designed to assist in the development of compilers
+and other language-based tools.  It manages the generation of code to handle
+abstract syntax trees and operations upon the trees.")
+    (license license:gpl2+)))
-- 
2.40.1




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Mon, 26 Jun 2023 13:24:02 GMT) Full text and rfc822 format available.

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




Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Mon, 26 Jun 2023 13:26:02 GMT) Full text and rfc822 format available.

Message #58 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 4/4] gnu: Add pnetlib.
Date: Mon, 26 Jun 2023 21:25:30 +0800
From 3a7d0348944f238e9a81af85943e4dc69c389cef Mon Sep 17 00:00:00 2001
Message-Id: <3a7d0348944f238e9a81af85943e4dc69c389cef.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: Mon, 26 Jun 2023 20:20:12 +0800
Subject: [PATCH v3 4/4] gnu: Add pnetlib.

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

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
index 283168c5c0..98fed64925 100644
--- a/gnu/packages/dotgnu.scm
+++ b/gnu/packages/dotgnu.scm
@@ -144,3 +144,54 @@ (define-public pnet
 to build and execute .NET applications, including a C# compiler,
 assembler, disassembler, and runtime engine.")
     (license license:gpl2+)))
+
+(define-public pnetlib
+  (package
+    (name "pnetlib")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://savannah/dotgnu-pnet/pnetlib-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1adr5nyrx6ip3rlcilr5kyahw11bpzj1ijb5zdjpn2lvn218ksms"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (for-each delete-file '("configure"
+                                           "config.guess"
+                                           "config.sub"
+                                           "install-sh"
+                                           "ltmain.sh"))
+                   (for-each delete-file (find-files "." "Makefile\\.in"))
+                   (substitute* "tests/runtime/Makefile.am"
+                     (("TESTS_ENVIRONMENT.*")
+                      (string-append
+                       "LOG_COMPILER = $(SHELL)\n"
+                       "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh"
+                       " $(top_builddir)")))
+                   (substitute* "tools/run_test.sh.in"
+                     (("en_US") "en_US.utf8"))
+                   (substitute* "tools/wrapper.sh.in"
+                     (("exec .LN_S clrwrap ..1." all)
+                      (string-append
+                       "echo '#!@SHELL@' >> $1\n"
+                       "echo exec $CLRWRAP"
+                       " $(dirname $(dirname $1))"
+                       "/lib/cscc/lib/$(basename $1).exe >> $1\n"
+                       "chmod +x $1")))))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f)) ; 4 tests fail
+    (native-inputs
+     (list autoconf automake libtool treecc))
+    (inputs
+     (list pnet))
+    (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
+    (synopsis "Libraries for the C# programming language")
+    (description
+     "DotGNU Portable.NET Library contains an implementation of the C# library,
+for use with .NET-capable runtime engines and applications.")
+    (license license:gpl2+)))
-- 
2.40.1




Changed bug title to 'gnu: Add pnet.' from '[PATCH 0/3] WIP: Add pnet.' Request was from Adam Faiz <adam.faiz <at> disroot.org> to control <at> debbugs.gnu.org. (Mon, 26 Jun 2023 13:35:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#57625; Package guix-patches. (Mon, 26 Jun 2023 23:39:01 GMT) Full text and rfc822 format available.

Message #63 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 4/4] gnu: Add pnetlib.
Date: Tue, 27 Jun 2023 07:38:05 +0800
From 32aaac1e57b195273020a3babd54d1ecf42c3d69 Mon Sep 17 00:00:00 2001
Message-Id: <32aaac1e57b195273020a3babd54d1ecf42c3d69.1687822593.git.adam.faiz <at> disroot.org>
In-Reply-To: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687822593.git.adam.faiz <at> disroot.org>
References: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687822593.git.adam.faiz <at> disroot.org>
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Mon, 26 Jun 2023 20:20:12 +0800
Subject: [PATCH v3 4/4] gnu: Add pnetlib.

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

diff --git a/gnu/packages/dotgnu.scm b/gnu/packages/dotgnu.scm
index 283168c5c0..e4a42035e3 100644
--- a/gnu/packages/dotgnu.scm
+++ b/gnu/packages/dotgnu.scm
@@ -144,3 +144,54 @@ (define-public pnet
 to build and execute .NET applications, including a C# compiler,
 assembler, disassembler, and runtime engine.")
     (license license:gpl2+)))
+
+(define-public pnetlib
+  (package
+    (name "pnetlib")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://savannah/dotgnu-pnet/pnetlib-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1adr5nyrx6ip3rlcilr5kyahw11bpzj1ijb5zdjpn2lvn218ksms"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (for-each delete-file '("configure"
+                                           "config.guess"
+                                           "config.sub"
+                                           "install-sh"
+                                           "ltmain.sh"))
+                   (for-each delete-file (find-files "." "Makefile\\.in"))
+                   (substitute* "tests/runtime/Makefile.am"
+                     (("TESTS_ENVIRONMENT.*")
+                      (string-append
+                       "LOG_COMPILER = $(SHELL)\n"
+                       "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh"
+                       " $(top_builddir)")))
+                   (substitute* "tools/run_test.sh.in"
+                     (("en_US") "en_US.utf8"))
+                   (substitute* "tools/wrapper.sh.in"
+                     (("exec .LN_S clrwrap ..1." all)
+                      (string-append
+                       "echo '#!@SHELL@' >> $1\n"
+                       "echo exec $CLRWRAP"
+                       " $(dirname $(dirname $1))"
+                       "/lib/cscc/lib/$(basename $1).exe '$*' >> $1\n"
+                       "chmod +x $1")))))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f)) ; 4 tests fail
+    (native-inputs
+     (list autoconf automake libtool treecc))
+    (inputs
+     (list pnet))
+    (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
+    (synopsis "Libraries for the C# programming language")
+    (description
+     "DotGNU Portable.NET Library contains an implementation of the C# library,
+for use with .NET-capable runtime engines and applications.")
+    (license license:gpl2+)))
-- 
2.40.1




Removed tag(s) moreinfo. Request was from Adam Faiz <adam.faiz <at> disroot.org> to control <at> debbugs.gnu.org. (Sat, 22 Jul 2023 02:34:02 GMT) Full text and rfc822 format available.

Merged 57625 74609. Request was from Adam Faiz <adam.faiz <at> disroot.org> to control <at> debbugs.gnu.org. (Tue, 17 Dec 2024 01:39:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Jan 2025 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 108 days ago.

Previous Next


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