development/cargo-vendor-filterer: Fix FTB on arm.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
fourtysixandtwo 2024-02-14 18:03:02 -07:00 committed by Willy Sudiarto Raharjo
parent 0d45be5824
commit 4ccf5ed619
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 20 additions and 7 deletions

View file

@ -11,6 +11,12 @@
# Variables to use in your SlackBuild:
# VSBUILD # same use as BUILD but for vendored sources
# VSDIR=/sub/dir/ # (optional) alternate location in src for vendor dir
#
# Vendors sources for the following targets
# i686-unknown-linux-gnu
# x86_64-unknown-linux-gnu
# arm-unknown-linux-gnueabihf
# aarch64-unknown-linux-gnu
INFO="$( echo *.info )"
if [ ! -e "$INFO" ]; then
@ -97,7 +103,7 @@ fi
# Configure cargo-vendor-filterer
cat << EOF >> Cargo.toml
[package.metadata.vendor-filter]
platforms = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu"]
platforms = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabihf"]
all-features = true
exclude-crate-paths = [
{ name = "openssl-src", exclude = "openssl" },

View file

@ -27,15 +27,16 @@
# 20240102 46and2: modify to use VSBUILD instead of BUILD for vendored sources
# above requested by Andrew Clemons to avoid CI issues
# -also added VSDIR option to included script, see cargo-mkvendored.sh
# 20240213 46and2: Fix FTB on arm
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cargo-vendor-filterer
VERSION=${VERSION:-0.5.12}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
VSBUILD=${VSBUILD:-1}
VSBUILD=${VSBUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@ -71,6 +72,12 @@ else
LIBDIRSUFFIX=""
fi
if [ "$ARCH" = "arm" ]; then
TRIPLET="$ARCH-unknown-linux-gnueabihf"
else
TRIPLET="$ARCH-unknown-linux-gnu"
fi
set -e
rm -rf $PKG
@ -101,10 +108,10 @@ OPENSSL_NO_VENDOR=1 \
cargo build \
--offline \
--release \
--target $ARCH-unknown-linux-gnu
--target $TRIPLET
mkdir -p $PKG/usr/bin
install -m 755 target/$ARCH-unknown-linux-gnu/release/cargo-vendor-filterer \
install -m 755 target/$TRIPLET/release/cargo-vendor-filterer \
$PKG/usr/bin/
# add script to generate filtered vendor sources

View file

@ -2,9 +2,9 @@ PRGNAM="cargo-vendor-filterer"
VERSION="0.5.12"
HOMEPAGE="https://github.com/coreos/cargo-vendor-filterer"
DOWNLOAD="https://github.com/coreos/cargo-vendor-filterer/archive/v0.5.12/cargo-vendor-filterer-0.5.12.tar.gz \
https://slackware.uk/~fourtysixandtwo/src/cargo-vendor-filterer-vendored-sources-0.5.12-1.tar.xz"
https://slackware.uk/~fourtysixandtwo/src/cargo-vendor-filterer-vendored-sources-0.5.12-2.tar.xz"
MD5SUM="c0add10b6eea99e1d97b77554e558c3b \
5924a1885a74d36ccc4ac68335f603f9"
47bde15ffe20ce449d7b595b89f920d7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="rust16"