legacy code in bsd.ports.mk

Eitan Adler lists at eitanadler.com
Sat Oct 23 01:55:28 UTC 2010


I was going through bsd.port.mk to learn how the ports system works.
It seems quite complex - partly due to all the different
configurations that need to be supported.

1)  I noticed some hacks that were in place in 2004 and I was curious
if they were fixed by now, and if so if the hacks should be changed.
The attached patch just follows the comments - although I don't know
if the specific bug in question is fixed yet

2) revision 1.618 adds code to drop bsd.port.options.mk into
/usr/share/mk if it's missing - which seems to be supporting users
using 6.2 and before. Since these versions are already EOL now - is it
worth it to clutter bsd.port.mk with code to support them?
I'm not saying that we should drop support just because they are EOL -
but I think that bsd.port.mk is quite complicated already - and the
less code the better.

3) revision 1.581 added the following code
# XXX to remain undefined until all ports that require Perl are fixed
# to set one of the conditionals that force the inclusion of bsd.perl.mk
.if !defined(_PERL_REFACTORING_COMPLETE)

Is this complete yet? If so could we just remove the .if !defined code?

4) The code that converts from USE_BISON=yes to USE_BISON=build seems
to only affect two ports (based on my grepping) and could be fixed
using the attached patch

5) I'm sure there is more that could be done to clean up the ports
system. These are only things that I found going through bsd.port.mk -
if I look at some of the other files I think I'll find more :-(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-2004-hack.patch
Type: application/octet-stream
Size: 1471 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20101023/7edeb5d6/remove-2004-hack.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-use-bison-yes.patch
Type: application/octet-stream
Size: 1979 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20101023/7edeb5d6/remove-use-bison-yes.obj


More information about the freebsd-ports mailing list