Ticket #34667: Portfile-cleanup.diff
File Portfile-cleanup.diff, 5.7 KB (added by lockhart (Thomas Lockhart), 12 years ago) |
---|
-
Portfile
old new 1 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 93 517 2012-05-25 14:24:34Z pixilla@macports.org $2 # $Id: Portfile 93489 2012-05-24 05:19:35Z ryandesign@macports.org $ 3 3 4 4 # MacPorts specification for the TAO CORBA package. 5 5 # Includes ACE even though the ace port is available … … 10 10 11 11 PortSystem 1.0 12 12 13 # Disable the full universal support since TAO already does most of this14 # and the extra stuff in muniversal (including making two build trees15 # and using libtool to merge libraries) does not work for this case.16 # PortGroup muniversal 1.017 18 13 name tao 19 14 set name_package ACE+TAO 20 15 version 6.1.2 21 revision 116 revision 2 22 17 distname ${name_package}-${version} 23 18 categories devel 24 19 platforms darwin … … 40 35 ftp://download.dre.vanderbilt.edu/previous_versions 41 36 42 37 universal_variant yes 43 44 variant ssl description {Enable SSL} { 45 depends_lib port:openssl 46 } 38 default_variants +server 47 39 48 40 use_bzip2 yes 49 41 … … 70 62 set os.name ${value} 71 63 } 72 64 } 65 73 66 set libenv DYLD_LIBRARY_PATH=${worksrcpath}/lib 74 67 set aceenv ACE_ROOT=${worksrcpath} 75 68 set taoenv TAO_ROOT=${worksrcpath}/TAO … … 92 85 reinplace "s|@MACOSX@|${os.name}|g" \ 93 86 ${worksrcpath}/ace/config.h \ 94 87 ${worksrcpath}/include/makeinclude/platform_macros.GNU 95 # disable the assignment for compilers in lion and use our environment instead 88 # Disable the assignment for compilers in lion and use our environment instead 89 ui_info "patching platform_macosx_lion.GNU" 96 90 reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \ 97 91 ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU 98 92 reinplace "s|^\\(CC:=.*\\)|# \\1|g" \ 99 93 ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU 94 } 100 95 101 if {[variant_exists universal] && [variant_isset universal]} { 102 ui_debug "Enabling a universal build" 96 depends_lib-append path:bin/perl:perl5 \ 97 port:tcl \ 98 port:zlib 99 100 proc setuniversalflags {fname cxxflags ldflags} { 101 set apat "-arch \[ \]*\[a-z\]\[_a-z0-9\]*" 102 if {[file exists ${fname}]} { 103 reinplace "s|^\\(\[ \]*FLAGS_C_CC\[ \]*+=\[ \]*\\)${apat}\\(\[ \]*${apat}\\)*|\\1${cxxflags}|g" \ 104 ${fname} 105 reinplace "s|^\\(\[ \]*LDFLAGS\[ \]*+=\[ \]*\\)${apat}\\(\[ \]*${apat}\\)*|\\1${ldflags}|g" \ 106 ${fname} 107 } else { 108 ui_warn "File ${fname} not found for patching" 109 } 110 } 111 112 variant universal { 113 post-patch { 114 ui_info "patching platform_macros.GNU" 103 115 reinplace "s|buildbits=64|buildbits=universal|g" \ 104 116 ${worksrcpath}/include/makeinclude/platform_macros.GNU 105 # do not set universal=1 which tries i386 and PPC but fails 106 reinplace "s|universal=0|universal=0|g" \ 107 ${worksrcpath}/include/makeinclude/platform_macros.GNU 117 setuniversalflags ${worksrcpath}/include/makeinclude/platform_macosx_${os.name}.GNU \ 118 ${configure.universal_cxxflags} ${configure.universal_ldflags} 108 119 } 120 } 121 122 variant ssl description {Enable SSL} { 123 depends_lib-append port:openssl 109 124 110 if {[variant_exists ssl] && [variant_isset ssl]} { 111 ui_debug "Enabling SSL" 125 post-patch { 112 126 reinplace "s|ssl=0|ssl=1|g" \ 113 127 ${worksrcpath}/include/makeinclude/platform_macros.GNU 114 128 } 115 116 reinplace "s|@PREFIX@|${prefix}|g" \117 ${worksrcpath}/org.macports.${taodaemon}.plist118 reinplace "s|@USER@|${taouser}|g" \119 ${worksrcpath}/org.macports.${taodaemon}.plist120 reinplace "s|@DAEMON@|${taodaemon}|g" \121 ${worksrcpath}/org.macports.${taodaemon}.plist122 129 } 123 130 124 depends_lib path:bin/perl:perl5 \ 125 port:tcl \ 126 port:zlib 131 variant server description {Enable CosNaming server} { 132 post-patch { 133 ui_info "patching org.macports.${taodaemon}.plist" 134 reinplace "s|@PREFIX@|${prefix}|g" \ 135 ${worksrcpath}/org.macports.${taodaemon}.plist 136 reinplace "s|@USER@|${taouser}|g" \ 137 ${worksrcpath}/org.macports.${taodaemon}.plist 138 reinplace "s|@DAEMON@|${taodaemon}|g" \ 139 ${worksrcpath}/org.macports.${taodaemon}.plist 140 } 141 142 pre-install { 143 delete ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/org.macports.${taodaemon}.plist 144 delete ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/${taodaemon}.wrapper 145 copy ${worksrcpath}/org.macports.${taodaemon}.plist \ 146 ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/org.macports.${taodaemon}.plist 147 } 148 149 startupitem.create yes 150 startupitem.name ${taodaemon} 151 } 127 152 128 153 use_configure no 129 154 … … 153 178 # Files required to build CosEvent classes but not installed 154 179 copy ${worksrcpath}/TAO/orbsvcs/orbsvcs/ESF ${destroot}/${prefix}/include/orbsvcs/ESF 155 180 } 156 pre-install {157 delete ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/org.macports.${taodaemon}.plist158 delete ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/${taodaemon}.wrapper159 copy ${worksrcpath}/org.macports.${taodaemon}.plist \160 ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${taodaemon}/org.macports.${taodaemon}.plist161 }162 startupitem.create yes163 startupitem.name ${taodaemon}164 181 165 182 livecheck.type regex 166 183 livecheck.url ${master_sites}