Update to reflect today infrastructure update:

- USE_REINPLACE is now always assumed
- USE_DOS2UNIX to handle CRLFs
- @dirrmtry instead of @unexec rmdir
- BROKEN strings no longer quoted
This commit is contained in:
Pav Lucistnik 2006-01-21 20:06:05 +00:00
parent 8deeb9d1e4
commit 658f98ef78
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=26915

View file

@ -683,9 +683,7 @@ PLIST_DIRS= lib/X11/oneko</programlisting>
&man.sed.1;. This is very useful when you need to patch in &man.sed.1;. This is very useful when you need to patch in
a variable value. Example:</para> a variable value. Example:</para>
<programlisting>USE_REINPLACE= yes <programlisting>post-patch:
post-patch:
@${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README
@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' ${WRKSRC}/configure</programlisting> @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' ${WRKSRC}/configure</programlisting>
@ -694,19 +692,12 @@ post-patch:
the CR/LF convention for most of its source files. This may cause the CR/LF convention for most of its source files. This may cause
problems with further patching, compiler warnings, scripts problems with further patching, compiler warnings, scripts
execution (<command>/bin/sh^M</command> not found), etc. To execution (<command>/bin/sh^M</command> not found), etc. To
quickly convert those files from CR/LF to just LF, you can do quickly convert all files from CR/LF to just LF, add
something like this:</para> <literal>USE_DOS2UNIX=yes</literal> to the port
<filename>Makefile</filename>. A list of files to convert can
be specified:</para>
<programlisting>USE_REINPLACE= yes <programlisting>USE_DOS2UNIX= util.c util.h</programlisting>
post-extract:
@${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|cpp|h|txt)" -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//'</programlisting>
<para>Of course, if you need to process each and every file,
<option>-iregex</option> above can be omitted. Be aware that this
piece of code will strip all trailing control characters from each
line of processed file (except <literal>\n</literal>).</para>
</sect1> </sect1>
<sect1 id="slow-configure"> <sect1 id="slow-configure">
@ -6038,14 +6029,14 @@ lib/X11/oneko/sounds/cat.au
<para>However, sometimes <literal>@dirrm</literal> will give you <para>However, sometimes <literal>@dirrm</literal> will give you
errors because other ports share the same directory. You errors because other ports share the same directory. You
can call <command>rmdir</command> from <literal>@unexec</literal> to can use <literal>@dirrmtry</literal> to
remove only empty directories without warning.</para> remove only empty directories without warning.</para>
<programlisting>@unexec rmdir %D/share/doc/gimp 2>/dev/null || true</programlisting> <programlisting>@dirrmtry share/doc/gimp</programlisting>
<para>This will neither print any error messages nor cause <para>This will neither print any error messages nor cause
&man.pkg.delete.1; to exit abnormally even if &man.pkg.delete.1; to exit abnormally even if
<filename><makevar>PREFIX</makevar>/share/doc/gimp</filename> is not <filename><makevar>${PREFIX}</makevar>/share/doc/gimp</filename> is not
empty due to other ports installing some files in there.</para> empty due to other ports installing some files in there.</para>
</sect2> </sect2>
@ -9655,17 +9646,12 @@ bacula:*:910:</programlisting>
<sect2 id="dads-noinstall-notes"> <sect2 id="dads-noinstall-notes">
<title>Implementation Notes</title> <title>Implementation Notes</title>
<para>Due to vagaries in the usage of <makevar>IGNORECMD</makevar> <para>The strings should not be quoted.
in <filename>bsd.port.mk</filename> among other places, Also, the wording of the string should be somewhat
the value of <makevar>BROKEN</makevar> should be enclosed
in quotes, and the value of <makevar>IGNORE</makevar> should
not be enclosed in quotes.</para>
<para>Also, the wording of the string should be somewhat
different due to the way the information is shown to the different due to the way the information is shown to the
user. Examples:</para> user. Examples:</para>
<programlisting>BROKEN= "this port is unsupported on FreeBSD 5.x"</programlisting> <programlisting>BROKEN= this port is unsupported on FreeBSD 5.x</programlisting>
<programlisting>IGNORE= is unsupported on FreeBSD 5.x</programlisting> <programlisting>IGNORE= is unsupported on FreeBSD 5.x</programlisting>