#
# 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 2024 Marcel Telka
#

%hook-manifest%
# During bootstrap we invoke perl-integrate-module with the -f flag and so we
# need to drop dependency on Math-Random-ISAAC-XS.
((FORCE)) && sed -i -e '/^depend.*math-random-isaac-xs/d' $MANIFEST

%include-3%
#
# There is circular runtime dependency:
#
#	Math-Random-ISAAC recommends Math-Random-ISAAC-XS
#	Math-Random-ISAAC-XS recommends Math-Random-ISAAC
#
# To bootstrap both components we need to build Math-Random-ISAAC first and
# remove any unresolved runtime dependency on Math-Random-ISAAC-XS.
#
MANGLE_DEPEND_RUNTIME += | \
	$(GNU_GREP) -v '^depend type=require fmri=__TBD pkg\.debug\.depend\.file=Math/Random/ISAAC/XS\.pm'