Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148867710
D5607.id14233.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5607.id14233.diff
View Options
Index: head/Mk/Uses/dos2unix.mk
===================================================================
--- head/Mk/Uses/dos2unix.mk
+++ head/Mk/Uses/dos2unix.mk
@@ -5,6 +5,7 @@
# DOS2UNIX_REGEX a regular expression to match files that needs to be converted
# DOS2UNIX_FILES list of files of glob pattern relative to ${WRKSRC}
# DOS2UNIX_GLOB list of glob pattern find(1) will match with
+# DOS2UNIX_WRKSRC top-level path for directory traversal instead of ${WRKSRC}
#
# MAINTAINER: portmgr@FreeBSD.org
@@ -15,22 +16,24 @@
_DOS2UNIX_ALL= yes
.endif
+DOS2UNIX_WRKSRC?= ${WRKSRC}
+
_USES_patch+= 200:dos2unix
dos2unix:
@${ECHO_MSG} "===> Converting DOS text files to UNIX text files"
.if defined(_DOS2UNIX_ALL)
- @${FIND} ${WRKSRC} -type f -print0 | \
+ @${FIND} ${DOS2UNIX_WRKSRC} -type f -print0 | \
${XARGS} -0 ${SED} -i '' -e 's/ $$//'
.else
.if defined(DOS2UNIX_FILES)
- @(cd ${WRKSRC}; \
+ @(cd ${DOS2UNIX_WRKSRC}; \
${ECHO_CMD} ${DOS2UNIX_FILES} | ${XARGS} ${SED} -i '' -e 's/ $$//' )
.elif defined(DOS2UNIX_REGEX)
- @${FIND} -E ${WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \
+ @${FIND} -E ${DOS2UNIX_WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \
${XARGS} -0 ${SED} -i '' -e 's/ $$//'
.else
.for f in ${DOS2UNIX_GLOB}
- @${FIND} ${WRKSRC} -type f -name '${f}' -print0 | \
+ @${FIND} ${DOS2UNIX_WRKSRC} -type f -name '${f}' -print0 | \
${XARGS} -0 ${SED} -i '' -e 's/ $$//'
.endfor
.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 21, 3:48 PM (17 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30057818
Default Alt Text
D5607.id14233.diff (1 KB)
Attached To
Mode
D5607: Allow overriding WRKSRC for USES=dos2unix
Attached
Detach File
Event Timeline
Log In to Comment