diff --git a/lang/jython/Portfile b/lang/jython/Portfile
index d16804b..7f67e5a 100644
a
|
b
|
|
3 | 3 | PortSystem 1.0 |
4 | 4 | |
5 | 5 | name jython |
6 | | version 2.5.2 |
| 6 | version 2.7.0 |
7 | 7 | categories lang python java |
8 | 8 | platforms darwin |
9 | 9 | maintainers nomaintainer |
… |
… |
long_description \ |
14 | 14 | 100% Pure Java, and seamlessly integrated with the \ |
15 | 15 | Java platform. It thus allows you to run Python on any \ |
16 | 16 | Java platform. |
| 17 | license PSF |
17 | 18 | |
18 | 19 | homepage http://www.jython.org/ |
19 | | master_sites sourceforge:project/jython/jython/${version} |
20 | | fetch.type svn |
21 | | set und_vers [string map {. _} ${version}] |
22 | | svn.url https://svn.code.sf.net/p/jython/svn/tags/Release_${und_vers}/jython |
23 | | distname jython |
| 20 | master_sites http://search.maven.org/remotecontent?filepath=org/python/jython-installer/${version} |
| 21 | fetch.type hg |
| 22 | hg.url https://hg.python.org/jython |
| 23 | hg.tag v${version} |
24 | 24 | |
25 | 25 | depends_build bin:ant:apache-ant |
26 | 26 | depends_lib bin:java:kaffe |
… |
… |
depends_lib bin:java:kaffe |
28 | 28 | use_configure no |
29 | 29 | build.cmd ant |
30 | 30 | build.target developer-build |
| 31 | set java_ver 1.7 |
| 32 | set have_java [catch { exec /usr/libexec/java_home -F -v ${java_ver} } java_home ] |
| 33 | build.env JAVA_HOME=${java_home} |
31 | 34 | |
32 | | destroot { |
33 | | move ${worksrcpath}/dist/jython-dev.jar ${worksrcpath}/dist/jython.jar |
34 | | |
35 | | xinstall -m 755 ${worksrcpath}/dist/bin/jython ${destroot}${prefix}/bin/ |
36 | | reinplace "s|JYTHON_HOME_1=`dirname \"\$PRG\"`|JYTHON_HOME_1=${prefix}/share/java/${name}|" ${destroot}${prefix}/bin/jython |
| 35 | pre-fetch { |
| 36 | if {![variant_isset installer] && ${have_java} == 1} { |
| 37 | return -code error "Java ${java_ver} is required to build from source" |
| 38 | } |
| 39 | } |
37 | 40 | |
| 41 | set bin_name jython.py |
| 42 | |
| 43 | destroot { |
38 | 44 | xinstall -m 755 -d ${destroot}${prefix}/share/java/ |
39 | 45 | copy ${worksrcpath}/dist \ |
40 | 46 | ${destroot}${prefix}/share/java/${name} |
41 | 47 | } |
| 48 | |
42 | 49 | post-destroot { |
43 | | xinstall -m 777 -d ${destroot}${prefix}/share/java/${name}/cachedir/packages |
44 | | system "touch ${destroot}${prefix}/share/java/${name}/cachedir/packages/blank" |
| 50 | set fp [open ${destroot}${prefix}/bin/${name} w] |
| 51 | puts $fp "#!/bin/sh" |
| 52 | puts $fp "${prefix}/share/java/${name}/bin/${bin_name} \\" |
| 53 | puts $fp " -Dpython.cachedir=\"\$HOME/.jython_cachedir\" \"\$@\"" |
| 54 | close $fp |
| 55 | system "chmod +x ${destroot}${prefix}/bin/${name}" |
45 | 56 | } |
46 | 57 | |
47 | 58 | variant installer description {Use installer, rather than building from source} { |
48 | 59 | fetch.type standard |
49 | | distname ${name}_installer-${version} |
50 | | worksrcdir |
| 60 | distname ${name}-installer-${version} |
| 61 | worksrcdir |
51 | 62 | extract.suffix .jar |
52 | 63 | distfiles ${distname}${extract.suffix} |
53 | 64 | extract.cmd cp |
… |
… |
variant installer description {Use installer, rather than building from source} |
55 | 66 | extract.pre_args |
56 | 67 | extract.post_args ${worksrcpath} |
57 | 68 | depends_build-delete bin:ant:apache-ant |
58 | | checksums md5 7c7d9abd8985df480edeacd27ed9dcd5 \ |
59 | | sha1 d4534a691edf40aa1d51723dfe3e22db1e39b432 \ |
60 | | rmd160 898f92c07a44beb76c1a51cbb5ad8c0a874f06bd |
| 69 | checksums rmd160 4f9cf193cc9a41b1fc603d02932778d3fbeb3e11 \ |
| 70 | sha256 b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf |
61 | 71 | |
62 | 72 | pre-build { |
63 | 73 | xinstall -m 755 -d ${destroot}${prefix}/share/java/${name} |
64 | 74 | } |
65 | 75 | |
66 | 76 | build.cmd java |
67 | | build.target |
| 77 | build.target |
| 78 | build.env |
68 | 79 | build.args -jar ${distname}${extract.suffix} |
69 | 80 | build.post_args -s -d ${destroot}${prefix}/share/java/${name} |
70 | | destroot { |
71 | | reinplace -E "s|^JYTHON_HOME_FALLBACK=.*|JYTHON_HOME_FALLBACK=\"${prefix}/share/java/${name}\"|" ${destroot}${prefix}/share/java/${name}/jython |
72 | | move ${destroot}${prefix}/share/java/${name}/jython ${destroot}${prefix}/bin/ |
73 | | } |
| 81 | |
| 82 | set bin_name jython |
| 83 | |
| 84 | destroot {} |
74 | 85 | } |
| 86 | |
75 | 87 | default_variants +installer |
76 | 88 | |
77 | | livecheck.type sourceforge |
| 89 | livecheck.type regex |
| 90 | livecheck.url ${homepage}downloads.html |
| 91 | livecheck.regex "Jython (\\d+(?:\\.\\d+)*)" |