source: trunk/dports/devel/ice-python/Portfile @ 38492

Last change on this file since 38492 was 38492, checked in by blair@…, 11 years ago

Add Google Protocol Buffer's support to Ice.

http://www.zeroc.com/labs/protobuf/

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# $Id: Portfile 38492 2008-07-22 17:17:41Z blair@macports.org $
2
3PortSystem 1.0
4
5name            ice-python
6version         3.3.0
7revision        2
8categories      devel python
9maintainers     blair
10description     Fast, object-oriented RPC for C++, Java, Python, Ruby, PHP
11
12long_description \
13        The Internet Communications Engine (Ice) is a modern alternative to \
14        object middleware such as CORBA or COM/DCOM/COM+, with support for \
15        C++, C#, Java, PHP, Python, Ruby and Visual Basic. \
16        Ice consists of the following packages. \
17        Slice: The Specification Language for Ice.  Slice establishes a \
18        contract between clients and servers, and is also used to describe \
19        persistent data. \
20        Slice Compilers: Slice specifications are compiled into various \
21        programming languages. Ice supports C++, Java, C#, Visual Basic, PHP, \
22        Python and Ruby.  Ice clients and servers work together, regardless \
23        of the programming language. \
24        Ice: The Ice core library manages all the communication tasks using a \
25        highly efficient protocol (including protocol compression and support \
26        for both TCP and UDP), provides a flexible thread pool for \
27        multi-threaded servers. \
28        This Port provides the Python bindings that sit on top of the C++ \
29        Ice C++ runtime libraries.
30
31homepage        http://www.zeroc.com/
32master_sites    http://www.zeroc.com/download/Ice/3.3/:ice \
33                http://www.zeroc.com/download/Protobuf/0.1/:ice-protobuf
34dist_subdir     ice-cpp
35distname        Ice-${version}
36distfiles       ${distname}${extract.suffix}:ice
37checksums       Ice-${version}.tar.gz \
38                        md5 0500306d9cdbc0fbb553fbb529de557a \
39                        sha1 b599c3a4d1d3006b868bf2cbcd8e2a2d4575fb22 \
40                        rmd160 e85b37c93f12d9ae97c6b7b2f64f506fa051e4f8 \
41                protobuf-patch-0.1.0.gz \
42                        md5 d5ac6485fd89c540fc9e3912f9595d58 \
43                        sha1sum 0f9d2e2c1c1601695339b4f621e18f40563e3fa0 \
44                        rmd160 9494f3f763c473b1ed0742eda49ae9dde18bea01
45platforms       darwin
46
47depends_lib     port:python24 \
48                port:ice-cpp
49
50patchfiles      patch-py.config.Make.rules.Darwin.diff \
51                patch-config.TestUtil.py.diff \
52                protobuf-patch-0.1.0.gz:ice-protobuf
53
54post-patch {
55        reinplace "s#python Client.py#${prefix}/bin/python2.4 Client.py#" \
56                ${worksrcpath}/py/test/Slice/keyword/run.py
57}
58
59use_configure   no
60
61build.dir       ${worksrcpath}/py
62build.target    prefix="${prefix}" \
63                ICE_HOME="${prefix}" \
64                PYTHON_HOME="${prefix}/Library/Frameworks/Python.framework/Versions/2.4" \
65                PYTHON_VERSION=python2.4 \
66                OPTIMIZE="yes" \
67                all
68
69test.run        yes
70test.dir        ${worksrcpath}/py
71test.env        ICE_HOME=${prefix}
72test.cmd        ${prefix}/bin/python2.4
73test.target     allTests.py
74
75destroot.dir    ${worksrcpath}/py
76destroot.target prefix="${destroot}${prefix}" \
77                ICE_HOME="${prefix}" \
78                PYTHON_HOME="${prefix}/Library/Frameworks/Python.framework/Versions/2.4" \
79                PYTHON_VERSION=python2.4 \
80                OPTIMIZE="yes" \
81                install
82
83post-destroot {
84        set sharedir ${destroot}${prefix}/share
85        set docdir ${sharedir}/doc/${name}
86
87        delete ${destroot}${prefix}/slice
88
89        xinstall -m 755 -d ${docdir}
90
91        file mkdir ${destroot}${prefix}/lib/python2.4
92        file rename ${destroot}${prefix}/python ${destroot}${prefix}/lib/python2.4/site-packages
93
94        set cmd "${prefix}/bin/python2.4 \
95                ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/compileall.py \
96                ${destroot}${prefix}/lib/python2.4/site-packages"
97        ui_debug ${cmd}
98        system ${cmd}
99
100        set cmd "${prefix}/bin/python2.4 -O \
101                ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/compileall.py \
102                ${destroot}${prefix}/lib/python2.4/site-packages"
103        ui_debug ${cmd}
104        system ${cmd}
105
106        file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
107        file rename ${destroot}${prefix}/LICENSE ${docdir}
108        foreach f {CHANGES RELEASE_NOTES} {
109                file copy ${worksrcpath}/${f} ${docdir}
110        }
111        file copy ${worksrcpath}/py/INSTALL ${docdir}
112
113        if {[variant_isset demo_source_code]} {
114                file copy ${worksrcpath}/py/demo ${docdir}
115        }
116}
117
118variant demo_source_code description {Install demonstration Python code} {
119}
Note: See TracBrowser for help on using the repository browser.