diff --git a/en_US.ISO8859-1/books/porters-handbook/book.xml b/en_US.ISO8859-1/books/porters-handbook/book.xml index 90b743f2b4..8836d26ccb 100644 --- a/en_US.ISO8859-1/books/porters-handbook/book.xml +++ b/en_US.ISO8859-1/books/porters-handbook/book.xml @@ -11,7 +11,6 @@ --> FreeBSD Porter's Handbook - The FreeBSD Documentation Project @@ -827,11 +826,11 @@ PLIST_DIRS= lib/X11/oneko further patching, compiler warnings, scripts execution (e.g., /bin/sh^M not found.) To quickly convert all files from CR/LF to just LF, add - USE_DOS2UNIX=yes to the port + USES=dos2unix to the port Makefile. A list of files to convert can be specified: - USE_DOS2UNIX= util.c util.h + DOS2UNIX_FILES= util.c util.h If you want to convert a group of files across subdirectories, DOS2UNIX_REGEX can be used. @@ -841,8 +840,15 @@ PLIST_DIRS= lib/X11/oneko extension, for example all source code files leaving binary files intact: - USE_DOS2UNIX= yes -DOS2UNIX_REGEX= .*\.(c|cpp|h) + USES= dos2unix +DOS2UNIX_REGEX= .*\.([ch]|cpp) + + A similar option is DOS2UNIX_GLOB, which + invokes find for each element listed in + it. + + USES= dos2unix +DOS2UNIX_GLOB= *.c *.cpp *.h If you want to create a patch file based off of an existing file, you can copy it with an diff --git a/en_US.ISO8859-1/books/porters-handbook/uses.xml b/en_US.ISO8859-1/books/porters-handbook/uses.xml index 3d263d22ce..22dee83e00 100644 --- a/en_US.ISO8859-1/books/porters-handbook/uses.xml +++ b/en_US.ISO8859-1/books/porters-handbook/uses.xml @@ -73,6 +73,24 @@ package install or removal. + + dos2unix + (none) + + The port has files with line endings in DOS format which need + to be converted. Three variables can be set to control which files + will be converted. The default is to convert + all files, including binaries. + + DOS2UNIX_REGEX: match file + names based on a regular expression. + DOS2UNIX_FILES: match literal + file names. + DOS2UNIX_GLOB: match file + names based on a glob pattern. + + + fuse (none)