diff options
| author | zorz <zorz@krypt.sh> | 2026-05-05 18:29:35 +0300 |
|---|---|---|
| committer | zorz <zorz@krypt.sh> | 2026-05-05 18:29:35 +0300 |
| commit | 3ee93968e10126adc7dad5c8872f0170c3421e13 (patch) | |
| tree | bcac8daa62b6c9a94a48dae87f5d3f6de1985bba /rust | |
| parent | 936433a5deb6ccc8f8476096f2c2b8dc72c33388 (diff) | |
| download | zorz-3ee93968e10126adc7dad5c8872f0170c3421e13.tar.gz zorz-3ee93968e10126adc7dad5c8872f0170c3421e13.tar.xz | |
various obsolette
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/MAKEPKG | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/rust/MAKEPKG b/rust/MAKEPKG new file mode 100644 index 0000000..5fc8881 --- /dev/null +++ b/rust/MAKEPKG | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | #!/bin/mkpkg | ||
| 2 | # description: Rust programming language | ||
| 3 | # url: https://www.rust-lang.org/ | ||
| 4 | |||
| 5 | name=rust | ||
| 6 | version=1.94.1 | ||
| 7 | release=1 | ||
| 8 | depends=(llvm) | ||
| 9 | makedeps=(cmake ninja python3 gcc-compat) | ||
| 10 | source=( | ||
| 11 | https://static.rust-lang.org/dist/rustc-$version-src.tar.xz | ||
| 12 | system.diff | ||
| 13 | musl-no-crt-static.patch | ||
| 14 | ) | ||
| 15 | sha256sums=( | ||
| 16 | "62b67230754da642a264ca0cb9fc08820c54e2ed7b3baba0289876d4cdb48c08" | ||
| 17 | "fdfd2b449aacd417921359db8bb3eb66944313485c72fde0a942230f2b19f55e" | ||
| 18 | "8b7d3beb08cc22a4477b238eff22d91b249ea4c5344911f6fc3c279342538e35" | ||
| 19 | ) | ||
| 20 | extract() { | ||
| 21 | cp system.diff $SRC/ | ||
| 22 | cp musl-no-crt-static.patch $SRC/ | ||
| 23 | tar -xf $PKGMK_SOURCE_DIR/rustc-$version-src.tar.xz -C $SRC | ||
| 24 | } | ||
| 25 | build() { | ||
| 26 | cd rustc-$version-src | ||
| 27 | |||
| 28 | patch -p1 -i $SRC/system.diff | ||
| 29 | patch -p1 -i $SRC/musl-no-crt-static.patch | ||
| 30 | |||
| 31 | cat > bootstrap.toml <<EOF | ||
| 32 | change-id = 148795 | ||
| 33 | [llvm] | ||
| 34 | link-shared = true | ||
| 35 | use-libcxx = true | ||
| 36 | static-libstdcpp = false | ||
| 37 | [build] | ||
| 38 | build = "x86_64-unknown-linux-musl" | ||
| 39 | host = ["x86_64-unknown-linux-musl"] | ||
| 40 | target = ["x86_64-unknown-linux-musl"] | ||
| 41 | rustc = "/usr/bin/rustc" | ||
| 42 | cargo = "/usr/bin/cargo" | ||
| 43 | docs = false | ||
| 44 | extended = true | ||
| 45 | tools = ["cargo", "rustfmt", "clippy", "rust-analyzer"] | ||
| 46 | vendor = true | ||
| 47 | [install] | ||
| 48 | prefix = "/usr" | ||
| 49 | [rust] | ||
| 50 | channel = "stable" | ||
| 51 | codegen-units = 1 | ||
| 52 | lto = "thin" | ||
| 53 | llvm-libunwind = "system" | ||
| 54 | [target.x86_64-unknown-linux-musl] | ||
| 55 | llvm-config = "/usr/bin/llvm-config" | ||
| 56 | crt-static = false | ||
| 57 | cc = "clang" | ||
| 58 | cxx = "clang++" | ||
| 59 | ar = "llvm-ar" | ||
| 60 | ranlib = "llvm-ranlib" | ||
| 61 | linker = "clang" | ||
| 62 | rustflags = ["-C", "link-arg=-lunwind"] | ||
| 63 | EOF | ||
| 64 | python3 x.py build | ||
| 65 | DESTDIR=$PKG python3 x.py install | ||
| 66 | |||
| 67 | rm -rf $PKG/usr/share/doc | ||
| 68 | rm -f $PKG/usr/lib/rustlib/install.log | ||
| 69 | rm -f $PKG/usr/lib/rustlib/uninstall.sh | ||
| 70 | rm -f $PKG/usr/lib/rustlib/manifest-* | ||
| 71 | rm -f $PKG/usr/lib/rustlib/components | ||
| 72 | rm -f $PKG/usr/lib/rustlib/rust-installer-version | ||
| 73 | } | ||
| 74 | |||
| 75 | signify() { | ||
| 76 | untrusted comment: public key | ||
| 77 | RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 | ||
| 78 | } | ||
| 79 | |||
| 80 | # vim: filetype=sh | ||
| 81 | |||