source: trunk/dports/devel/tao/Portfile

Last change on this file was 140605, checked in by ryandesign@…, 2 years ago

tao: update to 6.3.3 (#48901; maintainer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.3 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 140605 2015-09-27 08:33:50Z ryandesign@macports.org $
3
4# MacPorts specification for the TAO CORBA package.
5# Includes ACE even though the ace port is available
6# since TAO can not be built against an installed version of ACE.
7# Thanks to the boost port maintainers for a great example to follow.
8# Thomas Lockhart
9# 2012-02-06
10
11PortSystem          1.0
12
13name                tao
14set name_package    ACE+TAO
15version             6.3.3
16distname            ${name_package}-${version}
17categories          devel
18platforms           darwin
19license             BSD
20maintainers         gmail.com:tlockhart1976 openmaintainer
21description         The ACE ORB CORBA real-time middleware
22long_description    The ACE ORB (TAO) is a real-time implementation of CORBA built using the \
23                    framework components and patterns provided by ACE. TAO contains the \
24                    network interface, OS, communication protocol, and CORBA middleware \
25                    components and features. TAO is based on the standard OMG CORBA \
26                    reference model, with the enhancements designed to overcome the \
27                    shortcomings of conventional ORBs for high-performance and real-time \
28                    applications.
29
30conflicts           ace libACE
31
32homepage            http://www.cs.wustl.edu/~schmidt/TAO.html
33master_sites        http://download.dre.vanderbilt.edu/previous_versions \
34                    ftp://download.dre.vanderbilt.edu/previous_versions
35
36universal_variant   yes
37default_variants    +server
38
39use_bzip2           yes
40
41worksrcdir          ACE_wrappers
42
43patch.pre_args      -p1
44patchfiles          patch-ace-config.h.diff \
45                    patch-include-makeinclude-platform_macros.GNU.diff
46
47checksums           rmd160  eec7ee3d00ce60665bba0855e202ac79462a89ef \
48                    sha256  f99169f79ea5ef8f7f7a977994a8f0fcc6a2015df0eca83bd55172d8cfacb55e
49
50set os.name "mavericks"
51array set os.names {
52     7  panther
53     8  tiger
54     9  leopard
55    10  snowleopard
56    11  lion
57    12  mountainlion
58    13  mavericks
59}
60foreach {key value} [array get os.names]  {
61    if {${key} == ${os.major}} {
62        set os.name ${value}
63    }
64}
65
66set libenv          DYLD_LIBRARY_PATH=${worksrcpath}/lib
67set aceenv          ACE_ROOT=${worksrcpath}
68set taoenv          TAO_ROOT=${worksrcpath}/TAO
69set makearg         INSTALL_PREFIX=${prefix}
70set logdir          ${prefix}/var/log/tao
71set taodaemon       tao_cosnaming
72set daemondir       ${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}
73set taouser         _tao
74# set subdirs         { . TAO }
75set subdirs         { ace ACEXML ASNMP Kokyu apps netsvcs TAO/TAO_IDL TAO/tao TAO/orbsvcs TAO/utils }
76
77add_users ${taouser} group=${taouser} realname=TAO\ Server
78
79post-extract {
80    copy ${filespath}/org.macports.${taodaemon}.plist ${worksrcpath}/
81}
82
83post-patch {
84    reinplace "s|@MACOSX@|${os.name}|g" \
85        ${worksrcpath}/ace/config.h \
86        ${worksrcpath}/include/makeinclude/platform_macros.GNU
87    # Disable the assignment for compilers in lion and use our environment instead
88    ui_info "patching platform_macosx_lion.GNU"
89    reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \
90        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
91    reinplace "s|^\\(CC:=.*\\)|# \\1|g" \
92        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
93}
94
95depends_lib-append  path:bin/perl:perl5 \
96                    port:tcl \
97                    port:zlib
98
99variant universal {
100    post-patch {
101        ui_info "patching platform_macros.GNU"
102        reinplace "s|buildbits=64|buildbits=universal|g" \
103            ${worksrcpath}/include/makeinclude/platform_macros.GNU
104        set apat "-arch \[ \]*\[a-z\]\[_a-z0-9\]*"
105        reinplace "s|${apat}\\(\[ \]*${apat}\\)*|${configure.universal_cxxflags}|g" \
106            ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
107        ui_info "patching platform_macosx_snowleopard.GNU"
108        reinplace "s|${apat}\\(\[ \]*${apat}\\)*|${configure.universal_cxxflags}|g" \
109            ${worksrcpath}/include/makeinclude/platform_macosx_snowleopard.GNU
110    }
111}
112
113variant ssl description {Enable SSL} {
114    depends_lib-append path:lib/libssl.dylib:openssl
115
116    post-patch {
117        reinplace "s|ssl=0|ssl=1|g" \
118            ${worksrcpath}/include/makeinclude/platform_macros.GNU
119    }
120}
121
122variant server description {Enable CosNaming server} {
123    post-patch {
124        ui_info "patching org.macports.${taodaemon}.plist"
125        reinplace "s|@PREFIX@|${prefix}|g" \
126            ${worksrcpath}/org.macports.${taodaemon}.plist
127        reinplace "s|@USER@|${taouser}|g" \
128            ${worksrcpath}/org.macports.${taodaemon}.plist
129        reinplace "s|@DAEMON@|${taodaemon}|g" \
130            ${worksrcpath}/org.macports.${taodaemon}.plist
131    }
132
133    startupitem.create  yes
134    startupitem.name    ${taodaemon}
135}
136
137use_configure       no
138
139use_parallel_build  no
140
141build.env           "${libenv} ${aceenv} ${taoenv}"
142build.args-append   CC=${configure.cc} \
143                    CXX=${configure.cxx} \
144                    CPP=${configure.cpp}
145build.pre_args      ${makearg} all
146build {
147    foreach {subdir} $subdirs {
148        build.dir ${worksrcpath}/${subdir}
149        command_exec build
150    }
151}
152
153destroot.env        "${libenv} ${aceenv} ${taoenv}"
154destroot.pre_args   ${makearg} install
155destroot.keepdirs   ${logdir}
156destroot {
157    xinstall -d -o ${taouser} -m 0755 ${logdir}
158    foreach {subdir} $subdirs {
159        destroot.dir ${worksrcpath}/${subdir}
160        command_exec destroot
161    }
162    xinstall -d -m 0755 ${destroot}${daemondir}
163    copy ${worksrcpath}/org.macports.${taodaemon}.plist \
164        ${destroot}${daemondir}/org.macports.${taodaemon}.plist
165    # Files required to build CosEvent classes but not installed
166    copy ${worksrcpath}/TAO/orbsvcs/orbsvcs/ESF ${destroot}/${prefix}/include/orbsvcs/ESF
167}
168
169pre-activate {
170    if { [file exists ${daemondir}/org.macports.${taodaemon}.plist] } {
171        catch {[file delete -force ${daemondir}/org.macports.${taodaemon}.plist]}
172    }
173}
174
175pre-deactivate {
176    if { [file exists ${daemondir}/org.macports.${taodaemon}.plist] } {
177        catch {system "launchctl unload ${daemondir}/org.macports.${taodaemon}.plist"}
178    }
179}
180
181livecheck.type      regex
182livecheck.url       ${master_sites}
183livecheck.regex     "ACE\\+TAO-(\[0-9.\]+\[0-9\]+)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.