# -*- 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 # $Id$ # MacPorts specification for the TAO CORBA package. # Includes ACE even though the ace port is available # since TAO can not be built against an installed version of ACE. # Thanks to the boost port maintainers for a great example to follow. # Thomas Lockhart # 2012-02-06 PortSystem 1.0 name tao set name_package ACE+TAO version 6.3.3 distname ${name_package}-${version} categories devel platforms darwin license BSD maintainers gmail.com:tlockhart1976 openmaintainer description The ACE ORB CORBA real-time middleware long_description The ACE ORB (TAO) is a real-time implementation of CORBA built using the \ framework components and patterns provided by ACE. TAO contains the \ network interface, OS, communication protocol, and CORBA middleware \ components and features. TAO is based on the standard OMG CORBA \ reference model, with the enhancements designed to overcome the \ shortcomings of conventional ORBs for high-performance and real-time \ applications. conflicts ace libACE homepage http://www.cs.wustl.edu/~schmidt/TAO.html master_sites http://download.dre.vanderbilt.edu/previous_versions \ ftp://download.dre.vanderbilt.edu/previous_versions universal_variant yes default_variants +server use_bzip2 yes worksrcdir ACE_wrappers patch.pre_args -p1 patchfiles patch-ace-config.h.diff \ patch-include-makeinclude-platform_macros.GNU.diff checksums rmd160 eec7ee3d00ce60665bba0855e202ac79462a89ef \ sha256 f99169f79ea5ef8f7f7a977994a8f0fcc6a2015df0eca83bd55172d8cfacb55e set os.name "mavericks" array set os.names { 7 panther 8 tiger 9 leopard 10 snowleopard 11 lion 12 mountainlion 13 mavericks } foreach {key value} [array get os.names] { if {${key} == ${os.major}} { set os.name ${value} } } set libenv DYLD_LIBRARY_PATH=${worksrcpath}/lib set aceenv ACE_ROOT=${worksrcpath} set taoenv TAO_ROOT=${worksrcpath}/TAO set makearg INSTALL_PREFIX=${prefix} set logdir ${prefix}/var/log/tao set taodaemon tao_cosnaming set daemondir ${prefix}/etc/LaunchDaemons/org.macports.${taodaemon} set taouser _tao # set subdirs { . TAO } set subdirs { ace ACEXML ASNMP Kokyu apps netsvcs TAO/TAO_IDL TAO/tao TAO/orbsvcs TAO/utils } add_users ${taouser} group=${taouser} realname=TAO\ Server post-extract { copy ${filespath}/org.macports.${taodaemon}.plist ${worksrcpath}/ } post-patch { reinplace "s|@MACOSX@|${os.name}|g" \ ${worksrcpath}/ace/config.h \ ${worksrcpath}/include/makeinclude/platform_macros.GNU # Disable the assignment for compilers in lion and use our environment instead ui_info "patching platform_macosx_lion.GNU" reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \ ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU reinplace "s|^\\(CC:=.*\\)|# \\1|g" \ ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU } depends_lib-append path:bin/perl:perl5 \ port:tcl \ port:zlib variant universal { post-patch { ui_info "patching platform_macros.GNU" reinplace "s|buildbits=64|buildbits=universal|g" \ ${worksrcpath}/include/makeinclude/platform_macros.GNU set apat "-arch \[ \]*\[a-z\]\[_a-z0-9\]*" reinplace "s|${apat}\\(\[ \]*${apat}\\)*|${configure.universal_cxxflags}|g" \ ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU ui_info "patching platform_macosx_snowleopard.GNU" reinplace "s|${apat}\\(\[ \]*${apat}\\)*|${configure.universal_cxxflags}|g" \ ${worksrcpath}/include/makeinclude/platform_macosx_snowleopard.GNU } } variant ssl description {Enable SSL} { depends_lib-append path:lib/libssl.dylib:openssl post-patch { reinplace "s|ssl=0|ssl=1|g" \ ${worksrcpath}/include/makeinclude/platform_macros.GNU } } variant server description {Enable CosNaming server} { post-patch { ui_info "patching org.macports.${taodaemon}.plist" reinplace "s|@PREFIX@|${prefix}|g" \ ${worksrcpath}/org.macports.${taodaemon}.plist reinplace "s|@USER@|${taouser}|g" \ ${worksrcpath}/org.macports.${taodaemon}.plist reinplace "s|@DAEMON@|${taodaemon}|g" \ ${worksrcpath}/org.macports.${taodaemon}.plist } startupitem.create yes startupitem.name ${taodaemon} } use_configure no use_parallel_build no build.env "${libenv} ${aceenv} ${taoenv}" build.args-append CC=${configure.cc} \ CXX=${configure.cxx} \ CPP=${configure.cpp} build.pre_args ${makearg} all build { foreach {subdir} $subdirs { build.dir ${worksrcpath}/${subdir} command_exec build } } destroot.env "${libenv} ${aceenv} ${taoenv}" destroot.pre_args ${makearg} install destroot.keepdirs ${logdir} destroot { xinstall -d -o ${taouser} -m 0755 ${logdir} foreach {subdir} $subdirs { destroot.dir ${worksrcpath}/${subdir} command_exec destroot } xinstall -d -m 0755 ${destroot}${daemondir} copy ${worksrcpath}/org.macports.${taodaemon}.plist \ ${destroot}${daemondir}/org.macports.${taodaemon}.plist # Files required to build CosEvent classes but not installed copy ${worksrcpath}/TAO/orbsvcs/orbsvcs/ESF ${destroot}/${prefix}/include/orbsvcs/ESF } pre-activate { if { [file exists ${daemondir}/org.macports.${taodaemon}.plist] } { catch {[file delete -force ${daemondir}/org.macports.${taodaemon}.plist]} } } pre-deactivate { if { [file exists ${daemondir}/org.macports.${taodaemon}.plist] } { catch {system "launchctl unload ${daemondir}/org.macports.${taodaemon}.plist"} } } livecheck.type regex livecheck.url ${master_sites} livecheck.regex "ACE\\+TAO-(\[0-9.\]+\[0-9\]+)${extract.suffix}"