Balló György pushed to branch main at Arch Linux / Packaging / Packages / 
mission-center


Commits:
8387452f by Balló György at 2024-12-30T14:57:23+01:00
Apply some cargo-related build fixes

- Set path for CARGO_HOME, it must be the same as specified by upstream. 
Download crates also for the 'gatherer' subproject.

- Set CARGO_PROFILE_* to get optimized build and debuginfo.

- Setting RUSTUP_TOOLCHAIN is not needed since we are building the official 
packages in a clean chroot.

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -31,15 +31,23 @@ 
sha256sums=('06ab2e9199dbfe74de5925f6009971ff8c1ad655bc8cd8eedb7e6186e5d661f8')
 
 prepare() {
   cd "$pkgname"
-  export RUSTUP_TOOLCHAIN=stable
-  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
+  CARGO_HOME="$srcdir/build/cargo-home" \
+    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+
+  cd src/sys_info_v2/gatherer
+  CARGO_HOME="$srcdir/build/src/sys_info_v2/gatherer/cargo-home" \
+    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
 }
 
 build() {
   CFLAGS+=" -ffat-lto-objects"
-  export RUSTUP_TOOLCHAIN=stable
-  arch-meson "$pkgname" build --buildtype=release
-  meson compile -C build
+  arch-meson "$pkgname" build
+
+  CARGO_PROFILE_RELEASE_LTO=true \
+    CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 \
+    CARGO_PROFILE_RELEASE_DEBUG=2 \
+    CARGO_PROFILE_RELEASE_STRIP=false \
+    meson compile -C build
 }
 
 check() {



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/mission-center/-/commit/8387452f9d322c31e998f857314fcfc406dfc73b

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/mission-center/-/commit/8387452f9d322c31e998f857314fcfc406dfc73b
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to