From f47e469ec0ff102ab844d5197778181834f9673c Mon Sep 17 00:00:00 2001
From: Jim Dishaw <jim@dishaw.org>
Date: Sat, 7 Mar 2015 17:11:49 -0500
Subject: [PATCH] Updated build instructions for Mac OS X

---
 doc/docbook/src/os_notes.xml | 52 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/doc/docbook/src/os_notes.xml b/doc/docbook/src/os_notes.xml
index cc8dbf7..5265898 100644
--- a/doc/docbook/src/os_notes.xml
+++ b/doc/docbook/src/os_notes.xml
@@ -100,4 +100,56 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     </sect2>
 
   </sect1>
+
+  <sect1 id="macosx-notes">
+    <title>Mac OS X Notes</title>
+    <para>
+      PLplot has been tested with Mac OS X 10.8 and 10.9 using the
+      Apple LLVM version 6.0 compiler provided by XCode 6.1.1.  CMake
+      must be installed in order to build PLplot and version 3.1.3
+      from MacPorts has been tested.
+    </para>
+    <para>
+      If language bindings (e.g. Python) are needed, PLplot has been
+      tested with the ports from MacPorts.  When using MacPorts, there
+      is a secondary dependency that occurs if SWIG is installed.  For
+      example, if python is installed from MacPorts, swig-python must
+      also be installed.
+    </para>
+    <para>
+      If both XQuartz and the xorg-libX11 port is installed, CMake may
+      fail to configure PLplot correctly and the build will fail.  If
+      this occurs, use the following CMake command string.
+      <programlisting>
+	cmake -DX11_X11_LIB=/opt/X11/lib/libX11.dylib \
+	  -DX11_X11_INCLUDE_PATH=/opt/X11/include -DENABLE_tk=OFF \
+	  &lt;path-to-source-tree&gt; &gt;&amp; cmake.out
+      </programlisting>
+    </para>
+    <sect2>
+      <title>Mac OS X Configure and Build</title>
+      <para>
+	The build process for Mac OS X follows the same basic steps
+	used Linux and Unix platforms.  
+      </para>
+      <para>
+	The following steps will configure and build PLplot on Mac OS
+	X that do not have the XQuartz and xorg-libX11 conflict.
+	<programlisting>
+	  # Note many other cmake options are available besides -DCMAKE_INSTALL_PREFIX
+	  # Inspect CMakeCache.txt after a preliminary cmake run to see an annotated
+	  # list of the available options.  Then remove CMakeCache.txt and try again.
+	  cmake -DCMAKE_INSTALL_PREFIX=&lt;install-prefix&gt; \
+	  &lt;path-to-source-tree&gt; &gt;&amp; cmake.out
+	  make &gt;&amp; make.out
+	  #(optional, requires -DBUILD_TEST=ON option for cmake)
+	  ctest &gt;&amp; ctest.out
+	  make install &gt;&amp; make_install.out
+	  cd &lt;install-prefix&gt;/share/plplot&lt;version&gt;/examples/
+	  make &gt;&amp; make_examples.out
+	  ./plplot-test.sh &gt;&amp; plplot-test.sh.out
+	</programlisting>
+      </para>
+    </sect2>
+  </sect1>
 </chapter>
-- 
1.9.3 (Apple Git-50)

