David Stes
2024-03-31 8cdd197ba643eb2608c5aab87567625bb9336cee
commit | author | age
f52087 1 #
DS 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.
5 #
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.
9 #
10
11 #
c5025c 12 # Copyright 2020, 2021, 2022, 2023, 2024 David Stes
f52087 13 #
DS 14
15
16 #
6dfd01 17 # Package Makefile for the "OpenSmalltalk Cog Spur" Squeak Smalltalk system
f52087 18 # See http://squeak.org and http://opensmalltalk.org
DS 19 #
20
21 # opensmalltalk-vm can be built both in 32 and 64bit
c1b5df 22 # since december 2023 version 5.0.3339 we only deliver ELF64 bit executables
DS 23 # because the required 32bit libraries are no longer available
24 BUILD_BITS=64
694303 25 USE_COMMON_TEST_MASTER= no
c1b5df 26
DS 27 # the SSL module is supporting 1.1 and 3.x but SUnit testframework is not
28 USE_OPENSSL10=yes
f52087 29
8ba160 30 include ../../../../make-rules/shared-macros.mk
f52087 31
5d055b 32 # there is no official triplet version for opensmalltalk-vm
DS 33 # we use 5.0.<n> for VMMaker.oscog-eem.<n>
34 # sometimes the Stack VM is generated from a different VMMaker as the Cog VM
35
6dfd01 36 COMPONENT_NAME=        cog-spur
8cdd19 37 COMPONENT_VERSION=    5.0.3356
DS 38 GIT_TAG=        sun-v5.0.63
39 PLUGIN_REV=        5.0-202403301849-cog
6dfd01 40 COMPONENT_SUMMARY=    The OpenSmalltalk Cog Spur Virtual Machine
f52087 41 COMPONENT_PROJECT_URL=    http://www.squeak.org
6dfd01 42 COMPONENT_FMRI=        runtime/smalltalk/cog-spur
DS 43 COMPONENT_CLASSIFICATION=    Development/Smalltalk
f52087 44
DS 45 # See http://wiki.squeak.org/squeak/933
46 # See http://wiki.squeak.org/squeak/159
47 # there's 2 license lines in the manifest, the MIT squeak.license and this one
48 COMPONENT_LICENSE=    Squeak5
49 COMPONENT_LICENSE_FILE=    squeak5.license
50
51 COMPONENT_SRC=        opensmalltalk-vm-$(GIT_TAG)
52 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
8cdd19 53 COMPONENT_ARCHIVE_HASH=    sha256:417eeb23cf33fab0e670903f406308ac49f227f15cf9e377a655d3ce402fb281
f52087 54 COMPONENT_ARCHIVE_URL=    https://codeload.github.com/cstes/opensmalltalk-vm/tar.gz/$(GIT_TAG)
DS 55
694303 56 # run SUnit tests in the build directories on 32bit and 64bit Squeak images
5ec779 57 # AllocationTest and BitmapStreamTests are currently skipped
DS 58 # see comments in the Squeak.image on those tests
694303 59 COMPONENT_TEST_CMD=    $(COMPONENT_TEST_RESULTS_DIR)/testrunner.sh $(BITS) $(COMPONENT_DIR) $(BUILD_DIR_$(BITS))
f52087 60
DS 61 include $(WS_MAKE_RULES)/common.mk
62
bbb627 63 # problem with OpenSmalltalk libtool and /bin/bash
DS 64 # since upgrade from libtool VERSION="2.4.6 Debian-2.4.6-2"
65 # to VERSION="2.4.6 Debian-2.4.6-9"
66 CONFIG_SHELL= /bin/sh
67
f52087 68 PKG_OPTIONS += -D PLUGIN_REV="$(PLUGIN_REV)"
824b06 69 PKG_OPTIONS += -DBRANCHID="$(BRANCHID)"
f52087 70
DS 71 PATH=$(PATH.gnu)
72
73 # opensmalltalk configure script checks for plugins files in builddir
d4bb1e 74 COMPONENT_PRE_CONFIGURE_ACTION = ( \
DS 75     $(MKDIR) $(BUILD_DIR_32); \
76     cp plugins.ext plugins.int $(BUILD_DIR_32); \
77     $(MKDIR) $(BUILD_DIR_64); \
78     cp plugins.ext plugins.int $(BUILD_DIR_64) \
79     )
80
81 # the Squeak configure script detects the lfcompile flags
82 # but unfortunately I think some files do not #include "config.h"
83 # we have to make sure largefile support is enabled in the 32bit case
84 CPPFLAGS += $(CPP_LARGEFILES)
f52087 85
b8b281 86 # Spur memory management sometimes not compatible with traditional malloc
DS 87 LIBS = "-lmapmalloc"
88
f52087 89 # the default CFLAGS.gcc will be -m64 -O3 but this does not work for us
DS 90 # opensmalltalk code is not compatible with the gcc optimizer -O2 or higher
8a2cb9 91 gcc_OPT=        -DAIO_DEBUG -DNDEBUG -DDEBUGVM=0 -DCOGMTVM=0
f52087 92
DS 93 CONFIGURE_SCRIPT= $(SOURCE_DIR)/platforms/unix/config/configure
94 CONFIGURE_OPTIONS +=    --without-npsqueak
95 CONFIGURE_OPTIONS +=    --with-vmversion=5.0
96 CONFIGURE_OPTIONS +=    --disable-dynamicopenssl
97 CONFIGURE_OPTIONS +=    --without-libtls
106c94 98 CONFIGURE_OPTIONS.32 +=    --with-src=src/spur32.cog
DS 99 CONFIGURE_OPTIONS.64 +=    --with-src=src/spur64.cog
f52087 100
1c6885 101 # epoll(5) seems to work, so use epoll instead of select(3c)
DS 102 CONFIGURE_ENV    +=     ax_cv_have_epoll=yes
103 CONFIGURE_ENV    +=     ax_cv_have_epoll_pwait=yes
d4bb1e 104 CONFIGURE_ENV    +=     CPPFLAGS="$(CPPFLAGS)"
b8b281 105 CONFIGURE_ENV    +=     LIBS="$(LIBS)"
d4bb1e 106 CONFIGURE_ENV.32 +=    TARGET_ARCH="-m32"
DS 107 CONFIGURE_ENV.64 +=    TARGET_ARCH="-m64"
f52087 108
c5025c 109 # for pkgsend generate (sample-manifest)
DS 110 # the actual manifest uses a mediator mediated hardlink for the squeak manpage
111 PKG_HARDLINKS    += usr/share/man/man1/squeak.1
112
f52087 113 # the opensmalltalk Makefile does not use DESTDIR
DS 114 COMPONENT_INSTALL_ARGS=      ROOT=$(PROTO_DIR)
f858c2 115 COMPONENT_BUILD_TARGETS=     getversion squeak plugins ckformat
DS 116 COMPONENT_INSTALL_TARGETS=     install-squeak install-doc install-plugins \
117     install-ckformat
f52087 118
DS 119 # Makefile has no strip target
120 COMPONENT_POST_INSTALL_ACTION = \
d4bb1e 121 ( find $(PROTOUSRLIBDIR) -name 'squeak' -type f -exec strip {} \; )
f52087 122
70a497 123 #
DS 124 # target to update the manifests from sample-manifest
125 #
126
127 rebuild-manifests::
6dfd01 128     cp manifests/cog-spur.p5m cog-spur.p5m
40a469 129     cp manifests/cog-spur-vep.p5m cog-spur-vep.p5m
8a2cb9 130     cp manifests/cog-spur-ssl.p5m cog-spur-ssl.p5m
6dfd01 131     cp manifests/cog-spur-display-X11.p5m cog-spur-display-X11.p5m
DS 132     cp manifests/cog-spur-nodisplay.p5m cog-spur-nodisplay.p5m
70a497 133     cp manifests/sample-manifest.p5m sample-manifest.p5m
DS 134     tools/pluginrev.sh $(PLUGIN_REV) <sample-manifest.p5m >sample.p5m
135     tools/classify.pl <sample.p5m
136     rm -f sample-manifest.p5m sample.p5m
137
f52087 138 REQUIRED_PACKAGES += x11/library/mesa
DS 139 REQUIRED_PACKAGES += system/library/dbus
140 REQUIRED_PACKAGES += library/audio/gstreamer
141 REQUIRED_PACKAGES += library/libffi
142 REQUIRED_PACKAGES += system/library/freetype-2
143
144 # Auto-generated dependencies
145 REQUIRED_PACKAGES += library/audio/pulseaudio
146 REQUIRED_PACKAGES += library/desktop/cairo
147 REQUIRED_PACKAGES += library/desktop/pango
148 REQUIRED_PACKAGES += library/glib2
149 REQUIRED_PACKAGES += library/security/openssl
08ca4a 150 REQUIRED_PACKAGES += shell/ksh93
f52087 151 REQUIRED_PACKAGES += system/library
DS 152 REQUIRED_PACKAGES += system/library/math
153 REQUIRED_PACKAGES += x11/library/libx11
08ca4a 154 REQUIRED_PACKAGES += x11/library/libxext
f52087 155 REQUIRED_PACKAGES += x11/library/libxrender