aboutsummaryrefslogtreecommitdiffstats
path: root/community/corrosion/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/corrosion/APKBUILD')
-rw-r--r--community/corrosion/APKBUILD37
1 files changed, 22 insertions, 15 deletions
diff --git a/community/corrosion/APKBUILD b/community/corrosion/APKBUILD
index b863c18e4f3..fed02af43b9 100644
--- a/community/corrosion/APKBUILD
+++ b/community/corrosion/APKBUILD
@@ -1,39 +1,46 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=corrosion
-pkgver=0_git20210414
-pkgrel=2
-_commit="946c5dd80a6ebdb84c5986e52af460e23e74394d"
+pkgver=0.4.7
+pkgrel=0
pkgdesc="Marrying Rust and CMake - Easy Rust and C/C++ Integration!"
-url="https://github.com/AndrewGaspar/corrosion"
-# s390x and mips64 blocked by Rust
-arch="all !s390x !mips64 !riscv64"
+url="https://github.com/corrosion-rs/corrosion"
+arch="all"
license="MIT"
depends="
cargo
cmake
rust
"
-source="https://github.com/AndrewGaspar/corrosion/archive/$_commit/corrosion-$_commit.tar.gz"
+makedepends="samurai"
+source="https://github.com/AndrewGaspar/corrosion/archive/v$pkgver/corrosion-$pkgver.tar.gz"
options="net" # Required to download Rust dependencies
-builddir="$srcdir/$pkgname-$_commit"
+
build() {
- cmake -B build \
- -DCMAKE_BUILD_TYPE=None \
+ cmake -B build -G Ninja \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DBUILD_SHARED_LIBS=True
+ -DCMAKE_INSTALL_LIBDIR=lib
cmake --build build
}
check() {
- cd build
- CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+ # unset these for tests as they aren't relevant and just slow them down
+ unset CARGO_PROFILE_RELEASE_LTO
+ unset CARGO_PROFILE_RELEASE_CODEGEN_UNITS
+ unset CARGO_PROFILE_RELEASE_PANIC
+
+ # parse_target_triple_build is broken, expects rustup and fails without it
+ # cargo_config_rustflags seems broken
+ # rustup_proxy_build expects to find rustup
+ ctest --test-dir build --output-on-failure -E "(parse_target_triple_build|cargo_config_rustflags_build|cargo_config_rustflags_run_cargo_config_rustflags|rustup_proxy_build)"
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
-sha512sums="1483fef5e3bce879b0f28c1f9f000baf10b1621d7427637d1ed968f62388e963f21cb7ac024fcd9f35e4f538ab4e2494ada13d4bed88de09e57e1551ad6cb6cb corrosion-946c5dd80a6ebdb84c5986e52af460e23e74394d.tar.gz"
+sha512sums="
+274baca57f7d599b304b75a73067fae9eb488eec10925fade7e195d494a192760b116a3bdf289e0cb7c291b29684909d5fd1c9404c6d37203c883cd511849bbb corrosion-0.4.7.tar.gz
+"