Ticket #54289: lcxxabi+runtime.diff
File lcxxabi+runtime.diff, 3.7 KB (added by RJVB (René Bertin), 7 years ago) |
---|
-
lang/libcxxabi/Portfile
old new 14 14 replace the host version in order to be used. On Snow Leopard and earlier, this is done \ 15 15 automatically because there is no existing host version of this library. On Lion and later, \ 16 16 users must build the port with +replacemnt_libcxx and install the root manually if they wish \ 17 to replace the existing host implementation. 17 to replace the existing host implementation. They can also use the +runtime variant which installs \ 18 copies of the library that can be loaded via DYLD_INSERT_LIBRARIES\; \ 19 applications started that way will then use a more recent libc++abi than the host provides. 18 20 19 21 homepage http://libcxxabi.llvm.org/ 20 22 … … 55 57 } 56 58 57 59 variant replacemnt_libcxx description {EXPERTS ONLY: Build a replacement libcxxabi and libcxx even if it is already part of the base OS.} {} 60 variant runtime description "Install the libcxxabi library so that it can be used with DYLD_INSERT_LIBRARIES" { 61 depends_build-append \ 62 port:cctools 63 } 58 64 59 if {${os.major} < 11 || [variant_isset replacemnt_libcxx] } {65 if {${os.major} < 11 || [variant_isset replacemnt_libcxx] || [variant_isset runtime]} { 60 66 compiler.blacklist *gcc* {clang < 300} 61 67 62 68 # clang 3.5 and newer are blacklisted to prevent dependency cycles … … 102 110 CXX="${configure.cxx} ${configure.cppflags}" \ 103 111 RC_XBS=1 \ 104 112 RC_CFLAGS="[get_canonical_archflags]" \ 113 CXXFLAGS="${configure.optflags}" \ 105 114 RC_ProjectSourceVersion="${version}" \ 106 115 TRIPLE="-apple-darwin${os.major}" 107 116 … … 115 124 # runtime. 116 125 117 126 destroot { 118 xinstall -m 755 -d ${destroot}${roots_path}/${root_name}/usr/lib 119 xinstall -m 755 ${worksrcpath}/lib/libc++abi.dylib ${destroot}${roots_path}/${root_name}/usr/lib 120 121 xinstall -m 755 -d ${destroot}${roots_path}/${root_name}/usr/include 122 xinstall -m 644 ${worksrcpath}/include/__cxxabi_config.h ${destroot}${roots_path}/${root_name}/usr/include 123 xinstall -m 644 ${worksrcpath}/include/cxxabi.h ${destroot}${roots_path}/${root_name}/usr/include 127 if {[variant_isset replacemnt_libcxx]} { 128 xinstall -m 755 -d ${destroot}${roots_path}/${root_name}/usr/lib 129 xinstall -m 755 ${worksrcpath}/lib/libc++abi.dylib ${destroot}${roots_path}/${root_name}/usr/lib 130 131 xinstall -m 755 -d ${destroot}${roots_path}/${root_name}/usr/include 132 xinstall -m 644 ${worksrcpath}/include/__cxxabi_config.h ${destroot}${roots_path}/${root_name}/usr/include 133 xinstall -m 644 ${worksrcpath}/include/cxxabi.h ${destroot}${roots_path}/${root_name}/usr/include 124 134 125 system "cd ${destroot}${roots_path}/${root_name} && tar czf ../${root_name}.tgz ." 126 file delete -force ${destroot}${roots_path}/${root_name} 135 system "cd ${destroot}${roots_path}/${root_name} && tar czf ../${root_name}.tgz ." 136 file delete -force ${destroot}${roots_path}/${root_name} 137 } 138 if {[variant_isset runtime]} { 139 # install as a runtime library that will not be picked up by the linker/editor! 140 xinstall -m 755 ${worksrcpath}/lib/libc++abi.dylib ${destroot}${prefix}/lib/libc++abi.1.dylib 141 system "install_name_tool -id ${prefix}/lib/libc++abi.1.dylib ${destroot}${prefix}/lib/libc++abi.1.dylib" 142 } 127 143 } 128 144 } else { 129 145 distfiles