But in fact this package is designtime only. It's in the ide. I don't understand why it worked with Lazarus 1.6 up to 2.2.6 then stop what has changed?
Probably because
before lazarus 3 it was a sort of standalone source.
In the newer version it depends on a lot more source files and dependencies.
If you include all dependencies of the lazarus.lpi program and use the same search & include path, it will work again.
Maybe you don't need all dependencies but it would be some work to find out which you need exactly.
That's the downside from taking 1 source files from another project.
(if you don't include all the dependencies and depending source files, it will fail)