summaryrefslogtreecommitdiff
path: root/repo/squeak-vm
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
committerdavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
commitd2567bfbdf0e9fa6db0a6ed1534831ec859a3e03 (patch)
tree684a17eebf446aa1adab1097616f1882c8d51568 /repo/squeak-vm
parentd1fc3393cca72e8e432f827f7624e38734fad6dc (diff)
added deps for qemu
Diffstat (limited to 'repo/squeak-vm')
-rw-r--r--repo/squeak-vm/sqVirtualMachine.patch49
-rw-r--r--repo/squeak-vm/squeak-vm.xibuild31
2 files changed, 80 insertions, 0 deletions
diff --git a/repo/squeak-vm/sqVirtualMachine.patch b/repo/squeak-vm/sqVirtualMachine.patch
new file mode 100644
index 0000000..37b4699
--- /dev/null
+++ b/repo/squeak-vm/sqVirtualMachine.patch
@@ -0,0 +1,49 @@
+--- a/Cross/vm/sqVirtualMachine.c
++++ b/Cross/vm/sqVirtualMachine.c
+@@ -485,10 +485,7 @@
+ /* This lives here for now but belongs somewhere else.
+ * platforms/Cross/vm/sqStuff.c??
+ */
+-#define STDOUT_STACK_SZ 5
+-static int stdoutStackIdx = -1;
+-static FILE stdoutStack[STDOUT_STACK_SZ];
+-
++
+ /* N.B. As of cygwin 1.5.25 fopen("crash.dmp","a") DOES NOT WORK! crash.dmp
+ * contains garbled output as if the file pointer gets set to the start of the
+ * file, not the end. So we synthesize our own append mode.
+@@ -521,10 +518,6 @@
+
+ FILE *output;
+
+- if (stdoutStackIdx + 2 >= STDOUT_STACK_SZ) {
+- fprintf(stderr,"output file stack is full.\n");
+- return;
+- }
+ switch ((unsigned)filenameOrStdioIndex) {
+ case STDOUT_FILENO: output = stdout; break;
+ case STDERR_FILENO: output = stderr; break;
+@@ -536,17 +529,11 @@
+ return;
+ }
+ }
+- stdoutStack[++stdoutStackIdx] = *stdout;
+- *stdout = *output;
+ }
+
+ void
+ popOutputFile()
+ {
+- if (stdoutStackIdx < 0) {
+- fprintf(stderr,"output file stack is empty.\n");
+- return;
+- }
+ fflush(stdout);
+ if (fileno(stdout) > STDERR_FILENO) {
+ /* as of Feb 2011 with fclose@@GLIBC_2.1 under e.g. CentOS 5.3, fclose
+@@ -558,5 +545,4 @@
+ fclose(stdout);
+ #endif
+ }
+- *stdout = stdoutStack[stdoutStackIdx--];
+ }
diff --git a/repo/squeak-vm/squeak-vm.xibuild b/repo/squeak-vm/squeak-vm.xibuild
new file mode 100644
index 0000000..f6a7738
--- /dev/null
+++ b/repo/squeak-vm/squeak-vm.xibuild
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+NAME="squeak-vm"
+DESC="Full-featured implementation of the Smalltalk programming language and environment"
+
+MAKEDEPS=" make cmake"
+
+PKG_VER=4.10.2.2614
+SOURCE="http://squeakvm.org/unix/release/Squeak-$PKG_VER-src.tar.gz"
+
+ADDITIONAL="
+sqVirtualMachine.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ ./unix/cmake/configure \
+ --prefix=/usr \
+ --without-quartz \
+ --with-x \
+ --enable-mpg-mmx
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
+