#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2020, 2021, 2023, 2024 David Stes
#


set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license squeak.license license='MIT'
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

<transform file -> add pkg.depend.bypass-generate libGL\.so\.1>

# for the sound plugins, we only package vm-sound-pulse
# we do not package vm-sound-OSS and vm-sound-Sun
# on my machine, vm-sound-Sun compiles, but it does not work

# LocalePlugin (reported upstream to maintainer) requires existence locale dir
dir path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/locale mode=0755

# the minimal installation consists of the cog-spur-nodisplay package
# which can run "headless" squeak -nodisplay images
# with only minimal installation requirements (only ksh, libc, math)

depend type=require fmri=pkg:/runtime/smalltalk/cog-spur-ssl@$(IPS_COMPONENT_VERSION)-$(BRANCHID)
depend type=require fmri=pkg:/runtime/smalltalk/cog-spur-display-X11@$(IPS_COMPONENT_VERSION)-$(BRANCHID)

file path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/FileAttributesPlugin.so
file path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/LocalePlugin.so
file path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/SqueakFFIPrims.so
file path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/UUIDPlugin.so
file path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/UnicodePlugin.so
file path=usr/lib/$(MACH64)/squeak/$(PLUGIN_REV)-64bit/vm-sound-pulse.so