Date: Thu, 6 Feb 2014 17:47:54 +0000 (UTC) From: Warren Block <wblock@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43810 - head/en_US.ISO8859-1/books/porters-handbook Message-ID: <201402061747.s16HlsmN047591@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wblock Date: Thu Feb 6 17:47:54 2014 New Revision: 43810 URL: http://svnweb.freebsd.org/changeset/doc/43810 Log: Whitespace-only fixes, translators please ignore. Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/book.xml Thu Feb 6 17:44:01 2014 (r43809) +++ head/en_US.ISO8859-1/books/porters-handbook/book.xml Thu Feb 6 17:47:54 2014 (r43810) @@ -763,8 +763,7 @@ PLIST_DIRS= lib/X11/oneko</programlistin <screen>&prompt.user; <userinput>cp <replaceable>file</replaceable> <replaceable>file</replaceable>.orig</userinput></screen> - <para>Patches are - saved into files named + <para>Patches are saved into files named <filename>patch-*</filename> where <replaceable>*</replaceable> indicates the pathname of the file that is patched, such as @@ -785,18 +784,17 @@ PLIST_DIRS= lib/X11/oneko</programlistin <screen>&prompt.user; <userinput>diff -u -N <replaceable>newfile</replaceable>.orig <replaceable>newfile</replaceable> > patch-<replaceable>pathname-newfile</replaceable></userinput></screen> - <para>Patch files are - stored in <varname>PATCHDIR</varname> (usually - <filename class="directory">files/</filename>, from where they will be - automatically applied. All patches must be relative to - <varname>WRKSRC</varname> (generally the directory the port's - tarball unpacks itself into, that being where the build is - done). To make fixes and upgrades easier, avoid + <para>Patch files are stored in <varname>PATCHDIR</varname> + (usually <filename class="directory">files/</filename>, from + where they will be automatically applied. All patches must be + relative to <varname>WRKSRC</varname> (generally the directory + the port's tarball unpacks itself into, that being where the + build is done). To make fixes and upgrades easier, avoid having more than one patch fix the same file (that is, <filename>patch-file</filename> and <filename>patch-file2</filename> both changing - <filename>WRKSRC/foobar.c</filename>). - Note that if the path of a patched file contains an underscore + <filename>WRKSRC/foobar.c</filename>). Note that if the path + of a patched file contains an underscore (<literal>_</literal>) character, the patch needs to have two underscores instead in its name. For example, to patch a file named <filename>src/freeglut_joystick.c</filename>, the @@ -804,18 +802,19 @@ PLIST_DIRS= lib/X11/oneko</programlistin <filename>patch-src-freeglut__joystick.c</filename>.</para> <para>Please only use characters - <literal>[-+._a-zA-Z0-9]</literal> for naming patches. - Do not use any other characters besides them. Do not name - patches like <filename>patch-aa</filename> or + <literal>[-+._a-zA-Z0-9]</literal> for naming patches. Do not + use any other characters besides them. Do not name patches + like <filename>patch-aa</filename> or <filename>patch-ab</filename>, always mention the path and file name in patch names.</para> - <para>There is an alternate, easier method for creating patches to existing files. - The first steps are the same, make a copy of the unmodified file with an - <filename>.orig</filename> extension, then make modifications. - Then use <command>make makepatch</command> - to write updated patch files to the - <filename>files</filename> directory of the port.</para> + <para>There is an alternate, easier method for creating patches + to existing files. The first steps are the same, make a copy + of the unmodified file with an <filename>.orig</filename> + extension, then make modifications. Then use + <command>make makepatch</command> to write updated patch files + to the <filename>files</filename> directory of the + port.</para> <para>Do not put RCS strings in patches. <application>Subversion</application> will mangle them when we @@ -838,21 +837,20 @@ PLIST_DIRS= lib/X11/oneko</programlistin <command>autoconf</command> to regenerate <command>configure</command>, do not take the diffs of <command>configure</command> (it often grows to a few thousand - lines!). Instead, define <literal>USE_AUTOTOOLS=autoconf:261</literal> - and take the diffs of - <filename>configure.in</filename>.</para> - - <para>Try to minimize the amount of non-functional - whitespace changes in patches. It is common in the Open - Source world for projects to share large amounts of a code - base, but obey different style and indenting rules. When - taking a working piece of functionality from one project to fix - similar areas in another, please be careful: the resulting - line patch may be full of non-functional changes. It not only - increases the size of the - <application>Subversion</application> repository but makes it - hard to find out what exactly caused the problem and what was - changed at all.</para> + lines!). Instead, define + <literal>USE_AUTOTOOLS=autoconf:261</literal> and take the + diffs of <filename>configure.in</filename>.</para> + + <para>Try to minimize the amount of non-functional whitespace + changes in patches. It is common in the Open Source world for + projects to share large amounts of a code base, but obey + different style and indenting rules. When taking a working + piece of functionality from one project to fix similar areas + in another, please be careful: the resulting line patch may be + full of non-functional changes. It not only increases the + size of the <application>Subversion</application> repository + but makes it hard to find out what exactly caused the problem + and what was changed at all.</para> <para>If a file must be deleted, do it in the <buildtarget>post-extract</buildtarget> target rather than as @@ -860,7 +858,8 @@ PLIST_DIRS= lib/X11/oneko</programlistin <para>Simple replacements can be performed directly from the port <filename>Makefile</filename> using the in-place mode of - &man.sed.1;. This is useful when changes use the value of a variable:</para> + &man.sed.1;. This is useful when changes use the value of a + variable:</para> <programlisting>post-patch: @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README</programlisting> @@ -869,8 +868,7 @@ PLIST_DIRS= lib/X11/oneko</programlistin convention in source files. This may cause problems with further patching, compiler warnings, or script execution (like <literal>/bin/sh^M not found</literal>.) To quickly convert - all files from CR/LF to just LF, add this entry - to the port + all files from CR/LF to just LF, add this entry to the port <filename>Makefile</filename>:</para> <programlisting>USES= dos2unix</programlisting> @@ -882,12 +880,12 @@ PLIST_DIRS= lib/X11/oneko</programlistin DOS2UNIX_FILES= util.c util.h</programlisting> <para>Use <varname>DOS2UNIX_REGEX</varname> to convert a group - of files across subdirectories. - Its argument is a &man.find.1;-compatible regular - expression. More on the format is in &man.re.format.7;. This - option is useful for converting all files of a given - extension. For example, convert all source code files, leaving binary - files intact:</para> + of files across subdirectories. Its argument is a + &man.find.1;-compatible regular expression. More on the + format is in &man.re.format.7;. This option is useful for + converting all files of a given extension. For example, + convert all source code files, leaving binary files + intact:</para> <programlisting>USES= dos2unix DOS2UNIX_REGEX= .*\.([ch]|cpp)</programlisting>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402061747.s16HlsmN047591>