summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-12-20 22:12:42 +0100
committerMichał Górny <mgorny@gentoo.org>2015-12-20 22:13:24 +0100
commitfd32d95f547b668b9d8fdddf36b35ce35a7edc77 (patch)
tree55f82fa3d47f56404b1b880a0ab267565e5ef0e9 /dev-python/pypy3/files
parentdev-python/pypy: Add a live ebuild (diff)
downloadgentoo-fd32d95f547b668b9d8fdddf36b35ce35a7edc77.tar.gz
gentoo-fd32d95f547b668b9d8fdddf36b35ce35a7edc77.tar.bz2
gentoo-fd32d95f547b668b9d8fdddf36b35ce35a7edc77.zip
dev-python/pypy3: Add a live ebuild
Diffstat (limited to 'dev-python/pypy3/files')
-rw-r--r--dev-python/pypy3/files/2.5.0-shared-lib.patch12
-rw-r--r--dev-python/pypy3/files/4.0.0-gentoo-path.patch50
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-python/pypy3/files/2.5.0-shared-lib.patch b/dev-python/pypy3/files/2.5.0-shared-lib.patch
new file mode 100644
index 000000000000..ddd74730f3dd
--- /dev/null
+++ b/dev-python/pypy3/files/2.5.0-shared-lib.patch
@@ -0,0 +1,12 @@
+diff -ur pypy-2.5.0-src.orig/rpython/translator/platform/posix.py pypy-2.5.0-src/rpython/translator/platform/posix.py
+--- rpython/translator/platform/posix.py 2015-02-03 05:12:49.000000000 +0800
++++ rpython/translator/platform/posix.py 2015-03-22 07:36:01.420116684 +0800
+@@ -183,7 +183,7 @@
+ 'int main(int argc, char* argv[]) '
+ '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@')
+ m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'],
+- '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)')
++ '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@')
+
+ return m
+
diff --git a/dev-python/pypy3/files/4.0.0-gentoo-path.patch b/dev-python/pypy3/files/4.0.0-gentoo-path.patch
new file mode 100644
index 000000000000..1c0270d93bae
--- /dev/null
+++ b/dev-python/pypy3/files/4.0.0-gentoo-path.patch
@@ -0,0 +1,50 @@
+From 165e05bbdc93e54411217c0198d0a5cbb9de4e33 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 27 Nov 2015 17:02:42 +0100
+Subject: [PATCH] Gentoo: override paths for system-wide install based on
+ sys.prefix
+
+Override all default distutils install paths to ones suitable for
+system-wide install when sys.prefix indicates we're running the Gentoo
+system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
+
+Fixes: https://bugs.gentoo.org/462306
+Fixes: https://bugs.gentoo.org/465546
+---
+ lib-python/3/distutils/command/install.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py
+index fc43951..fed5218 100644
+--- a/lib-python/3/distutils/command/install.py
++++ b/lib-python/3/distutils/command/install.py
+@@ -90,6 +90,13 @@ INSTALL_SCHEMES = {
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
++ 'gentoo': {
++ 'purelib': '$base/site-packages',
++ 'platlib': '$base/site-packages',
++ 'headers': '$base/include',
++ 'scripts': '@EPREFIX@/usr/bin',
++ 'data' : '@EPREFIX@/usr',
++ },
+ }
+
+ # The keys to an installation scheme; if any new types of files are to be
+@@ -476,7 +483,11 @@ class install (Command):
+ # it's the caller's problem if they supply a bad name!
+ if (hasattr(sys, 'pypy_version_info') and
+ not name.endswith(('_user', '_home'))):
+- name = 'pypy'
++ if self.install_base == os.path.normpath('@EPREFIX@/usr/@libdir@/pypy'):
++ # override paths for system-wide install
++ name = 'gentoo'
++ else:
++ name = 'pypy'
+ scheme = INSTALL_SCHEMES[name]
+ for key in SCHEME_KEYS:
+ attrname = 'install_' + key
+--
+2.6.3
+