kern/161452: [patch] make PORTS_MODULES compile more sane with proper OSVERSION / SRC_BASE values

Garrett Cooper yanegomi at gmail.com
Sun Oct 9 23:52:26 UTC 2011


 	Silly me.. I submitted an empty patch in the original PR. This is 
what I meant to submit.
Thanks,
-Garrett
-------------- next part --------------
Index: sys/conf/kern.post.mk
===================================================================
--- sys/conf/kern.post.mk	(revision 226171)
+++ sys/conf/kern.post.mk	(working copy)
@@ -38,7 +38,13 @@
 
 # Handle out of tree ports 
 .if !defined(NO_MODULES) && defined(PORTS_MODULES)
-PORTSMODULESENV=SYSDIR=${SYSDIR}
+.if !defined(OSRELDATE)
+OSRELDATE!=	awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
+		/usr/include/osreldate.h
+.endif
+PORTSMODULESENV=OSVERSION=${OSRELDATE} \
+		PATH="${PATH}:/usr/local/bin" \
+		SRC_BASE="$$(realpath "${SYSDIR:H}/")"
 .for __target in all install reinstall clean
 ${__target}: ports-${__target}
 ports-${__target}:


More information about the freebsd-bugs mailing list