pkgsrc-Bugs archive

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

pkg/53920: devel/patch: pkgsrc patches fail to apply on macOS due to ${PATCH} not being defined



>Number:         53920
>Category:       pkg
>Synopsis:       devel/patch: pkgsrc patches fail to apply on macOS due to ${PATCH} not being defined
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 29 00:15:00 +0000 2019
>Originator:     Dean Matzkov
>Release:        pkgsrc-2018Q4
>Organization:
>Environment:
>Description:
When using pkgsrc-2018Q4 on the latest version of macOS, the package ``devel/patch`` fails to build due to ${PATCH} being undefined, and thus causing $pkgsrc/mk/patch/patch.nk to fail.

No other package I've tried to build has failed to have its pkgsrc patches apply, so I can only guess is that, for whatever reason, the package name being called ``patch`` might have have something to do with it.

Here's the output from running ``bmake patch`` in ``devel/patch``:

---SNIP---
$ bmake patch

=> Bootstrap dependency digest>=20010302: found digest-20180917
===> Patching for patch-2.7.6nb1
=> Applying pkgsrc patches for patch-2.7.6nb1
/bin/sh: -d: command not found
Patch /Volumes/Stuff/pkgsrc-2018Q4/devel/patch/patches/patch-src_pch.c failed
/bin/sh: -d: command not found
Patch /Volumes/Stuff/pkgsrc-2018Q4/devel/patch/patches/patch-tests_Makefile.in failed
/bin/sh: -d: command not found
Patch /Volumes/Stuff/pkgsrc-2018Q4/devel/patch/patches/patch-tests_ed-style failed
ERROR: Patching failed due to modified or broken patch file(s):
ERROR:  /Volumes/Stuff/pkgsrc-2018Q4/devel/patch/patches/patch-src_pch.c
ERROR:  /Volumes/Stuff/pkgsrc-2018Q4/devel/patch/patches/patch-tests_Makefile.in
ERROR:  /Volumes/Stuff/pkgsrc-2018Q4/devel/patch/patches/patch-tests_ed-style
*** Error code 1

Stop.
bmake[1]: stopped in /Volumes/Stuff/pkgsrc-2018Q4/devel/patch
*** Error code 1

Stop.
bmake: stopped in /Volumes/Stuff/pkgsrc-2018Q4/devel/patch
---/SNIP---


I managed to get it to patch and build after making a quick and dirty edit of this line in ``do-pkgsrc-patch`` in ``$pkgsrc/mk/patch/patch.mk``, which'd help confirm it might indeed be caused by ${PATCH} being undefined:

        if ${PATCH} $$fuzz_flags ${PATCH_ARGS} < $$i; then  \

to -->

        if patch $$fuzz_flags ${PATCH_ARGS} < $$i; then  \



My mk.conf is bog-standard, with nothing to report aside from having my prefix being setup with ``--unprivileged``.
>How-To-Repeat:
1. Make sure you have the latest version of macOS.
2. cd ${pkgsrc_2018_Q4}/devel/patch
3. bmake
>Fix:


Home | Main Index | Thread Index | Old Index