So, that's all to make the linked SPKG work:

diff -u --recursive cunningham_tables-2.2-old/spkg-install cunningham_tables-2.2/spkg-install
--- cunningham_tables-2.2-old/spkg-install 2009-10-17 22:46:12.000000000 +0200
+++ cunningham_tables-2.2/spkg-install 2014-02-21 09:42:48.599254970 +0100
@@ -1,4 +1,4 @@
#!/bin/sh
-rm -rf $SAGE_DATA/cunningham_tables
-cp -r src/cunningham_tables $SAGE_DATA/cunningham_tables
+rm -rf $SAGE_SHARE/cunningham_tables
+cp -r src/cunningham_tables $SAGE_SHARE/cunningham_tables

Now to figure out what the actual patch should look like.