Ticket #34666: Portfile-cleanup.diff
File Portfile-cleanup.diff, 3.4 KB (added by lockhart (Thomas Lockhart), 12 years ago) |
---|
-
Portfile
old new 3 3 4 4 PortSystem 1.0 5 5 6 # Disable the full universal support since ACE already does most of this7 # and the extra stuff in muniversal (including making two build trees8 # and using libtool to merge libraries) does not work for this case.9 # PortGroup muniversal 1.010 11 6 name ace 12 7 set name_package ACE 13 8 version 6.1.2 14 revision 19 revision 2 15 10 distname ${name_package}-${version} 16 11 categories devel 17 12 maintainers fourpalms.org:lockhart openmaintainer … … 37 32 38 33 universal_variant yes 39 34 40 variant ssl description {Enable SSL} {41 depends_lib port:openssl42 }43 44 35 use_bzip2 yes 45 36 46 37 worksrcdir ACE_wrappers … … 61 52 11 lion 62 53 12 mountainlion 63 54 } 64 if {"darwin" == ${os.platform}} { 65 foreach {key value} [array get os.names] { 66 if {${key} == ${os.major}} { 67 set os.name ${value} 68 } 55 foreach {key value} [array get os.names] { 56 if {${key} == ${os.major}} { 57 set os.name ${value} 69 58 } 70 59 } 60 71 61 set libenv DYLD_LIBRARY_PATH=${worksrcpath}/lib 72 62 set aceenv ACE_ROOT=${worksrcpath} 73 63 set makearg INSTALL_PREFIX=${prefix} … … 78 68 ${worksrcpath}/ace/config.h \ 79 69 ${worksrcpath}/include/makeinclude/platform_macros.GNU 80 70 # disable the assignment for compilers in lion and use our environment instead 71 ui_info "patching platform_macosx_lion.GNU" 81 72 reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \ 82 73 ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU 83 74 reinplace "s|^\\(CC:=.*\\)|# \\1|g" \ 84 75 ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU 76 } 85 77 86 if {[variant_exists universal] && [variant_isset universal]} { 87 ui_debug "Enabling a universal build" 78 depends_lib-append path:bin/perl:perl5 79 80 proc setuniversalflags {fname cxxflags ldflags} { 81 set apat "-arch \[ \]*\[a-z\]\[_a-z0-9\]*" 82 if {[file exists ${fname}]} { 83 reinplace "s|^\\(\[ \]*FLAGS_C_CC\[ \]*+=\[ \]*\\)${apat}\\(\[ \]*${apat}\\)*|\\1${cxxflags}|g" \ 84 ${fname} 85 reinplace "s|^\\(\[ \]*LDFLAGS\[ \]*+=\[ \]*\\)${apat}\\(\[ \]*${apat}\\)*|\\1${ldflags}|g" \ 86 ${fname} 87 } else { 88 ui_warn "File ${fname} not found for patching" 89 } 90 } 91 92 variant universal { 93 post-patch { 94 ui_info "patching platform_macros.GNU" 88 95 reinplace "s|buildbits=64|buildbits=universal|g" \ 89 96 ${worksrcpath}/include/makeinclude/platform_macros.GNU 90 # do not set universal=1 which tries i386 and PPC but fails 91 reinplace "s|universal=0|universal=0|g" \ 92 ${worksrcpath}/include/makeinclude/platform_macros.GNU 97 setuniversalflags ${worksrcpath}/include/makeinclude/platform_macosx_${os.name}.GNU \ 98 ${configure.universal_cxxflags} ${configure.universal_ldflags} 93 99 } 100 } 94 101 95 if {[variant_exists ssl] && [variant_isset ssl]} { 96 ui_debug "Enabling SSL" 102 variant ssl description {Enable SSL} { 103 depends_lib-append port:openssl 104 105 post-patch { 97 106 reinplace "s|ssl=0|ssl=1|g" \ 98 107 ${worksrcpath}/include/makeinclude/platform_macros.GNU 99 108 } 100 109 } 101 110 102 depends_lib path:bin/perl:perl5103 104 111 use_configure no 105 112 106 113 use_parallel_build no