aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2011-09-21 20:07:34 -0500
committerJack Nagel2011-09-21 20:12:44 -0500
commit546fda9255474f07f09898ba58eb6c5b47a5dedd (patch)
treefd2b62b6d3541d40c3bbd22f90d680bf3b55db9c
parent88859958d8afe8450459790adbbc9c57bd576c7c (diff)
downloadhomebrew-546fda9255474f07f09898ba58eb6c5b47a5dedd.tar.bz2
Add gdbm patches to python and python3 formulae
This takes care of the issue described here (recognizing gdbm 1.9.x databases): http://www.gossamer-threads.com/lists/python/bugs/942749 The patches are already in their respective upstream repositories, so they will presumably be included in the next Python 2.7.x and 3.2.x releases. Closes #7738. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Formula/python.rb18
-rw-r--r--Library/Formula/python3.rb18
2 files changed, 36 insertions, 0 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index 8f91d998d..57bd1cc03 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -31,6 +31,12 @@ class Python < Formula
]
end
+ def patches
+ # fix for recognizing gdbm 1.9.x databases
+ # patch is already upstream: http://hg.python.org/cpython/rev/14cafb8d1480
+ DATA
+ end
+
# Skip binaries so modules will load; skip lib because it is mostly Python files
skip_clean ['bin', 'lib']
@@ -156,3 +162,15 @@ class Python < Formula
HOMEBREW_PREFIX+"share/python"
end
end
+
+__END__
+diff --git a/Lib/whichdb.py b/Lib/whichdb.py
+--- a/Lib/whichdb.py
++++ b/Lib/whichdb.py
+@@ -91,7 +91,7 @@ def whichdb(filename):
+ return ""
+
+ # Check for GNU dbm
+- if magic == 0x13579ace:
++ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
+ return "gdbm"
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index 9b1ab6d76..5e65373e7 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -38,6 +38,12 @@ class Python3 < Formula
# Skip binaries so modules will load; skip lib because it is mostly Python files
skip_clean ['bin', 'lib']
+ def patches
+ # fix for recognizing gdbm 1.9.x databases
+ # patch is already upstream: http://hg.python.org/cpython/rev/7a41855b6196
+ DATA
+ end
+
# The Cellar location of site-packages
# This location is different for Framework builds
def site_packages
@@ -159,3 +165,15 @@ class Python3 < Formula
HOMEBREW_PREFIX+"share/python3"
end
end
+
+__END__
+diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py
+--- a/Lib/dbm/__init__.py
++++ b/Lib/dbm/__init__.py
+@@ -166,7 +166,7 @@ def whichdb(filename):
+ return ""
+
+ # Check for GNU dbm
+- if magic == 0x13579ace:
++ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
+ return "dbm.gnu"