Revision: 130424 https://trac.macports.org/changeset/130424 Author: jeremyhu@macports.org Date: 2014-12-29 22:53:56 -0800 (Mon, 29 Dec 2014) Log Message: ----------- libcxx: Add a replacemnt_libcxx variant Modified Paths: -------------- trunk/dports/lang/libcxx/Portfile Modified: trunk/dports/lang/libcxx/Portfile =================================================================== --- trunk/dports/lang/libcxx/Portfile 2014-12-30 06:50:58 UTC (rev 130423) +++ trunk/dports/lang/libcxx/Portfile 2014-12-30 06:53:56 UTC (rev 130424) @@ -30,19 +30,24 @@ set root_path ${prefix}/var/host/${name}-${version}-${revision} -if {${os.major} >= 11} { - fetch {} - build {} - destroot { - xinstall -d ${destroot}${prefix}/share/doc/${name} - system "echo ${name} is an empty port on this OS version because the functionality is already provided by the OS. > ${destroot}${prefix}/share/doc/${name}/README.txt" +platform darwin { + if {${os.major} < 10} { + pre-fetch { + ui_error "${name} is not supported on Leopard or earlier." + error "unsupported platform" + } } -} elseif {${os.major} < 10} { - pre-fetch { - ui_error "${name} is not supported on Leopard or earlier." - error "unsupported platform" + + if {${os.major} < 11} { + post-activate { + system "ditto ${root_path} /" + } } -} else { +} + +variant replacemnt_libcxx description {EXPERTS ONLY: Build a replacement libcxxabi and libcxx even if it is already part of the base OS.} {} + +if {${os.major} < 11 || [variant_isset replacemnt_libcxx]} { # 3.5 and 3.6 are blacklisted to prevent dependency cycles compiler.blacklist *gcc* {clang < 100} macports-clang-3.5 macports-clang-3.6 @@ -61,18 +66,24 @@ # We want to use the host's libc++ everywhere because we want to ensure # that only *ONE* copy of this library is in any process's address space. - # On newer OS versions (Lion+), this port does not install anything. On - # Snow Leopard, this port provides this library in /usr for binary + # On Snow Leopard, this port provides this library in /usr for binary # compatibility with Lion and later. + # + # On newer OS version, this port does not install the content to /usr and + # just leaves it to expert users who may want to replace their system + # runtime. destroot { xinstall -m 755 -d ${destroot}${root_path}/usr/lib xinstall -m 755 ${worksrcpath}/lib/libc++.1.dylib ${destroot}${root_path}/usr/lib ln -s libc++.1.dylib ${destroot}${root_path}/usr/lib/libc++.dylib } - - post-activate { - system "ditto ${root_path} /" +} else { + fetch {} + build {} + destroot { + xinstall -d ${destroot}${prefix}/share/doc/${name} + system "echo ${name} is an empty port on this OS version because the functionality is already provided by the OS. > ${destroot}${prefix}/share/doc/${name}/README.txt" } }
participants (1)
-
jeremyhu@macports.org