Re: PATCH_WRKSRC with groups?
- In reply to: Daniel Engberg : "Re: PATCH_WRKSRC with groups?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Dec 2024 01:07:44 UTC
Hello.
On 2024/12/01 19:59, Daniel Engberg wrote:
> On 2024-11-30T23:26:38.000+01:00, Ronald Klop <ronald-lists@klop.ws>
> wrote:
>> PATCH_WRKSRC+= ${WRKSRC}/src/third_party/mozjs-60/extract:mozpatch
>> Without affecting where other patches are applied.
This was a long time ago.
After www/seamonkey was removed, there were libraries or FreeBSD updates that needed to be patched to build SeaMonkey.
That patch was provided for Firefox.
Since SeaMonkey had exactly the same contents, the patch changes could be applied as is, but the patch file could not be used directly because the file path was one level different.
There were two possible ways to solve this: either by editing the patch before the patch phase to create an extra-patch, or by creating a do-patch target with a different WRKSRC.
I adopted the latter and wrote a target in make.conf that looks like the following fragment.
FX_EXTRA_PATCHES=\
${.CURDIR}/../../www/firefox/files/patch-bug1575876\
${.CURDIR}/../../www/firefox/files/patch-bug1594027
post-patch: .NOTMAIN .PHONY extra-patch-fx
extra-patch-fx: .NOTMAIN .PHONY
@${SETENV} \
dp_BZCAT="${BZCAT}" \
︙
dp_EXTRA_PATCHES="${FX_EXTRA_PATCHES}" \
︙
dp_PATCH_WRKSRC="${PATCH_WRKSRC}/mozilla" \
︙
${SH} ${SCRIPTSDIR}/do-patch.sh
︙ means omission, which is the same as do-patch.
The reason why I have been able to rebuild seamonkey-2.49.4_27 of the port so easily these days is because of these modifications :)
Does this silly episode do any good? :)
Regards.