Ticket #54289: lcxx+runtime.diff
File lcxx+runtime.diff, 3.1 KB (added by RJVB (René Bertin), 7 years ago) |
---|
-
lang/libcxx/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 or the optlibs script\; \ 19 applications started that way will then use a more recent libc++ than the host provides. 18 20 19 21 homepage http://libcxx.llvm.org/ 20 22 … … 50 52 } 51 53 52 54 variant replacemnt_libcxx description {EXPERTS ONLY: Build a replacement libcxxabi and libcxx even if it is already part of the base OS.} {} 55 variant runtime description "Install the libcxx library so that it can be used with DYLD_INSERT_LIBRARIES" { 56 depends_build-append \ 57 port:cctools 58 } 59 53 60 54 if {${os.major} < 11 || [variant_isset replacemnt_libcxx] } {61 if {${os.major} < 11 || [variant_isset replacemnt_libcxx] || [variant_isset runtime]} { 55 62 compiler.blacklist *gcc* {clang < 500} 56 63 57 64 # clang 3.5 and newer are blacklisted to prevent dependency cycles … … 98 107 # runtime. 99 108 100 109 destroot { 101 xinstall -m 755 -d ${destroot}${roots_path}/${root_name}/usr/lib 102 xinstall -m 755 ${worksrcpath}/lib/libc++.1.dylib ${destroot}${roots_path}/${root_name}/usr/lib 103 ln -s libc++.1.dylib ${destroot}${roots_path}/${root_name}/usr/lib/libc++.dylib 110 if {[variant_isset replacemnt_libcxx]} { 111 xinstall -m 755 -d ${destroot}${roots_path}/${root_name}/usr/lib 112 xinstall -m 755 ${worksrcpath}/lib/libc++.1.dylib ${destroot}${roots_path}/${root_name}/usr/lib 113 ln -s libc++.1.dylib ${destroot}${roots_path}/${root_name}/usr/lib/libc++.dylib 104 114 105 system "cd ${destroot}${roots_path}/${root_name} && tar czf ../${root_name}.tgz ." 106 file delete -force ${destroot}${roots_path}/${root_name} 115 system "cd ${destroot}${roots_path}/${root_name} && tar czf ../${root_name}.tgz ." 116 file delete -force ${destroot}${roots_path}/${root_name} 117 } 118 if {[variant_isset runtime]} { 119 # install only the runtime library so it will not be picked up by the linker/editor! 120 xinstall -m 755 ${worksrcpath}/lib/libc++.1.dylib ${destroot}${prefix}/lib/ 121 system "install_name_tool -id ${prefix}/lib/libc++.1.dylib ${destroot}${prefix}/lib/libc++.1.dylib" 122 xinstall -m 755 ${filespath}/optlibs.sh ${destroot}${prefix}/bin/optlibs 123 reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${prefix}/bin/optlibs 124 } 107 125 } 108 126 } else { 109 127 distfiles