source: trunk/dports/devel/zeroc-ice34/Portfile @ 110485

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

zeroc-ice34: follow zeroc-ice35: rename libIce* to libZerocIce*.

This makes the two ports consistent in the names they use for the
shared libraries.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 110485 2013-08-31 17:07:12Z blair@macports.org $
3
4PortSystem 1.0
5
6name            zeroc-ice34
7version         3.4.2
8revision        2
9set branch      [join [lrange [split ${version} .] 0 1] .]
10categories      devel
11maintainers     blair
12conflicts       zeroc-ice33 zeroc-ice35
13license         GPL-2
14description     Fast, object-oriented RPC for C++, Java, Python, Ruby, PHP
15
16long_description \
17    The Internet Communications Engine (Ice) is a modern alternative to \
18    object middleware such as CORBA or COM/DCOM/COM+, with support for \
19    C++, C#, Java, PHP, Python, Ruby and Visual Basic. \
20    Ice consists of the following packages. \
21    Slice: The Specification Language for Ice.  Slice establishes a \
22    contract between clients and servers, and is also used to describe \
23    persistent data. \
24    Slice Compilers: Slice specifications are compiled into various \
25    programming languages. Ice supports C++, Java, C#, Visual Basic, PHP, \
26    Python and Ruby.  Ice clients and servers work together, regardless \
27    of the programming language. \
28    Ice: The Ice core library manages all the communication tasks using a \
29    highly efficient protocol (including protocol compression and support \
30    for both TCP and UDP), provides a flexible thread pool for \
31    multi-threaded servers. \
32    This Port provides the C++ runtime libraries, the core Slice files \
33    and slice2cpp.  It also includes the slice compilers for all the \
34    other languages: slice2cs, slice2java, slice2py, slice2rb and slice2vb.
35
36homepage        http://www.zeroc.com/
37master_sites    ${homepage}download/Ice/${branch}/
38
39distname        Ice-${version}
40checksums       md5 e97672eb4a63c6b8dd202d0773e19dc7 \
41                sha1 8c84d6e3b227f583d05e08251e07047e6c3a6b42 \
42                rmd160 7ce680a4eb5fa9d0bb6f8b8910e267dfc2373d75
43patchfiles      patch-ice.cpp.config.Make.rules.diff \
44                patch-ice.cpp.config.Make.rules.Darwin.diff \
45                patch-ice.cpp.allTests.py.diff \
46                patch-ice.cpp.demo.IceGrid.secure.README.diff \
47                patch-ice.cpp.demo.IceGrid.secure.application.xml.diff \
48                patch-ice.cpp.demo.IceGrid.secure.config.admin.diff \
49                patch-ice.cpp.demo.IceGrid.secure.config.client.diff \
50                patch-ice.cpp.demo.IceGrid.secure.config.master.diff \
51                patch-ice.cpp.demo.IceGrid.secure.config.node.diff \
52                patch-ice.cpp.demo.IceGrid.secure.config.registry.diff \
53                patch-ice.cpp.demo.IceGrid.secure.config.slave.diff \
54                patch-ice.cpp.demo.IceGrid.secure.makecerts.py.diff \
55                patch-ice.cpp.include.Freeze.Map.h.diff \
56                patch-ice.cpp.include.Ice.Buffer.h.diff \
57                patch-ice.cpp.include.Ice.ConnectionIF.h.diff \
58                patch-ice.cpp.include.Ice.IconvStringConverter.h.diff \
59                patch-ice.cpp.include.Ice.IncomingAsyncF.h.diff \
60                patch-ice.cpp.include.Ice.LocalObjectF.h.diff \
61                patch-ice.cpp.include.Ice.ObjectF.h.diff \
62                patch-ice.cpp.include.Ice.OutgoingAsyncF.h.diff \
63                patch-ice.cpp.include.Ice.Proxy.h.diff \
64                patch-ice.cpp.include.Ice.ProxyF.h.diff \
65                patch-ice.cpp.include.Ice.Stream.h.diff \
66                patch-ice.cpp.include.Ice.StreamF.h.diff \
67                patch-ice.cpp.include.IceUtil.Mutex.h.diff \
68                patch-ice.cpp.src.Freeze.MapDb.cpp.diff \
69                patch-ice.cpp.src.Freeze.MapI.cpp.diff \
70                patch-ice.cpp.src.Freeze.SharedDbEnv.cpp.diff \
71                patch-ice.cpp.src.Glacier2.Blobject.cpp.diff \
72                patch-ice.cpp.src.Glacier2.Blobject.h.diff \
73                patch-ice.cpp.src.Glacier2.RequestQueue.cpp.diff \
74                patch-ice.cpp.src.Glacier2.RequestQueue.h.diff \
75                patch-ice.cpp.src.Glacier2.RouterI.cpp.diff \
76                patch-ice.cpp.src.Ice.ConnectionI.cpp.diff \
77                patch-ice.cpp.src.Ice.DynamicLibrary.cpp.diff \
78                patch-ice.cpp.src.Ice.IncomingAsync.cpp.diff \
79                patch-ice.cpp.src.Ice.LocalObject.cpp.diff \
80                patch-ice.cpp.src.Ice.Network.cpp.diff \
81                patch-ice.cpp.src.Ice.Object.cpp.diff \
82                patch-ice.cpp.src.Ice.OutgoingAsync.cpp.diff \
83                patch-ice.cpp.src.Ice.PropertyNames.cpp.diff \
84                patch-ice.cpp.src.Ice.ProxyFactory.cpp.diff \
85                patch-ice.cpp.src.Ice.Service.cpp.diff \
86                patch-ice.cpp.src.Ice.Stream.cpp.diff \
87                patch-ice.cpp.src.IceGrid.AdminCallbackRouter.cpp.diff \
88                patch-ice.cpp.src.IceGrid.DescriptorHelper.cpp.diff \
89                patch-ice.cpp.src.IceGrid.Internal.ice.diff \
90                patch-ice.cpp.src.IceGrid.InternalRegistryI.cpp.diff \
91                patch-ice.cpp.src.IceGrid.InternalRegistryI.h.diff \
92                patch-ice.cpp.src.IceGrid.NodeSessionManager.cpp.diff \
93                patch-ice.cpp.src.IceGrid.ReplicaCache.cpp.diff \
94                patch-ice.cpp.src.IceGrid.ReplicaSessionManager.cpp.diff \
95                patch-ice.cpp.src.IceGrid.SessionI.h.diff \
96                patch-ice.cpp.src.IceSSL.Instance.cpp.diff \
97                patch-ice.cpp.src.IceSSL.InstanceF.h.diff \
98                patch-ice.cpp.src.IceSSL.TrustManager.cpp.diff \
99                patch-ice.cpp.src.IceSSL.TrustManagerF.h.diff \
100                patch-ice.cpp.src.IceSSL.Util.cpp.diff \
101                patch-ice.cpp.src.IceSSL.UtilF.h.diff \
102                patch-ice.cpp.src.IceStorm.NodeI.cpp.diff \
103                patch-ice.cpp.src.IceUtil.Cond.cpp.diff \
104                patch-ice.cpp.src.IceUtil.CountDownLatch.cpp.diff \
105                patch-ice.cpp.src.IceUtil.CtrlCHandler.cpp.diff \
106                patch-ice.cpp.src.IceUtil.FileUtil.cpp.diff \
107                patch-ice.cpp.src.IceUtil.RecMutex.cpp.diff \
108                patch-ice.cpp.src.Slice.CPlusPlusUtil.cpp.diff \
109                patch-ice.cpp.src.Slice.FileTracker.cpp.diff \
110                patch-ice.cpp.src.slice2cpp.Gen.cpp.diff \
111                patch-ice.cpp.src.slice2cs.Gen.cpp.diff \
112                patch-ice.cpp.src.slice2java.Gen.cpp.diff \
113                patch-ice.cpp.test.Glacier2.ssl.Server.cpp.diff \
114                patch-ice.cpp.test.Ice.background.EndpointI.h.diff \
115                patch-ice.cpp.test.Ice.custom.AllTests.cpp.diff \
116                patch-ice.cpp.test.Ice.info.AllTests.cpp.diff \
117                patch-ice.cpp.test.Ice.properties.run.py.diff \
118                patch-ice.cpp.test.IceGrid.admin.run.py.diff \
119                patch-ice.cpp.test.IceUtil.unicode.Client.cpp.diff \
120                patch-ice.cpp.test.Slice.keyword.Client.cpp.diff \
121                patch-ice.cpp.test.include.TestCommon.h.diff \
122                patch-ice.scripts.TestUtil.py.diff \
123                patch-add-thrift-support-for-java.diff \
124                patch-add-thrift-support-for-python.diff
125
126patch.pre_args  -p1
127platforms       darwin
128
129depends_lib     port:db46 \
130                port:expat \
131                port:libiconv \
132                port:mcpp \
133                port:openssl \
134                port:readline
135
136build.dir       ${worksrcpath}/cpp
137
138post-patch {
139    reinplace "s/-O2/-g -O2/" ${build.dir}/config/Make.rules.Darwin
140
141    # It appears that the 10.4 and 10.5 installed versions of
142    # ${prefix}/include/iconv.h have different definitions of
143    # the inbuf parameter to iconv(), one is 'const char* * inbuf'
144    # and the other is 'char* * inbuf'.  The Ice compile will
145    # fail if the wrong #define is choosen by Ice.
146    set fl [open ${prefix}/include/iconv.h]
147    set data [read $fl]
148    close $fl
149    foreach line [split $data \n] {
150        if {[string match "extern size_t iconv*const*" $line]} {
151            reinplace "s/_LIBICONV_VERSION < 0x010B/1/" \
152                ${build.dir}/include/Ice/IconvStringConverter.h
153            break
154        }
155    }
156
157    # Prevent name conflicts between libICE.* from xorg-libice and
158    # libIce.* from this port by renaming libIce.* to libZerocIce.*.
159    # For consistency, rename Ice's other shared libraries.
160    foreach f [exec find ${build.dir} -name Makefile] {
161        # To prevent replacements on slice2freeze's --dict argument,
162        # match exactly on a , or a ) that follows ,Ice\w*, e.g.:
163        # $(SLICE2FREEZE) --ice -I$(slicedir) --dict StringIsbnSeqDict,string,Ice::StringSeq
164        reinplace -E {s/,Ice([[:alnum:]]*[,)])/,ZerocIce\1/} ${f}
165        reinplace -E {s/-lIce([ A-Z]|$)/-lZerocIce\1/g} ${f}
166    }
167    reinplace -E {s/-lIce([ A-Z]|$)/-lZerocIce\1/g} \
168        ${build.dir}/config/Make.rules \
169        ${build.dir}/config/Make.rules.Darwin
170}
171
172use_configure   no
173
174build {
175    set jobsargs ""
176    if {${build.jobs} > 1} {
177        set jobsargs " -j${build.jobs}"
178    }
179
180    set cmd "cd ${build.dir} && make${jobsargs} prefix='${prefix}' embedded_runpath_prefix='${prefix}' CC='${configure.cc}' CXX='${configure.cxx}' OPTIMIZE='yes' BZIP2_HOME='${prefix}' DB_HOME='${prefix}' EXPAT_HOME='${prefix}' OPENSSL_HOME='${prefix}' READLINE_HOME='${prefix}' USE_READLINE=yes MCPP_HOME='${prefix}' LDPLATFORMFLAGS= all && cd doc && make${jobsargs}"
181    ui_debug ${cmd}
182    system ${cmd}
183}
184
185test.run        yes
186test.target     test
187
188destroot.target prefix="${destroot}${prefix}" \
189                embedded_runpath_prefix="${prefix}" \
190                OPTIMIZE="yes" \
191                BZIP2_HOME="${prefix}" \
192                DB_HOME="${prefix}" \
193                EXPAT_HOME="${prefix}" \
194                OPENSSL_HOME="${prefix}" \
195                READLINE_HOME="${prefix}" \
196                USE_READLINE=yes \
197                MCPP_HOME="${prefix}" \
198                install
199
200post-destroot {
201    set sharedir ${destroot}${prefix}/share
202    set docdir ${sharedir}/doc/${name}
203
204    xinstall -m 755 -d ${sharedir}/ice
205    file rename ${destroot}${prefix}/config ${sharedir}/ice
206    file rename ${destroot}${prefix}/slice ${sharedir}/slice
207
208    xinstall -m 755 -d ${docdir}
209    file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
210    file rename ${destroot}${prefix}/LICENSE ${docdir}
211    file copy ${build.dir}/doc/reference ${docdir}
212
213    foreach f {CHANGES RELEASE_NOTES} {
214        file copy ${worksrcpath}/${f} ${docdir}
215    }
216
217    if {[variant_isset demo_source_code]} {
218        system "cd ${build.dir}/demo && make clean"
219        file copy ${build.dir}/demo $docdir
220    }
221}
222
223variant demo_source_code description {Install demonstration C++ code} {
224}
Note: See TracBrowser for help on using the repository browser.