aboutsummaryrefslogtreecommitdiffstats
path: root/lang/pypy
diff options
context:
space:
mode:
authormva <mva@FreeBSD.org>2012-07-18 03:08:21 +0800
committermva <mva@FreeBSD.org>2012-07-18 03:08:21 +0800
commitb2d06c076958f873151c473797c6dc8170ec0b97 (patch)
tree7865dbb2e3ba358957ea009c20121cd4e08b1a36 /lang/pypy
parent892f214ab118cbac8b017706b9279fa6373eb3f1 (diff)
downloadfreebsd-ports-gnome-b2d06c076958f873151c473797c6dc8170ec0b97.tar.gz
freebsd-ports-gnome-b2d06c076958f873151c473797c6dc8170ec0b97.tar.zst
freebsd-ports-gnome-b2d06c076958f873151c473797c6dc8170ec0b97.zip
- Fix site-packages path
Discussed with: David Naylor <naylor.b.david@gmail.com> Approved by: David Naylor <naylor.b.david@gmail.com> Obtained from: https://github.com/DragonSA/pypy/tree/fix-1.9-2
Diffstat (limited to 'lang/pypy')
-rw-r--r--lang/pypy/Makefile4
-rw-r--r--lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py33
-rw-r--r--lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py20
-rw-r--r--lang/pypy/files/patch-lib__pypy1.9__sysconfig.py40
-rw-r--r--lang/pypy/pkg-plist2
5 files changed, 97 insertions, 2 deletions
diff --git a/lang/pypy/Makefile b/lang/pypy/Makefile
index 3b3380beb275..6878dfb4e0ee 100644
--- a/lang/pypy/Makefile
+++ b/lang/pypy/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pypy
DISTVERSION= 1.9
+PORTREVISION= 1
CATEGORIES= lang python java
MASTER_SITES= https://bitbucket.org/pypy/pypy/get/
DISTNAME= release-${DISTVERSION}
@@ -203,6 +204,9 @@ post-extract:
${MV} ${WRKSRC}/lib-python/${PYTHON_IMPL_VER} ${WRKSRC}/${PYPY_LIBDIR}
${MV} ${WRKSRC}/lib_pypy ${WRKSRC}/${PYPY_LIBDIR}/
+post-patch:
+ ${FIND} ${WRKSRC}/lib -name '*.orig' -delete
+
do-configure:
${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%PYPY_NAMES%%|${PYPY_NAMES}|g' \
diff --git a/lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py b/lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py
new file mode 100644
index 000000000000..9738bcfc4274
--- /dev/null
+++ b/lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py
@@ -0,0 +1,33 @@
+--- lib/pypy1.9/distutils/command/install.py.orig 2012-07-15 10:10:18.000000000 +0200
++++ lib/pypy1.9/distutils/command/install.py 2012-07-15 10:13:15.000000000 +0200
+@@ -84,9 +84,9 @@
+ 'data' : '$userbase',
+ },
+ 'pypy': {
+- 'purelib': '$base/site-packages',
+- 'platlib': '$base/site-packages',
+- 'headers': '$base/include',
++ 'purelib': '$base/lib/pypy$pypy_version_short/site-packages',
++ 'platlib': '$platbase/lib/pypy$pypy_version_short/site-packages',
++ 'headers': '$base/include/pypy$pypy_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+@@ -304,6 +304,7 @@
+ # about needing recursive variable expansion (shudder).
+
+ py_version = (string.split(sys.version))[0]
++ pypy_version = sys.version[-6:-3]
+ (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
+ self.config_vars = {'dist_name': self.distribution.get_name(),
+ 'dist_version': self.distribution.get_version(),
+@@ -311,6 +312,9 @@
+ 'py_version': py_version,
+ 'py_version_short': py_version[0:3],
+ 'py_version_nodot': py_version[0] + py_version[2],
++ 'pypy_version': pypy_version,
++ 'pypy_version_short': pypy_version[0:3],
++ 'pypy_version_nodot': pypy_version[0] + pypy_version[2],
+ 'sys_prefix': prefix,
+ 'prefix': prefix,
+ 'sys_exec_prefix': exec_prefix,
diff --git a/lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py b/lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py
new file mode 100644
index 000000000000..dab7293ca7de
--- /dev/null
+++ b/lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py
@@ -0,0 +1,20 @@
+--- lib/pypy1.9/distutils/sysconfig_pypy.py.orig 2012-07-13 22:52:04.000000000 +0200
++++ lib/pypy1.9/distutils/sysconfig_pypy.py 2012-07-13 22:58:35.000000000 +0200
+@@ -15,7 +15,7 @@
+
+ def get_python_inc(plat_specific=0, prefix=None):
+ from os.path import join as j
+- return j(sys.prefix, 'include')
++ return j(sys.prefix, 'include', 'pypy' + sys.version[-6:-3])
+
+ def get_python_version():
+ """Return a string containing the major and minor Python version,
+@@ -44,7 +44,7 @@
+ "calls to get_python_lib(standard_lib=1) cannot succeed")
+ if prefix is None:
+ prefix = PREFIX
+- return os.path.join(prefix, 'site-packages')
++ return os.path.join(prefix, 'lib', 'pypy' + sys.version[-6:-3], 'site-packages')
+
+
+ _config_vars = None
diff --git a/lang/pypy/files/patch-lib__pypy1.9__sysconfig.py b/lang/pypy/files/patch-lib__pypy1.9__sysconfig.py
new file mode 100644
index 000000000000..0de71f578487
--- /dev/null
+++ b/lang/pypy/files/patch-lib__pypy1.9__sysconfig.py
@@ -0,0 +1,40 @@
+--- lib/pypy1.9/sysconfig.py.orig 2012-07-15 09:57:14.000000000 +0200
++++ lib/pypy1.9/sysconfig.py 2012-07-15 10:03:25.000000000 +0200
+@@ -27,12 +27,12 @@
+ 'data' : '{base}',
+ },
+ 'pypy': {
+- 'stdlib': '{base}/lib-python',
+- 'platstdlib': '{base}/lib-python',
+- 'purelib': '{base}/lib-python',
+- 'platlib': '{base}/lib-python',
+- 'include': '{base}/include',
+- 'platinclude': '{base}/include',
++ 'stdlib': '{base}/lib/pypy{pypy_version_short}',
++ 'platstdlib': '{platbase}/lib/pypy{pypy_version_short}',
++ 'purelib': '{base}/lib/pypy{pypy_version_short}',
++ 'platlib': '{platbase}/lib/pypy{pypy_version_short}',
++ 'include': '{base}/include{pypy_version_short}',
++ 'platinclude': '{platbase}/include/pypy{pypy_version_short}',
+ 'scripts': '{base}/bin',
+ 'data' : '{base}',
+ },
+@@ -98,6 +98,8 @@
+ 'scripts', 'data')
+ _PY_VERSION = sys.version.split()[0]
+ _PY_VERSION_SHORT = sys.version[:3]
++_PYPY_VERSION = sys.version[-6:-1]
++_PYPY_VERSION_SHORT = sys.version[-6:-3]
+ _PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
+ _PREFIX = os.path.normpath(sys.prefix)
+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+@@ -304,6 +306,9 @@
+ _CONFIG_VARS['py_version'] = _PY_VERSION
+ _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
+ _CONFIG_VARS['py_version_nodot'] = _PY_VERSION[0] + _PY_VERSION[2]
++ _CONFIG_VARS['py_version'] = _PYPY_VERSION
++ _CONFIG_VARS['pypy_version_short'] = _PYPY_VERSION_SHORT
++ _CONFIG_VARS['pypy_version_nodot'] = _PYPY_VERSION[0] + _PYPY_VERSION[2]
+ _CONFIG_VARS['base'] = _PREFIX
+ _CONFIG_VARS['platbase'] = _EXEC_PREFIX
+ _CONFIG_VARS['projectbase'] = _PROJECT_BASE
diff --git a/lang/pypy/pkg-plist b/lang/pypy/pkg-plist
index f162a5b14e49..0cdf6dd8410b 100644
--- a/lang/pypy/pkg-plist
+++ b/lang/pypy/pkg-plist
@@ -1555,7 +1555,6 @@
%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/locale.ctc.py
%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/locale.ctc.pyc
%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/rebuild.py
-%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/rebuild.py.orig
%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/rebuild.pyc
%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/resource.ctc.py
%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/resource.ctc.pyc
@@ -2384,7 +2383,6 @@
%%PYPY_LIBDIR%%/shutil.pyc
%%PYPY_LIBDIR%%/site-packages/README
%%PYPY_LIBDIR%%/site.py
-%%PYPY_LIBDIR%%/site.py.orig
%%PYPY_LIBDIR%%/site.pyc
%%PYPY_LIBDIR%%/smtpd.py
%%PYPY_LIBDIR%%/smtpd.pyc