source: trunk/dports/python/py-zeroc-ice35/Portfile

Last change on this file was 114324, checked in by ryandesign@…, 4 years ago

python ports: use eq and ne when comparing ${subport} instead of == and !=

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup       python 1.0
5
6name            py-zeroc-ice35
7version         3.5.1
8set branch      [join [lrange [split ${version} .] 0 1] .]
9categories-append   devel
10maintainers     blair
11license         GPL-2
12description     Fast, object-oriented RPC for C++, Java, Python, Ruby, PHP
13
14long_description \
15    The Internet Communications Engine (Ice) is a modern alternative to \
16    object middleware such as CORBA or COM/DCOM/COM+, with support for \
17    C++, C#, Java, PHP, Python, Ruby and Visual Basic. \
18    Ice consists of the following packages. \
19    Slice: The Specification Language for Ice.  Slice establishes a \
20    contract between clients and servers, and is also used to describe \
21    persistent data. \
22    Slice Compilers: Slice specifications are compiled into various \
23    programming languages. Ice supports C++, Java, C#, Visual Basic, PHP, \
24    Python and Ruby.  Ice clients and servers work together, regardless \
25    of the programming language. \
26    Ice: The Ice core library manages all the communication tasks using a \
27    highly efficient protocol (including protocol compression and support \
28    for both TCP and UDP), provides a flexible thread pool for \
29    multi-threaded servers. \
30    This Port provides the Python bindings that sit on top of the C++ \
31    Ice C++ runtime libraries.
32
33homepage        http://www.zeroc.com/
34master_sites    ${homepage}download/Ice/${branch}/
35dist_subdir     zeroc-ice35
36distname        Ice-${version}
37checksums       sha1   63599ea22a1e9638a49356682c9e516b7c2c454f \
38                sha256 989e51194c6adadbd156da3288e37bad847b93b3b876502e83033b70493af392
39patchfiles      patch-ice.cpp.config.Make.rules.Darwin.diff \
40                patch-ice.py.config.Make.rules.Darwin.diff \
41                patch-ice.py.modules.IcePy.Communicator.cpp.diff
42patch.pre_args  -p1
43
44platforms       darwin
45
46python.versions 26 27
47
48if {${name} ne ${subport}} {
49    depends_lib-append  port:zeroc-ice35
50
51    build.dir       ${worksrcpath}/py
52
53    post-patch {
54        reinplace "s/-O2/-g -O2/" ${build.dir}/config/Make.rules.Darwin
55
56        # Prevent name conflicts between libICE.* from xorg-libice and
57        # libIce.* from this port by renaming s/libIce/libZerocIce/.
58        reinplace -E {s/-lIce([ A-Z]|$)/-lZerocIce\1/g} \
59            ${build.dir}/config/Make.rules \
60            ${build.dir}/config/Make.rules.Darwin
61
62        # Prevent core dumps from mixing Mac OS X's libstdc++.6.dylib
63        # on older operating systems, e.g. 10.5.8, with MacPorts'
64        # libstdc++.6.dylib from newer libgcc's, e.g. 4.8.1, through
65        # the use of DYLD_LIBRARY_PATH being set to $prefix, use
66        # DYLD_FALLBACK_LIBRARY_PATH instead.
67        system "find ${worksrcpath} -type f -print0 | xargs -0 grep -Z -l DYLD_LIBRARY_PATH | xargs -0 perl -w -p -i -e 's/DYLD_LIBRARY_PATH/DYLD_FALLBACK_LIBRARY_PATH/g'"
68    }
69
70    use_configure   no
71
72    build.cmd       make
73    build.target    prefix="${prefix}" \
74                    embedded_runpath_prefix="${prefix}" \
75                    CC="${configure.cc}" \
76                    CXX="${configure.cxx}" \
77                    ICE_HOME="${prefix}" \
78                    PYTHON_HOME="${python.prefix}" \
79                    PYTHON_VERSION="python${python.branch}" \
80                    OPTIMIZE="yes" \
81                    all
82
83    test.run        yes
84    test.env        ICE_HOME=${prefix}
85    test.cmd        ${python.bin}
86    test.target     allTests.py
87
88    destroot.destdir
89    destroot.cmd    ${build.cmd}
90    destroot.target prefix="${destroot}${prefix}" \
91                    CC="${configure.cc}" \
92                    CXX="${configure.cxx}" \
93                    ICE_HOME="${prefix}" \
94                    PYTHON_HOME="${python.prefix}" \
95                    PYTHON_VERSION="python${python.branch}" \
96                    OPTIMIZE="yes" \
97                    install
98
99    post-destroot {
100        set sharedir ${destroot}${prefix}/share
101        set docdir ${sharedir}/doc/${subport}
102
103        delete ${destroot}${prefix}/slice
104
105        xinstall -m 755 -d ${docdir}
106
107        xinstall -m 755 -d [file dirname ${destroot}${python.pkgd}]
108        file rename ${destroot}${prefix}/python ${destroot}${python.pkgd}
109
110        set cmd "${python.bin} \
111                ${python.libdir}/compileall.py \
112                ${destroot}${python.pkgd}"
113        ui_debug ${cmd}
114        system ${cmd}
115
116        set cmd "${python.bin} -O \
117                 ${python.libdir}/compileall.py \
118                 ${destroot}${python.pkgd}"
119        ui_debug ${cmd}
120        system ${cmd}
121
122        foreach f {CHANGES ICE_LICENSE LICENSE RELEASE_NOTES} {
123            file rename ${destroot}${prefix}/${f} ${docdir}
124        }
125
126        if {[variant_isset demo_source_code]} {
127            file copy ${build.dir}/demo ${docdir}
128        }
129    }
130
131    variant demo_source_code description {Install demonstration Python code} {
132    }
133}
Note: See TracBrowser for help on using the repository browser.