Bug 234587 - misc/mc: Does not honour user-supplied EXTRA_PATCHES/RUN_DEPENDS in /etc/make.conf
Summary: misc/mc: Does not honour user-supplied EXTRA_PATCHES/RUN_DEPENDS in /etc/make...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Tobias Kortkamp
URL:
Keywords: easy, needs-patch
Depends on:
Blocks:
 
Reported: 2019-01-03 09:32 UTC by vvv
Modified: 2019-01-31 11:20 UTC (History)
0 users

See Also:
tobik: maintainer-feedback-
tobik: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vvv 2019-01-03 09:32:43 UTC
This part of Makefile prevents using custom patches in /etc/make.conf:

.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200030
EXTRA_PATCHES=  ${FILESDIR}/extra-patch-src_diffviewer_ydiff.c
RUN_DEPENDS=    gdiff:textproc/diffutils
.endif

Please, replace EXTRA_PATCHES= and RUN_DEPENDS= with EXTRA_PATCHES+= and UN_DEPENDS+=.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-03 09:35:39 UTC
Thank you for the report.

Could you provide an/the example of the /etc/make.conf override as an attachment please, sanitized if necessary.
Comment 2 vvv 2019-01-03 11:13:50 UTC
Here is the part of /etc/make.conf:

.if ${.CURDIR:N*/ports/misc/mc} == ""
EXTRA_PATCHES+=/opt/src/mcedit-vim-modeline-4.diff
.endif
Comment 3 Tobias Kortkamp freebsd_committer 2019-01-31 11:15:28 UTC
(In reply to vvv from comment #2)
> Here is the part of /etc/make.conf:
> 
> .if ${.CURDIR:N*/ports/misc/mc} == ""
> EXTRA_PATCHES+=/opt/src/mcedit-vim-modeline-4.diff
> .endif

This is wrong and you cannot expect ports to honor this for all variables.
It might work for EXTRA_PATCHES, but in general customization like this
should happen in misc/mc/Makefile.local if you do not want to edit
ports directly.

For extra patches for ports there is also EXTRA_PATCH_TREE.

However this was a legitimate port bug here, so fixed as requested.
Thanks for the report.
Comment 4 commit-hook freebsd_committer 2019-01-31 11:15:49 UTC
A commit references this bug:

Author: tobik
Date: Thu Jan 31 11:15:16 UTC 2019
New revision: 491705
URL: https://svnweb.freebsd.org/changeset/ports/491705

Log:
  misc/mc: Do not override variables after bsd.port.pre.mk

  At least the Python run dependency is not added on FreeBSD >= 12.0
  because of it.

  PR:		234587
  Approved by:	woodsb02 (maintainer timeout, 4 weeks)

Changes:
  head/misc/mc/Makefile
Comment 5 commit-hook freebsd_committer 2019-01-31 11:18:53 UTC
A commit references this bug:

Author: tobik
Date: Thu Jan 31 11:17:51 UTC 2019
New revision: 491706
URL: https://svnweb.freebsd.org/changeset/ports/491706

Log:
  MFH: r491705

  misc/mc: Do not override variables after bsd.port.pre.mk

  At least the Python run dependency is not added on FreeBSD >= 12.0
  because of it.

  PR:		234587
  Approved by:	woodsb02 (maintainer timeout, 4 weeks)

  Approved by:	ports-secteam blanket

Changes:
_U  branches/2019Q1/
  branches/2019Q1/misc/mc/Makefile