On Wednesday January 27 2016 15:00:52 Rainer Müller wrote:

> Yes, it is a test, but I would not call that simple. Also, we would only
> need to test this once and it could even be done during configure.

Configure when MacPorts itself is being built?

> afsctool is GPL-3 software, so we should not just include it in base, as
> it is BSD licensed.

Wasn't suggesting you should. But what can be done is to check for existence of 
the executable. That's what I do in the places where I added build.dir 
compression. That's a (crude) form of giving the user the choice whether or not 
the feature is to be used (someone not at all interested in using hfs 
compression would probably not install afsctool).

> We could include our own libarchive/bsdtar with this feature enabled or

It is already enabled.

> develop equivalent functionality for Pextlib based on the source of
> libarchive. However, it really does not look like writing compressed
> files is trivial [1].

No, it isn't, probably for a large part because it involves writing the 
compressed data to the resource fork. I'm using 
https://github.com/RJVB/afsctool/blob/master/afsctool.c as a reference, which 
is probably even more complicated because of additional features like choice of 
the compression level.
Things would have been different if the compressor were a part of the HFS+ 
implementation (and all you needed to do to activate it was setting the 
attribute on the file). As it is I think it'd be much preferable to leverage 
existing utilities or libraries that provide hfsCompression than to reimplement 
support for it.

R.
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to