2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2020, 2021, 2022, 2023, 2024 David Stes
17 # Package Makefile for the "OpenSmalltalk" Squeak Smalltalk system
18 # See http://squeak.org and http://opensmalltalk.org
21 # opensmalltalk-vm can be built both in 32 and 64bit
22 # since december 2023 version 5.0.3339 we only deliver ELF64 bit executables
23 # because the required 32bit libraries are no longer available
25 # we deliver our own script squeak.ips as driver script
27 # the driver script checks (with ckformat) the Smalltalk image
28 # image format 6521 or 7033 : start VM 32bit (not included any longer)
29 # image format 68021 or 68533 : start VM 64bit
31 USE_COMMON_TEST_MASTER
= no
33 # the SSL module is supporting 1.1 and 3.x but SUnit testframework is not
36 # currently the JPEGReadWriter2Plugin is disabled in plugins.int
38 # the goal is to use libjpeg8-turbo (or any other libjpeg implementation)
39 # special care for included header files as the struct sizes vary
40 # we 'fix' the Squeak source code that has an old libjpeg included in source
41 # this should be fixed upstream in the Squeak sources
42 # the default OpenIndiana JPEG_IMPLEM at time of writing is libjpeg8-turbo
43 JPEG_IMPLEM
=libjpeg8-turbo
45 include ..
/..
/..
/..
/make-rules
/shared-macros.mk
47 # there is no official triplet version for opensmalltalk-vm
48 # we use 5.0.<n> for VMMaker.oscog-eem.<n> or VMMaker.oscog-mt.<n>
49 # sometimes the Stack VM is generated from a different VMMaker as the Cog VM
51 COMPONENT_NAME
= stack-spur
52 COMPONENT_VERSION
= 5.0.3475
54 PLUGIN_REV
= 5.0-202412141720
55 COMPONENT_SUMMARY
= The OpenSmalltalk Stack Spur Virtual Machine
56 COMPONENT_PROJECT_URL
= http
://www.squeak.org
57 COMPONENT_FMRI
= runtime
/smalltalk
/stack-spur
58 COMPONENT_CLASSIFICATION
= Development
/Smalltalk
60 # See http://wiki.squeak.org/squeak/933
61 # See http://wiki.squeak.org/squeak/159
62 # there's 2 license lines in the manifest, the MIT squeak.license and this one
63 COMPONENT_LICENSE
= Squeak5
64 COMPONENT_LICENSE_FILE
= squeak5.license
66 COMPONENT_SRC
= opensmalltalk-vm-
$(GIT_TAG
)
67 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
68 COMPONENT_ARCHIVE_HASH
= sha256
:4bf8791bea40ed4f730e23286d7357abee1a26f0a3c8d2dbef29431fbfebe79c
69 COMPONENT_ARCHIVE_URL
= https
://codeload.github.com
/cstes
/opensmalltalk-vm
/tar.gz
/$(GIT_TAG
)
71 # run SUnit tests in the build directories on 32bit and 64bit Squeak images
72 # currently two tests are skipped : AllocationTest and BitmapStreamTests
73 # see comments on those classes in the Squeak image itself for more info
74 COMPONENT_TEST_CMD
= $(COMPONENT_TEST_RESULTS_DIR
)/testrunner.sh
$(BITS
) $(COMPONENT_DIR
) $(BUILD_DIR_
$(BITS
))
76 include $(WS_MAKE_RULES
)/common.mk
78 # problem with OpenSmalltalk libtool and /bin/bash
79 # since upgrade from libtool VERSION="2.4.6 Debian-2.4.6-2"
80 # to VERSION="2.4.6 Debian-2.4.6-9"
83 PKG_OPTIONS
+= -D PLUGIN_REV
="$(PLUGIN_REV)"
84 PKG_OPTIONS
+= -DBRANCHID
="$(BRANCHID)"
88 # cleanup the plugin directory
89 SOURCE_JPEG
= $(SOURCE_DIR
)/platforms
/Cross
/plugins
/JPEGReadWriter2Plugin
91 # opensmalltalk configure script checks for plugins files in builddir
92 COMPONENT_PRE_CONFIGURE_ACTION
= ( \
93 $(MKDIR
) $(BUILD_DIR_32
); \
94 cp plugins.ext plugins.int
$(BUILD_DIR_32
); \
95 $(MKDIR
) $(BUILD_DIR_64
); \
96 cp plugins.ext plugins.int
$(BUILD_DIR_64
); \
98 \
! -name JPEGReadWriter2Plugin.h \
99 \
! -name sqJPEGReadWriter2Plugin.c \
101 \
! -name jinclude.h \
102 \
! -name jmemdatasrc.c \
103 \
! -name jmemdatadst.c \
107 # the Squeak configure script detects the lfcompile flags
108 # but unfortunately I think some files do not #include "config.h"
109 # we have to make sure largefile support is enabled in the 32bit case
110 CPPFLAGS
+= $(CPP_LARGEFILES
)
112 # Spur memory management sometimes not compatible with traditional malloc
115 # the default CFLAGS.gcc will be -m64 -O3 but this does not work for us
116 # opensmalltalk code is not compatible with the gcc optimizer -O2 or higher
117 gcc_OPT
= -DAIO_DEBUG
-DNDEBUG
-DDEBUGVM
=0
119 CONFIGURE_SCRIPT
= $(SOURCE_DIR
)/platforms
/unix
/config
/configure
120 CONFIGURE_OPTIONS
+= --with-vmversion
=5.0
121 CONFIGURE_OPTIONS
+= --disable-dynamicopenssl
122 CONFIGURE_OPTIONS
+= --without-libtls
123 CONFIGURE_OPTIONS
.32 += --with-src
=src
/spur32.stack
124 CONFIGURE_OPTIONS
.64 += --with-src
=src
/spur64.stack
125 CONFIGURE_OPTIONS
+= --disable-cogit
126 CONFIGURE_OPTIONS
+= --without-vm-display-fbdev
127 CONFIGURE_OPTIONS
+= --without-npsqueak
129 # epoll(5) seems to work, so use epoll instead of select(3c)
130 CONFIGURE_ENV
+= ax_cv_have_epoll
=yes
131 CONFIGURE_ENV
+= ax_cv_have_epoll_pwait
=yes
132 CONFIGURE_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
133 CONFIGURE_ENV
+= LIBS
="$(LIBS)"
134 CONFIGURE_ENV
.32 += TARGET_ARCH
="-m32"
135 CONFIGURE_ENV
.64 += TARGET_ARCH
="-m64"
137 # for pkgsend generate (sample-manifest)
138 # the actual manifest uses a mediator mediated hardlink for the squeak manpage
139 PKG_HARDLINKS
+= usr
/share
/man
/man1
/squeak
.1
141 # the opensmalltalk Makefile does not use DESTDIR
142 COMPONENT_INSTALL_ARGS
= ROOT
=$(PROTO_DIR
)
143 COMPONENT_BUILD_TARGETS
= getversion squeak plugins ckformat
144 COMPONENT_INSTALL_TARGETS
= install-squeak install-doc install-plugins \
147 # Makefile has no strip target
148 COMPONENT_POST_INSTALL_ACTION
= \
149 ( find
$(PROTOUSRLIBDIR
) -name
'squeak' -type f
-exec
strip {} \
; )
152 # target to update the manifests from sample-manifest
156 cp manifests
/stack-spur.p5m stack-spur.p5m
157 cp manifests
/stack-spur-ssl.p5m stack-spur-ssl.p5m
158 cp manifests
/stack-spur-vep.p5m stack-spur-vep.p5m
159 cp manifests
/stack-spur-display-X11.p5m stack-spur-display-X11.p5m
160 cp manifests
/stack-spur-nodisplay.p5m stack-spur-nodisplay.p5m
161 cp manifests
/sample-manifest.p5m sample-manifest.p5m
162 tools
/pluginrev.sh
$(PLUGIN_REV
) <sample-manifest.p5m
>sample.p5m
163 tools
/classify.pl
<sample.p5m
164 rm -f sample-manifest.p5m sample.p5m
166 REQUIRED_PACKAGES
+= x11
/library
/mesa
167 REQUIRED_PACKAGES
+= system
/library
/dbus
168 REQUIRED_PACKAGES
+= library
/audio
/gstreamer
169 REQUIRED_PACKAGES
+= library
/libffi
170 REQUIRED_PACKAGES
+= system
/library
/freetype-2
172 # Auto-generated dependencies
173 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
174 REQUIRED_PACKAGES
+= library
/audio
/pulseaudio
175 REQUIRED_PACKAGES
+= library
/desktop
/cairo
176 REQUIRED_PACKAGES
+= library
/desktop
/pango
177 REQUIRED_PACKAGES
+= library
/glib2
178 REQUIRED_PACKAGES
+= library
/zlib
179 REQUIRED_PACKAGES
+= shell/ksh93
180 REQUIRED_PACKAGES
+= system
/library
181 REQUIRED_PACKAGES
+= system
/library
/math
182 REQUIRED_PACKAGES
+= x11
/library
/libx11
183 REQUIRED_PACKAGES
+= x11
/library
/libxext
184 REQUIRED_PACKAGES
+= x11
/library
/libxrender