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

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

Ensure that the Python 2.4 bindings for Ice link against the correct
framework Python. The gcc collect2 seems to reorder the -F and -f
lines so that the system's Python framework install is picked up.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 37862 2008-06-26 22:03:26Z blair@macports.org $
2
3PortSystem 1.0
4
5name            ice-python
6version         3.3.0
7revision        1
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/
33dist_subdir     ice-cpp
34distname        Ice-${version}
35checksums       md5 0500306d9cdbc0fbb553fbb529de557a \
36                sha1 b599c3a4d1d3006b868bf2cbcd8e2a2d4575fb22 \
37                rmd160 e85b37c93f12d9ae97c6b7b2f64f506fa051e4f8
38platforms       darwin
39
40depends_lib     port:python24 \
41                port:ice-cpp
42
43patchfiles      patch-py.config.Make.rules.Darwin.diff \
44                patch-config.TestUtil.py.diff
45
46post-patch {
47        reinplace "s#python Client.py#${prefix}/bin/python2.4 Client.py#" \
48                ${worksrcpath}/py/test/Slice/keyword/run.py
49}
50
51use_configure   no
52
53build.dir       ${worksrcpath}/py
54build.target    prefix="${prefix}" \
55                ICE_HOME="${prefix}" \
56                PYTHON_HOME="${prefix}/Library/Frameworks/Python.framework/Versions/2.4" \
57                PYTHON_VERSION=python2.4 \
58                OPTIMIZE="yes" \
59                all
60
61test.run        yes
62test.dir        ${worksrcpath}/py
63test.env        ICE_HOME=${prefix}
64test.cmd        ${prefix}/bin/python2.4
65test.target     allTests.py
66
67destroot.dir    ${worksrcpath}/py
68destroot.target prefix="${destroot}${prefix}" \
69                ICE_HOME="${prefix}" \
70                PYTHON_HOME="${prefix}/Library/Frameworks/Python.framework/Versions/2.4" \
71                PYTHON_VERSION=python2.4 \
72                OPTIMIZE="yes" \
73                install
74
75post-destroot {
76        set sharedir ${destroot}${prefix}/share
77        set docdir ${sharedir}/doc/${name}
78
79        delete ${destroot}${prefix}/slice
80
81        xinstall -m 755 -d ${docdir}
82
83        file mkdir ${destroot}${prefix}/lib/python2.4
84        file rename ${destroot}${prefix}/python ${destroot}${prefix}/lib/python2.4/site-packages
85
86        set cmd "${prefix}/bin/python2.4 \
87                ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/compileall.py \
88                ${destroot}${prefix}/lib/python2.4/site-packages"
89        ui_debug ${cmd}
90        system ${cmd}
91
92        set cmd "${prefix}/bin/python2.4 -O \
93                ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/compileall.py \
94                ${destroot}${prefix}/lib/python2.4/site-packages"
95        ui_debug ${cmd}
96        system ${cmd}
97
98        file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
99        file rename ${destroot}${prefix}/LICENSE ${docdir}
100        foreach f {CHANGES RELEASE_NOTES} {
101                file copy ${worksrcpath}/${f} ${docdir}
102        }
103        file copy ${worksrcpath}/py/INSTALL ${docdir}
104
105        if {[variant_isset demo_source_code]} {
106                file copy ${worksrcpath}/py/demo ${docdir}
107        }
108}
109
110variant demo_source_code description {Install demonstration Python code} {
111}
Note: See TracBrowser for help on using the repository browser.