mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] call for testing: support for lzma archives


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] call for testing: support for lzma archives
Date: Tue, 14 Sep 2010 15:14:47 +1000

On 14 September 2010 06:42, Mark Brand <address@hidden> wrote:
>
> Thanks for checking that out. It looks like a safe choice is  "| tar xf -",
> although I even considered "| tar xf /dev/stdin"!
>
> http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/eebfbf8cbcda

Seems like the path of least resistance, however, if we made a
"modern" tar one of the requirements, we could use the auto-detection
and extract most formats with the tar xf $(1) syntax. If we used
libarchive (bsdtar), we could also get rid of the UnZip requirement
since it can extract these also.

We could take it one step further and build a libarchive-native
ourselves. It could install itself as $(TARGET)-tar (or something
similar), then we have:

TAR = $(shell $(TARGET)-tar --help >/dev/null 2>&1 && echo $(TARGET)-)tar

that re-evaluates itself for each pkg, and

UNPACK_ARCHIVE = $(TAR) xf '$(1)'

The main problem with this is that it assumes the new native tar will
be built very early in the dependency chain. We could avoid that by
keeping UNPACK_ARCHIVE much the same and only using the new native tar
for *.lzma and *.zip files. In that case, we don't need the TAR
variable, just $(TARGET)-tar xf $(1) on the respective lines in
UNPACK_ARCHIVE. We'd still need to ensure that the first (or every)
pkg that uses these formats has the dependency specified (it's only
coincidental that w32api is very early).

What do you think? It reduces requirements (xz, unzip) and increases
complexity a little.

Cheers,

Tony



reply via email to

[Prev in Thread] Current Thread [Next in Thread]