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 |
|
14 |
.if !defined(_INCLUDE_USES_BUNDLE_MK) |
15 |
_INCLUDE_USES_BUNDLE_MK= yes |
16 |
|
17 |
_USES_extract+= 900:do-bundle |
18 |
do-bundle: |
19 |
@${ECHO} "===> Extracting bundled submodules for ${PKGNAME}" |
20 |
.for b in ${BUNDLE:C@.*:@@} |
21 |
@[ -d ${WRKSRC}/${BUNDLE:M*\:${b}:C@:.*@@} ] || ${ECHO} "No directory for the bundle ${b}: ${WRKSRC}/${BUNDLE:M*\:${b}:C@:.*@@}" |
22 |
@[ -n "${DISTFILES:M*\:${b}:C@:.*@@}" ] || ${ECHO} "No distfile for the bundle ${b}: ${DISTFILES:M*\:${b}:C@:.*@@}" |
23 |
@${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES:M*\:${b}:C@:.*@@} \ |
24 |
-C ${WRKSRC}/${BUNDLE:M*\:${b}:C@:.*@@} --strip 1; |
25 |
.endfor |
26 |
|
27 |
EXTRACT_ONLY=${DISTFILES:N*\:*} |
28 |
|
29 |
.endif |