--- spkg/base/sage-spkg~ 2009-02-21 20:38:33.000000000 +1100 +++ spkg/base/sage-spkg 2009-03-01 07:51:32.465298061 +1100 @@ -205,6 +205,14 @@ fi fi +if [ -f "$SAGE_PACKAGES/patches/$PKG_NAME.patch" ]; then + echo "Applying local patches for $PKG_NAME" + if ! patch -p0 < "$SAGE_PACKAGES/patches/$PKG_NAME.patch"; then + echo "Patching failed" + exit 1 + fi +fi + cd "$PKG_NAME" if [ ! -f spkg-install ]; then echo "#!/usr/bin/env bash" > spkg-install