From 36b6ad22429d0934b4ffe1a7e01e2a8d92fff666 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 8 Feb 2014 18:57:04 -0800 Subject: [PATCH] started patch docs. --- lib/spack/docs/packaging_guide.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index d9483fb2a4..c815c97dd7 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -794,6 +794,28 @@ fork a new process each time we invoke ``install()``. This allows packages to have their own completely sandboxed build environment, without impacting other jobs that the main Spack process runs. +.. _patching: + +Patches +------------------------------------------ + +Depending on the host architecture, package version, known bugs, or +other issues, you may need to patch your software to get it to build +correctly. Like many other package systems, spack allows you to store +patches alongside your package files and apply them to source code +after it's downloaded. + +``patch`` +~~~~~~~~~~~~~~~~~~~~~ + +You can specif patches in your package file with the ``patch()`` +function. ``patch`` looks like this:: + +.. literalinclude:: ../spack/packages/mvapich2/__init__.py + :end-before: def install + + + .. _install-method: Implementing the ``install`` method