From 6e44e1b23f1450d3dce31d5cd50432bb89e6dfae Mon Sep 17 00:00:00 2001
From: Pietro Cerutti <gahr@FreeBSD.org>
Date: Thu, 14 Feb 2013 14:35:54 +0000
Subject: [PATCH] - Modify the 12.11 Threading Libraries chapter to reflect the
 recent dismission   of PTHREAD_CFLAGS and PTHREAD_LIBS

Reviewed by:	eadler, bcr
Approved by:	bcr
---
 .../books/porters-handbook/book.xml           | 26 +++++++------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/en_US.ISO8859-1/books/porters-handbook/book.xml b/en_US.ISO8859-1/books/porters-handbook/book.xml
index 9a4aba12b5..789a37146f 100644
--- a/en_US.ISO8859-1/books/porters-handbook/book.xml
+++ b/en_US.ISO8859-1/books/porters-handbook/book.xml
@@ -787,8 +787,7 @@ PLIST_DIRS=	lib/X11/oneko</programlisting>
 	variable value.  Example:</para>
 
       <programlisting>post-patch:
-	@${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|for Linux|for FreeBSD|g' ${WRKSRC}/README</programlisting>
 
       <para>Quite often, there is a situation when the software being
 	ported, especially if it is primarily developed on &windows;,
@@ -16171,25 +16170,18 @@ exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@"</programlisting>
       <title>Threading Libraries</title>
 
       <para>The threading library must be linked to the binaries using
-	a special linker flag <literal>-pthread</literal> on &os;.  If
+	a special flag <literal>-pthread</literal> on &os;.  If
 	a port insists on linking <literal>-lpthread</literal>
-	directly, patch it to use
-	<makevar>PTHREAD_LIBS</makevar> variable provided by the ports
-	framework.  This variable usually has the value of
-	<literal>-pthread</literal>, but on certain architectures and
-	&os; versions it can have different values, so do not just
-	hardcode <literal>-pthread</literal> into patches and always
-	use <makevar>PTHREAD_LIBS</makevar>.</para>
+	directly, patch it to use <literal>-pthread</literal>.</para>
 
       <note>
 	<para>If building the port errors out with
-	  <literal>unrecognized option '-pthread'</literal> when
-	  setting <makevar>PTHREAD_LIBS</makevar>, it may be desirable
-	  to use <command>cc</command> as linker by setting
-	  <makevar>CONFIGURE_ENV</makevar> to
-	  <literal>LD=${CC}</literal>.  The
-	  <literal>-pthread</literal> option is not supported by
-	  <command>ld</command> directly.</para>
+	<literal>unrecognized option '-pthread'</literal>,
+	it may be desirable to use <command>cc</command> as linker by
+	setting <makevar>CONFIGURE_ENV</makevar> to
+	<literal>LD=${CC}</literal>.  The
+	<literal>-pthread</literal> option is not supported by
+	<command>ld</command> directly.</para>
       </note>
     </sect1>