[73942] trunk/dports/lang/pypy
jmr at macports.org
jmr at macports.org
Mon Nov 29 18:28:11 PST 2010
Revision: 73942
http://trac.macports.org/changeset/73942
Author: jmr at macports.org
Date: 2010-11-29 18:28:06 -0800 (Mon, 29 Nov 2010)
Log Message:
-----------
pypy: update to 1.4
Modified Paths:
--------------
trunk/dports/lang/pypy/Portfile
trunk/dports/lang/pypy/files/darwin.py.diff
Added Paths:
-----------
trunk/dports/lang/pypy/files/pypy-c
Removed Paths:
-------------
trunk/dports/lang/pypy/files/fix_cc.diff
Modified: trunk/dports/lang/pypy/Portfile
===================================================================
--- trunk/dports/lang/pypy/Portfile 2010-11-30 02:10:56 UTC (rev 73941)
+++ trunk/dports/lang/pypy/Portfile 2010-11-30 02:28:06 UTC (rev 73942)
@@ -4,9 +4,7 @@
PortSystem 1.0
name pypy
-version 1.3
-revision 1
-set branch [join [lrange [split ${version} .] 0 1] .]
+version 1.4
categories lang python devel
license MIT/PSF
maintainers jmr openmaintainer
@@ -23,45 +21,60 @@
use_bzip2 yes
distfiles ${name}-${version}-src${extract.suffix}
-checksums md5 9c87ff94885445d3aacfbd2617521222 \
- sha1 ea84cef573c410bf3e898f18ddafc0198bf42328 \
- rmd160 b4266fed91e0c7636ca589b3a9734cc57587ad70
+checksums md5 6c7e5a3fab4b3f6357aab84927420b49 \
+ sha1 22cb3d9d4ecf6a8d1094708df7cfe5633f848d22 \
+ rmd160 06a3f2a5a8d9d817158420b5a8283758fe58b134
depends_build port:pkgconfig
depends_lib port:libffi \
port:python26
-patchfiles darwin.py.diff fix_cc.diff
+patchfiles darwin.py.diff
post-patch {
reinplace "s|__MDT__|${macosx_deployment_target}|g" ${worksrcpath}/pypy/translator/platform/darwin.py
}
use_configure no
+platform darwin 10 {
+ # 4.2 is known not to work, sigh...
+ configure.compiler gcc-4.0
+}
+
build.dir ${worksrcpath}/pypy/translator/goal
-build.cmd arch -${build_arch} ${prefix}/bin/python2.6
-build.args --batch --cc=${configure.cc} --opt=3 \
+# next release (after 1.4) should use pypy to build if it's already installed
+build.cmd ${prefix}/bin/python2.6
+build.args --batch --cc=${configure.cc} --opt=jit \
--make-jobs=${build.jobs} \
--cflags=\"${configure.cc_archflags} ${configure.cppflags} ${configure.ldflags}\"
build.target translate.py
build.post_args targetpypystandalone.py
-# JIT is only available on i386 at present
-if {$build_arch == "i386"} {
- build.args-delete --opt=3
- build.args-append --opt=jit
+# JIT is not available on powerpc at present
+if {${os.arch} != "i386"} {
+ build.args-delete --opt=jit
+ build.args-append --opt=3
}
+platform darwin {
+ # use arch -foo if available
+ if {${os.major} >= 9} {
+ build.cmd arch -${build_arch} ${build.cmd}
+ }
+}
+
destroot {
- xinstall -d ${destroot}${prefix}/share/${name}-${branch}/pypy
- copy ${worksrcpath}/pypy/lib ${destroot}${prefix}/share/${name}-${branch}/pypy
- xinstall -d ${destroot}${prefix}/share/${name}-${branch}/lib-python
+ xinstall -d ${destroot}${prefix}/lib/${name}/lib-python
copy ${worksrcpath}/lib-python/2.5.2 ${worksrcpath}/lib-python/modified-2.5.2 \
- ${destroot}${prefix}/share/${name}-${branch}/lib-python
- xinstall -m 755 ${build.dir}/pypy-c ${destroot}${prefix}/bin
+ ${destroot}${prefix}/lib/${name}/lib-python
+ copy ${worksrcpath}/lib_pypy ${destroot}${prefix}/lib/${name}
+ xinstall -m 755 ${build.dir}/pypy-c ${destroot}${prefix}/lib/${name}
+ # library search paths changed quite inconveniently such that it's easiest just to use a wrapper script
+ xinstall -m 755 ${filespath}/pypy-c ${destroot}${prefix}/bin
+ reinplace "s|__PREFIX__|${prefix}|" ${destroot}${prefix}/bin/pypy-c
}
-variant opt1 description {use optimization level 1 for faster build} {
+variant opt1 description {use optimization level 1 for faster build (but slower execution)} {
depends_lib-append port:boehmgc
build.args-delete --opt=3 --opt=jit
build.args-append --opt=1
Modified: trunk/dports/lang/pypy/files/darwin.py.diff
===================================================================
--- trunk/dports/lang/pypy/files/darwin.py.diff 2010-11-30 02:10:56 UTC (rev 73941)
+++ trunk/dports/lang/pypy/files/darwin.py.diff 2010-11-30 02:28:06 UTC (rev 73942)
@@ -1,17 +1,17 @@
---- pypy/translator/platform/darwin.py.orig 2010-06-13 07:55:19.000000000 +1000
-+++ pypy/translator/platform/darwin.py 2010-06-29 12:41:59.000000000 +1000
+--- pypy/translator/platform/darwin.py.orig 2010-11-27 01:38:08.000000000 +1100
++++ pypy/translator/platform/darwin.py 2010-11-30 07:25:07.000000000 +1100
@@ -5,8 +5,8 @@
class Darwin(posix.BasePosix):
name = "darwin"
-- link_flags = ['-mmacosx-version-min=10.4']
-- cflags = ['-O3', '-fomit-frame-pointer', '-mmacosx-version-min=10.4']
-+ link_flags = ['-mmacosx-version-min=__MDT__']
-+ cflags = ['-O3', '-fomit-frame-pointer', '-mmacosx-version-min=__MDT__']
- standalone_only = ['-mdynamic-no-pic']
- shared_only = []
+- link_flags = ('-mmacosx-version-min=10.4',)
+- cflags = ('-O3', '-fomit-frame-pointer', '-mmacosx-version-min=10.4')
++ link_flags = ('-mmacosx-version-min=__MDT__',)
++ cflags = ('-O3', '-fomit-frame-pointer', '-mmacosx-version-min=__MDT__')
+ standalone_only = ('-mdynamic-no-pic',)
+ shared_only = ()
-@@ -23,21 +23,19 @@
+@@ -29,21 +29,19 @@
def _preprocess_include_dirs(self, include_dirs):
res_incl_dirs = list(include_dirs)
@@ -37,19 +37,21 @@
def check___thread(self):
# currently __thread is not supported by Darwin gccs
-@@ -69,11 +67,11 @@
+@@ -78,13 +76,13 @@
class Darwin_i386(Darwin):
name = "darwin_i386"
-- link_flags = ['-arch', 'i386', '-mmacosx-version-min=10.4']
-- cflags = ['-arch', 'i386', '-O3', '-fomit-frame-pointer', '-mmacosx-version-min=10.4']
-+ link_flags = ['-arch', 'i386', '-mmacosx-version-min=__MDT__']
-+ cflags = ['-arch', 'i386', '-O3', '-fomit-frame-pointer', '-mmacosx-version-min=__MDT__']
+- link_flags = ('-arch', 'i386', '-mmacosx-version-min=10.4')
++ link_flags = ('-arch', 'i386', '-mmacosx-version-min=__MDT__')
+ cflags = ('-arch', 'i386', '-O3', '-fomit-frame-pointer',
+- '-mmacosx-version-min=10.4')
++ '-mmacosx-version-min=__MDT__')
class Darwin_x86_64(Darwin):
name = "darwin_x86_64"
-- link_flags = ['-arch', 'x86_64', '-mmacosx-version-min=10.4']
-- cflags = ['-arch', 'x86_64', '-O3', '-fomit-frame-pointer', '-mmacosx-version-min=10.4']
-+ link_flags = ['-arch', 'x86_64', '-mmacosx-version-min=__MDT__']
-+ cflags = ['-arch', 'x86_64', '-O3', '-fomit-frame-pointer', '-mmacosx-version-min=__MDT__']
-
+- link_flags = ('-arch', 'x86_64', '-mmacosx-version-min=10.4')
++ link_flags = ('-arch', 'x86_64', '-mmacosx-version-min=__MDT__')
+ cflags = ('-arch', 'x86_64', '-O3', '-fomit-frame-pointer',
+- '-mmacosx-version-min=10.4')
++ '-mmacosx-version-min=__MDT__')
+ default_cc = 'gcc-4.0'
Deleted: trunk/dports/lang/pypy/files/fix_cc.diff
===================================================================
--- trunk/dports/lang/pypy/files/fix_cc.diff 2010-11-30 02:10:56 UTC (rev 73941)
+++ trunk/dports/lang/pypy/files/fix_cc.diff 2010-11-30 02:28:06 UTC (rev 73942)
@@ -1,71 +0,0 @@
-Author: afa
-Date: Wed Jun 16 11:00:27 2010
-New Revision: 75419
-
-Modified:
- pypy/trunk/pypy/translator/translator.py
-Log:
-Don't import the FlowObjSpace too early:
-among its dependencies is the rffi module, which needs the compiler to define its types.
-This causes problems when using the --cc option.
-
-(the change that broke --cc is r73857, in pyframe.py;
-but it feels more robust to defer the import in translator.py)
-
-
-Modified: pypy/trunk/pypy/translator/translator.py
-==============================================================================
---- pypy/translator/translator.py (original)
-+++ pypy/translator/translator.py Wed Jun 16 11:00:27 2010
-@@ -7,7 +7,6 @@
- import autopath, os, sys, types, copy
-
- from pypy.translator import simplify
--from pypy.objspace.flow.objspace import FlowObjSpace
- from pypy.objspace.flow.model import FunctionGraph, checkgraph, Block
- from pypy.tool.ansi_print import ansi_log
- from pypy.tool.sourcetools import nice_repr_for_func
-@@ -67,6 +66,7 @@
- else:
- if self.config.translation.verbose:
- log.start(nice_repr_for_func(func))
-+ from pypy.objspace.flow.objspace import FlowObjSpace
- space = FlowObjSpace(self.flowconfig)
- if self.annotator:
- # ZZZ
-Author: afa
-Date: Wed Jun 16 11:31:00 2010
-New Revision: 75420
-
-Modified:
- pypy/trunk/pypy/translator/goal/targetpreimportedpypy.py
- pypy/trunk/pypy/translator/goal/targetpypystandalone.py
-Log:
-Remove unneeded import, and really fix --cc=<othercompiler>
-
-
-Modified: pypy/trunk/pypy/translator/goal/targetpreimportedpypy.py
-==============================================================================
---- pypy/translator/goal/targetpreimportedpypy.py (original)
-+++ pypy/translator/goal/targetpreimportedpypy.py Wed Jun 16 11:31:00 2010
-@@ -3,7 +3,6 @@
- import os, sys
- sys.setrecursionlimit(17000)
-
--from pypy.objspace.std.objspace import StdObjSpace
- from pypy.interpreter import gateway
- from pypy.interpreter.error import OperationError
- from pypy.translator.goal.ann_override import PyPyAnnotatorPolicy
-
-Modified: pypy/trunk/pypy/translator/goal/targetpypystandalone.py
-==============================================================================
---- pypy/translator/goal/targetpypystandalone.py (original)
-+++ pypy/translator/goal/targetpypystandalone.py Wed Jun 16 11:31:00 2010
-@@ -2,7 +2,6 @@
-
- import os, sys
-
--from pypy.objspace.std.objspace import StdObjSpace
- from pypy.interpreter import gateway
- from pypy.interpreter.error import OperationError
- from pypy.translator.goal.ann_override import PyPyAnnotatorPolicy
Added: trunk/dports/lang/pypy/files/pypy-c
===================================================================
--- trunk/dports/lang/pypy/files/pypy-c (rev 0)
+++ trunk/dports/lang/pypy/files/pypy-c 2010-11-30 02:28:06 UTC (rev 73942)
@@ -0,0 +1,2 @@
+#!/bin/sh
+__PREFIX__/lib/pypy/pypy-c $@
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101129/3533d798/attachment-0001.html>
More information about the macports-changes
mailing list