[Bug 277455] bsd.port.mk: Add __MAKE_CONF=${NONEXISTENT} to WRK_ENV

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 03 Mar 2024 15:34:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277455

            Bug ID: 277455
           Summary: bsd.port.mk: Add __MAKE_CONF=${NONEXISTENT} to WRK_ENV
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: tijl@FreeBSD.org
                CC: ports-bugs@FreeBSD.org
             Flags: exp-run?

Created attachment 248899
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=248899&action=edit
patch

bsd.port.mk: Add __MAKE_CONF=${NONEXISTENT} to WRK_ENV

And remove it from individual ports.  Use WRK_ENV in custom build commands
where necessary.

FreeBSD make(1) includes /usr/share/mk/sys.mk and that includes /etc/make.conf
if it exists.  This patch disables make.conf when running the upstream build
system.  Users can define variables like CFLAGS in make.conf that override
ports framework variables.  This can cause problems that are difficult to
diagnose.  See for example
http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt.

If there are any build customisations made through make.conf that stop working
because of this patch then they should be made available by the ports tree
through some mechanism, e.g. an option in a port.  The idea is that the ports
tree controls the upstream build system and the user then controls the ports
tree, possibly using make.conf.

-- 
You are receiving this mail because:
You are on the CC list for the bug.