ports: Some enhancements in make-package.sh
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
apio 2023-08-11 18:25:07 +02:00
parent 181b4c151b
commit 0ae409ae22
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -29,7 +29,7 @@ source ports/$PORT_NAME/PACKAGE
[ -z ${url+x} ] && show_error "error: The port's PACKAGE file does not have a 'url' key."
if ! [ -z ${dependencies+x} ]; then
echo "Installing dependencies of $name: ($dependencies)"
echo "Installing dependencies of $name: (${dependencies[@]})"
for dep in ${dependencies[@]}; do
tools/install-package.sh $dep
done
@ -48,15 +48,22 @@ case $format in
tar)
[ -z ${output+x} ] && show_error "error: The 'tar' download format needs an 'output' key."
[ -z ${sha256sum+x} ] && show_error "error: The 'tar' download format needs a 'sha256sum' key."
if ! [ -f $output ]; then
echo "Downloading tarball for $name..."
wget $url --quiet
else
echo "Using cached tarball for $name."
fi
echo "$sha256sum $output" | sha256sum -c
tar xf $output
rm $output
;;
git)
if ! [ -d $srcdir]; then
echo "Cloning repository for $name..."
git clone $url $srcdir
else
echo "Using local repository for $name."
fi
if ! [ -z ${tag+x} ]; then
cd $srcdir
git checkout $tag
@ -68,12 +75,14 @@ case $format in
;;
esac
if ! [ "$set_cc_variables" = "no" ]; then
export CC=x86_64-luna-gcc
export CXX=x86_64-luna-g++
export PKG_CONFIG=luna-pkg-config
export CC_FOR_BUILD=gcc
export CXX_FOR_BUILD=g++
export PKG_CONFIG_FOR_BUILD=pkg-config
fi
mkdir -p $builddir
cd $builddir