pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cyclone: re-import cyclone-0.36 as wip/cyclone



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Thu Feb 29 01:15:43 2024 +0200
Changeset:	cc90352307a83719e59359e2f3a6d59c0ecb8375

Added Files:
	cyclone/DESCR
	cyclone/Makefile
	cyclone/PLIST
	cyclone/distinfo
	cyclone/patches/patch-Makefile
	cyclone/patches/patch-Makefile.config
	cyclone/patches/patch-cyclone.scm
	cyclone/patches/patch-include_cyclone_types.h
	cyclone/patches/patch-scheme_base.sld
	cyclone/patches/patch-tests_macro-hygiene.scm

Log Message:
cyclone: re-import cyclone-0.36 as wip/cyclone

The previous version was the compiled-to-C bootstrap code
(now in wip/cyclone-bootstrap) which made patching a bit
more involved. This approach will make testing and patching
a little easier.

Description:

Cyclone is an R7RS Scheme-to-C compiler that uses a variant of
Cheney on the MTA (http://www.pipeline.com/~hbaker1/CheneyMTA.html)
to implement full tail recursion, continuations, and generational
garbage collection.  In addition, the Cheney on the MTA concept
has been extended to allow execution of multiple native threads.
An on-the-fly garbage collector is used to manage the second-generation
heap and perform major collections without "stopping the world".

Cyclone is written entirely in the latest R7RS Scheme language
standard, and the intent is to support as much of that language as
possible.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cc90352307a83719e59359e2f3a6d59c0ecb8375

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cyclone/DESCR                                 |  11 +
 cyclone/Makefile                              |  36 +++
 cyclone/PLIST                                 | 372 ++++++++++++++++++++++++++
 cyclone/distinfo                              |  11 +
 cyclone/patches/patch-Makefile                |  56 ++++
 cyclone/patches/patch-Makefile.config         |  28 ++
 cyclone/patches/patch-cyclone.scm             |  20 ++
 cyclone/patches/patch-include_cyclone_types.h |  15 ++
 cyclone/patches/patch-scheme_base.sld         |  31 +++
 cyclone/patches/patch-tests_macro-hygiene.scm |  16 ++
 10 files changed, 596 insertions(+)

diffs:
diff --git a/cyclone/DESCR b/cyclone/DESCR
new file mode 100644
index 0000000000..55634c6031
--- /dev/null
+++ b/cyclone/DESCR
@@ -0,0 +1,11 @@
+Cyclone is an R7RS Scheme-to-C compiler that uses a variant of
+Cheney on the MTA (http://www.pipeline.com/~hbaker1/CheneyMTA.html)
+to implement full tail recursion, continuations, and generational
+garbage collection.  In addition, the Cheney on the MTA concept
+has been extended to allow execution of multiple native threads.
+An on-the-fly garbage collector is used to manage the second-generation
+heap and perform major collections without "stopping the world".
+
+Cyclone is written entirely in the latest R7RS Scheme language
+standard, and the intent is to support as much of that language as
+possible.
diff --git a/cyclone/Makefile b/cyclone/Makefile
new file mode 100644
index 0000000000..f6b882d1fc
--- /dev/null
+++ b/cyclone/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD$
+
+DISTNAME=	cyclone-${GITHUB_TAG:S,^v,,}
+CATEGORIES=	lang
+MASTER_SITES=	${MASTER_SITE_GITHUB:=justinethier/}
+GITHUB_TAG=	v0.36.0
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://justinethier.github.io/cyclone/
+COMMENT=	Scheme-to-C compiler
+LICENSE=	mit
+
+USE_TOOLS+=	pkg-config
+USE_TOOLS+=	gmake
+TEST_TARGET=	test
+
+INSTALLATION_DIRS+=	share/doc/cyclone
+INSTALLATION_DIRS+=	share/examples/cyclone
+
+PKGCONFIG_OVERRIDE+=	third-party/libtommath-1.2.0/libtommath.pc.in
+
+post-install:
+	cd ${WRKSRC}/docs && ${FIND} . -type d -exec \
+		${INSTALL_DATA_DIR} "${DESTDIR}${PREFIX}/share/doc/cyclone/{}" ";"
+	cd ${WRKSRC}/docs && ${FIND} . -type f -exec \
+		${INSTALL_DATA} "{}" "${DESTDIR}${PREFIX}/share/doc/cyclone/{}" ";"
+	cd ${WRKSRC}/examples && ${FIND} . -type d -exec \
+		${INSTALL_DATA_DIR} "${DESTDIR}${PREFIX}/share/examples/cyclone/{}" ";"
+	cd ${WRKSRC}/examples && ${FIND} . -type f -exec \
+		${INSTALL_DATA} "{}" "${DESTDIR}${PREFIX}/share/examples/cyclone/{}" ";"
+
+.include "../../devel/concurrencykit/buildlink3.mk"
+.include "../../math/ltm/buildlink3.mk"
+BUILDLINK_DEPMETHOD.cyclone-bootstrap=	build
+.include "../../wip/cyclone-bootstrap/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cyclone/PLIST b/cyclone/PLIST
new file mode 100644
index 0000000000..5e89f903cc
--- /dev/null
+++ b/cyclone/PLIST
@@ -0,0 +1,372 @@
+@comment $NetBSD$
+bin/cyclone
+bin/icyc
+include/cyclone/bignum.h
+include/cyclone/ck_ht_hash.h
+include/cyclone/hashset.h
+include/cyclone/runtime-main.h
+include/cyclone/runtime.h
+include/cyclone/types.h
+lib/libcyclone.a
+share/cyclone/cyclone/concurrent.o
+share/cyclone/cyclone/concurrent.sld
+share/cyclone/cyclone/concurrent.so
+share/cyclone/cyclone/delay-promise.scm
+share/cyclone/cyclone/foreign.meta
+share/cyclone/cyclone/foreign.o
+share/cyclone/cyclone/foreign.sld
+share/cyclone/cyclone/foreign.so
+share/cyclone/cyclone/match.meta
+share/cyclone/cyclone/match.o
+share/cyclone/cyclone/match.sld
+share/cyclone/cyclone/match.so
+share/cyclone/cyclone/test.meta
+share/cyclone/cyclone/test.o
+share/cyclone/cyclone/test.scm
+share/cyclone/cyclone/test.sld
+share/cyclone/cyclone/test.so
+share/cyclone/cyclone/use-shared-queue.scm
+share/cyclone/scheme/base.o
+share/cyclone/scheme/base.sld
+share/cyclone/scheme/base.so
+share/cyclone/scheme/case-lambda.o
+share/cyclone/scheme/case-lambda.sld
+share/cyclone/scheme/case-lambda.so
+share/cyclone/scheme/char.o
+share/cyclone/scheme/char.sld
+share/cyclone/scheme/char.so
+share/cyclone/scheme/complex.o
+share/cyclone/scheme/complex.sld
+share/cyclone/scheme/complex.so
+share/cyclone/scheme/cxr.o
+share/cyclone/scheme/cxr.sld
+share/cyclone/scheme/cxr.so
+share/cyclone/scheme/cyclone/ast.o
+share/cyclone/scheme/cyclone/ast.sld
+share/cyclone/scheme/cyclone/ast.so
+share/cyclone/scheme/cyclone/cgen.o
+share/cyclone/scheme/cyclone/cgen.sld
+share/cyclone/scheme/cyclone/cgen.so
+share/cyclone/scheme/cyclone/common.o
+share/cyclone/scheme/cyclone/common.sld
+share/cyclone/scheme/cyclone/common.so
+share/cyclone/scheme/cyclone/cps-opt-analyze-call-graph.scm
+share/cyclone/scheme/cyclone/cps-opt-local-var-redux.scm
+share/cyclone/scheme/cyclone/cps-opt-memoize-pure-fncs.scm
+share/cyclone/scheme/cyclone/cps-optimizations.o
+share/cyclone/scheme/cyclone/cps-optimizations.sld
+share/cyclone/scheme/cyclone/cps-optimizations.so
+share/cyclone/scheme/cyclone/hashset.o
+share/cyclone/scheme/cyclone/hashset.sld
+share/cyclone/scheme/cyclone/hashset.so
+share/cyclone/scheme/cyclone/libraries.o
+share/cyclone/scheme/cyclone/libraries.sld
+share/cyclone/scheme/cyclone/libraries.so
+share/cyclone/scheme/cyclone/macros.o
+share/cyclone/scheme/cyclone/macros.sld
+share/cyclone/scheme/cyclone/macros.so
+share/cyclone/scheme/cyclone/opti-test.scm
+share/cyclone/scheme/cyclone/pass-validate-syntax.scm
+share/cyclone/scheme/cyclone/pretty-print.o
+share/cyclone/scheme/cyclone/pretty-print.sld
+share/cyclone/scheme/cyclone/pretty-print.so
+share/cyclone/scheme/cyclone/primitives.o
+share/cyclone/scheme/cyclone/primitives.sld
+share/cyclone/scheme/cyclone/primitives.so
+share/cyclone/scheme/cyclone/test-cps.scm
+share/cyclone/scheme/cyclone/transforms.o
+share/cyclone/scheme/cyclone/transforms.sld
+share/cyclone/scheme/cyclone/transforms.so
+share/cyclone/scheme/cyclone/util.o
+share/cyclone/scheme/cyclone/util.sld
+share/cyclone/scheme/cyclone/util.so
+share/cyclone/scheme/eval.o
+share/cyclone/scheme/eval.sld
+share/cyclone/scheme/eval.so
+share/cyclone/scheme/file.o
+share/cyclone/scheme/file.sld
+share/cyclone/scheme/file.so
+share/cyclone/scheme/inexact.o
+share/cyclone/scheme/inexact.sld
+share/cyclone/scheme/inexact.so
+share/cyclone/scheme/lazy.o
+share/cyclone/scheme/lazy.sld
+share/cyclone/scheme/lazy.so
+share/cyclone/scheme/load.o
+share/cyclone/scheme/load.sld
+share/cyclone/scheme/load.so
+share/cyclone/scheme/process-context.o
+share/cyclone/scheme/process-context.sld
+share/cyclone/scheme/process-context.so
+share/cyclone/scheme/read.o
+share/cyclone/scheme/read.sld
+share/cyclone/scheme/read.so
+share/cyclone/scheme/repl.o
+share/cyclone/scheme/repl.sld
+share/cyclone/scheme/repl.so
+share/cyclone/scheme/time.o
+share/cyclone/scheme/time.sld
+share/cyclone/scheme/time.so
+share/cyclone/scheme/write.o
+share/cyclone/scheme/write.sld
+share/cyclone/scheme/write.so
+share/cyclone/srfi/1.meta
+share/cyclone/srfi/1.o
+share/cyclone/srfi/1.sld
+share/cyclone/srfi/1.so
+share/cyclone/srfi/106.meta
+share/cyclone/srfi/106.o
+share/cyclone/srfi/106.sld
+share/cyclone/srfi/106.so
+share/cyclone/srfi/111.meta
+share/cyclone/srfi/111.o
+share/cyclone/srfi/111.sld
+share/cyclone/srfi/111.so
+share/cyclone/srfi/113.meta
+share/cyclone/srfi/113.o
+share/cyclone/srfi/113.sld
+share/cyclone/srfi/113.so
+share/cyclone/srfi/117.meta
+share/cyclone/srfi/117.o
+share/cyclone/srfi/117.sld
+share/cyclone/srfi/117.so
+share/cyclone/srfi/121.meta
+share/cyclone/srfi/121.o
+share/cyclone/srfi/121.sld
+share/cyclone/srfi/121.so
+share/cyclone/srfi/128.meta
+share/cyclone/srfi/128.o
+share/cyclone/srfi/128.sld
+share/cyclone/srfi/128.so
+share/cyclone/srfi/132.meta
+share/cyclone/srfi/132.o
+share/cyclone/srfi/132.sld
+share/cyclone/srfi/132.so
+share/cyclone/srfi/133.meta
+share/cyclone/srfi/133.o
+share/cyclone/srfi/133.sld
+share/cyclone/srfi/133.so
+share/cyclone/srfi/143.meta
+share/cyclone/srfi/143.o
+share/cyclone/srfi/143.sld
+share/cyclone/srfi/143.so
+share/cyclone/srfi/18.meta
+share/cyclone/srfi/18.o
+share/cyclone/srfi/18.sld
+share/cyclone/srfi/18.so
+share/cyclone/srfi/2.meta
+share/cyclone/srfi/2.o
+share/cyclone/srfi/2.sld
+share/cyclone/srfi/2.so
+share/cyclone/srfi/27.meta
+share/cyclone/srfi/27.o
+share/cyclone/srfi/27.sld
+share/cyclone/srfi/27.so
+share/cyclone/srfi/28.meta
+share/cyclone/srfi/28.o
+share/cyclone/srfi/28.sld
+share/cyclone/srfi/28.so
+share/cyclone/srfi/60.meta
+share/cyclone/srfi/60.o
+share/cyclone/srfi/60.sld
+share/cyclone/srfi/60.so
+share/cyclone/srfi/69.meta
+share/cyclone/srfi/69.o
+share/cyclone/srfi/69.sld
+share/cyclone/srfi/69.so
+share/cyclone/srfi/list-queues/list-queues-impl.scm
+share/cyclone/srfi/list-queues/list-queues-test.scm
+share/cyclone/srfi/sets/comparators-shim.scm
+share/cyclone/srfi/sets/sets-impl.scm
+share/cyclone/srfi/sets/sets-test.scm
+share/cyclone/srfi/sorting/delndups.scm
+share/cyclone/srfi/sorting/lmsort.scm
+share/cyclone/srfi/sorting/median.scm
+share/cyclone/srfi/sorting/merge.scm
+share/cyclone/srfi/sorting/select.scm
+share/cyclone/srfi/sorting/sort.scm
+share/cyclone/srfi/sorting/sortfaster.scm
+share/cyclone/srfi/sorting/sorting-test.scm
+share/cyclone/srfi/sorting/sortp.scm
+share/cyclone/srfi/sorting/vbinsearch.scm
+share/cyclone/srfi/sorting/vector-util.scm
+share/cyclone/srfi/sorting/vhsort.scm
+share/cyclone/srfi/sorting/visort.scm
+share/cyclone/srfi/sorting/vmsort.scm
+share/cyclone/srfi/sorting/vqsort2.scm
+share/cyclone/srfi/sorting/vqsort3.scm
+share/doc/cyclone/API.md
+share/doc/cyclone/Benchmarks.md
+share/doc/cyclone/C-Calling-Conventions.md
+share/doc/cyclone/C-Generation.md
+share/doc/cyclone/C-Interface-Notes.md
+share/doc/cyclone/Development.md
+share/doc/cyclone/Garbage-Collection-Using-Lazy-Sweeping.md
+share/doc/cyclone/Garbage-Collector-Revised-2022.md
+share/doc/cyclone/Garbage-Collector.md
+share/doc/cyclone/Multithreaded-Development.md
+share/doc/cyclone/Release-Checklist.md
+share/doc/cyclone/Scheme-Language-Compliance.md
+share/doc/cyclone/Scheme-code-conventions.md
+share/doc/cyclone/User-Manual.md
+share/doc/cyclone/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md
+share/doc/cyclone/Writing-the-Cyclone-Scheme-Compiler.md
+share/doc/cyclone/api/api-index.scm
+share/doc/cyclone/api/cyclone/concurrent.md
+share/doc/cyclone/api/cyclone/foreign.md
+share/doc/cyclone/api/cyclone/match.md
+share/doc/cyclone/api/cyclone/test.md
+share/doc/cyclone/api/primitives.md
+share/doc/cyclone/api/scheme/base.md
+share/doc/cyclone/api/scheme/case-lambda.md
+share/doc/cyclone/api/scheme/char.md
+share/doc/cyclone/api/scheme/complex.md
+share/doc/cyclone/api/scheme/cxr.md
+share/doc/cyclone/api/scheme/cyclone/ast.md
+share/doc/cyclone/api/scheme/cyclone/cgen.md
+share/doc/cyclone/api/scheme/cyclone/common.md
+share/doc/cyclone/api/scheme/cyclone/cps-optimizations.md
+share/doc/cyclone/api/scheme/cyclone/libraries.md
+share/doc/cyclone/api/scheme/cyclone/pretty-print.md
+share/doc/cyclone/api/scheme/cyclone/primitives.md
+share/doc/cyclone/api/scheme/cyclone/transforms.md
+share/doc/cyclone/api/scheme/cyclone/util.md
+share/doc/cyclone/api/scheme/eval.md
+share/doc/cyclone/api/scheme/file.md
+share/doc/cyclone/api/scheme/inexact.md
+share/doc/cyclone/api/scheme/lazy.md
+share/doc/cyclone/api/scheme/load.md
+share/doc/cyclone/api/scheme/process-context.md
+share/doc/cyclone/api/scheme/read.md
+share/doc/cyclone/api/scheme/repl.md
+share/doc/cyclone/api/scheme/time.md
+share/doc/cyclone/api/scheme/write.md
+share/doc/cyclone/api/srfi/1.md
+share/doc/cyclone/api/srfi/106.md
+share/doc/cyclone/api/srfi/111.md
+share/doc/cyclone/api/srfi/113.md
+share/doc/cyclone/api/srfi/117.md
+share/doc/cyclone/api/srfi/121.md
+share/doc/cyclone/api/srfi/128.md
+share/doc/cyclone/api/srfi/132.md
+share/doc/cyclone/api/srfi/133.md
+share/doc/cyclone/api/srfi/143.md
+share/doc/cyclone/api/srfi/18.md
+share/doc/cyclone/api/srfi/2.md
+share/doc/cyclone/api/srfi/27.md
+share/doc/cyclone/api/srfi/28.md
+share/doc/cyclone/api/srfi/60.md
+share/doc/cyclone/api/srfi/69.md
+share/doc/cyclone/api/srfi/8.md
+share/doc/cyclone/benchmarks/benchmark-status.md
+share/doc/cyclone/benchmarks/car4-dev/benchmark-status.md
+share/doc/cyclone/benchmarks/car4-dev/results.Chicken.thinkpad-laptop-x86_64
+share/doc/cyclone/benchmarks/car4-dev/results.Cyclone.thinkpad-laptop-x86_64
+share/doc/cyclone/benchmarks/extract-data.sh
+share/doc/cyclone/benchmarks/results.Cyclone-0.1.5
+share/doc/cyclone/benchmarks/results.Cyclone-master
+share/doc/cyclone/benchmarks/results.Cyclone.thinkpad-laptop-x86_64
+share/doc/cyclone/images/arch-linux-thumb.png
+share/doc/cyclone/images/benchmark-tests-finished.png
+share/doc/cyclone/images/benchmark-total-runtimes.png
+share/doc/cyclone/images/benchmarks/gabriel.png
+share/doc/cyclone/images/benchmarks/gc.png
+share/doc/cyclone/images/benchmarks/kvw.png
+share/doc/cyclone/images/benchmarks/lazy-sweep-benchmark-times.png
+share/doc/cyclone/images/benchmarks/lazy-sweep.png
+share/doc/cyclone/images/build-thumb.png
+share/doc/cyclone/images/campfire.jpg
+share/doc/cyclone/images/compiler.dia
+share/doc/cyclone/images/compiler.png
+share/doc/cyclone/images/cyclone-contribs.png
+share/doc/cyclone/images/cyclone-logo-01.pdn
+share/doc/cyclone/images/cyclone-logo-01.png
+share/doc/cyclone/images/cyclone-logo-03-header.png
+share/doc/cyclone/images/cyclone-logo-03-thumb.png
+share/doc/cyclone/images/cyclone-logo-03.pdn
+share/doc/cyclone/images/cyclone-logo-03.png
+share/doc/cyclone/images/cyclone-logo-04-bootstrap.png
+share/doc/cyclone/images/cyclone-logo-04-header.png
+share/doc/cyclone/images/cyclone-logo-04.png
+share/doc/cyclone/images/cyclone-logo-05-header.png
+share/doc/cyclone/images/cyclone-logo-small.png
+share/doc/cyclone/images/cyclone-logo-smaller.png
+share/doc/cyclone/images/cyclone-winds-small.png
+share/doc/cyclone/images/docker-thumb.png
+share/doc/cyclone/images/game-of-life-gliders.gif
+share/doc/cyclone/images/gc-graph-clear.dia
+share/doc/cyclone/images/gc-graph-clear.png
+share/doc/cyclone/images/gc-graph-mark.dia
+share/doc/cyclone/images/gc-graph-mark.png
+share/doc/cyclone/images/gc-graph-sweep.dia
+share/doc/cyclone/images/gc-graph-sweep.png
+share/doc/cyclone/images/gc-graph-trace.dia
+share/doc/cyclone/images/gc-graph-trace.png
+share/doc/cyclone/images/gentoo-linux-logo.png
+share/doc/cyclone/images/gentoo-logo.svg
+share/doc/cyclone/images/homebrew-thumb.png
+share/doc/cyclone/images/logo.png
+share/doc/cyclone/images/runtime.dia
+share/doc/cyclone/images/runtime.png
+share/doc/cyclone/immutable-obj-notes.md
+share/doc/cyclone/old-notes/Developer-How-To.md
+share/doc/cyclone/old-notes/TODO
+share/doc/cyclone/old-notes/gc-notes.txt
+share/doc/cyclone/old-notes/global-opts-notes.txt
+share/doc/cyclone/r7rs.pdf
+share/doc/cyclone/research-papers/CheneyMTA.pdf
+share/doc/cyclone/research-papers/d1-mlton-realtime.pdf
+share/doc/cyclone/research-papers/syntactic-closures.pdf
+share/examples/cyclone/Makefile
+share/examples/cyclone/begin-splicing.scm
+share/examples/cyclone/call-scm-from-c/Makefile
+share/examples/cyclone/call-scm-from-c/Readme.md
+share/examples/cyclone/call-scm-from-c/basic-no-gc.scm
+share/examples/cyclone/call-scm-from-c/basic.c
+share/examples/cyclone/call-scm-from-c/basic.h
+share/examples/cyclone/call-scm-from-c/full-with-gc.scm
+share/examples/cyclone/call-scm-from-c/full.c
+share/examples/cyclone/call-scm-from-c/full.h
+share/examples/cyclone/cat.scm
+share/examples/cyclone/fac.scm
+share/examples/cyclone/ffi/custom-type.scm
+share/examples/cyclone/ffi/sub-bignums.h
+share/examples/cyclone/ffi/sub-bignums.scm
+share/examples/cyclone/game-of-life-png/Makefile
+share/examples/cyclone/game-of-life-png/README.md
+share/examples/cyclone/game-of-life-png/convert.sh
+share/examples/cyclone/game-of-life-png/example/grid.sld
+share/examples/cyclone/game-of-life-png/example/life.sld
+share/examples/cyclone/game-of-life-png/life.scm
+share/examples/cyclone/game-of-life-png/write-png.c
+share/examples/cyclone/game-of-life-png/write-png.h
+share/examples/cyclone/game-of-life/Makefile
+share/examples/cyclone/game-of-life/README.md
+share/examples/cyclone/game-of-life/example/grid.sld
+share/examples/cyclone/game-of-life/example/life.sld
+share/examples/cyclone/game-of-life/life.scm
+share/examples/cyclone/greater-of.scm
+share/examples/cyclone/hello-library/Makefile
+share/examples/cyclone/hello-library/hello.scm
+share/examples/cyclone/hello-library/libs/lib1.scm
+share/examples/cyclone/hello-library/libs/lib1.sld
+share/examples/cyclone/hello-library/libs/lib2.sld
+share/examples/cyclone/long-running-process.scm
+share/examples/cyclone/networking/client.scm
+share/examples/cyclone/networking/http-server.scm
+share/examples/cyclone/networking/server.scm
+share/examples/cyclone/resolve-dependencies.scm
+share/examples/cyclone/tail-call-optimization.scm
+share/examples/cyclone/tail-call-testing.scm
+share/examples/cyclone/threading/benchmarks/bv2string-integration.scm
+share/examples/cyclone/threading/benchmarks/bv2string.scm
+share/examples/cyclone/threading/benchmarks/ctak.scm
+share/examples/cyclone/threading/benchmarks/paraffins.scm
+share/examples/cyclone/threading/cv-broadcast.scm
+share/examples/cyclone/threading/many-writers.scm
+share/examples/cyclone/threading/parameters.scm
+share/examples/cyclone/threading/producer-consumer.scm
+share/examples/cyclone/threading/sum-atomic.scm
+share/examples/cyclone/threading/sum-mutex.scm
+share/examples/cyclone/threading/sum-nosync.scm
+share/examples/cyclone/threading/thread-join.scm
diff --git a/cyclone/distinfo b/cyclone/distinfo
new file mode 100644
index 0000000000..8fa9bd1cd4
--- /dev/null
+++ b/cyclone/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+BLAKE2s (cyclone-0.36.0.tar.gz) = 1777c4452a676b992c0b5ed968cd6b72b358fbd5517e72589dd53c285638437c
+SHA512 (cyclone-0.36.0.tar.gz) = 6dfa3ff80b1a8397608483e6d914c25b1fee521d620991fb70f1bcf77303d290477100cbd82fbd9c939b5f2c91f72240f58711d9ab023721c15c8ad9b15998fd
+Size (cyclone-0.36.0.tar.gz) = 5237987 bytes
+SHA1 (patch-Makefile) = d26a38fed6a46a650841f93b6cdb4eb48489d5dd
+SHA1 (patch-Makefile.config) = 1cb1559cbe9779d5fa8bda998db14951af99716a
+SHA1 (patch-cyclone.scm) = e624dd62369d92b88501f8770d3504e78e311321
+SHA1 (patch-include_cyclone_types.h) = caf0f87ec67d42aad59d7041c50de12fac20c932
+SHA1 (patch-scheme_base.sld) = b9aaeb494572eb4fddecf25d30eae7cafe77163f
+SHA1 (patch-tests_macro-hygiene.scm) = 3e640ae4e4f67f0d3e3be7670559748758ac66bc
diff --git a/cyclone/patches/patch-Makefile b/cyclone/patches/patch-Makefile
new file mode 100644
index 0000000000..b27b5f5c6b
--- /dev/null
+++ b/cyclone/patches/patch-Makefile
@@ -0,0 +1,56 @@
+$NetBSD$
+
+1) Use the path for pkgsrc cyclone-bootstrap for the system cyclone.
+2) Use pkgsrc libtommath (internally named libcyclonebn).
+
+--- Makefile.orig	2024-02-14 02:31:23.000000000 +0000
++++ Makefile
+@@ -9,15 +9,15 @@ include Makefile.config
+ # Set up Cyclone here to build the compiler itself using a system-installed
+ # compiler (EG: from bootstrap or an earlier cyclone version). Everything
+ # else can then be built using our local binary.
+-CYCLONE_SYSTEM = cyclone -I . -CLNK '-L.'
+-CYCLONE_LOCAL = ./cyclone -I . -I libs -COPT '-Iinclude' -CLNK '-L.'
++CYCLONE_SYSTEM = cyclone-bootstrap -CLNK '-L. -L$(PREFIX)/lib'
++CYCLONE_LOCAL = ./cyclone -I . -I libs -COPT '-Iinclude' -CLNK '-L. -L$(PREFIX)/lib'
+ CCOMP = $(CC) $(CFLAGS)
+ FORMAT_CMD = indent -linux -l80 -i2 -nut
+ 
+ # Libraries
+ CYC_RT_LIB = libcyclone.a
+-CYC_BN_LIB = libcyclonebn.a
+-CYC_BN_LIB_SUBDIR = third-party/libtommath-1.2.0
++#CYC_BN_LIB = libcyclonebn.a
++#CYC_BN_LIB_SUBDIR = third-party/libtommath-1.2.0
+ CYC_LIBS = $(CYC_RT_LIB) $(CYC_BN_LIB)
+ 
+ # Directories
+@@ -70,7 +70,7 @@ clean :
+ 	rm -f tests/srfi-143-tests
+ 	rm -f tests/macro-hygiene
+ 	rm -f tests/match-tests
+-	cd $(CYC_BN_LIB_SUBDIR) ; $(MAKE) clean
++#	cd $(CYC_BN_LIB_SUBDIR) ; $(MAKE) clean
+ 
+ install : libs install-libs install-includes install-bin
+ 	$(MKDIR) $(DESTDIR)$(DATADIR)
+@@ -188,8 +188,8 @@ icyc : icyc.scm $(CYC_RT_LIB) $(CYC_BN_L
+ 
+ $(CYC_RT_LIB) : $(CFILES) $(HEADERS) $(CYC_BN_LIB)
+ 
+-$(CYC_BN_LIB) : $(CYC_BN_LIB_SUBDIR)/*.c
+-	cd $(CYC_BN_LIB_SUBDIR) ; $(MAKE) LIBNAME=$(CYC_BN_LIB) && cp $(CYC_BN_LIB) ../..
++#$(CYC_BN_LIB) : $(CYC_BN_LIB_SUBDIR)/*.c
++#	cd $(CYC_BN_LIB_SUBDIR) ; $(MAKE) LIBNAME=$(CYC_BN_LIB) && cp $(CYC_BN_LIB) ../..
+ 
+ hashset.o : hashset.c $(HEADERS)
+ 	$(CCOMP) -c $< -o $@
+@@ -336,7 +336,7 @@ install-includes : $(HEADER_DIR)/*.h
+ install-libs : $(CYC_LIBS)
+ 	$(MKDIR) $(DESTDIR)$(LIBDIR)
+ 	$(INSTALL) -m0644 $(CYC_RT_LIB) $(DESTDIR)$(LIBDIR)/
+-	$(INSTALL) -m0644 $(CYC_BN_LIB) $(DESTDIR)$(LIBDIR)/
++#	$(INSTALL) -m0644 $(CYC_BN_LIB) $(DESTDIR)$(LIBDIR)/
+ 
+ install-bin : cyclone icyc
+ 	$(MKDIR) $(DESTDIR)$(BINDIR)
diff --git a/cyclone/patches/patch-Makefile.config b/cyclone/patches/patch-Makefile.config
new file mode 100644
index 0000000000..e4fdc9302e
--- /dev/null
+++ b/cyclone/patches/patch-Makefile.config
@@ -0,0 +1,28 @@
+$NetBSD$
+
+1) Set the RPATH when creating executables and shared libraries.
+2) Use pkgsrc libtommath instead of cyclone libtommath (cyclonebn).
+
+--- Makefile.config.orig	2024-02-14 02:31:23.000000000 +0000
++++ Makefile.config
+@@ -21,8 +21,8 @@ CYC_PTHREAD_SET_STACK_SIZE ?=
+ OS = $(shell uname)
+ CC ?= cc
+ 
+-LIBS = -pthread -lcyclone -lck -lm -lcyclonebn
+-ifneq ($(OS),FreeBSD)
++LIBS = -pthread -lcyclone -lck -lm -ltommath
++ifeq (,$(findstring $(OS),FreeBSD NetBSD OpenBSD DragonFly))
+ # libdl is part of libc on FreeBSD
+ LIBS += -ldl
+ endif
+@@ -55,6 +55,9 @@ CREATE_LIBRARY_COMMAND = $(AR)
+ CREATE_LIBRARY_FLAGS = rcs
+ endif
+ 
++COMP_LIBDIRS+= $(COMPILER_RPATH_FLAG),$(PREFIX)/lib
++LDFLAGS     += $(COMPILER_RPATH_FLAG),$(PREFIX)/lib
++
+ # /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or 
+ # concurrencykit was installed via Ports, it won't be picked up without explicitly looking
+ # for it here
diff --git a/cyclone/patches/patch-cyclone.scm b/cyclone/patches/patch-cyclone.scm
new file mode 100644
index 0000000000..ac26eb17cb
--- /dev/null
+++ b/cyclone/patches/patch-cyclone.scm
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Limit the defined macros to only those required by R7RS (intersection with (Cyc-global-vars)).
+
+--- cyclone.scm.orig	2024-02-14 02:31:23.000000000 +0000
++++ cyclone.scm
+@@ -203,10 +203,12 @@
+       ;; in final compiled program
+       ;(set! input-program (add-libs input-program))
+     
++      (define *required-macros* '(include include-ci and or let let* letrec begin cond-expand cond case when unless do quasiquote syntax-error parameterize with-handler syntax-rules letrec* let*-values let-values guard define-record-type define-values))
++
+       ;; Load macros for expansion phase
+       (let ((macros (filter 
+                       (lambda (v) 
+-                        (Cyc-macro? (Cyc-get-cvar (cdr v))))
++                        (and (member (car v) *required-macros*) (Cyc-macro? (Cyc-get-cvar (cdr v)))))
+                       (Cyc-global-vars))))
+         (set! *defined-macros*
+               (append
diff --git a/cyclone/patches/patch-include_cyclone_types.h b/cyclone/patches/patch-include_cyclone_types.h
new file mode 100644
index 0000000000..259208aa10
--- /dev/null
+++ b/cyclone/patches/patch-include_cyclone_types.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use pkgsrc libtommath instead of cyclone libtommath.
+
+--- include/cyclone/types.h.orig	2024-02-23 20:53:59.854747126 +0000
++++ include/cyclone/types.h
+@@ -20,7 +20,7 @@
+ #include <pthread.h>
+ #include <stdint.h>
+ #include <dlfcn.h>
+-#include "cyclone/bignum.h"
++#include <tommath.h>
+ 
+ #ifdef CYC_HIGH_RES_TIMERS
+ /**
diff --git a/cyclone/patches/patch-scheme_base.sld b/cyclone/patches/patch-scheme_base.sld
new file mode 100644
index 0000000000..79e0b40203
--- /dev/null
+++ b/cyclone/patches/patch-scheme_base.sld
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Make let-values be the same as let*-values, to work around 
+
+ https://github.com/justinethier/cyclone/issues/504
+
+--- scheme/base.sld.orig	2022-08-25 21:12:33.000000000 +0000
++++ scheme/base.sld
+@@ -1877,7 +1877,7 @@
+      (let-values ("step") () () expr () params rest . body))
+     ))
+ 
+-(define-syntax
++#;(define-syntax
+   let-values
+   (syntax-rules
+     ()
+@@ -1945,6 +1945,13 @@
+        (lambda (arg ... . x)
+          (let-values "bind" bindings (tmp ... (a x)) body))))))
+ 
++(define-syntax
++  let-values
++  (syntax-rules
++    ()
++    ((let-values (binding ...) body0 body1 ...)
++     (let*-values (binding ...) body0 body1 ...))))
++
+ (define-syntax guard
+   (syntax-rules ()
+     ((guard (var clause ...) e1 e2 ...)
diff --git a/cyclone/patches/patch-tests_macro-hygiene.scm b/cyclone/patches/patch-tests_macro-hygiene.scm
new file mode 100644
index 0000000000..b570c6fc04
--- /dev/null
+++ b/cyclone/patches/patch-tests_macro-hygiene.scm
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Adjust the test output, the generated symbol name is different
+due to pkgsrc patches.
+
+--- tests/macro-hygiene.scm.orig	2024-02-28 22:52:36.860745787 +0000
++++ tests/macro-hygiene.scm
+@@ -138,7 +138,7 @@
+ ;; ;;; Examples from the source to R5RS pitfall 3.3
+ ;; ;;;; (assert/equal
+   (test
+-   '(1 2 3 a$1385)
++   '(1 2 3 a$1703)
+    ;'(1 2 3 a)
+     (let ((a 1))
+        (letrec-syntax


Home | Main Index | Thread Index | Old Index