Some ports activate a --with- or --enable- configure option if a variable is defined, but don't add the corresponding --without- or --disable- option if the variable is not defined.
Unfortunately this way of handling options is not very accurate, since configure scripts often try to detect what you have on your system and activate options following what has been detected. This way, having unchecked an option in the port's 'make config' may result in having the feature activated anyway... Even worse, if this detected feature requires a special library, the dependency is *not* recorded in the DB, so anyone may break the application by uninstalling the library.
An example with the audio/amarok port :
- I have libgpod installed on my system (not used by any program)
- I don't want Amarok to be built with iPod support so I uncheck the option
- The configure script is run and detects the lib
- Amarok *is* built with the gpod option
- I can uninstall libgpod (no dependency recorded)
Fix: I have attached a patch to correct the amarok example. Unfortunately, this may happen for a lot of ports !
How can it be fixed ? No idea. Should each porter add (force) the corresponding --disable- or --without- option for each --enable- or --with one (as it I had done in net-p2p/amule2) ? This is quite painful and may result in a heterogenous ports tree. Or could it be done automatically by the modifying the way .mk files manage options (not pretty sure about that, since options are not predictable) ?
PLIST_SUB+= GPOD="@comment "
Content-Type: text/plain; name="file.diff"
Content-Disposition: attachment; filename="file.diff"
--- Makefile.old Wed Nov 8 15:25:40 2006
+++ Makefile Sun Nov 26 12:07:00 2006
@@ -49,6 +49,7 @@
How-To-Repeat: Just try the example above...
It'd be difficult to get everything just right if we tried to make
this logic implicit, the patch you supplied seems to be the canonical
way to deal with this issue, so pass it to mich@ so he can deal with it
(as maintainer of audio/amarok).
I've sent a mail to mich@ to ask him if he could take a look at this patch.
Maybe we could add a small chapter in the porter's Handbook 'Dos and Don'ts' to
warn porters about this situation and advise them to add --without- and
--disable- options whenever possible ?
Tel : (+33)6.84.03.57.24.
Committed, thanks !
mich 2006-11-28 09:55:01 UTC
FreeBSD ports repository
- actually disable libgpod if we do not enable it
Submitted by: Ganael LAPLANCHE <firstname.lastname@example.org>
Revision Changes Path
1.59 +1 -0 ports/audio/amarok/Makefile
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"
As I suggested, I've sent a patch for the porter's handbook. See PR/106065.
Tel : (+33)6.84.03.57.24.