diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 22 |
2 files changed, 20 insertions, 6 deletions
@@ -1,10 +1,10 @@ pkgbase = sccache pkgdesc = ccache with cloud storage pkgver = 0.2.12 - pkgrel = 1 + pkgrel = 2 url = https://github.com/mozilla/sccache - arch = i686 arch = x86_64 + arch = aarch64 license = Apache checkdepends = openssl-1.0 makedepends = cargo @@ -2,9 +2,9 @@ pkgname=sccache pkgver=0.2.12 -pkgrel=1 +pkgrel=2 pkgdesc='ccache with cloud storage' -arch=(i686 x86_64) +arch=(x86_64 aarch64) url=https://github.com/mozilla/sccache license=(Apache) depends=(openssl) @@ -13,17 +13,31 @@ checkdepends=(openssl-1.0) source=(sccache-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz) sha512sums=('1f7495aa7c0749c4bfbd85a88a304a6ed18cc9bfcd341f0f1a668a743ae31d355bc8c5b3199b048d8bcab3ce8e9c8b844a609e4c3009d4e5497dd080aa881a45') +prepare() { + # Lifetime annotation is required for the version-compare crate with Rust 1.40 + # Upgrade it to 0.0.9 which added the annotation + sed -r "s@(version-compare = \{ version = \")(.*)(\".*)@\10.0.9\3@" \ + -i sccache-$pkgver/Cargo.toml +} + build() { cd sccache-$pkgver - cargo build --all-features --release + # sccache-dist is only supported on x86_64 + cargo build \ + $([ $CARCH = aarch64 ] && echo --features=all || echo --all-features) \ + --release } check() { + # Tests require sccache-dist. Disable for now. + [ $CARCH = aarch64 ] && return + cd sccache-$pkgver + # Older native-tls crate depends on older openssl crate OPENSSL_LIB_DIR=/usr/lib/openssl-1.0 \ OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 \ - cargo test + cargo test --release } package() { |