Step-by-step migration guide for custom platform packages in 5.x?

Hi, I am looking for a step-by-step instruction how to make a forked platform-package (use a forked framework-library from a personal git repo) in Core5.x

With 4.x it worked like breeze:

  1. I forked a library, say GitHub - adafruit/Adafruit_nRF52_Arduino: Adafruit code for the Nordic nRF52 BLE SoC on Arduino into, say, GitHub - orrmany/Adafruit_nRF52_Arduino: Adafruit code for the Nordic nRF52 BLE SoC on Arduino and my necessary changes there (independent of PlatformIO, since this fork is used outside of the context of PlatformIO usage, too)
  2. When I wanted to use this fork instead of the upstream library within PlatformIO, then I simply added 1 line to my platformio.ini: added the platform-packages= directive and I let the URL point to the proper development branch in git. Voìla, it just worked.

Now it has been broken in 5.x, see For me it is a bug, and an especially grave one, since this backward-compatibility bug breaks my legacy build. @ivankravets disagrees with me, however, so the issue was closed without a fix.

As such, I look for a step-by-step tutorial how one can work around the bug and redo the same thing with 5.x Core? My use case is as follows.

  1. I, as non-platformIO user, happily fork some library for my own private purpose. Being the ignorant bastard I am, I do not care with PlatformIO while I do this, since my work is relevant outside of the PlatformIO community, too.
  2. Then later, as a platformIO user, I happen to realize that the very same upstream library I forked is actually being a source for a PlatformIO framework-package. I need to make PlatformIO to use my forked library as source files in the build process instead of the upstream library.

In 4.x PlatformIO that needed that single line directive in my Platformio.ini above, surely it must be that simple in 5.x, too, mustn’t it?

How can I do that? Could any body help me? Thanks in advance

I got a hint from Ivan: add a platform.json. Thanks for that, but (being the ignorant bastard I am) how can I figure out what magical strings shall use in that file? What “framework package version” shall I declare about my forked library, for example? I have no idea about the PlatformIO internal package versioning, I have idea about only the versions of my upstream repo and how to make my fork in sync with the upstream library. I am no PlatformIO developer and I do not want to be either.

I have the same issue.

It just does not work.