Lines 749-754
FreeBSD_MAINTAINER= portmgr@FreeBSD.org
Link Here
|
749 |
# The patches specified by this variable will be |
749 |
# The patches specified by this variable will be |
750 |
# applied after the normal distribution patches but |
750 |
# applied after the normal distribution patches but |
751 |
# before those in ${PATCHDIR}. |
751 |
# before those in ${PATCHDIR}. |
|
|
752 |
# EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches |
753 |
# Points to a directory hierarchy with the same layout |
754 |
# as the ports tree, where local patches can be found. |
755 |
# This allows a third party to keep their patches in |
756 |
# some other source control system if needed. |
752 |
# PATCH_WRKSRC - Directory to apply patches in. |
757 |
# PATCH_WRKSRC - Directory to apply patches in. |
753 |
# Default: ${WRKSRC} |
758 |
# Default: ${WRKSRC} |
754 |
# |
759 |
# |
Lines 1993-2004
PATCH_STRIP?= -p0
Link Here
|
1993 |
PATCH_DIST_STRIP?= -p0 |
1998 |
PATCH_DIST_STRIP?= -p0 |
1994 |
.if defined(PATCH_DEBUG) |
1999 |
.if defined(PATCH_DEBUG) |
1995 |
PATCH_DEBUG_TMP= yes |
2000 |
PATCH_DEBUG_TMP= yes |
1996 |
PATCH_ARGS?= -d ${PATCH_WRKSRC} -E ${PATCH_STRIP} |
2001 |
PATCH_ARGS?= -E ${PATCH_STRIP} |
1997 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} -d ${PATCH_WRKSRC} -E ${PATCH_DIST_STRIP} |
2002 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} -E ${PATCH_DIST_STRIP} |
1998 |
.else |
2003 |
.else |
1999 |
PATCH_DEBUG_TMP= no |
2004 |
PATCH_ARGS?= --forward --quiet -E ${PATCH_STRIP} |
2000 |
PATCH_ARGS?= -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_STRIP} |
2005 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward --quiet -E ${PATCH_DIST_STRIP} |
2001 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} |
|
|
2002 |
.endif |
2006 |
.endif |
2003 |
.if !defined(QUIET) |
2007 |
.if !defined(QUIET) |
2004 |
PATCH_SILENT= PATCH_SILENT=yes |
2008 |
PATCH_SILENT= PATCH_SILENT=yes |
Lines 2010-2015
PATCH_DIST_ARGS+= --batch
Link Here
|
2010 |
|
2014 |
|
2011 |
# Prevent breakage with VERSION_CONTROL=numbered |
2015 |
# Prevent breakage with VERSION_CONTROL=numbered |
2012 |
PATCH_ARGS+= -V simple |
2016 |
PATCH_ARGS+= -V simple |
|
|
2017 |
PATCH_DIST_ARGS+= -V simple |
2013 |
|
2018 |
|
2014 |
.if defined(PATCH_CHECK_ONLY) |
2019 |
.if defined(PATCH_CHECK_ONLY) |
2015 |
PATCH_ARGS+= -C |
2020 |
PATCH_ARGS+= -C |
Lines 2372-2379
_PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}}
Link Here
|
2372 |
. endfor |
2377 |
. endfor |
2373 |
. endif |
2378 |
. endif |
2374 |
_PATCHFILES:= ${_PATCHFILES} ${_P_file} |
2379 |
_PATCHFILES:= ${_PATCHFILES} ${_P_file} |
2375 |
. if !empty(_P_strip) |
2380 |
. if empty(_P_strip) |
2376 |
_PATCH_DIST_STRIP_CASES:= ${_PATCH_DIST_STRIP_CASES} ("${_P_file}") printf %s "${_P_strip}" ;; |
2381 |
_PATCHFILES2:= ${_PATCHFILES2} ${_P_file} |
|
|
2382 |
. else |
2383 |
_PATCHFILES2:= ${_PATCHFILES2} ${_P_file}:${_P_strip} |
2377 |
. endif |
2384 |
. endif |
2378 |
.endfor |
2385 |
.endfor |
2379 |
_P_groups= |
2386 |
_P_groups= |
Lines 3076-3148
do-extract:
Link Here
|
3076 |
|
3083 |
|
3077 |
.if !target(do-patch) |
3084 |
.if !target(do-patch) |
3078 |
do-patch: |
3085 |
do-patch: |
3079 |
.if defined(PATCHFILES) |
3086 |
@${SETENV} \ |
3080 |
@${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" |
3087 |
dp_BZCAT="${BZCAT}" \ |
3081 |
@(set -e; \ |
3088 |
dp_CAT="${CAT}" \ |
3082 |
cd ${_DISTDIR}; \ |
3089 |
dp_DISTDIR="${_DISTDIR}" \ |
3083 |
patch_dist_strip () { \ |
3090 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3084 |
case "$$1" in \ |
3091 |
dp_EXTRA_PATCHES="${EXTRA_PATCHES}" \ |
3085 |
${_PATCH_DIST_STRIP_CASES} \ |
3092 |
dp_EXTRA_PATCH_TREE="${EXTRA_PATCH_TREE}" \ |
3086 |
esac; \ |
3093 |
dp_GZCAT="${GZCAT}" \ |
3087 |
}; \ |
3094 |
dp_OPSYS="${OPSYS}" \ |
3088 |
for i in ${_PATCHFILES}; do \ |
3095 |
dp_PATCH="${PATCH}" \ |
3089 |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
3096 |
dp_PATCHDIR="${PATCHDIR}" \ |
3090 |
${ECHO_MSG} "===> Applying distribution patch $$i" ; \ |
3097 |
dp_PATCHFILES="${_PATCHFILES2}" \ |
3091 |
fi ; \ |
3098 |
dp_PATCH_ARGS=${PATCH_ARGS:Q} \ |
3092 |
case $$i in \ |
3099 |
dp_PATCH_DEBUG_TMP="${PATCH_DEBUG_TMP}" \ |
3093 |
*.Z|*.gz) ${GZCAT} $$i ;; \ |
3100 |
dp_PATCH_DIST_ARGS="${PATCH_DIST_ARGS}" \ |
3094 |
*.bz2) ${BZCAT} $$i ;; \ |
3101 |
dp_PATCH_SILENT="${PATCH_SILENT}" \ |
3095 |
*.xz) ${XZCAT} $$i ;; \ |
3102 |
dp_PATCH_WRKSRC=${PATCH_WRKSRC} \ |
3096 |
*.zip) ${UNZIP_NATIVE_CMD} -p $$i ;; \ |
3103 |
dp_PKGNAME="${PKGNAME}" \ |
3097 |
*) ${CAT} $$i ;; \ |
3104 |
dp_PKGORIGIN="${PKGORIGIN}" \ |
3098 |
esac | ${PATCH} ${PATCH_DIST_ARGS} `patch_dist_strip $$i` ; \ |
3105 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3099 |
done ) |
3106 |
dp_UNZIP_NATIVE_CMD="${UNZIP_NATIVE_CMD}" \ |
3100 |
.endif |
3107 |
dp_XZCAT="${XZCAT}" \ |
3101 |
.if defined(EXTRA_PATCHES) |
3108 |
${SH} ${SCRIPTSDIR}/do-patch.sh |
3102 |
@set -e ; \ |
|
|
3103 |
for i in ${EXTRA_PATCHES}; do \ |
3104 |
case $$i in \ |
3105 |
*:-p[0-9]) patch_file=$${i%:*} ; patch_strip=$${i##*:} ;; \ |
3106 |
*) patch_file=$$i ;; \ |
3107 |
esac ; \ |
3108 |
${ECHO_MSG} "===> Applying extra patch $$patch_file" ; \ |
3109 |
case $$patch_file in \ |
3110 |
*.Z|*.gz) ${GZCAT} $$patch_file ;; \ |
3111 |
*.bz2) ${BZCAT} $$patch_file ;; \ |
3112 |
*.xz) ${XZCAT} $$patch_file ;; \ |
3113 |
*.zip) ${UNZIP_NATIVE_CMD} -p $$patch_file ;; \ |
3114 |
*) ${CAT} $$patch_file ;; \ |
3115 |
esac | ${PATCH} ${PATCH_ARGS} $$patch_strip ; \ |
3116 |
done |
3117 |
.endif |
3118 |
@set -e ;\ |
3119 |
if [ -d ${PATCHDIR} ]; then \ |
3120 |
if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \ |
3121 |
${ECHO_MSG} "===> Applying ${OPSYS} patches for ${PKGNAME}" ; \ |
3122 |
PATCHES_APPLIED="" ; \ |
3123 |
for i in ${PATCHDIR}/patch-*; do \ |
3124 |
case $$i in \ |
3125 |
*.orig|*.rej|*~|*,v) \ |
3126 |
${ECHO_MSG} "===> Ignoring patchfile $$i" ; \ |
3127 |
;; \ |
3128 |
*) \ |
3129 |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
3130 |
${ECHO_MSG} "===> Applying ${OPSYS} patch $$i" ; \ |
3131 |
fi; \ |
3132 |
if ${PATCH} ${PATCH_ARGS} < $$i ; then \ |
3133 |
PATCHES_APPLIED="$$PATCHES_APPLIED $$i" ; \ |
3134 |
else \ |
3135 |
${ECHO_MSG} `${ECHO_CMD} "=> Patch $$i failed to apply cleanly." | ${SED} "s|${PATCHDIR}/||"` ; \ |
3136 |
if [ x"$$PATCHES_APPLIED" != x"" -a ${PATCH_SILENT} != "yes" ]; then \ |
3137 |
${ECHO_MSG} `${ECHO_CMD} "=> Patch(es) $$PATCHES_APPLIED applied cleanly." | ${SED} "s|${PATCHDIR}/||g"` ; \ |
3138 |
fi; \ |
3139 |
${FALSE} ; \ |
3140 |
fi; \ |
3141 |
;; \ |
3142 |
esac; \ |
3143 |
done; \ |
3144 |
fi; \ |
3145 |
fi |
3146 |
.endif |
3109 |
.endif |
3147 |
|
3110 |
|
3148 |
.if !target(run-autotools-fixup) |
3111 |
.if !target(run-autotools-fixup) |