summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/packaging_guide.rst22
1 files changed, 22 insertions, 0 deletions
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