summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/unladen-swallow/files')
-rw-r--r--dev-lang/unladen-swallow/files/fix-destdir-install.patch13
-rw-r--r--dev-lang/unladen-swallow/files/install-version.patch58
-rw-r--r--dev-lang/unladen-swallow/files/install-version2.patch72
3 files changed, 143 insertions, 0 deletions
diff --git a/dev-lang/unladen-swallow/files/fix-destdir-install.patch b/dev-lang/unladen-swallow/files/fix-destdir-install.patch
new file mode 100644
index 0000000..ba7e00c
--- /dev/null
+++ b/dev-lang/unladen-swallow/files/fix-destdir-install.patch
@@ -0,0 +1,13 @@
+Index: Makefile.pre.in
+===================================================================
+--- Makefile.pre.in (revision 1060)
++++ Makefile.pre.in (working copy)
+@@ -1094,7 +1094,7 @@
+ fi; \
+ fi
+ @if test @BUILD_LLVM@ != disabled ; then \
+- $(INSTALL_DATA) $(BCLIBRARY) $(DESTSHARED); \
++ $(INSTALL_DATA) $(BCLIBRARY) $(DESTDIR)$(DESTSHARED); \
+ fi
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
+ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
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*/
+ ])
+
diff --git a/dev-lang/unladen-swallow/files/install-version2.patch b/dev-lang/unladen-swallow/files/install-version2.patch
new file mode 100644
index 0000000..b0b457d
--- /dev/null
+++ b/dev-lang/unladen-swallow/files/install-version2.patch
@@ -0,0 +1,72 @@
+diff -urN Lib/distutils/command/build.py Lib/distutils/command/build.py
+--- Lib/distutils/command/build.py 2010-02-04 21:32:01.000000000 -0800
++++ Lib/distutils/command/build.py 2010-02-04 22:49:25.000000000 -0800
+@@ -83,7 +83,7 @@
+ "--plat-name only supported on Windows (try "
+ "using './configure --help' on your platform)")
+
+- plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
++ plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3] + "-unladen")
+
+ # Make it so Python 2.x and Python 2.x with --with-pydebug don't
+ # share the same build directories. Doing so confuses the build
+diff -urN Lib/distutils/command/build_ext.py Lib/distutils/command/build_ext.py
+--- Lib/distutils/command/build_ext.py 2010-02-04 21:32:01.000000000 -0800
++++ Lib/distutils/command/build_ext.py 2010-02-04 22:49:25.000000000 -0800
+@@ -758,9 +758,9 @@
+ else:
+ from distutils import sysconfig
+ if sysconfig.get_config_var('Py_ENABLE_SHARED'):
+- template = "python%d.%d"
++ template = "python%s"
+ pythonlib = (template %
+- (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
++ (sys.version[0:3] + "-unladen",))
+ return ext.libraries + [pythonlib]
+ else:
+ return ext.libraries
+diff -urN Lib/distutils/sysconfig.py Lib/distutils/sysconfig.py
+--- Lib/distutils/sysconfig.py 2010-02-04 21:32:01.000000000 -0800
++++ Lib/distutils/sysconfig.py 2010-02-04 22:49:26.000000000 -0800
+@@ -52,7 +52,7 @@
+ leaving off the patchlevel. Sample return values could be '1.5'
+ or '2.2'.
+ """
+- return sys.version[:3]
++ return sys.version[:3] + "-unladen"
+
+
+ def get_python_inc(plat_specific=0, prefix=None):
+diff -urN Lib/site.py Lib/site.py
+--- Lib/site.py 2010-02-04 21:31:58.000000000 -0800
++++ Lib/site.py 2010-02-04 22:49:32.000000000 -0800
+@@ -252,7 +252,7 @@
+ else:
+ USER_BASE = env_base if env_base else joinuser("~", ".local")
+ USER_SITE = os.path.join(USER_BASE, "lib",
+- "python" + sys.version[:3],
++ "python" + sys.version[:3] + "-unladen",
+ "site-packages")
+
+ if ENABLE_USER_SITE and os.path.isdir(USER_SITE):
+@@ -274,7 +274,7 @@
+ sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
+ elif os.sep == '/':
+ sitedirs.append(os.path.join(prefix, "lib",
+- "python" + sys.version[:3],
++ "python" + sys.version[:3] + "-unladen",
+ "site-packages"))
+ sitedirs.append(os.path.join(prefix, "lib", "site-python"))
+ else:
+diff -urN setup.py setup.py
+--- setup.py 2010-01-15 01:09:04.000000000 -0800
++++ setup.py 2010-02-05 01:19:44.656255205 -0800
+@@ -22,7 +22,7 @@
+
+ def record_build_dir():
+ """Record the relative path to the build diretory for site.py."""
+- build_dir = "build/lib.%s-%.3s" % (get_platform(), sys.version)
++ build_dir = "build/lib.%s-%.3s-unladen" % (get_platform(), sys.version)
+
+ build_dir_file = os.path.join(os.path.dirname(sys.executable), "build_dir")
+ f = open(build_dir_file, "w")