FreeBSD Bugzilla – Attachment 124718 Details for
Bug 168222
[bsd.port.mk] [patch] Allowing to specify per-file PATCH_DIST_STRIP in PATCHFILES
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 4.25 KB, created by
Akinori MUSHA
on 2012-05-22 09:50:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Akinori MUSHA
Created:
2012-05-22 09:50:02 UTC
Size:
4.25 KB
patch
obsolete
>--- bsd.port.mk.~1.708.~ 2012-03-14 07:49:12.000000000 +0900 >+++ bsd.port.mk 2012-05-22 17:03:26.436896195 +0900 >@@ -109,6 +109,9 @@ > # patches. Make will look for them at PATCH_SITES (see below). > # They will automatically be uncompressed before patching if > # the names end with ".gz", ".bz2" or ".Z". >+# For each file you can optionally specify a strip >+# flag of patch(1) after a colon if it has a different >+# base directory, e.g. "file1 file2:-p1 file3". > # Default: not set. > # PATCH_SITES - Primary location(s) for distribution patch files > # if not found locally. >@@ -2706,9 +2709,12 @@ > .endfor > _G_TEMP= DEFAULT > .for _P in ${PATCHFILES} >-_P_TEMP= ${_P:S/^${_P:C/:[^:]+$//}//} >-. if !empty(_P_TEMP) >-. for _group in ${_P_TEMP:S/^://:S/,/ /g} >+_P_TEMP= ${_P:C/:[^-:][^:]*$//} >+_P_groups= ${_P:S/^${_P:C/:[^:]+$//}//:S/^://} >+_P_file= ${_P_TEMP:C/:-[^:]+$//} >+_P_strip= ${_P_TEMP:S/^${_P_TEMP:C/:-[^:]*$//}//:S/^://} >+. if !empty(_P_groups) >+. for _group in ${_P_groups:S/,/ /g} > . if !defined(_PATCH_SITES_${_group}) > _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} > . if empty(_G_TEMP_TEMP) >@@ -2717,11 +2723,15 @@ > . endif > . endif > . endfor >-_PATCHFILES+= ${_P:C/:[^:]+$//} >-. else >-_PATCHFILES+= ${_P} >+. endif >+_PATCHFILES:= ${_PATCHFILES} ${_P_file} >+. if !empty(_P_strip) >+_PATCH_DIST_STRIP_CASES:= ${_PATCH_DIST_STRIP_CASES} ("${_P_file}") printf %s "${_P_strip}" ;; > . endif > .endfor >+_P_groups= >+_P_file= >+_P_strip= > _G_TEMP= > _G_TEMP_TEMP= > ALLFILES?= ${_DISTFILES} ${_PATCHFILES} >@@ -2790,7 +2800,7 @@ > .endfor > _PATCH_SITES_ENV= _PATCH_SITES_DEFAULT="${_PATCH_SITES_DEFAULT}" > .for _F in ${PATCHFILES} >-_F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} >+_F_TEMP= ${_F:S/^${_F:C/:[^-:][^:]*$//}//:S/^://} > . if !empty(_F_TEMP) > . for _group in ${_F_TEMP:S/,/ /g} > . if defined(_PATCH_SITES_${_group}) >@@ -3508,8 +3518,9 @@ > @cd ${_DISTDIR};\ > ${_PATCH_SITES_ENV} ; \ > for _file in ${PATCHFILES}; do \ >- file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ >+ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^-:][^:]*$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ >+ file=`${ECHO_CMD} $$file | ${SED} -E -e 's/:-[^:]+$$//'` ; \ > force_fetch=false; \ > filebasename=$${file##*/}; \ > for afile in ${FORCE_FETCH}; do \ >@@ -3611,21 +3622,26 @@ > .if defined(PATCHFILES) > @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" > @(cd ${_DISTDIR}; \ >+ patch_dist_strip () { \ >+ case "$$1" in \ >+ ${_PATCH_DIST_STRIP_CASES} \ >+ esac; \ >+ }; \ > for i in ${_PATCHFILES}; do \ > if [ ${PATCH_DEBUG_TMP} = yes ]; then \ > ${ECHO_MSG} "===> Applying distribution patch $$i" ; \ > fi; \ > case $$i in \ > *.Z|*.gz) \ >- ${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ >+ ${GZCAT} $$i; \ > ;; \ > *.bz2) \ >- ${BZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ >+ ${BZCAT} $$i; \ > ;; \ > *) \ >- ${PATCH} ${PATCH_DIST_ARGS} < $$i; \ >+ ${CAT} $$i; \ > ;; \ >- esac; \ >+ esac | ${PATCH} ${PATCH_DIST_ARGS} `patch_dist_strip $$i`; \ > done) > .endif > .if defined(EXTRA_PATCHES) >@@ -4652,8 +4668,9 @@ > @(cd ${_DISTDIR}; \ > ${_PATCH_SITES_ENV} ; \ > for _file in ${PATCHFILES}; do \ >- file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ >+ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^-:][^:]*$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ >+ file=`${ECHO_CMD} $$file | ${SED} -E -e 's/:-[^:]+$$//'` ; \ > if [ ! -f $$file -a ! -f $${file##*/} ]; then \ > if [ ! -z "$$select" ] ; then \ > __PATCH_SITES_TMP= ; \ >@@ -4720,9 +4737,10 @@ > @(cd ${_DISTDIR}; \ > ${_PATCH_SITES_ENV} ; \ > for _file in ${PATCHFILES}; do \ >- file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ >- fileptn=`${ECHO_CMD} $$file | ${SED} 's|/|\\\\/|g;s/\./\\\\./g;s/\+/\\\\+/g;s/\?/\\\\?/g'` ; \ >+ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^-:][^:]*$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ >+ file=`${ECHO_CMD} $$file | ${SED} -E -e 's/:-[^:]+$$//'` ; \ >+ fileptn=`${ECHO_CMD} $$file | ${SED} 's|/|\\\\/|g;s/\./\\\\./g;s/\+/\\\\+/g;s/\?/\\\\?/g'` ; \ > if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f $${file##*/} ]; then \ > if [ ! -z "$$select" ] ; then \ > __PATCH_SITES_TMP= ; \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 168222
: 124718