pkgsrc-WIP-changes archive

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

squeak5-vm: Import squeak5-vm-202003021730 as wip/squeak5-vm



Module Name:	pkgsrc-wip
Committed By:	Atsushi Toyokura <asteria.at%gmail.com@localhost>
Pushed By:	steleto
Date:		Fri Nov 5 01:15:20 2021 +0900
Changeset:	bd9d2d81a4e97529bc3225f9efeaf62630ff5d25

Modified Files:
	Makefile
Added Files:
	squeak5-vm/DESCR
	squeak5-vm/Makefile
	squeak5-vm/PLIST
	squeak5-vm/distinfo
	squeak5-vm/patches/patch-platforms_Cross_plugins_SqueakFFIPrims_sqFFIPlugin.c
	squeak5-vm/patches/patch-platforms_unix_config_bin.squeak.sh.in
	squeak5-vm/patches/patch-platforms_unix_config_configure.ac
	squeak5-vm/patches/patch-platforms_unix_config_make.cfg.in
	squeak5-vm/patches/patch-platforms_unix_config_make.ext.in
	squeak5-vm/patches/patch-platforms_unix_config_squeak.sh.in
	squeak5-vm/patches/patch-platforms_unix_plugins_SerialPlugin_sqUnixSerial.c
	squeak5-vm/patches/patch-platforms_unix_plugins_SqueakSSL_openssl__overlay.h
	squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_Makefile.inc
	squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_acinclude.m4
	squeak5-vm/patches/patch-platforms_unix_vm-display-X11_acinclude.m4
	squeak5-vm/patches/patch-platforms_unix_vm_include__ucontext.h
	squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerHeartbeat.c
	squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerTickerHeartbeat.c
	squeak5-vm/patches/patch-platforms_unix_vm_sqUnixMain.c
	squeak5-vm/patches/patch-spur64src_vm_cogitX64SysV.c

Log Message:
squeak5-vm: Import squeak5-vm-202003021730 as wip/squeak5-vm

Cog is an evolution of the Squeak Back-to-the-future Smalltalk virtual
machine that provides a number of different Smalltalk virtual
machines. The VMs are developed in Smalltalk, using all the dynamic
and reflective facilities of the Squeak/Pharo Smalltalk system. As
such, developing in Cog is a delight. The Smalltalk framework
comprising the various Cog VMs is translated into C by its Slang
component to produce VM source that is combined with platform-specific
support sources and compiled via a C compiler to obtain a fast
production VM. This directory tree includes the output of Slang for
various configurations of "Cog VM" and the associated platform support
code, plus build directories that can be used to produce production
VMs.

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

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

diffstat:
 Makefile                                           |  1 +
 squeak5-vm/DESCR                                   | 12 ++++
 squeak5-vm/Makefile                                | 76 ++++++++++++++++++++++
 squeak5-vm/PLIST                                   | 33 ++++++++++
 squeak5-vm/distinfo                                | 22 +++++++
 ...orms_Cross_plugins_SqueakFFIPrims_sqFFIPlugin.c | 18 +++++
 .../patch-platforms_unix_config_bin.squeak.sh.in   | 13 ++++
 .../patch-platforms_unix_config_configure.ac       | 17 +++++
 .../patch-platforms_unix_config_make.cfg.in        | 12 ++++
 .../patch-platforms_unix_config_make.ext.in        | 15 +++++
 .../patch-platforms_unix_config_squeak.sh.in       | 13 ++++
 ...tforms_unix_plugins_SerialPlugin_sqUnixSerial.c | 19 ++++++
 ...forms_unix_plugins_SqueakSSL_openssl__overlay.h | 12 ++++
 ...atforms_unix_plugins_UnicodePlugin_Makefile.inc |  9 +++
 ...atforms_unix_plugins_UnicodePlugin_acinclude.m4 | 26 ++++++++
 ...atch-platforms_unix_vm-display-X11_acinclude.m4 | 44 +++++++++++++
 .../patch-platforms_unix_vm_include__ucontext.h    | 13 ++++
 ...patch-platforms_unix_vm_sqUnixITimerHeartbeat.c | 13 ++++
 ...platforms_unix_vm_sqUnixITimerTickerHeartbeat.c | 13 ++++
 .../patches/patch-platforms_unix_vm_sqUnixMain.c   | 34 ++++++++++
 .../patches/patch-spur64src_vm_cogitX64SysV.c      | 15 +++++
 21 files changed, 430 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index f210f296ec..2e9ae17eca 100644
