source: trunk/dports/devel/zeroc-ice35/Portfile

Last change on this file was 146517, checked in by raimue@…, 19 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.9 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 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name            zeroc-ice35
7version         3.5.1
8revision        1
9set branch      [join [lrange [split ${version} .] 0 1] .]
10categories      devel
11maintainers     blair
12conflicts       zeroc-ice33 zeroc-ice34
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       sha1   63599ea22a1e9638a49356682c9e516b7c2c454f \
41                sha256 989e51194c6adadbd156da3288e37bad847b93b3b876502e83033b70493af392
42patchfiles      patch-ice.cpp.config.Make.rules.diff \
43                patch-ice.cpp.config.Make.rules.Darwin.diff \
44                patch-ice.cpp.src.Ice.DynamicLibrary.cpp.diff \
45                patch-ice.cpp.src.IceGrid.DescriptorHelper.h.diff \
46                patch-ice.cpp.test.Ice.info.AllTests.cpp.diff \
47                patch-ice.cpp.test.IceGrid.admin.run.py.diff \
48                patch-ice.cpp.test.IceGrid.deployer.run.py.diff \
49                patch-ice.cpp.test.IceGrid.replicaGroup.run.py.diff \
50                patch-ice.cpp.test.include.TestCommon.h.diff \
51                patch-ice.scripts.TestUtil.py.diff
52
53patch.pre_args  -p1
54platforms       darwin
55
56depends_lib     port:db46 \
57                port:expat \
58                port:libiconv \
59                port:mcpp \
60                path:lib/libssl.dylib:openssl \
61                port:readline
62
63build.dir       ${worksrcpath}/cpp
64
65post-patch {
66    reinplace "s/-O2/-g -O2/" ${build.dir}/config/Make.rules.Darwin
67
68    # It appears that the 10.4 and 10.5 installed versions of
69    # ${prefix}/include/iconv.h have different definitions of
70    # the inbuf parameter to iconv(), one is 'const char* * inbuf'
71    # and the other is 'char* * inbuf'.  The Ice compile will
72    # fail if the wrong #define is choosen by Ice.
73    set fl [open ${prefix}/include/iconv.h]
74    set data [read $fl]
75    close $fl
76    foreach line [split $data \n] {
77        if {[string match "extern size_t iconv*const*" $line]} {
78            reinplace "s/_LIBICONV_VERSION < 0x010B/1/" \
79                ${build.dir}/include/Ice/IconvStringConverter.h
80            break
81        }
82    }
83
84    # Prevent name conflicts between libICE.* from xorg-libice and
85    # libIce.* from this port by renaming libIce.* to libZerocIce.*.
86    # For consistency, rename Ice's other shared libraries.
87    foreach f [exec find ${build.dir} -name Makefile] {
88        # To prevent replacements on slice2freeze's --dict argument,
89        # match exactly on a , or a ) that follows ,Ice\w*, e.g.:
90        # $(SLICE2FREEZE) --ice -I$(slicedir) --dict StringIsbnSeqDict,string,Ice::StringSeq
91        reinplace -E {s/,Ice([[:alnum:]]*[,)])/,ZerocIce\1/} ${f}
92        reinplace -E {s/-lIce([ A-Z]|$)/-lZerocIce\1/g} ${f}
93    }
94    reinplace -E {s/-lIce([ A-Z]|$)/-lZerocIce\1/g} \
95        ${build.dir}/config/Make.rules \
96        ${build.dir}/config/Make.rules.Darwin
97}
98
99use_configure   no
100
101build {
102    set jobsargs ""
103    if {${build.jobs} > 1} {
104        set jobsargs " -j${build.jobs}"
105    }
106
107    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}' all && cd doc && make${jobsargs}"
108    ui_debug ${cmd}
109    system ${cmd}
110}
111
112test.run        yes
113test.target     test
114
115destroot.target prefix="${prefix}" \
116                embedded_runpath_prefix="${prefix}" \
117                OPTIMIZE="yes" \
118                BZIP2_HOME="${prefix}" \
119                DB_HOME="${prefix}" \
120                EXPAT_HOME="${prefix}" \
121                OPENSSL_HOME="${prefix}" \
122                READLINE_HOME="${prefix}" \
123                USE_READLINE=yes \
124                MCPP_HOME="${prefix}" \
125                install
126
127post-destroot {
128    set sharedir ${destroot}${prefix}/share
129    set docdir ${sharedir}/doc/${name}
130
131    xinstall -m 755 -d ${sharedir}/ice
132    file rename ${destroot}${prefix}/config ${sharedir}/ice
133    file delete -force ${sharedir}/man
134    file rename ${destroot}${prefix}/man ${sharedir}/man
135    file rename ${destroot}${prefix}/slice ${sharedir}/slice
136
137    xinstall -m 755 -d ${docdir}
138    foreach f {CHANGES ICE_LICENSE LICENSE RELEASE_NOTES} {
139        file rename ${destroot}${prefix}/${f} ${docdir}
140    }
141    file copy ${build.dir}/doc/reference ${docdir}
142
143    if {[variant_isset demo_source_code]} {
144        system "cd ${build.dir}/demo && make clean"
145        file copy ${build.dir}/demo $docdir
146    }
147}
148
149variant demo_source_code description {Install demonstration C++ code} {
150}
Note: See TracBrowser for help on using the repository browser.