View | Details | Raw Unified | Return to bug 205106 | Differences between
and this patch

Collapse All | Expand All

(-)Mk2/Uses/bundle.mk (+32 lines)
Line 0 Link Here
1
# $FreeBSD$
2
#
3
# Provide support for the bundled projects
4
#
5
# Feature:	bundle
6
# Usage:	USES=bundle
7
#
8
# MAINTAINER: portmgr@FreeBSD.org
9
10
# BUNDLE      - set of bundled submodules in the form directory:group
11
#               that will be extracted under WRKSRC.
12
#               Extracted submodules should be present in DISTFILES.
13
# BUNDLE_ROOT - The root path for the bundle. Default: WRKSRC
14
15
.if !defined(_INCLUDE_USES_BUNDLE_MK)
16
_INCLUDE_USES_BUNDLE_MK=	yes
17
18
BUNDLE_ROOT?=${WRKSRC}
19
20
_USES_extract+= 900:do-bundle
21
do-bundle:
22
	@${ECHO} "===>  Extracting bundled submodules for ${PKGNAME}"
23
.for b in ${BUNDLE:C@.*:@@}
24
	@[ -d ${BUNDLE_ROOT}/${BUNDLE:M*\:${b}:C@:.*@@} ] || ${ECHO} "No directory for the bundle ${b}: ${BUNDLE_ROOT}/${BUNDLE:M*\:${b}:C@:.*@@}"
25
	@[ -n "${DISTFILES:M*\:${b}:C@:.*@@}" ] || ${ECHO} "No distfile for the bundle ${b}: ${DISTFILES:M*\:${b}:C@:.*@@}"
26
	@${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES:M*\:${b}:C@:.*@@} \
27
	  -C ${BUNDLE_ROOT}/${BUNDLE:M*\:${b}:C@:.*@@} --strip 1;
28
.endfor
29
30
EXTRACT_ONLY=${DISTFILES:N*\:*}
31
32
.endif

Return to bug 205106