source: trunk/dports/devel/tao/Portfile @ 128303

Last change on this file since 128303 was 128303, checked in by pixilla@…, 4 years ago

devel/tao:

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