Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153213681
D43789.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D43789.diff
View Options
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -539,6 +539,12 @@
# installed.
# Useful for dynamically generated data files.
#
+# By default, a port install its package and all its subpacakges.
+# Set the following to install only a subset of the port
+#
+# TARGET_SUBPACKAGES
+# - A comma separated list of subpackages to install.
+#
# Default targets and their behaviors:
#
# fetch - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this
@@ -4858,17 +4864,43 @@
STAGE_ARGS= -N
. endif
-. for sp in ${_PKGS}
+# Identify which subpackage needs to be installed
+_IPKGS=
+. if empty(TARGET_SUBPACKAGES)
+_IPKGS= ${_PKGS}
+. else
+_TARGET_SUBPACKAGES= ${TARGET_SUBPACKAGES:S/,/ /g}
+. for sp in ${_TARGET_SUBPACKAGES}
+. if ${sp} == "main"
+_IPKGS+= ${PKGBASE}
+. else
+_IPKGS+= ${PKGBASE}-${sp}
+. endif
+. endfor
+. endif
+# Add additional targets for subpackage dependency
+. for sp in ${SUBPACKAGES}
+. for dep in ${SELF_DEPENDS.${sp}}
+. if ${dep} == "main"
+_DEPPKGS.${_PKGS.${sp}}+= fake-pkg.${PKGBASE}
+. else
+_DEPPKGS.${_PKGS.${sp}}+= fake-pkg.${PKGBASE}-${dep}
+. endif
+. endfor
+. endfor
+. for sp in ${_IPKGS}
fake-pkg: fake-pkg.${sp}
-fake-pkg.${sp}: ${_PLIST}.${sp}
+. endfor
+. for sp in ${_PKGS}
+fake-pkg.${sp}: ${_PLIST}.${sp} ${_DEPPKGS.${sp}}
. if defined(INSTALLS_DEPENDS)
. if !defined(NO_PKG_REGISTER)
- @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic"
+ @${ECHO_MSG} "===> Registering installation for ${PKGNAME${_SP.${sp}}} as automatic"
. endif
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR}.${sp} -f ${_PLIST}.${sp}
. else
. if !defined(NO_PKG_REGISTER)
- @${ECHO_MSG} "===> Registering installation for ${PKGNAME}"
+ @${ECHO_MSG} "===> Registering installation for ${PKGNAME${_SP.${sp}}}"
. endif
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR}.${sp} -f ${_PLIST}.${sp}
. endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 8:38 PM (5 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31863292
Default Alt Text
D43789.diff (2 KB)
Attached To
Mode
D43789: Mk/bsd.port.mk: Add ability to install subpackages
Attached
Detach File
Event Timeline
Log In to Comment