Ticket #33339: Portfile

File Portfile, 4.8 KB (added by lockhart (Thomas Lockhart), 13 years ago)

Full Portfile for TAO-2.1.1 including all of Bradley's fixups and suggestions.

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$
3
4# MacPorts specification for the TAO CORBA package.
5# Includes ACE even though the libACE package 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
12PortGroup           muniversal 1.0
13
14name                tao
15set name_package    ACE+TAO
16version             6.1.1
17distname            ${name_package}-${version}
18categories          devel
19platforms           darwin
20license             BSD
21maintainers         fourpalms.org:lockhart
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
37use_bzip2           yes
38checksums           rmd160  a5ea828a92806cc407e1aeb3e3d48a530aa2948d \
39                    sha256  db1b81941fcf665b7b7054db8bfca15c49d57dcb4c144016d5391b2fe6ca8cad
40
41worksrcdir          ACE_wrappers
42
43patch.pre_args      -p1
44patchfiles          patch-ace-config.h.diff \
45                    patch-include-makeinclude-platform_macros.GNU.diff
46
47set os.name         "lion"
48array set os.names {
49     7  panther
50     8  tiger
51     9  leopard
52    10  snowleopard
53    11  lion
54    12  mountainlion
55}
56foreach {key value} [array get os.names]  {
57    if {${key} == ${os.major}} {
58        set os.name ${value}
59    }
60}
61set libenv          "DYLD_LIBRARY_PATH=${worksrcpath}/lib"
62set aceenv          "ACE_ROOT=${worksrcpath}"
63set taoenv          "TAO_ROOT=${worksrcpath}/TAO"
64set makearg         "INSTALL_PREFIX=${prefix}"
65set logdir          ${prefix}/var/log/tao
66set taodaemon       tao_cosnaming
67set taouser         _tao
68set subdirs         { . TAO }
69# set subdirs         { ace ACEXML ASNMP Kokyu MPC apps docs netsvcs TAO/tao TAO/orbsvcs }
70# set subdirs         { ace ACEXML ASNMP Kokyu apps TAO/TAO_IDL TAO/tao TAO/orbsvcs }
71
72add_users ${taouser} group=${taouser} realname=TAO\ Server
73
74post-extract {
75    copy ${filespath}/org.macports.${taodaemon}.plist \
76        ${worksrcpath}/
77}
78
79post-patch {
80    reinplace "s|@MACOSX@|${os.name}|g" \
81        ${worksrcpath}/ace/config.h \
82        ${worksrcpath}/include/makeinclude/platform_macros.GNU
83    reinplace "s|@PREFIX@|${prefix}|g" \
84        ${worksrcpath}/org.macports.${taodaemon}.plist
85    reinplace "s|@USER@|${taouser}|g" \
86        ${worksrcpath}/org.macports.${taodaemon}.plist
87    reinplace "s|@DAEMON@|${taodaemon}|g" \
88        ${worksrcpath}/org.macports.${taodaemon}.plist
89}
90
91depends_lib         path:bin/perl:perl5 \
92                    port:tcl \
93                    port:zlib
94
95use_configure       no
96configure.cmd       "\$ACE_ROOT/bin/mpc.pl"
97configure.args      -type gnuace TAO_ACE.mwc
98configure.universal_args
99
100post-configure {}
101
102use_parallel_build  no
103
104build.env           "${libenv} ${aceenv} ${taoenv}"
105build.pre_args      ${makearg} all
106build {
107    foreach {subdir} $subdirs {
108        build.dir           ${worksrcpath}/${subdir}
109        command_exec build
110    }
111}
112
113destroot.env        "${libenv} ${aceenv} ${taoenv}"
114destroot.pre_args   ${makearg} install
115destroot.keepdirs   ${logdir}
116destroot {
117    xinstall -d -o ${taouser} -m 0755 ${logdir}
118    foreach {subdir} $subdirs {
119        destroot.dir        ${worksrcpath}/${subdir}
120        command_exec destroot
121    }
122    # Files required to build CosEvent classes but not installed
123    copy ${worksrcpath}/TAO/orbsvcs/orbsvcs/ESF ${destroot}/${prefix}/include/orbsvcs/ESF
124}
125pre-install {
126    delete ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/org.macports.${taodaemon}.plist
127    delete ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/${taodaemon}.wrapper
128    copy ${worksrcpath}/org.macports.${taodaemon}.plist \
129        ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/org.macports.${taodaemon}.plist
130}
131startupitem.create  yes
132startupitem.name    ${taodaemon}
133
134livecheck.type      regex
135livecheck.url       ${master_sites}
136livecheck.regex     "ACE\\+TAO-(\[0-9.\]+\[0-9\]+)${extract.suffix}"