[Midnightbsd-cvs] mports [21355] trunk/Mk/bsd.mport.mk: add fetch-specials target.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Apr 3 12:12:29 EDT 2016


Revision: 21355
          http://svnweb.midnightbsd.org/mports/?rev=21355
Author:   laffer1
Date:     2016-04-03 12:12:29 -0400 (Sun, 03 Apr 2016)
Log Message:
-----------
add fetch-specials target. This gives us an approach to get distfiles for jails with no network capability. Obtained from: FreeBSD

Modified Paths:
--------------
    trunk/Mk/bsd.mport.mk

Modified: trunk/Mk/bsd.mport.mk
===================================================================
--- trunk/Mk/bsd.mport.mk	2016-03-31 18:55:42 UTC (rev 21354)
+++ trunk/Mk/bsd.mport.mk	2016-04-03 16:12:29 UTC (rev 21355)
@@ -2701,7 +2701,7 @@
 
 _FETCH_DEP=		check-sanity
 _FETCH_SEQ=		fetch-depends pre-fetch pre-fetch-script \
-				do-fetch post-fetch post-fetch-script
+				do-fetch fetch-specials post-fetch post-fetch-script
 
 _EXTRACT_DEP=	fetch
 _EXTRACT_SEQ=	check-build-conflicts extract-message checksum extract-depends \
@@ -3516,8 +3516,9 @@
 
 # Dependency lists: both build and runtime, recursive.  Print out directory names.
 
-_UNIFIED_DEPENDS=${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}
+_UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}
 _DEPEND_DIRS=	${_UNIFIED_DEPENDS:C,^[^:]*:([^:]*).*$,\1,} ${DEPENDS:C,:.*,,}
+_DEPEND_SPECIALS=	${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,}
 
 all-depends-list:
 	@${ALL-DEPENDS-LIST}
@@ -3574,6 +3575,18 @@
 	done
 .endif
 
+.if !target(fetch-specials)
+fetch-specials:
+	@${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building"
+	@for dir in ${_DEPEND_SPECIALS}; do \
+		case $$dir in \
+		/*) ;; \
+		*) dir=${PORTSDIR}/$$dir ;; \
+		esac; \
+		(cd $$dir; ${MAKE} fetch); \
+	done
+.endif
+
 .if !target(fetch-recursive)
 fetch-recursive:
 	@${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies"



More information about the Midnightbsd-cvs mailing list