How to fetch and extract patches in archives?

Mojca Miklavec mojca at macports.org
Sun Mar 18 08:57:58 UTC 2018


On 18 March 2018 at 08:33, Zero King wrote:
> Hi,
>
> Port w3m needs patches from Debian to fix security issues. Currently,
> the patches are added to the ports tree and takes ~800KiB. Since its
> size will grow, I'd prefer to fetch the patches from Debian archives
> (e.g. w3m_0.5.3-36.debian.tar.xz).
>
> I tried to add the archive and ${workpath}/.../020_debian.patch to
> distfiles and patchfiles, but that didn't work because port(1) attempted
> to fetch the patchfiles into ${distpath} and `DEBUG: Fetching distfile
> failed: No such file or directory`.

I would add the patches to distfiles and include debian site in
master_sites. You then need to keep your fingers crossed that the main
distfile is also packaged as tar.xz because you need to manually
extract some of the files otherwise (MacPorts does not yet support
extracting from different types of archives).

I would imagine that
    patchfiles ${worksrcdir}/.../020_debian.patch
should work, but I didn't test.

Mojca


More information about the macports-dev mailing list