diff --git a/Ports/citron/package.sh b/Ports/citron/package.sh index a591fea29af..a8f835db2dd 100755 --- a/Ports/citron/package.sh +++ b/Ports/citron/package.sh @@ -3,12 +3,16 @@ port=citron version=0.0.9.3 useconfigure=false depends=(sparsehash libffi pcre) -commit_hash=d28b7d62bd61397e46152aa6e4ee59b115c0e2d7 -archive_hash=0e31ab638c4fd1438f68fdf069336e2541eb4cfc5db2f55888f6175e0171a2ef +commit_hash='c0bafa246bb2282125858da54e084c8085288d5c' +archive_hash='f4d77cc8f70a59a4d495fbf0cfc8a9654742817f87c50f5b0e46eef54b5413f7' files=( "https://github.com/alimpfard/citron/archive/$commit_hash.tar.gz $archive_hash" ) workdir="citron-$commit_hash" +export enable_boehm_gc=false +export enable_inject=false +export use_libbsd=false +export use_openmp=false pre_install() { pushd "$workdir" diff --git a/Ports/citron/patches/0001-Get-rid-of-wordexp-on-serenity.patch b/Ports/citron/patches/0001-Get-rid-of-wordexp-on-serenity.patch index 9b4c447e0f7..07ce501d3ca 100644 --- a/Ports/citron/patches/0001-Get-rid-of-wordexp-on-serenity.patch +++ b/Ports/citron/patches/0001-Get-rid-of-wordexp-on-serenity.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Get rid of wordexp on serenity 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/file.c b/src/file.c -index a3bfd16..720a6e5 100644 +index a3bfd163f832ca52202d5acc47f1d76ba6c1ce8a..720a6e5bfb4e4512f1f6a33467096fc1991dc11b 100644 --- a/src/file.c +++ b/src/file.c @@ -18,11 +18,13 @@ diff --git a/Ports/citron/patches/0002-Make-fiber-a-noop.patch b/Ports/citron/patches/0002-Make-fiber-a-noop.patch index 81ab7637b86..857cd357fca 100644 --- a/Ports/citron/patches/0002-Make-fiber-a-noop.patch +++ b/Ports/citron/patches/0002-Make-fiber-a-noop.patch @@ -9,7 +9,7 @@ Serenity doesn't have ucontext. 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/fiber.c b/src/fiber.c -index e8a99f1..23afae6 100644 +index e8a99f15443dbf21c3d2944df2eb99fb18723f3a..23afae64c68105146badce7e65d5802082ed5de8 100644 --- a/src/fiber.c +++ b/src/fiber.c @@ -49,6 +49,7 @@ extern int waitForAllFibers(); diff --git a/Ports/citron/patches/0003-Make-coroutines-a-noop.patch b/Ports/citron/patches/0003-Make-coroutines-a-noop.patch index 46d09b206a5..622c15c7863 100644 --- a/Ports/citron/patches/0003-Make-coroutines-a-noop.patch +++ b/Ports/citron/patches/0003-Make-coroutines-a-noop.patch @@ -9,7 +9,7 @@ Serenity doesn't have ucontext. 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/coroutine.c b/src/coroutine.c -index 8497869..8215cfa 100644 +index 8497869b07c90888a789b117154c0d559f946b19..8215cfa848c2dd472c5ff5987f7071d7104ba4f0 100644 --- a/src/coroutine.c +++ b/src/coroutine.c @@ -8,7 +8,7 @@ diff --git a/Ports/citron/patches/0004-Don-t-mess-with-libsocket.patch b/Ports/citron/patches/0004-Don-t-mess-with-libsocket.patch index 564530ef769..a6cee80ff62 100644 --- a/Ports/citron/patches/0004-Don-t-mess-with-libsocket.patch +++ b/Ports/citron/patches/0004-Don-t-mess-with-libsocket.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Don't mess with libsocket 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/makefile b/makefile -index ded4d5a..b262cd0 100644 +index 1e87eaea439902476d80fb73cb7fea9a2667d10a..e11b39f04dcf14161927f406c31568d34145b9bf 100644 --- a/makefile +++ b/makefile @@ -2,7 +2,6 @@ DEBUG_VERSION := 1603 @@ -19,7 +19,7 @@ index ded4d5a..b262cd0 100644 BUILDDIR ?= build DESTDIR ?= / BINDIR ?= $(DESTDIR)/usr/local/bin -@@ -57,7 +56,7 @@ LEXTRACF += $(LDFLAGS) -flto -lstdc++ +@@ -62,7 +61,7 @@ LEXTRACF += $(LDFLAGS) -flto -lstdc++ OBJS = siphash.o utf8.o memory.o util.o base.o collections.o file.o system.o \ lexer.o lexer_plug.o parser.o walker.o marshal.o reflect.o fiber.o \ importlib.o coroutine.o symbol.o generator.o base_extensions.o citron.o \ @@ -28,7 +28,7 @@ index ded4d5a..b262cd0 100644 EXTRAOBJS = TCC_STATICS = -@@ -131,7 +130,6 @@ debug: cxx ctr +@@ -137,7 +136,6 @@ debug: cxx ctr clean: rm -rf $(BUILDDIR) @@ -36,7 +36,7 @@ index ded4d5a..b262cd0 100644 $(MAKE) -C src/lib/tcc clean cxx: -@@ -146,10 +144,6 @@ build_tcc_statics: +@@ -152,10 +150,6 @@ build_tcc_statics: $(BUILDDIR)/%.a: src/lib/tcc/%.a cp $< $@ @@ -45,5 +45,5 @@ index ded4d5a..b262cd0 100644 - cp $(LIBSOCKETDIR)/libsocket.so $(BUILDDIR)/libsocket.so - $(BUILDDIR)/%.o: src/%.c - $(CC) -fopenmp $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ diff --git a/Ports/citron/patches/0007-Disable-GC-on-serenity.patch b/Ports/citron/patches/0005-Disable-GC-on-serenity.patch similarity index 88% rename from Ports/citron/patches/0007-Disable-GC-on-serenity.patch rename to Ports/citron/patches/0005-Disable-GC-on-serenity.patch index b7206c8c8cd..3319ce01736 100644 --- a/Ports/citron/patches/0007-Disable-GC-on-serenity.patch +++ b/Ports/citron/patches/0005-Disable-GC-on-serenity.patch @@ -9,7 +9,7 @@ Subject: [PATCH] Disable GC on serenity 2 files changed, 7 insertions(+) diff --git a/src/memory.c b/src/memory.c -index f221e06..974bbe6 100644 +index 3694dbbc47ae5ea132176e5246b3422b2fcfb96f..e660b776f04e649f082d66b0e128470f5fc30629 100644 --- a/src/memory.c +++ b/src/memory.c @@ -91,6 +91,7 @@ void* ctr_heap_allocate(size_t size) @@ -42,7 +42,7 @@ index f221e06..974bbe6 100644 /** diff --git a/src/system.c b/src/system.c -index e42d09a..a6856b8 100644 +index f4dd7aee322403ce996255f18a105eb2f408139e..949f0365d3a599c71ad06af8de853a820e69974d 100644 --- a/src/system.c +++ b/src/system.c @@ -426,6 +426,9 @@ void ctr_gc_mark(ctr_object* object, int last_vector_index) diff --git a/Ports/citron/patches/0005-Disable-inject.patch b/Ports/citron/patches/0005-Disable-inject.patch deleted file mode 100644 index ffc06445fdc..00000000000 --- a/Ports/citron/patches/0005-Disable-inject.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ali Mohammad Pur -Date: Fri, 11 Feb 2022 16:49:59 +0330 -Subject: [PATCH] Disable inject - -tcc requires ucontext. ---- - makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/makefile b/makefile -index b262cd0..2e05795 100644 ---- a/makefile -+++ b/makefile -@@ -12,7 +12,7 @@ INCLUDE_DIR ?= $(DESTDIR)/usr/local/include/Citron - - .PHONY: all ctrconfig libctr ctr install cxx - --enable_inject ?= true -+enable_inject ?= false - enable_ctypes ?= true - enable_inline_asm ?= false - enable_boehm_gc ?= true diff --git a/Ports/citron/patches/0006-Disable-openmp.patch b/Ports/citron/patches/0006-Disable-openmp.patch deleted file mode 100644 index db2ae3c0b19..00000000000 --- a/Ports/citron/patches/0006-Disable-openmp.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ali Mohammad Pur -Date: Fri, 11 Feb 2022 16:52:51 +0330 -Subject: [PATCH] Disable openmp - ---- - makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/makefile b/makefile -index 2e05795..d916511 100644 ---- a/makefile -+++ b/makefile -@@ -96,7 +96,7 @@ $(BUILDDIR): - mkdir -p $@ - - $(BUILDDIR)/ctr: $(TCC_STATICS) $(BUILDDIR) $(OBJS) $(EXTRAOBJS) -- $(CXX) -fopenmp $(EXTRAOBJS) $(OBJS) $(CXXFLAGS) $(CFLAGS) $(LIBS) $(LEXTRACF) -o $@ -+ $(CXX) $(EXTRAOBJS) $(OBJS) $(CXXFLAGS) $(CFLAGS) $(LIBS) $(LEXTRACF) -o $@ - - ctr: $(BUILDDIR)/ctr - -@@ -145,7 +145,7 @@ $(BUILDDIR)/%.a: src/lib/tcc/%.a - cp $< $@ - - $(BUILDDIR)/%.o: src/%.c -- $(CC) -fopenmp $(CFLAGS) -c $< -o $@ -+ $(CC) $(CFLAGS) -c $< -o $@ - - $(BUILDDIR)/%.o: src/%.cpp - $(CXX) -g $(CFLAGS) -c $< $(CXXFLAGS) -o $@ diff --git a/Ports/citron/patches/0008-Don-t-use-libbsd-on-serenity.patch b/Ports/citron/patches/0008-Don-t-use-libbsd-on-serenity.patch deleted file mode 100644 index bef519a15d3..00000000000 --- a/Ports/citron/patches/0008-Don-t-use-libbsd-on-serenity.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ali Mohammad Pur -Date: Sun, 13 Feb 2022 17:03:21 +0330 -Subject: [PATCH] Don't use libbsd on serenity - -arc4random exists on serenity, there's no need to pull libbsd in for -functionality that already exists. ---- - makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/makefile b/makefile -index d916511..d1ce70d 100644 ---- a/makefile -+++ b/makefile -@@ -16,7 +16,7 @@ enable_inject ?= false - enable_ctypes ?= true - enable_inline_asm ?= false - enable_boehm_gc ?= true --use_libbsd ?= true -+use_libbsd ?= false - - CFLAGS += -Wall -Wextra -Wno-unused-parameter\ - -D withTermios -D CTR_STD_EXTENSION_PATH=\"$(DATADIR)\" diff --git a/Ports/citron/patches/0009-Disable-boehm-GC-on-serenity.patch b/Ports/citron/patches/0009-Disable-boehm-GC-on-serenity.patch deleted file mode 100644 index 21cf33d485e..00000000000 --- a/Ports/citron/patches/0009-Disable-boehm-GC-on-serenity.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ali Mohammad Pur -Date: Sun, 13 Feb 2022 17:04:46 +0330 -Subject: [PATCH] Disable boehm GC on serenity - -Serenity doesn't have a bdwgc port, so disable it here. ---- - makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/makefile b/makefile -index d1ce70d..307bf1c 100644 ---- a/makefile -+++ b/makefile -@@ -15,7 +15,7 @@ INCLUDE_DIR ?= $(DESTDIR)/usr/local/include/Citron - enable_inject ?= false - enable_ctypes ?= true - enable_inline_asm ?= false --enable_boehm_gc ?= true -+enable_boehm_gc ?= false - use_libbsd ?= false - - CFLAGS += -Wall -Wextra -Wno-unused-parameter\ diff --git a/Ports/citron/patches/ReadMe.md b/Ports/citron/patches/ReadMe.md index f095a2e594b..46bf533e4e9 100644 --- a/Ports/citron/patches/ReadMe.md +++ b/Ports/citron/patches/ReadMe.md @@ -22,32 +22,8 @@ Serenity doesn't have ucontext. Don't mess with libsocket -## `0005-Disable-inject.patch` - -Disable inject - -tcc requires ucontext. - -## `0006-Disable-openmp.patch` - -Disable openmp - - -## `0007-Disable-GC-on-serenity.patch` +## `0005-Disable-GC-on-serenity.patch` Disable GC on serenity -## `0008-Don-t-use-libbsd-on-serenity.patch` - -Don't use libbsd on serenity - -arc4random exists on serenity, there's no need to pull libbsd in for -functionality that already exists. - -## `0009-Disable-boehm-GC-on-serenity.patch` - -Disable boehm GC on serenity - -Serenity doesn't have a bdwgc port, so disable it here. -