Revision: 140142 https://trac.macports.org/changeset/140142 Author: sean@macports.org Date: 2015-09-09 14:28:15 -0700 (Wed, 09 Sep 2015) Log Message: ----------- rust-src: add port for rust source code The benefit of having this in a subport is that it is automatically kept in line with the rust compiler version. Modified Paths: -------------- trunk/dports/lang/rust/Portfile Modified: trunk/dports/lang/rust/Portfile =================================================================== --- trunk/dports/lang/rust/Portfile 2015-09-09 21:28:13 UTC (rev 140141) +++ trunk/dports/lang/rust/Portfile 2015-09-09 21:28:15 UTC (rev 140142) @@ -135,11 +135,38 @@ destroot.args VERBOSE=1 post-destroot { - xinstall -d ${destroot}${prefix}/share/${name} - xinstall -m 644 ${worksrcpath}/src/etc/ctags.rust \ - ${destroot}${prefix}/share/${name} + if {${subport} eq ${name}} { + xinstall -d ${destroot}${prefix}/share/${name} + xinstall -m 644 ${worksrcpath}/src/etc/ctags.rust \ + ${destroot}${prefix}/share/${name} + } } livecheck.type regex livecheck.url ${homepage}/install.html livecheck.regex {dist/rust-(\d\.\d)} + +subport rust-src { + # remove dependencies + depends_build + depends_lib + + description Source code for the rust programming language + long_description ${description} + + use_configure no + + build {} + + destroot { + xinstall -d ${destroot}${prefix}/share/rust + move ${worksrcpath}/src ${destroot}${prefix}/share/rust/src + + # correct the permissions + system -W ${destroot}${prefix}/share/rust "find . -type d -exec chmod 755 {} \\;" + system -W ${destroot}${prefix}/share/rust "find . -type f -exec chmod 644 {} \\;" + + # delete the test directories (which for some god awful reason contains binaries) + system -W ${destroot}${prefix}/share/rust "find . -type d -name test -print0 | xargs -0 rm -rf" + } +}
participants (1)
-
sean@macports.org