summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/unladen-swallow/files/install-version.patch')
-rw-r--r--dev-lang/unladen-swallow/files/install-version.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-lang/unladen-swallow/files/install-version.patch b/dev-lang/unladen-swallow/files/install-version.patch
new file mode 100644
index 0000000..dbedc84
--- /dev/null
+++ b/dev-lang/unladen-swallow/files/install-version.patch
@@ -0,0 +1,58 @@
+Index: Python/global_llvm_data.cc
+===================================================================
+--- Python/global_llvm_data.cc (revision 1060)
++++ Python/global_llvm_data.cc (working copy)
+@@ -64,17 +64,21 @@
+ #define STRINGIFY(X) STRINGIFY2(X)
+ #define STRINGIFY2(X) #X
+ // The basename of the bitcode file holding the standard library.
++#ifdef PYTHON_INSTALL_VERSION
++#define Py_BC_VERSION_COMPONENT PYTHON_INSTALL_VERSION
++#else
++#define Py_BC_VERSION_COMPONENT STRINGIFY(PY_MAJOR_VERSION) \
++ STRINGIFY(PY_MINOR_VERSION)
++#endif
++
+ #ifdef MS_WINDOWS
+ #ifdef Py_DEBUG
+-#define LIBPYTHON_BC "python" STRINGIFY(PY_MAJOR_VERSION) \
+- STRINGIFY(PY_MINOR_VERSION) "_d.bc"
++#define LIBPYTHON_BC "python" Py_BC_VERSION_COMPONENT "_d.bc"
+ #else
+-#define LIBPYTHON_BC "python" STRINGIFY(PY_MAJOR_VERSION) \
+- STRINGIFY(PY_MINOR_VERSION) ".bc"
++#define LIBPYTHON_BC "python" Py_BC_VERSION_COMPONENT ".bc"
+ #endif
+ #else
+-#define LIBPYTHON_BC "libpython" STRINGIFY(PY_MAJOR_VERSION) "." \
+- STRINGIFY(PY_MINOR_VERSION) ".bc"
++#define LIBPYTHON_BC "libpython" Py_BC_VERSION_COMPONENT ".bc"
+ #endif
+
+ // Searches for the bitcode file holding the Python standard library.
+Index: configure.in
+===================================================================
+--- configure.in (revision 1060)
++++ configure.in (working copy)
+@@ -4,11 +4,12 @@
+ dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.61).
+
+ # Set VERSION so we only need to edit in one place (i.e., here)
+-m4_define(PYTHON_VERSION, 2.6)
++m4_define(PYTHON_VERSION, 2.6-unladen)
+
+ AC_REVISION($Revision: 75132 $)
+ AC_PREREQ(2.61)
+ AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
++AC_DEFINE(PYTHON_INSTALL_VERSION, "2.6-unladen")
+ AC_CONFIG_SRCDIR([Include/object.h])
+ AC_CONFIG_HEADER(pyconfig.h)
+
+@@ -24,6 +25,7 @@
+ #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
+ #endif
+
++#define PYTHON_INSTALL_VERSION PYTHON_INSTALL_VERSION
+ #endif /*Py_PYCONFIG_H*/
+ ])
+