[80313] trunk/dports/devel/liblzma/Portfile

Anders F Björklund afb at macports.org
Tue Jul 26 03:47:15 PDT 2011


A few weeks ago, Ryan Schmidt wrote:

> On Jul 8, 2011, at 22:45, Jeremy Lavergne wrote:
> 
>>> liblzma: update to 5.0.3; use bzip2 distfile because it's smaller; share xz's dist_subdir
>> 
>> Just a remark: I found the commit message cryptographic until I reviewed the actual changes. I thought xz dubdir woudl imply the fetch type and not that the port is similar to xz.
>> 
>> This is likely unique to libzlma but thought you might be interested in the thoughts anyways.
> 
> Sorry if the commit message was unclear. I'll explain in more detail. The xz port and the liblzma port both use the same distfile (currently xz-5.0.3.tar.bz2). If each port uses its default dist_subdir (${name}) and a user were to install both ports, they would have to download the same distfile twice, which is wasteful of the user's network bandwidth and time. Our distfiles mirrors would also be mirroring the same file twice, wasting space. To avoid all of this, I make both ports use the same dist_subdir. Since the distfile name is xz-* I chose to use the xz port's dist_subdir.

The waste in this case is much more than using the .gz format or using two subdirs. There is no reason why the xz port should be statically linked, and the headers/libraries in a separate port - except for the poor upgrade and library handling by MacPorts (in general). It would make more sense to roll the "liblzma" port into the "xz", but even that won't work as long as base is using xz from port rather than from the system (i.e. upgrading xz itself). But at least that way it would behave like every other port, until the subpackage feature is available ?

And I'll add lzma and xz detection to configure, next to the gzip and bzip2...

--anders



More information about the macports-dev mailing list