Changeset View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 2,209 Lines • ▼ Show 20 Lines | |||||
PLIST?= ${PKGDIR}/pkg-plist | PLIST?= ${PKGDIR}/pkg-plist | ||||
PKGHELP?= ${PKGDIR}/pkg-help | PKGHELP?= ${PKGDIR}/pkg-help | ||||
PKGINSTALL?= ${PKGDIR}/pkg-install | PKGINSTALL?= ${PKGDIR}/pkg-install | ||||
PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall | PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall | ||||
PKGMESSAGE?= ${PKGDIR}/pkg-message | PKGMESSAGE?= ${PKGDIR}/pkg-message | ||||
_PKGMESSAGES+= ${PKGMESSAGE} | _PKGMESSAGES+= ${PKGMESSAGE} | ||||
TMPPLIST?= ${WRKDIR}/.PLIST.mktmp | TMPPLIST?= ${WRKDIR}/.PLIST.mktmp | ||||
_PLIST?= ${WRKDIR}/.PLIST | |||||
.if defined(PKG_NOCOMPRESS) | .if defined(PKG_NOCOMPRESS) | ||||
PKG_SUFX?= .tar | PKG_SUFX?= .tar | ||||
.else | .else | ||||
PKG_SUFX?= .txz | PKG_SUFX?= .txz | ||||
.endif | .endif | ||||
# where pkg(8) stores its data | # where pkg(8) stores its data | ||||
PKG_DBDIR?= /var/db/pkg | PKG_DBDIR?= /var/db/pkg | ||||
▲ Show 20 Lines • Show All 371 Lines • ▼ Show 20 Lines | . if empty(VALID_CATEGORIES:M${cat}) | ||||
@${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ | @${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ | ||||
${FALSE}; | ${FALSE}; | ||||
. endif | . endif | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
PKGREPOSITORYSUBDIR?= All | PKGREPOSITORYSUBDIR?= All | ||||
PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} | PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} | ||||
.if exists(${PACKAGES}) | |||||
PACKAGES:= ${PACKAGES:S/:/\:/g} | |||||
_HAVE_PACKAGES= yes | |||||
PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} | |||||
.else | |||||
PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} | |||||
.endif | |||||
WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} | |||||
# The "latest version" link -- ${PKGNAME} minus everthing after the last '-' | # The "latest version" link -- ${PKGNAME} minus everthing after the last '-' | ||||
PKGLATESTREPOSITORY?= ${PACKAGES}/Latest | PKGLATESTREPOSITORY?= ${PACKAGES}/Latest | ||||
PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} | PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} | ||||
PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} | PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} | ||||
_PKGS= ${PKGBASE} | |||||
PORTS_FEATURES+= SUBPACKAGES | |||||
.if defined(SUBPACKAGES) | |||||
. if ${SUBPACKAGES:Mmain} | |||||
DEV_ERROR+= "SUBPACKAGES cannot contain 'main', it is a reserved value" | |||||
. endif | |||||
. for f in ${SUBPACKAGES} | |||||
. if ${f:C/[[:lower:][:digit:]_]//g} | |||||
_BAD_SUBPACKAGE_NAMES+= ${f} | |||||
. endif | |||||
. endfor | |||||
. if !empty(_BAD_SUBPACKAGE_NAMES) | |||||
DEV_ERROR+= "SUBPACKAGES contains subpackages that are not all [a-z0-9_]: ${_BAD_SUBPACKAGE_NAMES}" | |||||
tcberner: ^ `flavors` sounds wrong here. | |||||
Done Inline ActionsAh, yes, too much copy&paste ^^ mat: Ah, yes, too much copy&paste ^^ | |||||
. endif | |||||
.endif | |||||
.for p in ${SUBPACKAGES} | |||||
# If a FRAMEWORK generated package needs to override its subpackage package | |||||
# name, it can do so with this mechanism. | |||||
.if !defined(_PKGS.${p}) | |||||
_PKGS.${p}= ${PKGBASE}-${p} | |||||
.endif | |||||
_PKGS+= ${_PKGS.${p}} | |||||
_P.${_PKGS.${p}}= .${p} | |||||
.endfor | |||||
.if !defined(_DID_SUBPACKAGES_HELPERS) | |||||
_DID_SUBPACKAGES_HELPERS= yes | |||||
_SUBPACKAGE_HELPERS_FILE= DESCR PKGINSTALL PKGDEINSTALL PKGMESSAGE \ | |||||
PKGPREINSTALL PKGPOSTINSTALL PKGPREDEINSTALL PKGPOSTDEINSTALL \ | |||||
PKGPREUPGRADE PKGPOSTUPGRADE PKGUPGRADE | |||||
. for p in ${SUBPACKAGES} | |||||
# These overwrite the current value | |||||
. for v in ${_SUBPACKAGE_HELPERS_FILE} | |||||
Done Inline Actions^ I would keep it afterwards and add a DEV_WARNING tcberner: ^ I would keep it afterwards and add a `DEV_WARNING` | |||||
Done Inline ActionsMmmm. You mean a DEV_WARNING when the subpackage does not have a specific description file? mat: Mmmm. You mean a DEV_WARNING when the subpackage does not have a specific description file? | |||||
${v}.${p}?= ${$v}.$p | |||||
. endfor | |||||
_PKGMESSAGES.${p}= ${PKGMESSAGE}.${p} | |||||
# XXX: for testing, and maybe kept afterwards | |||||
Done Inline ActionsHow about adding a bsd.subpackages.commentsuffix.mk ala bsd.options.desc.mk: COMMENTSUFFIX.debug?= Debug Parts COMMENTSUFFIX.doc?= Documentation COMMENTSUFFIX.l10n?= Localization Files And then do something like: . if defined(COMMENTSUFFIX.${p}) _COMMENTSUFFIX?= ${COMMENTSUFFIX.${p}} . else _COMMENTSUFFIX?= ${p} subpackage . endif COMMENT.${p}?= ${COMMENT} (${_COMMENTSUFFIX}) . endfor .endif tcberner: How about adding a `bsd.subpackages.commentsuffix.mk` ala `bsd.options.desc.mk`:
```… | |||||
Done Inline ActionsFirst, I think bsd.options.desc.mk should die, preferably in a large bonfire. Because it's all filled in with: <foo>_DESC= <foo> support Which is mostly useless to end users, because it does not tell them anything. Of course option foo as something to do with foo being added. But it does not tell the users what foo is, or what adding foo support actually does. For example, if a port has the ICU option, the user will be shown "Unicode support via ICU", but what does it mean for the port? Does it mean that without it, the port will only accept 7 bit ASCII text input? So, while your three examples are ok, I feel having this would end up as the options, and not saying much of what's in it. Or it would need to require some sort of approval to add to, unlike options.desc right now. Also, I feel adding too many helpers defeats the purpose of having everything customizable. (Side note, your example can be written as two lines: COMMENTSUFFIX.${p}?= ${p} subpackage COMMENT.${p}?= ${COMMENT} (${COMMENTSUFFIX.${p}}) ) mat: First, I think bsd.options.desc.mk should die, preferably in a large bonfire. Because it's all… | |||||
. if !exists(${DESCR.${p}}) | |||||
DESCR.${p}= ${DESCR} | |||||
DEV_WARNING+= "DESCR.${p} needs to point to an existing file." | |||||
. endif | |||||
# XXX: Thoughts? | |||||
COMMENT.${p}?= ${COMMENT} (subpkg: ${p}) | |||||
. endfor | |||||
.endif | |||||
.if exists(${PACKAGES}) | |||||
-PACKAGES:= ${PACKAGES:S/:/\:/g} | |||||
_HAVE_PACKAGES= yes | |||||
_PKGDIR= ${PKGREPOSITORY} | |||||
.else | |||||
_PKGDIR= ${.CURDIR} | |||||
.endif | |||||
. for p in ${_PKGS} | |||||
PKGFILE${_P.${p}}= ${_PKGDIR}/${p}-${PKGVERSION}${PKG_SUFX} | |||||
. endfor | |||||
_EXTRA_PACKAGE_TARGET_DEP+= ${_PKGDIR} | |||||
.for p in ${_PKGS} | |||||
WRKDIR_PKGFILE${_P.${p}}= ${WRKDIR}/pkg/${p}-${PKGVERSION}${PKG_SUFX} | |||||
.endfor | |||||
CONFIGURE_SCRIPT?= configure | CONFIGURE_SCRIPT?= configure | ||||
CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} | CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} | ||||
CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} | CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} | ||||
CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//} | CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//} | ||||
CONFIGURE_LOG?= config.log | CONFIGURE_LOG?= config.log | ||||
# A default message to print if do-configure fails. | # A default message to print if do-configure fails. | ||||
CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)." | CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)." | ||||
▲ Show 20 Lines • Show All 759 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
# Package | # Package | ||||
.if defined(_HAVE_PACKAGES) | .if defined(_HAVE_PACKAGES) | ||||
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} | _EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} | ||||
_PORTS_DIRECTORIES+= ${PKGREPOSITORY} | _PORTS_DIRECTORIES+= ${PKGREPOSITORY} | ||||
${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY} | |||||
@${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \ | |||||
|| ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE} | |||||
. if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" | . if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" | ||||
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} | _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} | ||||
_PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} | _PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} | ||||
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} | _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} | ||||
${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} | ${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} | ||||
${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} | ${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} | ||||
. endif | . endif | ||||
.endif | .endif | ||||
Done Inline ActionsIs this a placeholder, or a leftover? adamw: Is this a placeholder, or a leftover? | |||||
Done Inline ActionsNo idea, it was in @bapt patch when I imported his work. mat: No idea, it was in @bapt patch when I imported his work. | |||||
Done Inline ActionsYou can remove, it was a "false" good idea. bapt: You can remove, it was a "false" good idea.
Aka I started with an idea, started writting the… | |||||
# from here this will become a loop for subpackages | .for p in ${_PKGS} | ||||
${WRKDIR_PKGFILE}: ${TMPPLIST} create-manifest ${WRKDIR}/pkg | ${_PLIST}.${p}: ${TMPPLIST} | ||||
@if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR} -p ${TMPPLIST} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \ | @if [ "${PKGBASE}" = "${p}" ]; then \ | ||||
${SED} "/^@comment /d; /@@/d" ${TMPPLIST} > ${.TARGET} ; \ | |||||
else \ | |||||
${SED} -n "s/@@${p:S/${PKGBASE}-//}@@//p" ${TMPPLIST} > ${.TARGET} ; \ | |||||
fi | |||||
${WRKDIR_PKGFILE${_P.${p}}}: ${_PLIST}.${p} create-manifest.${p} ${WRKDIR}/pkg | |||||
@echo "===> Building ${p}-${PKGVERSION}" | |||||
@if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR}.${p} -p ${_PLIST}.${p} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \ | |||||
cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ | cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ | ||||
exit 1; \ | exit 1; \ | ||||
fi | fi | ||||
# | |||||
# Temporary will be later dynamically added per subpackages | |||||
_EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE} | |||||
# This will be the end of the loop | |||||
_EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE${_P.${p}}} | |||||
${PKGFILE${_P.${p}}}: ${WRKDIR_PKGFILE${_P.${p}}} | |||||
@${LN} -f ${WRKDIR_PKGFILE${_P.${p}}} ${PKGFILE${_P.${p}}} 2>/dev/null \ | |||||
|| ${CP} -f ${WRKDIR_PKGFILE${_P.${p}}} ${PKGFILE${_P.${p}}} | |||||
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE${_P.${p}}} | |||||
.endfor | |||||
.if !target(do-package) | .if !target(do-package) | ||||
PKG_CREATE_ARGS= -r ${STAGEDIR} | PKG_CREATE_ARGS= -r ${STAGEDIR} | ||||
. if defined(PKG_CREATE_VERBOSE) | . if defined(PKG_CREATE_VERBOSE) | ||||
PKG_CREATE_ARGS+= -v | PKG_CREATE_ARGS+= -v | ||||
. endif | . endif | ||||
do-package: ${_EXTRA_PACKAGE_TARGET_DEP} ${WRKDIR}/pkg | do-package: ${_EXTRA_PACKAGE_TARGET_DEP} ${WRKDIR}/pkg | ||||
.endif | .endif | ||||
.if !target(delete-package) | .if !target(delete-package) | ||||
delete-package: | delete-package: | ||||
@${ECHO_MSG} "===> Deleting package for ${PKGNAME}" | . for p in ${_PKGS} | ||||
@${ECHO_MSG} "===> Deleting package for ${p}" | |||||
# When staging, the package may only be in the workdir if not root | # When staging, the package may only be in the workdir if not root | ||||
@${RM} ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : | @${RM} ${PKGFILE${_P.${p}}} ${WRKDIR_PKGFILE${_P.${p}}} 2>/dev/null || : | ||||
. endfor | |||||
.endif | .endif | ||||
.if !target(delete-package-list) | .if !target(delete-package-list) | ||||
delete-package-list: | delete-package-list: | ||||
@${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} ${PKGFILE})" | . for p in ${_PKGS} | ||||
@${ECHO_CMD} "[ -f ${PKGFILE${_P.${p}}} ] && (${ECHO_CMD} deleting ${PKGFILE${_P.${p}}}; ${RM} ${PKGFILE${_P.${p}}})" | |||||
. endfor | |||||
.endif | .endif | ||||
# Used by scripts and users to install a package from local repository. | # Used by scripts and users to install a package from local repository. | ||||
# Poudriere -i uses this, please keep. | # Poudriere -i uses this, please keep. | ||||
.if !target(install-package) | .if !target(install-package) | ||||
.if defined(FORCE_PKG_REGISTER) | .if defined(FORCE_PKG_REGISTER) | ||||
_INSTALL_PKG_ARGS= -f | _INSTALL_PKG_ARGS= -f | ||||
.endif | .endif | ||||
.if defined(INSTALLS_DEPENDS) | .if defined(INSTALLS_DEPENDS) | ||||
_INSTALL_PKG_ARGS+= -A | _INSTALL_PKG_ARGS+= -A | ||||
.endif | .endif | ||||
install-package: | .for p in ${_PKGS} | ||||
@if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ | install-package: install-package.${p} | ||||
_pkgfile="${WRKDIR_PKGFILE}"; \ | install-package.${p}: | ||||
@if [ -f "${WRKDIR_PKGFILE${_P.${p}}}" ]; then \ | |||||
_pkgfile="${WRKDIR_PKGFILE${_P.${p}}}"; \ | |||||
else \ | else \ | ||||
_pkgfile="${PKGFILE}"; \ | _pkgfile="${PKGFILE${_P.${p}}}"; \ | ||||
fi; \ | fi; \ | ||||
${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} | ${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} | ||||
.endfor | |||||
.endif | .endif | ||||
# Utility targets follow | # Utility targets follow | ||||
.if !target(check-already-installed) | .if !target(check-already-installed) | ||||
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) | .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) | ||||
check-already-installed: | check-already-installed: | ||||
▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | build-message: | ||||
@${ECHO_MSG} "===> Building for ${PKGNAME}" | @${ECHO_MSG} "===> Building for ${PKGNAME}" | ||||
stage-message: | stage-message: | ||||
@${ECHO_MSG} "===> Staging for ${PKGNAME}" | @${ECHO_MSG} "===> Staging for ${PKGNAME}" | ||||
install-message: | install-message: | ||||
@${ECHO_MSG} "===> Installing for ${PKGNAME}" | @${ECHO_MSG} "===> Installing for ${PKGNAME}" | ||||
test-message: | test-message: | ||||
@${ECHO_MSG} "===> Testing for ${PKGNAME}" | @${ECHO_MSG} "===> Testing for ${PKGNAME}" | ||||
package-message: | package-message: | ||||
@${ECHO_MSG} "===> Building package for ${PKGNAME}" | @${ECHO_MSG} "===> Building packages for ${PKGNAME}" | ||||
# Empty pre-* and post-* targets | # Empty pre-* and post-* targets | ||||
.if exists(${SCRIPTDIR}) | .if exists(${SCRIPTDIR}) | ||||
.for stage in pre post | .for stage in pre post | ||||
.for name in pkg check-sanity fetch extract patch configure build stage install package | .for name in pkg check-sanity fetch extract patch configure build stage install package | ||||
.if !target(${stage}-${name}-script) | .if !target(${stage}-${name}-script) | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
.if !target(deinstall) | .if !target(deinstall) | ||||
deinstall: | deinstall: | ||||
.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) | .if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) | ||||
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" | @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" | ||||
@cd ${.CURDIR} && \ | @cd ${.CURDIR} && \ | ||||
${SU_CMD} "${MAKE} ${.TARGET}" | ${SU_CMD} "${MAKE} ${.TARGET}" | ||||
@${ECHO_MSG} "===> Returning to user credentials" | @${ECHO_MSG} "===> Returning to user credentials" | ||||
.else | .else | ||||
@${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" | .for _p in ${_PKGS} | ||||
@if ${PKG_INFO} -e ${PKGBASE}; then \ | @${ECHO_MSG} "===> Deinstalling for ${_p}" | ||||
p=`${PKG_INFO} -q -O ${PKGBASE}`; \ | @if ${PKG_INFO} -e ${_p}; then \ | ||||
p=`${PKG_INFO} -q -O ${_p}`; \ | |||||
${ECHO_MSG} "===> Deinstalling $${p}"; \ | ${ECHO_MSG} "===> Deinstalling $${p}"; \ | ||||
${PKG_DELETE} -f ${PKGBASE} ; \ | ${PKG_DELETE} -f ${_p} ; \ | ||||
else \ | else \ | ||||
${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ | ${ECHO_MSG} "===> ${_p} not installed, skipping"; \ | ||||
fi | fi | ||||
.endfor | |||||
@${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} | @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
# Deinstall-all | # Deinstall-all | ||||
# | # | ||||
# Special target to remove installation of all ports of the same origin | # Special target to remove installation of all ports of the same origin | ||||
▲ Show 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
# Build a package but don't check the package cookie | # Build a package but don't check the package cookie | ||||
.if !target(repackage) | .if !target(repackage) | ||||
repackage: pre-repackage package | repackage: pre-repackage package | ||||
pre-repackage: | pre-repackage: | ||||
@${RM} ${PACKAGE_COOKIE} | @${RM} ${PACKAGE_COOKIE} ${TMPPLIST}* | ||||
.endif | .endif | ||||
# Build a package but don't check the cookie for installation, also don't | # Build a package but don't check the cookie for installation, also don't | ||||
# install package cookie | # install package cookie | ||||
.if !target(package-noinstall) | .if !target(package-noinstall) | ||||
package-noinstall: package | package-noinstall: package | ||||
.endif | .endif | ||||
################################################################ | ################################################################ | ||||
# Dependency checking | # Dependency checking | ||||
################################################################ | ################################################################ | ||||
.if !target(depends) | .if !target(depends) | ||||
depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends | depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends | ||||
.for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST | .for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST | ||||
.for p in ${_PKGS} | |||||
${deptype}_DEPENDS_ALL+= ${${deptype}_DEPENDS${_P.${p}}} | |||||
.endfor | |||||
${deptype:tl}-depends: | ${deptype:tl}-depends: | ||||
.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) | .if !empty(${deptype}_DEPENDS_ALL) && !defined(NO_DEPENDS) | ||||
@${SETENV} \ | @${SETENV} \ | ||||
dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ | dp_RAWDEPENDS="${${deptype}_DEPENDS_ALL}" \ | ||||
dp_DEPTYPE="${deptype}_DEPENDS" \ | dp_DEPTYPE="${deptype}_DEPENDS" \ | ||||
dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ | dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ | ||||
dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ | dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ | ||||
dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ | dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ | ||||
dp_DEPENDS_ARGS="${DEPENDS_ARGS}" \ | dp_DEPENDS_ARGS="${DEPENDS_ARGS}" \ | ||||
dp_USE_PACKAGE_DEPENDS="${USE_PACKAGE_DEPENDS}" \ | dp_USE_PACKAGE_DEPENDS="${USE_PACKAGE_DEPENDS}" \ | ||||
dp_USE_PACKAGE_DEPENDS_ONLY="${USE_PACKAGE_DEPENDS_ONLY}" \ | dp_USE_PACKAGE_DEPENDS_ONLY="${USE_PACKAGE_DEPENDS_ONLY}" \ | ||||
dp_PKG_ADD="${PKG_ADD}" \ | dp_PKG_ADD="${PKG_ADD}" \ | ||||
Show All 12 Lines | @${SETENV} \ | ||||
${SH} ${SCRIPTSDIR}/do-depends.sh | ${SH} ${SCRIPTSDIR}/do-depends.sh | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
# Dependency lists: both build and runtime, recursive. Print out directory names. | # Dependency lists: both build and runtime, recursive. Print out directory names. | ||||
_UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS} | _UNIFIED_DEPENDS=${PKG_DEPENDS_ALL} ${EXTRACT_DEPENDS_ALL} ${PATCH_DEPENDS_ALL} ${FETCH_DEPENDS_ALL} ${BUILD_DEPENDS_ALL} ${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL} ${TEST_DEPENDS_ALL} | ||||
_DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} | _DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} | ||||
.for d in ${_UNIFIED_DEPENDS:M*\:/*} | .for d in ${_UNIFIED_DEPENDS:M*\:/*} | ||||
_PORTSDIR_STR= $${PORTSDIR}/ | _PORTSDIR_STR= $${PORTSDIR}/ | ||||
DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." | DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." | ||||
.endfor | .endfor | ||||
all-depends-list: | all-depends-list: | ||||
Show All 35 Lines | ${SETENV} \ | ||||
dp_OVERLAYS="${OVERLAYS}" \ | dp_OVERLAYS="${OVERLAYS}" \ | ||||
${SH} ${SCRIPTSDIR}/depends-list.sh \ | ${SH} ${SCRIPTSDIR}/depends-list.sh \ | ||||
${DEPENDS_SHOW_FLAVOR:D-f} | ${DEPENDS_SHOW_FLAVOR:D-f} | ||||
ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} | ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} | ||||
ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q} | ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q} | ||||
DEINSTALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:N${PKG_DEPENDS}:Q} | DEINSTALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:N${PKG_DEPENDS}:Q} | ||||
MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} | MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} | ||||
BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | BUILD-DEPENDS-LIST= ${DEPENDS-LIST_ALL} "${PKG_DEPENDS_ALL} ${EXTRACT_DEPENDS_ALL} ${PATCH_DEPENDS_ALL} ${FETCH_DEPENDS_ALL} ${BUILD_DEPENDS_ALL} ${LIB_DEPENDS_ALL}" | ||||
RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS} ${RUN_DEPENDS}" | RUN-DEPENDS-LIST= ${DEPENDS-LIST_ALL} "${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL}" | ||||
TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS:Q} | TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS_ALL:Q} | ||||
CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} | CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} | ||||
CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} | CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} | ||||
.if !target(clean-depends) | .if !target(clean-depends) | ||||
clean-depends: | clean-depends: | ||||
@for dir in $$(${CLEAN-DEPENDS-LIST}); do \ | @for dir in $$(${CLEAN-DEPENDS-LIST}); do \ | ||||
(cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ | (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ | ||||
done | done | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
.if !target(fetch-required) | .if !target(fetch-required) | ||||
fetch-required: fetch | fetch-required: fetch | ||||
.if defined(NO_DEPENDS) | .if defined(NO_DEPENDS) | ||||
@${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" | @${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" | ||||
.else | .else | ||||
@${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" | @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" | ||||
.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN | .for deptype in PKG EXTRACT PATCH FETCH BUILD RUN | ||||
.if defined(${deptype}_DEPENDS) | .if defined(${deptype}_DEPENDS) | ||||
@targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} | @targ=fetch; deps="${${deptype}_DEPENDS_ALL}"; ${FETCH_LIST} | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if !target(fetch-required-list) | .if !target(fetch-required-list) | ||||
fetch-required-list: fetch-list | fetch-required-list: fetch-list | ||||
.if !defined(NO_DEPENDS) | .if !defined(NO_DEPENDS) | ||||
.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN | .for deptype in PKG EXTRACT PATCH FETCH BUILD RUN | ||||
.if defined(${deptype}_DEPENDS) | .if defined(${deptype}_DEPENDS) | ||||
@targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} | @targ=fetch-list; deps="${${deptype}_DEPENDS_ALL}"; ${FETCH_LIST} | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if !target(checksum-recursive) | .if !target(checksum-recursive) | ||||
checksum-recursive: | checksum-recursive: | ||||
@${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" | @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" | ||||
Show All 22 Lines | |||||
# Package (recursive runtime) dependency list. Print out both directory names | # Package (recursive runtime) dependency list. Print out both directory names | ||||
# and package names. | # and package names. | ||||
package-depends-list: | package-depends-list: | ||||
.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) | .if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) | ||||
@${PACKAGE-DEPENDS-LIST} | @${PACKAGE-DEPENDS-LIST} | ||||
.endif | .endif | ||||
_LIB_RUN_DEPENDS= ${LIB_DEPENDS} ${RUN_DEPENDS} | _LIB_RUN_DEPENDS= ${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL} | ||||
PACKAGE-DEPENDS-LIST?= \ | PACKAGE-DEPENDS-LIST?= \ | ||||
if [ "${CHILD_DEPENDS}" ]; then \ | if [ "${CHILD_DEPENDS}" ]; then \ | ||||
installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ | installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ | ||||
${TRUE}); \ | ${TRUE}); \ | ||||
if [ "$$installed" ]; then \ | if [ "$$installed" ]; then \ | ||||
break; \ | break; \ | ||||
fi; \ | fi; \ | ||||
if [ -z "$$installed" ]; then \ | if [ -z "$$installed" ]; then \ | ||||
Show All 30 Lines | if [ -d $$dir ]; then \ | ||||
shift 3; \ | shift 3; \ | ||||
done; \ | done; \ | ||||
checked="$$dir $$childdir $$checked"; \ | checked="$$dir $$childdir $$checked"; \ | ||||
else \ | else \ | ||||
${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ | ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ | ||||
fi; \ | fi; \ | ||||
done | done | ||||
ACTUAL-PACKAGE-DEPENDS?= \ | # FIXME: SELF_DEPENDS can only be used to depend on sub packages whose package | ||||
# name has not been overrided by the framework, otherwise the assumption made | |||||
# bellow that the package name is "PKGBASE-$$self" is broken. | |||||
.for p in ${_PKGS} | |||||
ACTUAL-PACKAGE-DEPENDS${_P.${p}}?= \ | |||||
depfiles="" ; \ | depfiles="" ; \ | ||||
for lib in ${LIB_DEPENDS:C/\:.*//}; do \ | for lib in ${LIB_DEPENDS${_P.${p}}:C/\:.*//}; do \ | ||||
depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ | depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ | ||||
done ; \ | done ; \ | ||||
${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} | for self in ${SELF_DEPENDS${_P.${p}}}; do \ | ||||
if [ "$$self" = "main" ]; then \ | |||||
printf "\"%s\": {origin: \"%s\", version: \"%s\"}\n" ${PKGBASE} ${PKGORIGIN} ${PKGVERSION}; \ | |||||
else \ | |||||
printf "\"%s-%s\": {origin: \"%s\", version: \"%s\"}\n" ${PKGBASE} $$self ${PKGORIGIN} ${PKGVERSION}; \ | |||||
fi ; \ | |||||
done ; \ | |||||
${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS${_P.${p}}:C/(.*)\:.*/"\1"/} | |||||
.endfor | |||||
PKG_NOTES_ENV?= | PKG_NOTES_ENV?= | ||||
.for note in ${PKG_NOTES} | .for note in ${PKG_NOTES} | ||||
PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} | PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} | ||||
.endfor | .endfor | ||||
create-manifest: | .for p in ${_PKGS} | ||||
create-manifest: create-manifest.${p} | |||||
create-manifest.${p}: | |||||
@${SETENV} \ | @${SETENV} \ | ||||
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ | dp_SCRIPTSDIR='${SCRIPTSDIR}' \ | ||||
dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ | dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS${_P.${p}}}' \ | ||||
dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ | dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ | ||||
dp_COMMENT=${COMMENT:Q} \ | dp_COMMENT=${COMMENT${_P.${p}}:Q} \ | ||||
dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ | dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ | ||||
dp_DEPRECATED=${DEPRECATED:Q} \ | dp_DEPRECATED=${DEPRECATED:Q} \ | ||||
dp_DESCR='${DESCR}' \ | dp_DESCR='${DESCR${_P.${p}}}' \ | ||||
dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ | dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ | ||||
dp_GROUPS='${GROUPS:u:S/$/,/}' \ | dp_GROUPS='${GROUPS:u:S/$/,/}' \ | ||||
dp_LICENSE='${LICENSE:u:S/$/,/}' \ | dp_LICENSE='${LICENSE:u:S/$/,/}' \ | ||||
dp_LICENSE_COMB='${LICENSE_COMB}' \ | dp_LICENSE_COMB='${LICENSE_COMB}' \ | ||||
dp_MAINTAINER='${MAINTAINER}' \ | dp_MAINTAINER='${MAINTAINER}' \ | ||||
dp_METADIR='${METADIR}' \ | dp_METADIR='${METADIR}.${p}' \ | ||||
dp_NO_ARCH='${NO_ARCH}' \ | dp_NO_ARCH='${NO_ARCH}' \ | ||||
dp_PKGBASE='${PKGBASE}' \ | dp_PKGBASE='${p}' \ | ||||
dp_PKGDEINSTALL='${PKGDEINSTALL}' \ | dp_PKGDEINSTALL='${PKGDEINSTALL${_P.${p}}}' \ | ||||
dp_PKGINSTALL='${PKGINSTALL}' \ | dp_PKGINSTALL='${PKGINSTALL${_P.${p}}}' \ | ||||
dp_PKGMESSAGES='${_PKGMESSAGES}' \ | dp_PKGMESSAGES='${_PKGMESSAGES${_P.${p}}}' \ | ||||
dp_PKGORIGIN='${PKGORIGIN}' \ | dp_PKGORIGIN='${PKGORIGIN}' \ | ||||
dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ | dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL${_P.${p}}}' \ | ||||
dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ | dp_PKGPOSTINSTALL='${PKGPOSTINSTALL${_P.${p}}}' \ | ||||
dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE}' \ | dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE${_P.${p}}}' \ | ||||
dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ | dp_PKGPREDEINSTALL='${PKGPREDEINSTALL${_P.${p}}}' \ | ||||
dp_PKGPREINSTALL='${PKGPREINSTALL}' \ | dp_PKGPREINSTALL='${PKGPREINSTALL${_P.${p}}}' \ | ||||
dp_PKGPREUPGRADE='${PKGPREUPGRADE}' \ | dp_PKGPREUPGRADE='${PKGPREUPGRADE${_P.${p}}}' \ | ||||
dp_PKGUPGRADE='${PKGUPGRADE}' \ | dp_PKGUPGRADE='${PKGUPGRADE${_P.${p}}}' \ | ||||
dp_PKGVERSION='${PKGVERSION}' \ | dp_PKGVERSION='${PKGVERSION}' \ | ||||
dp_PKG_BIN='${PKG_BIN}' \ | dp_PKG_BIN='${PKG_BIN}' \ | ||||
dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ | dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ | ||||
dp_PKG_NOTES='${PKG_NOTES}' \ | dp_PKG_NOTES='${PKG_NOTES}' \ | ||||
dp_PORT_OPTIONS='${PORT_OPTIONS}' \ | dp_PORT_OPTIONS='${PORT_OPTIONS}' \ | ||||
dp_PREFIX='${PREFIX}' \ | dp_PREFIX='${PREFIX}' \ | ||||
dp_USERS='${USERS:u:S/$/,/}' \ | dp_USERS='${USERS:u:S/$/,/}' \ | ||||
dp_WWW='${WWW}' \ | dp_WWW='${WWW}' \ | ||||
${PKG_NOTES_ENV} \ | ${PKG_NOTES_ENV} \ | ||||
${SH} ${SCRIPTSDIR}/create-manifest.sh | ${SH} ${SCRIPTSDIR}/create-manifest.sh | ||||
.endfor | |||||
# Print out package names. | # Print out package names. | ||||
package-depends: | package-depends: | ||||
@${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' | @${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' | ||||
actual-package-depends: | .for p in ${_PKGS} | ||||
@${ACTUAL-PACKAGE-DEPENDS} | actual-package-depends${_P.${p}}: | ||||
@${ACTUAL-PACKAGE-DEPENDS${_P.${p}}} | |||||
.endfor | |||||
# Build packages for port and dependencies | # Build packages for port and dependencies | ||||
package-recursive: package | package-recursive: package | ||||
@recursive_cmd="package-noinstall"; \ | @recursive_cmd="package-noinstall"; \ | ||||
recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ | recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ | ||||
${_FLAVOR_RECURSIVE_SH} | ${_FLAVOR_RECURSIVE_SH} | ||||
# Show missing dependencies | # Show missing dependencies | ||||
Show All 28 Lines | |||||
# distribution-name|port-path|installation-prefix|comment| \ | # distribution-name|port-path|installation-prefix|comment| \ | ||||
# description-file|maintainer|categories|extract-depends| \ | # description-file|maintainer|categories|extract-depends| \ | ||||
# patch-depends|fetch-depends|build-depends|run-depends|www site | # patch-depends|fetch-depends|build-depends|run-depends|www site | ||||
# | # | ||||
# If this ever changes, portmgr should contact the portsnap maintainer | # If this ever changes, portmgr should contact the portsnap maintainer | ||||
# first to avoid gratuitous breakage. | # first to avoid gratuitous breakage. | ||||
. if !target(describe) | . if !target(describe) | ||||
_EXTRACT_DEPENDS=${EXTRACT_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | _EXTRACT_DEPENDS=${EXTRACT_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | ||||
_PATCH_DEPENDS=${PATCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | _PATCH_DEPENDS=${PATCH_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | ||||
_FETCH_DEPENDS=${FETCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | _FETCH_DEPENDS=${FETCH_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | ||||
_LIB_DEPENDS=${LIB_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | _LIB_DEPENDS=${LIB_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} | ||||
_BUILD_DEPENDS=${BUILD_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} | _BUILD_DEPENDS=${BUILD_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} | ||||
_RUN_DEPENDS=${RUN_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} | _RUN_DEPENDS=${RUN_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} | ||||
. if exists(${DESCR}) | . if exists(${DESCR}) | ||||
_DESCR=${DESCR} | _DESCR=${DESCR} | ||||
. else | . else | ||||
_DESCR=/dev/null | _DESCR=/dev/null | ||||
. endif | . endif | ||||
. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) | . if defined(BUILDING_INDEX) && defined(INDEX_PORTS) | ||||
INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr | INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
generate-plist: ${WRKDIR} | generate-plist: ${WRKDIR} | ||||
@${ECHO_MSG} "===> Generating temporary packing list" | @${ECHO_MSG} "===> Generating temporary packing list" | ||||
@${MKDIR} ${TMPPLIST:H} | @${MKDIR} ${TMPPLIST:H} | ||||
@if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi | @if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi | ||||
@>${TMPPLIST} | @>${TMPPLIST} | ||||
@for file in ${PLIST_FILES}; do \ | @for file in ${PLIST_FILES}; do \ | ||||
${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ | ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ | ||||
done | done | ||||
.for p in ${_PKGS:[2..-1]} | |||||
@for file in ${PLIST_FILES${_P.${p}}}; do \ | |||||
${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's/^/@@${_P.${p}:S/^.//}@@/' >> ${TMPPLIST}; \ | |||||
done | |||||
.endfor | |||||
.if !empty(PLIST) | .if !empty(PLIST) | ||||
.for f in ${PLIST} | .for f in ${PLIST} | ||||
@if [ -f "${f}" ]; then \ | @if [ -f "${f}" ]; then \ | ||||
${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${f} >> ${TMPPLIST}; \ | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${f} >> ${TMPPLIST}; \ | ||||
fi | fi | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
.for dir in ${PLIST_DIRS} | .for dir in ${PLIST_DIRS} | ||||
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} | @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} | ||||
.endfor | .endfor | ||||
.for p in ${_PKGS:[2..-1]} | |||||
.for dir in ${PLIST_DIRS${_P.${p}}} | |||||
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@@${_P.${p}:S/^.//}@@@dir ,' >> ${TMPPLIST} | |||||
.endfor | |||||
.endfor | |||||
.endif | .endif | ||||
${TMPPLIST}: | ${TMPPLIST}: | ||||
@cd ${.CURDIR} && ${MAKE} generate-plist | @cd ${.CURDIR} && ${MAKE} generate-plist | ||||
.for _type in EXAMPLES DOCS | .for _type in EXAMPLES DOCS | ||||
.if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) | .if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) | ||||
.if !target(add-plist-${_type:tl}) | .if !target(add-plist-${_type:tl}) | ||||
▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | stage-qa: | ||||
@${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh | @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh | ||||
.if !defined(DEVELOPER) | .if !defined(DEVELOPER) | ||||
@${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" | @${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" | ||||
.endif | .endif | ||||
.endif | .endif | ||||
pretty-flavors-package-names: .PHONY | pretty-flavors-package-names: .PHONY | ||||
.if empty(FLAVORS) | .if empty(FLAVORS) | ||||
@${ECHO_CMD} "no flavor: ${PKGNAME}" | @${ECHO_CMD} "no flavor: ${_PKGS}" | ||||
.else | .else | ||||
.for f in ${FLAVORS} | .for f in ${FLAVORS} | ||||
@${ECHO_CMD} -n "${f}: " | @${ECHO_CMD} -n "${f}: " | ||||
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME | @cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V _PKGS | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
flavors-package-names: .PHONY | flavors-package-names: .PHONY | ||||
.if empty(FLAVORS) | .if empty(FLAVORS) | ||||
@${ECHO_CMD} "${PKGNAME}" | @${ECHO_CMD} "${_PKGS}" | ||||
.else | .else | ||||
.for f in ${FLAVORS} | .for f in ${FLAVORS} | ||||
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME | @cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V _PKGS | ${XARGS} -n 1 | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
# Fake installation of package so that user can pkg delete it later. | # Fake installation of package so that user can pkg delete it later. | ||||
.if !target(fake-pkg) | .if !target(fake-pkg) | ||||
STAGE_ARGS= -i ${STAGEDIR} | STAGE_ARGS= -i ${STAGEDIR} | ||||
.if !defined(NO_PKG_REGISTER) | .if !defined(NO_PKG_REGISTER) | ||||
fake-pkg: | . for p in ${_PKGS} | ||||
fake-pkg: fake-pkg.${p} | |||||
fake-pkg.${p}: ${_PLIST}.${p} ${METADIR}.${p} | |||||
.if defined(INSTALLS_DEPENDS) | .if defined(INSTALLS_DEPENDS) | ||||
@${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" | @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" | ||||
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} | @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR}.${p} -f ${_PLIST}.${p} | ||||
.else | .else | ||||
@${ECHO_MSG} "===> Registering installation for ${PKGNAME}" | @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" | ||||
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} | @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR}.${p} -f ${_PLIST}.${p} | ||||
.endif | .endif | ||||
@${RM} -r ${METADIR} | @${RM} -r ${METADIR.${p}} | ||||
.endfor | |||||
.endif | .endif | ||||
.endif | .endif # !target(fake-pkg) | ||||
# Depend is generally meaningless for arbitrary ports, but if someone wants | # Depend is generally meaningless for arbitrary ports, but if someone wants | ||||
# one they can override this. This is just to catch people who've gotten into | # one they can override this. This is just to catch people who've gotten into | ||||
# the habit of typing `make depend all install' as a matter of course. | # the habit of typing `make depend all install' as a matter of course. | ||||
# Same goes for tags | # Same goes for tags | ||||
.for _t in depend tags | .for _t in depend tags | ||||
.if !target(${_t}) | .if !target(${_t}) | ||||
${_t}: | ${_t}: | ||||
▲ Show 20 Lines • Show All 705 Lines • Show Last 20 Lines |
^ flavors sounds wrong here.