gnu: Add pnet.

  • Open
  • quality assurance status badge
Details
3 participants
  • Adam Faiz
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Adam Faiz
Severity
normal
A
A
Adam Faiz wrote on 6 Sep 2022 10:48
[PATCH 0/3] WIP: Add pnet.
(address . guix-patches@gnu.org)
9d424667-868f-03f2-c521-8c10e106d6d3@disroot.org
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.
A
A
Adam Faiz wrote on 6 Sep 2022 17:34
[PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.
(address . 57625@debbugs.gnu.org)
620a920f-c95a-ada1-714c-dc39fc95c5a9@disroot.org
From feec1f999877de9ae411653c76bbf144cc6c7b2d Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (61 lines)
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
A
A
Adam Faiz wrote on 6 Sep 2022 17:39
[PATCH 2/3] gnu: Add treecc.
(address . 57625@debbugs.gnu.org)
f714b160-5ea4-9bdd-d4f0-46434f68e1fb@disroot.org
From 72b17b99a7318626dd41db831201c9df64e4defd Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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

Toggle diff (63 lines)
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@gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail@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
A
A
Adam Faiz wrote on 6 Sep 2022 17:53
WIP: gnu: Add pnet.
(address . 57625@debbugs.gnu.org)
d9c91744-9f26-3f87-c054-d2f9105bd685@disroot.org
From c1283813b73f0fd076f4007851d25db99ee2fe7a Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (93 lines)
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.
M
M
Maxime Devos wrote on 6 Sep 2022 18:55
Re: [bug#57625] [PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.
13dfa7fa-a27f-f68d-43ba-4be55e14ba16@telenet.be
On 06-09-2022 17:34, Adam Faiz via Guix-patches via wrote:
Toggle quote (14 lines)
> +(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.
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 6 Sep 2022 19:23
Re: [bug#57625] WIP: gnu: Add pnet.
87ff6515-bd84-d465-99c4-baf4a0275a86@telenet.be
On 06-09-2022 17:53, Adam Faiz via Guix-patches via wrote:
Toggle quote (42 lines)
> From c1283813b73f0fd076f4007851d25db99ee2fe7a Mon Sep 17 00:00:00 2001
> From: AwesomeAdam54321 <adam.faiz@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.
Toggle quote (9 lines)
> + #: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:
Toggle quote (2 lines)
> Origin snippets are
> typically used to remove unwanted files such as bundled libraries, [...]
Toggle quote (19 lines)
> + (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").
Toggle quote (17 lines)
> + (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:
Toggle quote (4 lines)
> 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"
Toggle quote (3 lines)
> +    (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?
Toggle quote (3 lines)
> + (description
> +     "The goal of this project is to build a suite of Free Software
> tools
Why is 'free sofware' capitalised?
Toggle quote (3 lines)
> +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.
Toggle quote (1 lines)
> + (license license:gpl2+)))
Greetings,
Maxime
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 6 Sep 2022 20:07
Re: [bug#57625] [PATCH 2/3] gnu: Add treecc.
d9d5d7e4-4cd6-64e6-ac2d-fe939773abb2@telenet.be
On 06-09-2022 17:39, Adam Faiz via Guix-patches via wrote:
Toggle quote (12 lines)
>
> +  (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
Attachment: OpenPGP_signature
A
A
Adam Faiz wrote on 7 Sep 2022 04:48
Re: [bug#57625] [PATCH 1/3] gnu: Add libgc-private-headers-for-pnet.
(address . 57625@debbugs.gnu.org)
ae783ede-aaea-3d88-5a1f-426360a6695f@disroot.org
On 9/7/22 00:55, Maxime Devos wrote:
Toggle quote (3 lines)
> 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.

Toggle quote (20 lines)
> (*) 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"?)
Toggle quote (7 lines)
> (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.
L
L
Ludovic Courtès wrote on 24 Sep 2022 15:15
control message for bug #57625
(address . control@debbugs.gnu.org)
87fsggap71.fsf@gnu.org
tags 57625 + moreinfo
quit
A
A
Adam Faiz wrote on 18 Nov 2022 10:15
[PATCH v1 01/03] gnu: Add libgc-all-headers.
(address . 57625@debbugs.gnu.org)
1b3a9c28-436c-252a-e556-76b18b040b42@disroot.org
From 6e3a2e2cb6d206c0dd9104968e3d98011b4bb3bb Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (61 lines)
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
A
A
Adam Faiz wrote on 18 Nov 2022 10:20
[PATCH v1 02/03] gnu: Add treecc.
(address . 57625@debbugs.gnu.org)
809493d4-0a97-e04c-73df-e0d2f75402cb@disroot.org
On 11/18/22 17:15, Adam Faiz wrote:
From 38a45d7451442a4905cab043adb5f3a514929495 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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

Toggle diff (61 lines)
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@gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail@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
A
A
Adam Faiz wrote on 18 Nov 2022 10:28
Re: [PATCH v1 03/03] WIP : gnu: Add pnet.
(address . 57625@debbugs.gnu.org)
d9139b93-ea3c-ecb2-4313-e497bbc148d0@disroot.org
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(+)

Toggle diff (108 lines)
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
A
A
Adam Faiz wrote on 19 Nov 2022 11:33
[PATCH v2 1/3] gnu: Add libgc-all-headers.
(address . 57625@debbugs.gnu.org)
474de317-bfb9-7dd6-def7-daf953e96e33@disroot.org
From 5ddddd9a24d9b319e722984e19ab26ba02779752 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (58 lines)
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
A
A
Adam Faiz wrote on 19 Nov 2022 11:35
[PATCH v2 2/3] gnu: Add treecc.
(address . 57625@debbugs.gnu.org)
d9227263-f589-11d0-3995-39b6217fb91e@disroot.org
From 27fb538641db2bb29928422a87c69e6d774a85ca Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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

Toggle diff (61 lines)
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@gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail@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
A
A
Adam Faiz wrote on 19 Nov 2022 11:37
Re: [PATCH v2 3/3] gnu: Add pnet.
(address . 57625@debbugs.gnu.org)
1a6e0a54-429b-f5f5-5ae9-0ac908e6e287@disroot.org
From 832c95bc06cbb55f8456cf174e617052b2ec4131 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (79 lines)
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
A
A
Adam Faiz wrote on 26 Jun 2023 15:17
[PATCH v3 1/4] gnu: Add libgc-all-headers.
(address . 57625@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
01d10129-3aad-cf8e-7616-2718b465f70f@disroot.org
From 94149f940fc7dd3c052cfa9765933303abb7a4ee Mon Sep 17 00:00:00 2001
Message-Id: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (52 lines)
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
A
A
Adam Faiz wrote on 26 Jun 2023 15:20
[PATCH v3 2/4] gnu: Add treecc.
(address . 57625@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
c4c0417c-5d11-817f-c583-a12ea8188c84@disroot.org
From 2623ee59df8fd2c73a16deb98b455d7330e06a08 Mon Sep 17 00:00:00 2001
Message-Id: <2623ee59df8fd2c73a16deb98b455d7330e06a08.1687784497.git.adam.faiz@disroot.org>
In-Reply-To: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
References: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@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

Toggle diff (58 lines)
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@gnu.org>
+;;; Copyright © 2020 Pierre Neidhardt <mail@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
A
A
Adam Faiz wrote on 26 Jun 2023 15:23
[PATCH v3 3/4] gnu: Add pnet.
(address . 57625@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
1bbde14e-a13f-7bf3-cb09-f6f9158140ca@disroot.org
From 515d886c02492bc390db39330baefa6806349e20 Mon Sep 17 00:00:00 2001
Message-Id: <515d886c02492bc390db39330baefa6806349e20.1687784497.git.adam.faiz@disroot.org>
In-Reply-To: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
References: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@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(-)

Toggle diff (117 lines)
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
A
A
Adam Faiz wrote on 26 Jun 2023 15:25
[PATCH v3 4/4] gnu: Add pnetlib.
(address . 57625@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
47cbe007-47d8-61e0-b6bd-98f29a06a60c@disroot.org
From 3a7d0348944f238e9a81af85943e4dc69c389cef Mon Sep 17 00:00:00 2001
Message-Id: <3a7d0348944f238e9a81af85943e4dc69c389cef.1687784497.git.adam.faiz@disroot.org>
In-Reply-To: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
References: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687784497.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (61 lines)
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
A
A
Adam Faiz wrote on 26 Jun 2023 15:33
The main DotGNU packages now build
(address . control@debbugs.gnu.org)
57c72ef3-7cec-2390-7a73-960b46345613@disroot.org
retitle 57625 gnu: Add pnet.
A
A
Adam Faiz wrote on 27 Jun 2023 01:38
[PATCH v3 4/4] gnu: Add pnetlib.
(address . 57625@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
e8745e32-abd4-d88b-2c6f-3f701ca656b3@disroot.org
From 32aaac1e57b195273020a3babd54d1ecf42c3d69 Mon Sep 17 00:00:00 2001
Message-Id: <32aaac1e57b195273020a3babd54d1ecf42c3d69.1687822593.git.adam.faiz@disroot.org>
In-Reply-To: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687822593.git.adam.faiz@disroot.org>
References: <94149f940fc7dd3c052cfa9765933303abb7a4ee.1687822593.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@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(+)

Toggle diff (61 lines)
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
A
A
Adam Faiz wrote on 22 Jul 2023 04:32
The pnet patchset is ready for review
(address . control@debbugs.gnu.org)
22ed3a67-14e8-502f-7894-99d55b893613@disroot.org
tags 57625 - moreinfo
quit
?