(address . guix-patches@gnu.org)
- Aon 6 Sep 2022 10:48
- Aon 6 Sep 2022 17:34
- Aon 6 Sep 2022 17:39
- Aon 6 Sep 2022 17:53
- Mon 6 Sep 2022 18:55
- Mon 6 Sep 2022 19:23
- Mon 6 Sep 2022 20:07
- Aon 7 Sep 2022 04:48
- Lon 24 Sep 2022 15:15
- Aon 18 Nov 2022 10:15
- Aon 18 Nov 2022 10:20
- Aon 18 Nov 2022 10:28
- Aon 19 Nov 2022 11:33
- Aon 19 Nov 2022 11:35
- Aon 19 Nov 2022 11:37
[PATCH 0/3] WIP: Add pnet.
A
[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
[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
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
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_0x49E3EE22191725EE.asc
Attachment: OpenPGP_signature
M
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)
> + (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?
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_0x49E3EE22191725EE.asc
Attachment: OpenPGP_signature
M
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_0x49E3EE22191725EE.asc
Attachment: OpenPGP_signature
A
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.
A
[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
[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
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
[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
[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
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
?