I've noticed that the uefi-edk2-bhyve port has a run-time dependency on gcc48, which means it installs gcc48 + several other packages when installed from pkg.
I don't know if this is something that can be easily changed, seeing as it does require gcc48 to build, but it seems excessive to install these when all the uefi-edk2-bhyve package contains are a couple of binary firmware images.
Created attachment 172511 [details]
If you don't mind making portlint angry I did something similar in devel/fb-adb with USE_LINUX.
$ portlint -C
FATAL: Makefile: the last line of Makefile has to be .include <bsd.port(.post).mk>
Could this port instead use USES=compiler, or is this actually an issue for Mk/bsd.gcc.mk to allow for setting only BUILD_DEPENDS as per attachment 172511 [details] ?
If the latter, please create a new blocking issue under Ports Framework for the bsd.gcc.mk change
Just looking at the grub2-bhyve port, I've noticed it also has USE_GCC=yes, but seems to have avoided the run dependency on gcc with the following at the end of the Makefile:
Maybe that's the easiest solution. Not that I do much C development but it does seem strange that USE_GCC adds a run dependency by default. I would of thought it's reasonably unlikely a port would actually need gcc in order to run once built.
hmm, a quick grep shows that this is also how sysutils/grub2-efi, sysutils/grub2-pcbsd, sysutils/grub2-efi, sysutils/memtest86+ and misc/seabios do it.
So, agreed, this seems like the way to go. I'll update the diff to that extent.
However, it seems this port isn't the only one that has this problem; see https://www.freshports.org/lang/gcc/#RequiredByRun. I think most of the ports listed there only require gcc for building. So this is probably something of a general issue for bsd.gcc.mk.
Any update on this? I also would like to install uefi-edk2-bhyve without pulling in all the gcc deps.
Makefile still shows
in the meantim gcc48 is
DEPRECATED= Unsupported by upstream. Use GCC 6 or newer instead.
A commit references this bug:
Date: Sat Mar 10 10:07:45 UTC 2018
New revision: 464059
sysutils/uefi-edk2-bhyve: Remove GCC run dependency
The firmware does not require or link with any of the libraries
provided by GCC, so remove the GCC run dependency.
Due to the lack of an accepted better solution in bsd.gcc.mk to do
this, we use the hack used by other ports like devel/linux-kernel,
sysutils/memtest86+, sysutils/grub2-bhyve, misc/seabios, net/ipxe, ...
PR: 211079, 211154
Approved by: Process paralysis
Fixed in ports r464059.