David Stes
2021-06-11 b8b2816e7db1f28be4e30335e001d28ec86cca9e
commit | author | age
36090d 1 #
S 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 #
824b06 12 # Copyright 2020, 2021 David Stes
36090d 13 #
S 14
15
16 #
6dfd01 17 # Package Makefile for the "OpenSmalltalk" Squeak Smalltalk system
36090d 18 # See http://squeak.org and http://opensmalltalk.org
S 19 #
20
21 # opensmalltalk-vm can be built both in 32 and 64bit
d4bb1e 22 #
DS 23 # we deliver our own script squeak.ips as driver script
24 #
25 # the driver script checks (with ckformat) the Smalltalk image
26 # image format 6521  : start VM 32bit 
27 # image format 68021 : start VM 64bit
28 BUILD_BITS=32_and_64
36090d 29
S 30 include ../../../make-rules/shared-macros.mk
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=        stack-spur
DS 37 COMPONENT_VERSION=    5.0.2957
b8b281 38 COMPONENT_REVISION=    3
6dfd01 39 GIT_TAG=        sun-v5.0.29
DS 40 PLUGIN_REV=        5.0-202105050900
41 COMPONENT_SUMMARY=    The OpenSmalltalk Stack Spur Virtual Machine
36090d 42 COMPONENT_PROJECT_URL=    http://www.squeak.org
6dfd01 43 COMPONENT_FMRI=        runtime/smalltalk/stack-spur
DS 44 COMPONENT_CLASSIFICATION=    Development/Smalltalk
36090d 45
S 46 # See http://wiki.squeak.org/squeak/933
47 # See http://wiki.squeak.org/squeak/159
48 # there's 2 license lines in the manifest, the MIT squeak.license and this one
49 COMPONENT_LICENSE=    Squeak5
50 COMPONENT_LICENSE_FILE=    squeak5.license
51
52 COMPONENT_SRC=        opensmalltalk-vm-$(GIT_TAG)
53 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
6dfd01 54 COMPONENT_ARCHIVE_HASH=    sha256:6975d8be2d8f4cf80c6f5ca60f14550325b6406f3be7b1bcd3e16cead7c86210
36090d 55 COMPONENT_ARCHIVE_URL=    https://codeload.github.com/cstes/opensmalltalk-vm/tar.gz/$(GIT_TAG)
S 56
57 TEST_TARGET= $(NO_TESTS)
58
59 include $(WS_MAKE_RULES)/common.mk
60
61 PKG_OPTIONS += -D PLUGIN_REV="$(PLUGIN_REV)"
824b06 62 PKG_OPTIONS += -DBRANCHID="$(BRANCHID)"
36090d 63
S 64 PATH=$(PATH.gnu)
65
66 # opensmalltalk configure script checks for plugins files in builddir
d4bb1e 67 COMPONENT_PRE_CONFIGURE_ACTION = ( \
DS 68     $(MKDIR) $(BUILD_DIR_32); \
69     cp plugins.ext plugins.int $(BUILD_DIR_32); \
70     $(MKDIR) $(BUILD_DIR_64); \
71     cp plugins.ext plugins.int $(BUILD_DIR_64) \
72     )
73
74 # the Squeak configure script detects the lfcompile flags
75 # but unfortunately I think some files do not #include "config.h"
76 # we have to make sure largefile support is enabled in the 32bit case
77 CPPFLAGS += $(CPP_LARGEFILES)
36090d 78
b8b281 79 # Spur memory management sometimes not compatible with traditional malloc
DS 80 LIBS = "-lmapmalloc"
81
36090d 82 # the default CFLAGS.gcc will be -m64 -O3 but this does not work for us
S 83 # opensmalltalk code is not compatible with the gcc optimizer -O2 or higher
8a2cb9 84 gcc_OPT=        -DAIO_DEBUG -DNDEBUG -DDEBUGVM=0
36090d 85
S 86 CONFIGURE_SCRIPT= $(SOURCE_DIR)/platforms/unix/config/configure
87 CONFIGURE_OPTIONS +=    --with-vmversion=5.0
88 CONFIGURE_OPTIONS +=    --disable-dynamicopenssl
89 CONFIGURE_OPTIONS +=    --without-libtls
d4bb1e 90 CONFIGURE_OPTIONS.32 +=    --with-src=spurstacksrc
DS 91 CONFIGURE_OPTIONS.64 +=    --with-src=spurstack64src
36090d 92 CONFIGURE_OPTIONS +=    --disable-cogit
S 93 CONFIGURE_OPTIONS +=    --without-vm-display-fbdev
94 CONFIGURE_OPTIONS +=    --without-npsqueak
95
d4bb1e 96 CONFIGURE_ENV    +=     CPPFLAGS="$(CPPFLAGS)"
b8b281 97 CONFIGURE_ENV    +=     LIBS="$(LIBS)"
d4bb1e 98 CONFIGURE_ENV.32 +=    TARGET_ARCH="-m32"
DS 99 CONFIGURE_ENV.64 +=    TARGET_ARCH="-m64"
36090d 100
S 101 # the opensmalltalk Makefile does not use DESTDIR
102 COMPONENT_INSTALL_ARGS=      ROOT=$(PROTO_DIR)
f858c2 103 COMPONENT_BUILD_TARGETS=        getversion squeak plugins ckformat
DS 104 COMPONENT_INSTALL_TARGETS=      install-squeak install-doc install-plugins \
105     install-ckformat
36090d 106
S 107 # Makefile has no strip target
108 COMPONENT_POST_INSTALL_ACTION = \
d4bb1e 109 ( find $(PROTOUSRLIBDIR) -name 'squeak' -type f -exec strip {} \; )
36090d 110
70a497 111 #
DS 112 # target to update the manifests from sample-manifest
113 #
114
115 rebuild-manifests::
6dfd01 116     cp manifests/stack-spur.p5m stack-spur.p5m
8a2cb9 117     cp manifests/stack-spur-ssl.p5m stack-spur-ssl.p5m
6dfd01 118     cp manifests/stack-spur-display-X11.p5m stack-spur-display-X11.p5m
DS 119     cp manifests/stack-spur-nodisplay.p5m stack-spur-nodisplay.p5m
70a497 120     cp manifests/sample-manifest.p5m sample-manifest.p5m
DS 121     tools/pluginrev.sh $(PLUGIN_REV) <sample-manifest.p5m >sample.p5m
122     tools/classify.pl <sample.p5m
123     rm -f sample-manifest.p5m sample.p5m
124
36090d 125 REQUIRED_PACKAGES += x11/library/mesa
S 126 REQUIRED_PACKAGES += system/library/dbus
127 REQUIRED_PACKAGES += library/audio/gstreamer
128 REQUIRED_PACKAGES += library/libffi
129 REQUIRED_PACKAGES += system/library/freetype-2
b53670 130 REQUIRED_PACKAGES += x11/library/libxevie
36090d 131
S 132 # Auto-generated dependencies
133 REQUIRED_PACKAGES += library/audio/pulseaudio
134 REQUIRED_PACKAGES += library/desktop/cairo
135 REQUIRED_PACKAGES += library/desktop/pango
136 REQUIRED_PACKAGES += library/glib2
137 REQUIRED_PACKAGES += library/security/openssl
08ca4a 138 REQUIRED_PACKAGES += shell/ksh93
36090d 139 REQUIRED_PACKAGES += system/library
S 140 REQUIRED_PACKAGES += system/library/math
141 REQUIRED_PACKAGES += x11/library/libx11
08ca4a 142 REQUIRED_PACKAGES += x11/library/libxext
36090d 143 REQUIRED_PACKAGES += x11/library/libxrender