<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This works, avoids overriding extract, but is less direct:<div class=""><br class=""></div><div class=""><div class=""> extract.cmd<span class="Apple-tab-span" style="white-space:pre"> </span> cp</div><div class=""> extract.pre_args</div><div class=""> extract.post_args<span class="Apple-tab-span" style="white-space:pre"> </span>${workpath}/.</div><div class=""><br class=""></div><div class=""><div class=""> destroot {</div><div class=""> xinstall -d ${destroot}${prefix}/share/doc/${name}</div><div class=""> foreach f ${distfiles} {</div><div class=""> set stem [file rootname [file tail ${f}]]</div><div class=""> system -W ${workpath} "gunzip -c ${f} > ${destroot}${prefix}/share/doc/${name}/${stem}"</div><div class=""> }</div><div class=""> }</div></div><div class=""><br class=""></div><div class="">Preference?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">
<div class="">Mark Brethen</div><div class=""><a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Dec 2, 2018, at 2:32 PM, Mark Brethen <<a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Abiword used this solution:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">distname AbiWord-${version}-10.2</span></div><div class=""><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">extract.suffix .dmg.gz</span></div><div class=""><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">extract.post_args > ${workpath}/${distname}.dmg</span></div><div class=""><br class=""></div><div class="">but I seven files, all .ps.gz, will this work with distfiles instead?</div><div class=""><br class=""></div><div class="">Alternatively, I could use extract {} and then change destroot to</div><div class=""><br class=""></div><div class=""><div class="">destroot {</div><div class=""> xinstall -d ${destroot}${prefix}/share/doc/${name}</div><div class=""> foreach f ${distfiles} {</div><div class=""> set stem [file rootname [file tail ${f}]]</div><div class=""> system -W ${distpath} "gunzip -c ${f} > ${destroot}${prefix}/share/doc/${name}//${stem}"</div><div class=""> }</div></div><div class="">}</div><br class=""><div class="">
<div class="">Mark Brethen</div><div class=""><a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 2, 2018, at 1:57 PM, Ryan Schmidt <<a href="mailto:ryandesign@macports.org" class="">ryandesign@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><br class="">On Nov 30, 2018, at 08:13, Mark Brethen wrote:<br class=""><br class=""><blockquote type="cite" class="">For *.gz files (no tar), what’s the proper way to extract them to extract_dir? <br class=""></blockquote><br class="">MacPorts doesn't have specific support for this built-in, I guess because it wasn't thought to be a common enough use case. But there are several ports in the tree that do this manually; you can probably find them by grepping for "extract.suffix .gz".<br class=""><br class="">Just as we recently added a use_tar option to handle uncompressed tarballs, even though that is uncommon, we could add an option to handle gz-/bz2-/xz-/etc. compressed non-tar files. But there might be some confusion about what to call the options. We already have options use_bzip2 and use_xz, for example, which handle bz2- and xz-compressed tarballs, respectively; there is no use_gz or use_gzip, but if there were one, for consistency it would have to mean a gz-compressed tarball; there is no such option because that is the default behavior.<br class=""><br class="">Ultimately, I would like MacPorts to be able to automatically extract almost any file, without needing to be told what compression format was used. See <a href="https://lists.macports.org/pipermail/macports-dev/2016-March/032671.html" class="">https://lists.macports.org/pipermail/macports-dev/2016-March/032671.html</a> . But every port that provides custom extract phase settings is an obstacle to that (i.e. is something that might break if we release a new version of MacPorts with that functionality, depending on how it's implemented), hence my desire to first provide options to accommodate most ports' extraction needs without the need to override any extract phase settings.<br class=""><br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></body></html>