Split out header/PTHREAD_LIBS fixups into post-patch, otherwise the

latter prevents the patching of nearby parts of files.  This fixes
patching on 4.x.
This commit is contained in:
Kris Kennaway 2004-03-22 00:25:55 +00:00
parent f9a72273af
commit 13f820fab3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=104877
2 changed files with 12 additions and 4 deletions

View File

@ -37,11 +37,15 @@ PLIST_SUB+= WITH_PATESTS=""
pre-patch:
# replace \r\n with \n
# replace <malloc.h> with <stdlib.h>
@${FIND} ${WRKSRC} -type f \
| ${XARGS} -x -n 10 \
${REINPLACE_CMD} -E \
-e 's| ||' \
-e 's| ||'
post-patch:
# replace obsolete headers, and fix up thread library
@${FIND} ${WRKSRC} -type f \
| ${XARGS} -x -n 10 \
${REINPLACE_CMD} -E \
-e 's|malloc.h|stdlib.h|' \
-e 's|machine\/soundcard.h|sys\/soundcard.h|' \
-e 's|-lpthread|${PTHREAD_LIBS}|'

View File

@ -37,11 +37,15 @@ PLIST_SUB+= WITH_PATESTS=""
pre-patch:
# replace \r\n with \n
# replace <malloc.h> with <stdlib.h>
@${FIND} ${WRKSRC} -type f \
| ${XARGS} -x -n 10 \
${REINPLACE_CMD} -E \
-e 's| ||' \
-e 's| ||'
post-patch:
# replace obsolete headers, and fix up thread library
@${FIND} ${WRKSRC} -type f \
| ${XARGS} -x -n 10 \
${REINPLACE_CMD} -E \
-e 's|malloc.h|stdlib.h|' \
-e 's|machine\/soundcard.h|sys\/soundcard.h|' \
-e 's|-lpthread|${PTHREAD_LIBS}|'