Created attachment 211140 [details]
In attachments you can find the complete build log of dhcpcd on my STABLE-12 system. I have set multiple src.conf options such as WITHOUT_NIS= which results in not building and installing those binaries/headers for my base systemt. This results in dhcpcd not detecting the program and thus not installing 50-ypbind while it is statically included in its port. https://github.com/rsmarples/dhcpcd/blob/master/configure (line 1646)
A similar problem will arise when WITHOUT_NTP= is set in src.conf option with the 50-ntp.conf file.
I see two solutions:
1) Install all hooks independent of the base system configuration (eg in post-install copying all scripts manually). Since this does not influence the binary itself but only the hooks, I think this is easiest. Even if NTP or NIS are not present in the base system the installed hooks wont cause any havoc.
2) Be able to give flags from the ports infrastructure to the dhcpcd build to force each of them on or off. Then the port logic can deal with the pkg-plist dynamic nature.
Thoughts? Happy to provide a patch for 1). From a quick scan I don't think 2) Is possible with the current configure of dhcpcd.
I don't think NIS is used much anymore really.
In pkgsrc we just hardcode the ntp.conf hook as it's extremely portable:
Or you could make the hooks optional and set pass an array via --withhooks="hook1 hook2" or one by one --withhook=hook1 --withhook=hook2 and toggle each hook via the ports option menu thingy which I have no idea how to do.