SAMD is ArduinoCore-samd + ArduinoCore-API


Arduino samd uses 2 repos: arduino/ArduinoCore-samd + arduino/ArduinoCore-API
ArduinoCore-API adds cores\arduino\api\ArduinoAPI.h deprecated etc

A custom Arduino samd fork of ArduinoCore-samd
with a package.json file added works with following platformio.ini:

platform_packages = framework-arduino-samd XXX ArduinoCore-samd
platform = atmelsam
board = mzeroUSB
framework = arduino

but I have to copy missing and modified custom files arduino\api… from
custom ArduinoCore-API
to C:\Users\XXX.platformio\packages\framework-arduino-samd\cores\arduino\api
Custom ArduinoCore-API has a package.json file.

How to add both
custom ArduinoCore-API and
custom ArduinoCore-samd in
platformio.ini to avoid the manual copy ?