ASSP out of date (Portfile complexity)

Anders F Björklund afb at macports.org
Wed Nov 5 23:50:31 PST 2008


Bryan Blackburn wrote:

>> Can you elaborate a little on this, I am not sure I understand  
>> what you
>> mean.  What would you suggest I do?  I already have ASSP running  
>> via hand
>> compile, but wanted to use this as a way to possibly supply a working
>> install back to the community.  Same with mrtg as well, but I have a
>> feeling mrtg may be a little harder, even though I also have that  
>> working
>> as well by hand compiling it and dependencies.
>
> MacPorts by default assumes "extract the file, run configure, make,  
> make
> install" to do an install of a given port.  When this works, the  
> Portfile is
> really short and simple.  When software starts to diverge from that  
> is when
> Portfiles begin to get more complicated.  They still aren't too bad  
> if some
> of those steps work.  However, once you get to something like assp  
> which
> doesn't have a configure script or even a Makefile, then you have  
> to do all
> the heavy lifting yourself.

Complex Portfiles are often indicators of bugs or missing features...

If the Portfile is doing a lot of things that should be in a Makefile
(or similar alternative), then patching in a Makefile and sending that
upstream could be better than scripting a lot of stuff downstream.
Not to mention that doing so is often easier than juggling Tcl. :-)

If a lot of ports all require similar tweaks, then that is usually a
sign that "base" could use either a group or a proc - or maybe both.
Now, adding such new groups could have been easier (not requiring a
new base version) and new releases of base less scarce. But still.

I have a few ideas pending for 1.8, that I'll test when trunk is open.

> Of course, if you've been able to install something successfully by  
> hand,
> that gets you quite a way towards a working Portfile.  At that  
> point, the
> Portfile just becomes a reproduction of what it was you did by hand by
> overriding various phases.  assp does most of the work in its  
> destroot phase
> so you could put most of what you did by hand in this section.   
> However,
> since the port has a history, you're also having to deal with that,  
> which is
> why it seems starting from scratch might be simpler.

Documenting complexity, whether in a document or in a script file,
is never a suitable replacement for making it simpler if possible.

--anders



More information about the macports-users mailing list