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