Ticket #38279: rust.diff
File rust.diff, 6.4 KB (added by g5pw (Aljaž Srebrnič), 12 years ago) |
---|
-
Portfile
6 6 name rust 7 7 version 0.5 8 8 maintainers g5pw openmaintainer 9 license {MIT Apache-2} 9 10 10 11 categories lang devel 11 12 description Compiler for the Rust programming language … … 15 16 platforms darwin 16 17 17 18 homepage http://www.rust-lang.org 18 master_sites http://dl.rust-lang.org/dist 19 master_sites http://static.rust-lang.org/dist:main \ 20 http://static.rust-lang.org/stage0-snapshots:stage0 19 21 20 checksums rmd160 b4988da7be984aa1337f4076e96e6d0c72e3170d \ 21 sha256 d326d22707f0562d669c11efbc33ae812ddbf76ab78f07087fc5beb095a8928a 22 # Rust has not added universal binary support: https://github.com/mozilla/rust/issues/2024 23 supported_archs i386 x86_64 24 universal_variant no 25 26 # Download the right bootstrap compiler 27 if {${os.platform} == "darwin" && $build_arch == "x86_64"} { 28 set rust-stage0 rust-stage0-2012-12-19-8554d5e-macos-x86_64-e4564933f11b17f7dbd25b61032233693da21dc5.tar.bz2 29 } elseif {${os.platform} == "darwin" && $build_arch == "i386"} { 30 set rust-stage0 rust-stage0-2012-12-19-8554d5e-macos-i386-151ff211c01f0b7a1895b93ff0bc021bf1472346.tar.bz2 31 } 32 33 set rust-local-root ${worksrcpath}/${build_arch}-apple-darwin/stage0 34 35 distfiles-append ${rust-stage0}:stage0 36 extract.only-delete ${rust-stage0} 37 38 checksums rust-0.5.tar.gz \ 39 rmd160 b4988da7be984aa1337f4076e96e6d0c72e3170d \ 40 rust-stage0-2012-12-19-8554d5e-macos-x86_64-e4564933f11b17f7dbd25b61032233693da21dc5.tar.bz2 \ 41 rmd160 3d966bd2d17e3f2c74ed78f3674439c89d5a16ee \ 42 sha256 a2e287a683128e2e213e11c5b9f92e5e628eb63163591d61523549deb2e21f7d \ 43 rust-stage0-2012-12-19-8554d5e-macos-i386-151ff211c01f0b7a1895b93ff0bc021bf1472346.tar.bz2 \ 44 rmd160 300b17458073a8704817821bd5406189a264f765 \ 45 sha256 5e598d4c45ee2dd8b7f2b69d92f60d16e57991e796d76ca255a612357a5e48e0 46 47 # Configure patch needed to accept LLVM backends higher than 3.1 48 # Stage0.pk patch nixes download 49 patchfiles configure.patch \ 50 mk-stage0.mk.patch \ 51 mk-platform.mk.patch 22 52 23 53 configure.universal_args-delete \ 24 54 --disable-dependency-tracking 25 55 56 configure.args-append \ 57 --disable-docs 58 59 26 60 # There's a makefile that ignores the configure script CC options, this makes \ 27 61 # it behave. 28 62 build.args-append CC=${configure.cc} \ 29 63 CXX=${configure.cxx} \ 30 64 CPP=${configure.cpp} 31 65 66 post-extract { 67 file mkdir ${worksrcpath}/${build_arch}-apple-darwin 68 system -W ${workpath} "gnutar --no-same-owner -xf ${distpath}/${rust-stage0}" 69 move ${workpath}/rust-stage0 ${rust-local-root} 70 } 71 72 variant llvm30 description {Use LLVM 3.0 backend} conflicts llvm31 llvm32 llvm33 { 73 depends_lib-append port:llvm-3.0 74 configure.args-append \ 75 --llvm-root=${prefix}/libexec/llvm-3.0 76 } 77 78 variant llvm31 description {Use LLVM 3.1 backend} conflicts llvm30 llvm32 llvm33 { 79 depends_lib-append port:llvm-3.1 80 configure.args-append \ 81 --llvm-root=${prefix}/libexec/llvm-3.1 82 } 83 84 variant llvm32 description {Use LLVM 3.2 backend} conflicts llvm30 llvm31 llvm33 { 85 depends_lib-append port:llvm-3.2 86 configure.args-append \ 87 --llvm-root=${prefix}/libexec/llvm-3.2 88 } 89 90 variant llvm33 description {Use LLVM 3.3 backend} conflicts llvm30 llvm31 llvm32 { 91 depends_lib-append port:llvm-3.3 92 configure.args-append \ 93 --llvm-root=${prefix}/libexec/llvm-3.3 94 } 95 96 if { ![variant_isset llvm30] && 97 ![variant_isset llvm31] && 98 ![variant_isset llvm32] && 99 ![variant_isset llvm33] } { 100 default_variants +llvm32 101 } 102 32 103 livecheck.url ${homepage}/ 33 104 livecheck.regex "/release-(\\d\.\\d)/" -
files/configure.patch
1 --- configure.orig 2012-12-19 07:29:12.000000000 +0800 2 +++ configure 2012-12-24 20:52:33.524922231 +0800 3 @@ -363,7 +363,6 @@ 4 step_msg "looking for build programs" 5 6 probe_need CFG_PERL perl 7 -probe_need CFG_CURL curl 8 probe_need CFG_PYTHON python2.7 python2.6 python2 python 9 10 python_version=$($CFG_PYTHON -V 2>&1) 11 @@ -493,7 +493,7 @@ 12 LLVM_VERSION=$($LLVM_CONFIG --version) 13 14 case $LLVM_VERSION in 15 - (3.1svn|3.1|3.0svn|3.0) 16 + (3.3svn|3.3|3.2svn|3.2|3.1svn|3.1|3.0svn|3.0) 17 msg "found ok version of LLVM: $LLVM_VERSION" 18 ;; 19 (*) 20 @@ -516,7 +506,7 @@ 21 | cut -d ' ' -f 2) 22 23 case $CFG_CLANG_VERSION in 24 - (3.0svn | 3.0 | 3.1 | 4.0 | 4.1) 25 + (3.0svn | 3.0 | 3.1 | 3.2 | 4.0 | 4.1) 26 step_msg "found ok version of CLANG: $CFG_CLANG_VERSION" 27 CFG_C_COMPILER="clang" 28 ;; -
files/mk-platform.mk.patch
1 --- mk/platform.mk 2012-12-19 00:29:12.000000000 +0100 2 +++ mk/platform.mk.new 2013-03-07 20:56:14.000000000 +0100 3 @@ -313,7 +313,7 @@ 4 # We're using llvm-mc as our assembler because it supports 5 # .cfi pseudo-ops on mac 6 define CFG_MAKE_ASSEMBLER 7 - CFG_ASSEMBLE_$(1)=$$(CPP) $$(CFG_DEPEND_FLAGS) $$(2) | \ 8 + CFG_ASSEMBLE_$(1)=$$(CPP) -MMD -MP $$(2) | \ 9 $$(LLVM_MC_$$(CFG_HOST_TRIPLE)) \ 10 -assemble \ 11 -filetype=obj \ -
files/mk-stage0.mk.patch
1 --- mk/stage0.mk 2012-12-19 00:29:12.000000000 +0100 2 +++ mk/stage0.mk.new 2013-03-07 00:12:00.000000000 +0100 3 @@ -11,7 +11,6 @@ 4 ifdef CFG_ENABLE_LOCAL_RUST 5 $(Q)$(S)src/etc/local_stage0.sh $(CFG_HOST_TRIPLE) $(CFG_LOCAL_RUST_ROOT) 6 else 7 - $(Q)$(S)src/etc/get-snapshot.py $(CFG_HOST_TRIPLE) $(SNAPSHOT_FILE) 8 ifdef CFG_ENABLE_PAX_FLAGS 9 @$(call E, apply PaX flags: $@) 10 @"$(CFG_PAXCTL)" -cm "$@"