Created attachment 144026 [details] patch Quite often, binaries are needed as build-time and run-time dependencies. There are even instructions floating around about why you can't RUN_DEPENDS=${BUILD_DEPENDS} (needing RUN_DEPENDS:= instead). So why not give a convenient way to do it all at once? This adds BUILD_RUN_DEPENDS=. It also adds ${opt}_BUILD_RUN_DEPENDS and ${opt}_BUILD_RUN_DEPENDS_OFF helpers.
One concern with this sort of helper is that it makes it more likely that people will accidentally add new dependencies to both build and run depends even when it isn't needed for both stages. That said, I don't object to this change.
Haha, true, but right now people are doing RUN_DEPENDS+= ${BUILD_DEPENDS} which is even stupider :-)
Hi I dont like this change for 2 reasons: - I think its not necessary and encourages sloppy porting - the name build_run_depends is already used for run_depends of option build
Hi Antoine, thanks for reviewing the patch. I'm not sure that I follow you about encouraging sloppy porting. I'd suggest that it could do just the opposite. Currently, porters accidentally do RUN_DEPENDS=${BUILD_DEPENDS}, which is most definitely sloppy and known to be harmful. Giving people a safe and convenient way to do it correctly, while reducing keystrokes... to me it seems like it would *prevent* sloppy porting. Also, the convenience of it would be quite welcome to me, as a porter. As for your second point, I'm not sure that I follow you, as "build_run_depends" doesn't appear anywhere under /usr/ports/Mk.
Also, for the record, I currently count 76 instances of ports violating BUILD_DEPENDS=${RUN_DEPENDS}. So I'm not sure that promoting an even simpler alternative would INCREASE sloppiness.
For the 2nd point, build_run_depends is an option helper for build option
Oh, I see what you mean, if there was OPTIONS_DEFINE= BUILD Then BUILD_RUN_DEPENDS would be ambiguous. Seems a bit of a remote corner case to me, but regardless the nomenclature can certainly be changed. BOTH_DEPENDS, BUILDRUN_DEPENDS, etc. Either of those look better to you?
I think that, with the current discussion on svn-ports-...@ on whether := is correct and the right way to register build and run time dependencies, it bears reconsidering whether this patch would help people DTRT. It isn't just about having a shortcut, it's about making sure that there is a simple, consistent grammar to describe what you (the porter) want the port to do.
Closing this