The app-text/dgs ebuild, of which there is only one version in the current portage tree fails to respect the USE="tpcd" flag. The package depends on tcp-wrappers regardless of the flag. I tested the source and the configure script perfectly detects whether or not to build with tcp-wrappers support. It's not even worth attaching a new ebuild, just change: >=sys-apps/tcp-wrappers-7.6 to tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) Thank you!
Did you have a good look at configure ? There's no flag for tcp-wrappers, they're detected by configure and used if they are found. This makes it perfectly feasible for the following to occur. o have USE="tcpd" in USE and emerge something that installs tcp-wrappers. o compile dgs with USE="-tcpd" and still get tcpd support as tcp-wrappers is detected. If you would like optional support, please ask the maintainer to add the appropriate configure flag so we can actually control the use of tcp-wrappers at compilation/linking stage. Comments ?
I agree, and I will definitely contact the maintainer. Once it's fixed, I'll submit a new ebuild. In the mean time, can we at least fix the hard dependency, so dgs stops installing tcp-wrappers everytime I do an emerge -uUD world?
The possible short-term fix could be to put tcpd? (tcp-wrappers) as a DEPEND, which will mean that those who want tcpd support will definitely get it. The problem, however, is that for people with tcp-wrappers installed, but who don't want tcpd support for dgs will still get it. This only works if you assume that those who have USE="-tcpd" also dont have tcp-wrappers installed, which isn't always true. I think I'll move dgs to the tcp? (tcp-wrappers), but can you please report back here when you've recieved a reply from the maintainer ? Thanks.
Created attachment 28522 [details] dgs-0.5.10-r2.ebuild I have evaluated 5 different autoconf files for detected portmap libs on a machine in order to implement proper tcp-wrappers enable/disable. Each evaluated script used a completely different method to detect portmap libs, none properly implementing enable/disable. For this reason, I submit yet another solution, this time with an ebuild attachment to put an end to this mess. I will reference Bug #29879, in which an "ewarn" statement was used in an ebuild to warn users of the lack of "disable" support for a particular library/feature. Since this was used in a major ebuild, I believe it is precedent to do it in others. I have implemented this in the attached ebuild. Please commit this ebuild ASAP, I really feel it's the most efficient way to deal with this problem. Thank you!
Applied. (I moved the warning to pkg_setup for cosmetic reason, though) Please let us know if the upstream will add a way to enable/disable tcpd check. Thanks for the research and suggestion.