Re: Example for port which needs to run php-composer?
Date: Mon, 11 Dec 2023 13:43:16 UTC
On 11/12/23 12:55, Alexander Leidinger wrote: > Hi, > > is someone aware of a port which needs to run php-composer during the > port building? I tried to find one with grep, but either I didn't search > for the right keywords, or there is none... > > Bye, > Alexander. > I know none and a quick search in the ports tree shows none. But I can say you could do something similar to what is usually being done with ports requiring to run "npm install". That is, creating an archive of the "vendor" directory composer creates and distributing that as an additional distfile, moving it in the desired place in post-patch. You can find an example using npm in such a way in mail/mailpit. As a side note, if what you are trying to port is a pure PHP project using composer, I'm not sure creating pa port of it is really a good idea. The whole idea of composer is that it is handling dependencies and also can be configured by the user with various tweaks. It is preferable to "git clone" the project and manually run "composer install" (or whatever is needed). On the other hand, if what you're trying to port is a bigger project with a php+composer part making a port could make sense, but why upstream is not creating a proper distribution with all required files? -- Guido Falsi <mad@madpilot.net>