FreeBSD 11.1-RELEASE-p8 I am trying to build py-libzfs with portmaster and even though system sources are installed properly, it still fails with the error: ===>>> Port directory: /usr/ports/devel/py-libzfs ===>>> This port is marked IGNORE ===>>> requires kernel source files in /usr/src ===>>> If you are sure you can build it, remove the IGNORE line in the Makefile and try again. I am able to build the port normally if I remove the following lines from the port Makefile: .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel source files in ${SRC_BASE} .endif It looks like at the point of checking for ${SRC_BASE}/sys/Makefile, the variable SRC_BASE is not yet defined, always triggering the IGNORE error. If I move the .include <bsd.port.mk> in front of the check, it can be done normally and only triggers the error if ${SRC_BASE}/sys/Makefile is not present. This is not that much of a problem, but the way it is now, the kernel source check does not work, at least on my machine.
A commit references this bug: Author: tobik Date: Fri Oct 12 13:21:31 UTC 2018 New revision: 481901 URL: https://svnweb.freebsd.org/changeset/ports/481901 Log: devel/py-libzfs: Fix build on systems that are missing the /sys symlink SRC_BASE is defined in bsd.port.mk and cannot be used in conditionals earlier. PR: 226858 Reported by: skh1002@hotmail.com Approved by: wg (maintainer timeout, 6 months) Changes: head/devel/py-libzfs/Makefile