--- a/Makefile
+++ b/Makefile
@@ -5302,6 +5302,7 @@ SUBDIR+=	spotify-tui
 SUBDIR+=	spotifyd
 SUBDIR+=	spread4
 SUBDIR+=	spyder
+SUBDIR+=	squeak5-vm
 SUBDIR+=	squid4
 SUBDIR+=	squirrel
 SUBDIR+=	squirrelmail-avelsieve
diff --git a/squeak5-vm/DESCR b/squeak5-vm/DESCR
new file mode 100644
index 0000000000..f875561b6f
--- /dev/null
+++ b/squeak5-vm/DESCR
@@ -0,0 +1,12 @@
+Cog is an evolution of the Squeak Back-to-the-future Smalltalk virtual
+machine that provides a number of different Smalltalk virtual
+machines. The VMs are developed in Smalltalk, using all the dynamic
+and reflective facilities of the Squeak/Pharo Smalltalk system. As
+such, developing in Cog is a delight. The Smalltalk framework
+comprising the various Cog VMs is translated into C by its Slang
+component to produce VM source that is combined with platform-specific
+support sources and compiled via a C compiler to obtain a fast
+production VM. This directory tree includes the output of Slang for
+various configurations of "Cog VM" and the associated platform support
+code, plus build directories that can be used to produce production
+VMs.
diff --git a/squeak5-vm/Makefile b/squeak5-vm/Makefile
new file mode 100644
index 0000000000..55f6c2bf41
--- /dev/null
+++ b/squeak5-vm/Makefile
@@ -0,0 +1,76 @@
+# $NetBSD$
+
+DISTNAME=	opensmalltak-vm
+PKGNAME=	squeak5-vm-${GITHUB_TAG}
+PKGVERSION=	5.0-${GITHUB_TAG}
+CATEGORIES=	lang
+MASTER_SITES=	${MASTER_SITE_GITHUB:=OpenSmalltalk/}
+GITHUB_PROJECT=	opensmalltalk-vm
+GITHUB_TAG=	202003021730
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://opensmalltalk.org/
+COMMENT=	Cross-platform VM for Squeak, Pharo, Cuis, and Newspeak
+LICENSE=	mit
+
+ONLY_FOR_PLATFORM=	NetBSD-[0-9]*-x86_64
+CONFLICTS+=		squeak-vm-[0-9]*
+
+USE_LANGUAGES=	c
+USE_TOOLS+=	autoreconf autoconf automake pkg-config bash pax
+AUTOCONF_REQD=	2.69
+USE_LIBTOOL=	yes
+
+NO_CONFIGURE=	yes
+
+SUBST_CLASSES+=			fix-paths
+SUBST_STAGE.fix-paths=		pre-build
+SUBST_MESSAGE.fix-paths=	Fixing absolute paths.
+SUBST_FILES.fix-paths=		platforms/unix/plugins/SqueakSSL/openssl_overlay.h
+SUBST_FILES.fix-paths+=		platforms/unix/config/configure.ac
+SUBST_SED.fix-paths=		-e "s,@pkglibdir@,${PREFIX}/lib,g"
+
+SUBST_CLASSES+=		sccs
+SUBST_STAGE.sccs=	pre-build
+SUBST_MESSAGE.sccs=	Set version infomation to the VM.
+SUBST_FILES.sccs=	platforms/Cross/vm/sqSCCSVersion.h
+SUBST_FILES.sccs+=	platforms/Cross/plugins/sqPluginsSCCSVersion.h
+SUBST_SED.sccs=		-e "s,\$$Rev,\$$Rev: ${GITHUB_TAG} ,g"
+SUBST_SED.sccs+=	-e "s,\$$Date,\$$Date: Mon 2 Mar 2020 18:30:55 +0100 ,g"
+SUBST_SED.sccs+=	-e "s,\$$URL,\$$URL: `${ID} -un`@`${HOSTNAME_CMD}`:${WRKSRC} ,g"
+SUBST_SED.sccs+=	-e "s,\$$CommitHash,\$$CommitHash: 6a0bc9626 ,g"
+
+INSTALLATION_DIRS+=	bin
+
+NOT_PAX_MPROTECT_SAFE+=	lib/squeak/${PKGVERSION}/squeak
+
+pre-build:
+	cd ${WRKSRC}/platforms/unix/config && ${MAKE_PROGRAM}
+
+do-build:
+	cd ${WRKSRC}/build.linux64x64/squeak.cog.spur/build && yes | ${BASH} ./mvm
+
+do-install:
+	cd ${WRKSRC}/products/sqcogspur64linuxht && find bin -type f | while read file; do \
+		${INSTALL_SCRIPT} $$file ${DESTDIR}${PREFIX}/$$file; \
+	done
+	cd ${WRKSRC}/products/sqcogspur64linuxht && find lib -type d | while read dir; do \
+		${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/$$dir; \
+	done
+	cd ${WRKSRC}/products/sqcogspur64linuxht && find lib -type f -name "squeak" | while read file; do \
+		${INSTALL_LIB} $$file ${DESTDIR}${PREFIX}/$$file; \
+	done
+	cd ${WRKSRC}/products/sqcogspur64linuxht && find lib -type f -name "*.so" | while read file; do \
+		${INSTALL_LIB} $$file ${DESTDIR}${PREFIX}/$$file; \
+	done
+	cd ${WRKSRC}/products/sqcogspur64linuxht && find lib -type f -name "*.a" | while read file; do \
+		${INSTALL_DATA} $$file ${DESTDIR}${PREFIX}/$$file; \
+	done
+
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/pango/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/squeak5-vm/PLIST b/squeak5-vm/PLIST
new file mode 100644
index 0000000000..1b10746dd4
--- /dev/null
+++ b/squeak5-vm/PLIST
@@ -0,0 +1,33 @@
+@comment $NetBSD$
+bin/squeak
+lib/squeak/${PKGVERSION}/B3DAcceleratorPlugin.a
+lib/squeak/${PKGVERSION}/B3DAcceleratorPlugin.so
+lib/squeak/${PKGVERSION}/FileAttributesPlugin.a
+lib/squeak/${PKGVERSION}/FileAttributesPlugin.so
+lib/squeak/${PKGVERSION}/ImmX11Plugin.a
+lib/squeak/${PKGVERSION}/ImmX11Plugin.so
+lib/squeak/${PKGVERSION}/LocalePlugin.a
+lib/squeak/${PKGVERSION}/LocalePlugin.so
+lib/squeak/${PKGVERSION}/Squeak3D.a
+lib/squeak/${PKGVERSION}/Squeak3D.so
+lib/squeak/${PKGVERSION}/SqueakFFIPrims.a
+lib/squeak/${PKGVERSION}/SqueakFFIPrims.so
+lib/squeak/${PKGVERSION}/SqueakSSL.a
+lib/squeak/${PKGVERSION}/SqueakSSL.so
+lib/squeak/${PKGVERSION}/UUIDPlugin.a
+lib/squeak/${PKGVERSION}/UUIDPlugin.so
+lib/squeak/${PKGVERSION}/UnicodePlugin.a
+lib/squeak/${PKGVERSION}/UnicodePlugin.so
+lib/squeak/${PKGVERSION}/UnixOSProcessPlugin.a
+lib/squeak/${PKGVERSION}/UnixOSProcessPlugin.so
+lib/squeak/${PKGVERSION}/XDisplayControlPlugin.a
+lib/squeak/${PKGVERSION}/XDisplayControlPlugin.so
+lib/squeak/${PKGVERSION}/squeak
+lib/squeak/${PKGVERSION}/vm-display-X11.a
+lib/squeak/${PKGVERSION}/vm-display-X11.so
+lib/squeak/${PKGVERSION}/vm-display-null.a
+lib/squeak/${PKGVERSION}/vm-display-null.so
+lib/squeak/${PKGVERSION}/vm-sound-OSS.a
+lib/squeak/${PKGVERSION}/vm-sound-OSS.so
+lib/squeak/${PKGVERSION}/vm-sound-null.a
+lib/squeak/${PKGVERSION}/vm-sound-null.so
diff --git a/squeak5-vm/distinfo b/squeak5-vm/distinfo
new file mode 100644
index 0000000000..ebff7d5b8c
--- /dev/null
+++ b/squeak5-vm/distinfo
@@ -0,0 +1,22 @@
+$NetBSD$
+
+SHA1 (opensmalltak-vm-202003021730.tar.gz) = 3711fc9ea7e154b61724d4a2529dcc12e08cca02
+RMD160 (opensmalltak-vm-202003021730.tar.gz) = ce56ec2bdd767dcde6636adeffb338bbf6e7001c
+SHA512 (opensmalltak-vm-202003021730.tar.gz) = 62f37bd3ae133280b34dc2a703300b2a782a5e03eec92487af0a2e19b44e73eb15caa7684b1b227fe5bbcda9b28a2ad1b6f18b932205396c66138a1757717de6
+Size (opensmalltak-vm-202003021730.tar.gz) = 63428361 bytes
+SHA1 (patch-platforms_Cross_plugins_SqueakFFIPrims_sqFFIPlugin.c) = 6422c6e53716f5ad009235b7b3ae728ae1ef554f
+SHA1 (patch-platforms_unix_config_bin.squeak.sh.in) = eca83ca07948b5abce150bd4be4b5a7a8e1630eb
+SHA1 (patch-platforms_unix_config_configure.ac) = 59b4e0ed084e5b02d4dc434448b2f8e1a6c2f7c8
+SHA1 (patch-platforms_unix_config_make.cfg.in) = d3bc685372bf4104f2b3db78625681e26c0c29d9
+SHA1 (patch-platforms_unix_config_make.ext.in) = d9fcf9124568ffac544d9bb388883647f4d01e26
+SHA1 (patch-platforms_unix_config_squeak.sh.in) = 29b074f629fd773a6d14acdd28d5f0054f2ee59d
+SHA1 (patch-platforms_unix_plugins_SerialPlugin_sqUnixSerial.c) = 3e84fbb1a22ea899d8f61bd220c2407e73c1ef06
+SHA1 (patch-platforms_unix_plugins_SqueakSSL_openssl__overlay.h) = f74ab00c09a026c7df6bde4f647d77f12437884a
+SHA1 (patch-platforms_unix_plugins_UnicodePlugin_Makefile.inc) = 71aebebf64ddc205dd8d30f495bb19706d3216e2
+SHA1 (patch-platforms_unix_plugins_UnicodePlugin_acinclude.m4) = 53c5afc8dee6e31bd01a7611e2e30030e7059496
+SHA1 (patch-platforms_unix_vm-display-X11_acinclude.m4) = b6d13d74a7c3f5428f4cefa068a9ba3f15ac6556
+SHA1 (patch-platforms_unix_vm_include__ucontext.h) = f4e944f3f1a74a363157efe4cb1fcf03dc127fc0
+SHA1 (patch-platforms_unix_vm_sqUnixITimerHeartbeat.c) = 96b6f1094b07c9456f9b6cc56b2bc7237e6c24f0
+SHA1 (patch-platforms_unix_vm_sqUnixITimerTickerHeartbeat.c) = 2714da2e76226d5194a07ad1ea5ead3edc39d7fd
+SHA1 (patch-platforms_unix_vm_sqUnixMain.c) = 371f69c1e78914c3187003e89524485a6e930628
+SHA1 (patch-spur64src_vm_cogitX64SysV.c) = e1759c6a501bd611a3796134e71fcb37ab27ace8
diff --git a/squeak5-vm/patches/patch-platforms_Cross_plugins_SqueakFFIPrims_sqFFIPlugin.c b/squeak5-vm/patches/patch-platforms_Cross_plugins_SqueakFFIPrims_sqFFIPlugin.c
new file mode 100644
index 0000000000..32ee99fd88
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_Cross_plugins_SqueakFFIPrims_sqFFIPlugin.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c
+@@ -7,11 +7,10 @@
+ *
+ *****************************************************************************/
+ 
++#include "sq.h"
++
+ #include <stdio.h>
+ #include <stdlib.h> /* proto for alloca in MINGW */
+-#if !_WIN32 && !__FreeBSD__ && !__OpenBSD__
+-# include <alloca.h>
+-#endif
+ #include <string.h>
+ 
+ #ifdef _MSC_VER
diff --git a/squeak5-vm/patches/patch-platforms_unix_config_bin.squeak.sh.in b/squeak5-vm/patches/patch-platforms_unix_config_bin.squeak.sh.in
new file mode 100644
index 0000000000..9368403f3c
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_config_bin.squeak.sh.in
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- platforms/unix/config/bin.squeak.sh.in.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/config/bin.squeak.sh.in
+@@ -18,7 +18,7 @@ case "$BIN" in
+ *) PLUGINS="`pwd`/$BIN"
+ esac
+ 
+-if [ $(uname -s) = "OpenBSD" ]; then
++if [ $(uname -s) = "OpenBSD" -o $(uname -s) = "NetBSD" ]; then
+   LD_LIBRARY_PATH="$PLUGINS:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "$@"
+ fi
+ 
diff --git a/squeak5-vm/patches/patch-platforms_unix_config_configure.ac b/squeak5-vm/patches/patch-platforms_unix_config_configure.ac
new file mode 100644
index 0000000000..46bea41fa1
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_config_configure.ac
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- platforms/unix/config/configure.ac.orig	2019-01-17 23:23:50.000000000 +0000
++++ platforms/unix/config/configure.ac
+@@ -141,10 +141,12 @@ test "x$exec_prefix" = xNONE && exec_pre
+ imgdir=`eval echo ${libdir}/squeak`
+ expanded_relative_imgdir=`eval echo lib/squeak/${VM_VERSION}`
+ plgdir='${imgdir}/`${blddir}/getversion VERSION_TAG`'
++rpathdir='@pkglibdir@/squeak/`${blddir}/getversion VERSION_TAG`'
+ 
+ AC_SUBST(imgdir)
+ AC_SUBST(expanded_relative_imgdir)
+ AC_SUBST(plgdir)
++AC_SUBST(rpathdir)
+ 
+ AC_DEFINE(OS_TYPE, "unix", [OS type])
+ 
diff --git a/squeak5-vm/patches/patch-platforms_unix_config_make.cfg.in b/squeak5-vm/patches/patch-platforms_unix_config_make.cfg.in
new file mode 100644
index 0000000000..0380a18fa7
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_config_make.cfg.in
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- platforms/unix/config/make.cfg.in.orig	2019-01-17 23:23:50.000000000 +0000
++++ platforms/unix/config/make.cfg.in
+@@ -57,6 +57,7 @@ mandir=		@mandir@
+ imgdir=		@imgdir@
+ plgdir=		@plgdir@
+ docdir=		$(prefix)/doc/squeak
++rpathdir=	@rpathdir@
+ 
+ SHELL=		@SHELL@
+ MKINSTALLDIRS=	mkdir -p
diff --git a/squeak5-vm/patches/patch-platforms_unix_config_make.ext.in b/squeak5-vm/patches/patch-platforms_unix_config_make.ext.in
new file mode 100644
index 0000000000..1761041fd3
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_config_make.ext.in
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- platforms/unix/config/make.ext.in.orig	2019-01-17 23:23:50.000000000 +0000
++++ platforms/unix/config/make.ext.in
+@@ -16,8 +16,8 @@ COMPILE.cc	= $(LIBTOOL) --mode=compile \
+ 		  $(INCLUDES) $(XINCLUDES) $(CPPFLAGS) $(XCPPFLAGS) $(TARGET_ARCH) -c -o
+ LINK		= $(LIBTOOL) --mode=link \
+ 		  $(CC) $(CFLAGS) $(XCFLAGS) \
+-		  $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) -avoid-version -module -rpath $(plgdir) -o
++		  $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) -avoid-version -module -rpath $(plgdir) -Wl,-R$(rpathdir) -o
+ LINKXX		= $(LIBTOOL) --mode=link \
+ 		  $(CXX) $(CFLAGS) $(XCFLAGS) \
+-		  $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) -avoid-version -module -rpath $(plgdir) -o
++		  $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) -avoid-version -module -rpath $(plgdir) -Wl,-R$(rpathdir) -o
+ RANLIB		= :
diff --git a/squeak5-vm/patches/patch-platforms_unix_config_squeak.sh.in b/squeak5-vm/patches/patch-platforms_unix_config_squeak.sh.in
new file mode 100644
index 0000000000..b0fee94c31
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_config_squeak.sh.in
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- platforms/unix/config/squeak.sh.in.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/config/squeak.sh.in
+@@ -18,7 +18,7 @@ case "$BIN" in
+ *) PLUGINS="`pwd`/$BIN"
+ esac
+ 
+-if [ $(uname -s) = "OpenBSD" ]; then
++if [ $(uname -s) = "OpenBSD" -o $(uname -s) = "NetBSD" ]; then
+   LD_LIBRARY_PATH="$PLUGINS:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "$@"
+ fi
+ 
diff --git a/squeak5-vm/patches/patch-platforms_unix_plugins_SerialPlugin_sqUnixSerial.c b/squeak5-vm/patches/patch-platforms_unix_plugins_SerialPlugin_sqUnixSerial.c
new file mode 100644
index 0000000000..d5476e9d5c
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_plugins_SerialPlugin_sqUnixSerial.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- platforms/unix/plugins/SerialPlugin/sqUnixSerial.c.orig	2019-01-17 23:23:50.000000000 +0000
++++ platforms/unix/plugins/SerialPlugin/sqUnixSerial.c
+@@ -100,10 +100,14 @@ static drDecode dataRateDecode[] = {
+ #endif
+ #if defined(B500000)		/* missing on GNU/Linux prior to 2.2 */
+   { 500000, B500000 },
++#if defined(B576000)		/* missing on NetBSD */
+   { 576000, B576000 },
++#endif
+   { 921600, B921600 },
+   { 1000000, B1000000 },
++#if defined(B1152000)		/* missing on NetBSD */
+   { 1152000, B1152000 },
++#endif
+   { 1500000, B1500000 },
+   { 2000000, B2000000 },
+ #endif
diff --git a/squeak5-vm/patches/patch-platforms_unix_plugins_SqueakSSL_openssl__overlay.h b/squeak5-vm/patches/patch-platforms_unix_plugins_SqueakSSL_openssl__overlay.h
new file mode 100644
index 0000000000..27615b4c15
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_plugins_SqueakSSL_openssl__overlay.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- platforms/unix/plugins/SqueakSSL/openssl_overlay.h.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/plugins/SqueakSSL/openssl_overlay.h
+@@ -516,6 +516,7 @@ static size_t _sqo_lib_paths(size_t cons
+     _SQO_ADD_LIB("/lib");
+     _SQO_ADD_LIB("/usr/lib");
+     _SQO_ADD_LIB("/usr/local/lib");
++    _SQO_ADD_LIB("@pkglibdir@");
+ #if INTPTR_MAX == INT32_MAX
+     _SQO_ADD_LIB("/lib32");
+     _SQO_ADD_LIB("/usr/lib32");
diff --git a/squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_Makefile.inc b/squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_Makefile.inc
new file mode 100644
index 0000000000..fc550cea67
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_Makefile.inc
@@ -0,0 +1,9 @@
+$NetBSD$
+
+--- platforms/unix/plugins/UnicodePlugin/Makefile.inc.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/plugins/UnicodePlugin/Makefile.inc
+@@ -1,2 +1,2 @@
+-XCPPFLAGS=	-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0  -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include
+-XLDFLAGS= -lpangocairo-1.0 -lcairo -lpango-1.0 -lgobject-2.0 -lglib-2.0
++#XCPPFLAGS=	-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0  -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include
++#XLDFLAGS= -lpangocairo-1.0 -lcairo -lpango-1.0 -lgobject-2.0 -lglib-2.0
diff --git a/squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_acinclude.m4 b/squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_acinclude.m4
new file mode 100644
index 0000000000..17fbec725a
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_plugins_UnicodePlugin_acinclude.m4
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- platforms/unix/plugins/UnicodePlugin/acinclude.m4.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/plugins/UnicodePlugin/acinclude.m4
+@@ -1,12 +1,9 @@
+-# -*- sh -*-
+-
+-AC_MSG_CHECKING([for PangoCairo libraries])
+-save_CPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include"
+-AC_TRY_COMPILE([#include <pango/pangocairo.h>],[{}],[
+-  AC_MSG_RESULT(yes)
+-],[
+-  AC_MSG_RESULT(no)
+-  AC_PLUGIN_DISABLE
+-])
+-CPPFLAGS="$save_CPPFLAGS"
++# -*- sh -*-
++AC_MSG_CHECKING([for PangoCairo libraries])
++PKG_CHECK_MODULES([pangocairo], [pangocairo], [
++		      AC_MSG_RESULT(yes)
++		      CFLAGS="$CFLAGS $pangocairo_CFLAGS"
++		      LDFLAGS="$LDFLAGS $pangocairo_LIBS"
++		  ],[
++		      AC_MSG_RESULT(no)
++		  ])
diff --git a/squeak5-vm/patches/patch-platforms_unix_vm-display-X11_acinclude.m4 b/squeak5-vm/patches/patch-platforms_unix_vm-display-X11_acinclude.m4
new file mode 100644
index 0000000000..23d9f438ac
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_vm-display-X11_acinclude.m4
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- platforms/unix/vm-display-X11/acinclude.m4.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/vm-display-X11/acinclude.m4
+@@ -45,18 +45,19 @@ if test "$have_x" = "yes"; then
+     INCLUDES="${INCLUDES} -I${x_includes}"
+     X_INCLUDES="-I${x_includes}"
+   fi
+-  AC_SEARCH_LIBS([XOpenDisplay],[X11], [
++  PKG_CHECK_MODULES([x11], [x11], [
+     AC_DEFINE([USE_X11], [1], [Use X11])
+     AC_DEFINE_UNQUOTED([VM_X11DIR], "${x_libraries}", [X11 libraries])
+-    AC_SEARCH_LIBS([XShmAttach],[Xext])
++    PKG_CHECK_MODULES([xext], [xext])
++
+     if test "$have_gl" = ""; then have_gl="no"; fi
+     if test "$have_gl" = "yes"; then
+-        AC_CHECK_HEADERS([GL/gl.h gl/gl.h gl.h], [
+-          have_gl=yes
+-          AC_DEFINE([USE_X11_GLX], [1], [Use X11 GLX])
+-          AC_SEARCH_LIBS([glIsEnabled],[GL])
+-          break
+-        ])
++      PKG_CHECK_MODULES([gl], [gl], [
++        AC_CHECK_HEADERS([GL/gl.h gl/gl.h gl.h])
++        have_gl=yes
++        AC_DEFINE([USE_X11_GLX], [1], [Use X11 GLX])
++        break
++      ])
+     else
+         AC_DEFINE([USE_X11_GLX], [0], [Use X11 GLX])
+     fi
+@@ -77,9 +78,10 @@ X_INCLUDES=${INCLUDES}
+ AC_SUBST(X_INCLUDES)
+ 
+ LIBS=${VMLIBS}
+-CFLAGS=${VMCFLAGS}
++CFLAGS="${VMCFLAGS} ${x11_CFLAGS} ${xext_CFLAGS} ${gl_CFLAGS}"
+ CPPFLAGS=${VMCPPFLAGS}
+ INCLUDES=${VMINCLUDES}
++LDFLAGS="${LDFLAGS} ${x11_LIBS} ${xext_LIBS} ${gl_LIBS}"
+ 
+ AC_SUBST(VM_DISPX11_OBJS, $vm_dispx11_objs)
+ AC_SUBST(VM_DISPX11_BITBLT_FLAGS, $vm_dispx11_bitblt_flags)
diff --git a/squeak5-vm/patches/patch-platforms_unix_vm_include__ucontext.h b/squeak5-vm/patches/patch-platforms_unix_vm_include__ucontext.h
new file mode 100644
index 0000000000..6f86fc8ccc
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_vm_include__ucontext.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- platforms/unix/vm/include_ucontext.h.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/vm/include_ucontext.h
+@@ -46,6 +46,8 @@
+ # define _PC_IN_UCONTEXT uc_mcontext.mc_eip
+ #elif __FreeBSD__ && __amd64__
+ # define _PC_IN_UCONTEXT uc_mcontext.mc_rip
++#elif __NetBSD__ && __amd64__
++# define _PC_IN_UCONTEXT uc_mcontext.__gregs[_REG_RIP]
+ #elif __OpenBSD__ && __i386__
+ # define _PC_IN_UCONTEXT sc_eip
+ #elif __OpenBSD__ && __amd64__
diff --git a/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerHeartbeat.c b/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerHeartbeat.c
new file mode 100644
index 0000000000..baf68fb5c1
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerHeartbeat.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- platforms/unix/vm/sqUnixITimerHeartbeat.c.orig	2018-10-19 04:12:21.000000000 +0000
++++ platforms/unix/vm/sqUnixITimerHeartbeat.c
+@@ -305,7 +305,7 @@ static int handling_heartbeat = 0;
+ #endif
+ 
+ static void
+-heartbeat_handler(int sig, struct siginfo *sig_info, void *context)
++heartbeat_handler(int sig, struct siginfo_t *sig_info, void *context)
+ {
+ #if !defined(SA_NODEFER)
+ 	/* if the CAS fails, the heartbeat is already being handled. */
diff --git a/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerTickerHeartbeat.c b/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerTickerHeartbeat.c
new file mode 100644
index 0000000000..cd7d24b32b
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixITimerTickerHeartbeat.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- platforms/unix/vm/sqUnixITimerTickerHeartbeat.c.orig	2018-11-05 16:37:13.052717036 +0000
++++ platforms/unix/vm/sqUnixITimerTickerHeartbeat.c
+@@ -329,7 +329,7 @@ prodHighPriorityThread()
+ }
+ 
+ static void
+-high_performance_tick_handler(int sig, struct siginfo *sig_info, void *context)
++high_performance_tick_handler(int sig, struct siginfo_t *sig_info, void *context)
+ {
+ static int tickCheckInProgress;
+ 
diff --git a/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixMain.c b/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixMain.c
new file mode 100644
index 0000000000..0983daf0dd
--- /dev/null
+++ b/squeak5-vm/patches/patch-platforms_unix_vm_sqUnixMain.c
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- platforms/unix/vm/sqUnixMain.c.orig	2020-03-02 17:30:55.000000000 +0000
++++ platforms/unix/vm/sqUnixMain.c
+@@ -933,6 +933,9 @@ reportStackState(char *msg, char *date, 
+ # elif __FreeBSD__ && __amd64__
+ 			void *fp = (void *)(uap ? uap->uc_mcontext.mc_rbp : 0);
+ 			void *sp = (void *)(uap ? uap->uc_mcontext.mc_rsp : 0);
++# elif __NetBSD__ && __x86_64__
++			void *fp = (void *)(uap ? _UC_MACHINE_FP(uap) : 0);
++			void *sp = (void *)(uap ? _UC_MACHINE_SP(uap) : 0);
+ # elif __OpenBSD__ && __i386__
+ 			void *fp = (void *)(uap ? uap->sc_ebp : 0);
+ 			void *sp = (void *)(uap ? uap->sc_esp : 0);
+@@ -1008,6 +1011,19 @@ printRegisterState(ucontext_t *uap)
+ 			regs->mc_edi, regs->mc_edi, regs->mc_ebp, regs->mc_esp,
+ 			regs->mc_eip);
+ 	return regs->mc_eip;
++#elif __NetBSD__ && __x86_64__
++	__greg_t *regs = &uap->uc_mcontext.__gregs;
++	printf(	"\trax 0x%08lx rbx 0x%08lx rcx 0x%08lx rdx 0x%08lx\n"
++			"\trdi 0x%08lx rsi 0x%08lx rbp 0x%08lx rsp 0x%08lx\n"
++			"\tr8  0x%08lx r9  0x%08lx r10 0x%08lx r11 0x%08lx\n"
++			"\tr12 0x%08lx r13 0x%08lx r14 0x%08lx r15 0x%08lx\n"
++			"\trip 0x%08lx\n",
++			regs[_REG_RAX], regs[_REG_RBX], regs[_REG_RCX], regs[_REG_RDX],
++			regs[_REG_RDI], regs[_REG_RSI], regs[_REG_RBP], regs[_REG_RSP],
++			regs[_REG_R8 ], regs[_REG_R9 ], regs[_REG_R10], regs[_REG_R11],
++			regs[_REG_R12], regs[_REG_R13], regs[_REG_R14], regs[_REG_R15],
++			regs[_REG_RIP]);
++	return (void *)regs[_REG_RIP];
+ #elif __linux__ && __x86_64__
+ 	greg_t *regs = (greg_t *)&uap->uc_mcontext.gregs;
+ 	printf(	"\trax 0x%08lx rbx 0x%08lx rcx 0x%08lx rdx 0x%08lx\n"
diff --git a/squeak5-vm/patches/patch-spur64src_vm_cogitX64SysV.c b/squeak5-vm/patches/patch-spur64src_vm_cogitX64SysV.c
new file mode 100644
index 0000000000..5ceb7568a6
--- /dev/null
+++ b/squeak5-vm/patches/patch-spur64src_vm_cogitX64SysV.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- spur64src/vm/cogitX64SysV.c.orig	2021-02-18 16:42:20.999184653 +0000
++++ spur64src/vm/cogitX64SysV.c
+@@ -22288,9 +22288,7 @@ dispatchConcretize(AbstractInstruction *
+ 			((self_in_dispatchConcretize->operands))[2] = 0;
+ 			return savedSize1;
+ 		}
+-		if ((reg20 == RAX)
+-		 || ((reg20 == RBP)
+-		 || (reg20 == RSP))) {
++		if (reg20 == RAX) {
+ 			offset38 = 0;
+ 		}
+ 		else {


Home | Main Index | Thread Index | Old Index