system/vtcol: Use static.crates.io, script tidy ups.

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
This commit is contained in:
Andrew Clemons 2023-08-11 10:48:06 +09:00
parent b17b17b2c8
commit a6542e38ee
No known key found for this signature in database
GPG key ID: CD26380FFACBDA2B
2 changed files with 10 additions and 12 deletions

View file

@ -3,6 +3,7 @@
# Slackware build script for vtcol
# Copyright 2017-2020 Andrew Clemons, Wellington New Zealand
# Copyright 2023 Andrew Clemons, Tokyo Japan
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -26,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=vtcol
VERSION=${VERSION:-0.42.2}
BUILD=${BUILD:-4}
BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -44,9 +45,6 @@ if [ -z "$ARCH" ]; then
fi
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -58,13 +56,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
CARGOTARGET="--target i586-unknown-linux-gnu"
CARGOTARGET="--target $ARCH-unknown-linux-gnu"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
CARGOTARGET="--target i686-unknown-linux-gnu"
elif [ "$ARCH" = "x86_64" ]; then
CARGOTARGET="--target $ARCH-unknown-linux-gnu"
elif [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "aarch64" ] ; then
SLKCFLAGS="-O2 -fPIC"
CARGOTARGET="--target x86_64-unknown-linux-gnu"
CARGOTARGET="--target $ARCH-unknown-linux-gnu"
else
SLKCFLAGS="-O2"
CARGOTARGET=""
@ -87,7 +85,7 @@ zcat $CWD/f00fed1f947dcd372a598f1e2905ae9d4c8a1b0c.patch.gz | patch -p1
# configuration tells cargo to use the configured directory
# for dependencies instead of downloading from crates.io
mkdir .cargo
cat << EOF >> .cargo/config
cat << EOF > .cargo/config
[source.crates-io]
registry = 'https://github.com/rust-lang/crates.io-index'
replace-with = 'vendored-sources'

View file

@ -2,9 +2,9 @@ PRGNAM="vtcol"
VERSION="0.42.2"
HOMEPAGE="https://gitlab.com/phgsng/vtcol"
DOWNLOAD="https://gitlab.com/phgsng/vtcol/-/archive/v0.42.2/vtcol-v0.42.2.tar.gz \
https://crates-io.s3-us-west-1.amazonaws.com/crates/getopts/getopts-0.2.21.crate \
https://crates-io.s3-us-west-1.amazonaws.com/crates/libc/libc-0.2.19.crate \
https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-width/unicode-width-0.1.8.crate"
https://static.crates.io/crates/getopts/getopts-0.2.21.crate \
https://static.crates.io/crates/libc/libc-0.2.19.crate \
https://static.crates.io/crates/unicode-width/unicode-width-0.1.8.crate"
MD5SUM="94ec72b7b2cc7d1a2ed80d2a08a70761 \
c3ec5977ecc0f6244ef3be87f5325e72 \
604a2edfd52c6e87d8903ef2795da387 \