Include a modified component library without `package.json` in the package

I am trying to include a modified framewpoork library like esp-modbus to my project

My platformio.ini looks as follow

platform = espressif32

platform_packages =
  ;use modified version of espidf
  framework-espidf @

When I build it, the error i get is

Error: Could not find one of 'package.json' manifest files in the package

What should I do? I tried to follow all the documentation step to step but how to replace package.json or so is never mentioned

That’s not a modified version of the ESP-IDF framework. It’s an ESP-IDF component. Include it in the project as documented and as shown in official examples.

Thanks Max, that clarified the issue right away.
To help people coming here, the solution is to put the modified ‘component’ in a components/ folder
, so that for component freemodbus (in this case) you will have components/freemodbus/... in your project.