Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/bsd.port.mk
Show First 20 Lines • Show All 515 Lines • ▼ Show 20 Lines | |||||
# Default: ${PORTSDIR}/packages | # Default: ${PORTSDIR}/packages | ||||
# WRKDIRPREFIX - The place to root the temporary working directory | # WRKDIRPREFIX - The place to root the temporary working directory | ||||
# hierarchy. | # hierarchy. | ||||
# Default: none | # Default: none | ||||
# WRKDIR - A temporary working directory that gets *clobbered* on clean | # WRKDIR - A temporary working directory that gets *clobbered* on clean | ||||
# Default: ${WRKDIRPREFIX}${.CURDIR}/work | # Default: ${WRKDIRPREFIX}${.CURDIR}/work | ||||
# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually | # WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually | ||||
# unpacks to. | # unpacks to. | ||||
# Default: ${WRKDIR}/${DISTNAME} unless NO_WRKSUBDIR is set, | # Default: ${WRKDIR}/${DISTNAME} | ||||
# in which case simply ${WRKDIR} | |||||
# WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually | # WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually | ||||
# builds in. | # builds in. | ||||
# Default: not set | # Default: not set | ||||
# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. | # NO_WRKSUBDIR - Assume port unpacks without a subdirectory, and extract it in | ||||
# ${WRKSRC} instead of ${WRKDIR}. | |||||
# PATCHDIR - A directory containing any additional patches you made | # PATCHDIR - A directory containing any additional patches you made | ||||
# to port this software to FreeBSD. | # to port this software to FreeBSD. | ||||
# Default: ${MASTERDIR}/files | # Default: ${MASTERDIR}/files | ||||
# SCRIPTDIR - A directory containing any auxiliary scripts | # SCRIPTDIR - A directory containing any auxiliary scripts | ||||
# Default: ${MASTERDIR}/scripts | # Default: ${MASTERDIR}/scripts | ||||
# FILESDIR - A directory containing any miscellaneous additional files. | # FILESDIR - A directory containing any miscellaneous additional files. | ||||
# Default: ${MASTERDIR}/files | # Default: ${MASTERDIR}/files | ||||
# PKGDIR - A directory containing any package creation files. | # PKGDIR - A directory containing any package creation files. | ||||
▲ Show 20 Lines • Show All 1,034 Lines • ▼ Show 20 Lines | MAKE_ENV+= NM=${NM} \ | ||||
PKG_CONFIG_SYSROOT_DIR="${X_SYSROOT}" | PKG_CONFIG_SYSROOT_DIR="${X_SYSROOT}" | ||||
CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${X_SYSROOT}" | CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${X_SYSROOT}" | ||||
.endif | .endif | ||||
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work | WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work | ||||
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) | .if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) | ||||
WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} | WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} | ||||
.endif | .endif | ||||
# If the distname is not extracting into a specific subdirectory, have the | |||||
# ports framework force extract into a subdirectory so that metadata files | |||||
# do not get in the way of the build, and vice-versa. | |||||
.if defined(NO_WRKSUBDIR) | .if defined(NO_WRKSUBDIR) | ||||
WRKSRC?= ${WRKDIR} | # Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, | ||||
# the rc file will conflict with WRKSRC, as WRKSRC is artificial, make it the | |||||
# most unlikely to conflict as we can. | |||||
WRKSRC?= ${WRKDIR}/${PKGNAME} | |||||
EXTRACT_WRKDIR:= ${WRKSRC} | |||||
.else | .else | ||||
WRKSRC?= ${WRKDIR}/${DISTNAME} | WRKSRC?= ${WRKDIR}/${DISTNAME} | ||||
EXTRACT_WRKDIR:= ${WRKDIR} | |||||
.endif | .endif | ||||
.if defined(WRKSRC_SUBDIR) | .if defined(WRKSRC_SUBDIR) | ||||
WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} | WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} | ||||
.endif | .endif | ||||
PATCH_WRKSRC?= ${WRKSRC} | PATCH_WRKSRC?= ${WRKSRC} | ||||
CONFIGURE_WRKSRC?= ${WRKSRC} | CONFIGURE_WRKSRC?= ${WRKSRC} | ||||
BUILD_WRKSRC?= ${WRKSRC} | BUILD_WRKSRC?= ${WRKSRC} | ||||
▲ Show 20 Lines • Show All 1,425 Lines • ▼ Show 20 Lines | .if defined(GNOME_OPTION_MSG) && (!defined(PACKAGE_BUILDING) || !defined(BATCH)) | ||||
done | done | ||||
.else | .else | ||||
@${DO_NADA} | @${DO_NADA} | ||||
.endif | .endif | ||||
.if defined(_OPTIONS_READ) | .if defined(_OPTIONS_READ) | ||||
@${ECHO_MSG} "===> Found saved configuration for ${_OPTIONS_READ}" | @${ECHO_MSG} "===> Found saved configuration for ${_OPTIONS_READ}" | ||||
.endif | .endif | ||||
${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${WRKSRC}: | ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} ${WRKSRC}: | ||||
@${MKDIR} ${.TARGET} | @${MKDIR} ${.TARGET} | ||||
# Warn user about deprecated packages. Advisory only. | # Warn user about deprecated packages. Advisory only. | ||||
.if !target(check-deprecated) | .if !target(check-deprecated) | ||||
check-deprecated: | check-deprecated: | ||||
.if defined(DEPRECATED) | .if defined(DEPRECATED) | ||||
@${ECHO_MSG} "===> NOTICE:" | @${ECHO_MSG} "===> NOTICE:" | ||||
▲ Show 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | |||||
# Extract | # Extract | ||||
clean-wrkdir: | clean-wrkdir: | ||||
@${RM} -rf ${WRKDIR} | @${RM} -rf ${WRKDIR} | ||||
.if !target(do-extract) | .if !target(do-extract) | ||||
do-extract: | do-extract: | ||||
@for file in ${EXTRACT_ONLY}; do \ | @for file in ${EXTRACT_ONLY}; do \ | ||||
if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ | if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ | ||||
then \ | then \ | ||||
exit 1; \ | exit 1; \ | ||||
fi; \ | fi; \ | ||||
done | done | ||||
@if [ ${UID} = 0 ]; then \ | @if [ ${UID} = 0 ]; then \ | ||||
${CHMOD} -R ug-s ${WRKDIR}; \ | ${CHMOD} -R ug-s ${WRKDIR}; \ | ||||
${CHOWN} -R 0:0 ${WRKDIR}; \ | ${CHOWN} -R 0:0 ${WRKDIR}; \ | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 2,423 Lines • ▼ Show 20 Lines | |||||
_PKG_SEQ= 500:pkg-depends | _PKG_SEQ= 500:pkg-depends | ||||
_FETCH_DEP= pkg | _FETCH_DEP= pkg | ||||
_FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ | _FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ | ||||
500:do-fetch 550:fetch-specials 700:post-fetch \ | 500:do-fetch 550:fetch-specials 700:post-fetch \ | ||||
850:post-fetch-script \ | 850:post-fetch-script \ | ||||
${_OPTIONS_fetch} ${_USES_fetch} | ${_OPTIONS_fetch} ${_USES_fetch} | ||||
_EXTRACT_DEP= fetch | _EXTRACT_DEP= fetch | ||||
_EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ | _EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ | ||||
150:extract-depends 190:clean-wrkdir 200:${WRKDIR} \ | 150:extract-depends 190:clean-wrkdir 200:${EXTRACT_WRKDIR} \ | ||||
300:pre-extract 450:pre-extract-script 500:do-extract \ | 300:pre-extract 450:pre-extract-script 500:do-extract \ | ||||
700:post-extract 850:post-extract-script \ | 700:post-extract 850:post-extract-script \ | ||||
${_OPTIONS_extract} ${_USES_extract} | ${_OPTIONS_extract} ${_USES_extract} | ||||
_PATCH_DEP= extract | _PATCH_DEP= extract | ||||
_PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ | _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ | ||||
300:pre-patch 450:pre-patch-script 500:do-patch \ | 300:pre-patch 450:pre-patch-script 500:do-patch \ | ||||
700:post-patch 850:post-patch-script \ | 700:post-patch 850:post-patch-script \ | ||||
${_OPTIONS_patch} ${_USES_patch} | ${_OPTIONS_patch} ${_USES_patch} | ||||
▲ Show 20 Lines • Show All 155 Lines • Show Last 20 Lines |