ports: Some enhancements in make-package.sh
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
181b4c151b
commit
0ae409ae22
@ -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."
|
[ -z ${url+x} ] && show_error "error: The port's PACKAGE file does not have a 'url' key."
|
||||||
|
|
||||||
if ! [ -z ${dependencies+x} ]; then
|
if ! [ -z ${dependencies+x} ]; then
|
||||||
echo "Installing dependencies of $name: ($dependencies)"
|
echo "Installing dependencies of $name: (${dependencies[@]})"
|
||||||
for dep in ${dependencies[@]}; do
|
for dep in ${dependencies[@]}; do
|
||||||
tools/install-package.sh $dep
|
tools/install-package.sh $dep
|
||||||
done
|
done
|
||||||
@ -48,15 +48,22 @@ case $format in
|
|||||||
tar)
|
tar)
|
||||||
[ -z ${output+x} ] && show_error "error: The 'tar' download format needs an 'output' key."
|
[ -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."
|
[ -z ${sha256sum+x} ] && show_error "error: The 'tar' download format needs a 'sha256sum' key."
|
||||||
|
if ! [ -f $output ]; then
|
||||||
echo "Downloading tarball for $name..."
|
echo "Downloading tarball for $name..."
|
||||||
wget $url --quiet
|
wget $url --quiet
|
||||||
|
else
|
||||||
|
echo "Using cached tarball for $name."
|
||||||
|
fi
|
||||||
echo "$sha256sum $output" | sha256sum -c
|
echo "$sha256sum $output" | sha256sum -c
|
||||||
tar xf $output
|
tar xf $output
|
||||||
rm $output
|
|
||||||
;;
|
;;
|
||||||
git)
|
git)
|
||||||
|
if ! [ -d $srcdir]; then
|
||||||
echo "Cloning repository for $name..."
|
echo "Cloning repository for $name..."
|
||||||
git clone $url $srcdir
|
git clone $url $srcdir
|
||||||
|
else
|
||||||
|
echo "Using local repository for $name."
|
||||||
|
fi
|
||||||
if ! [ -z ${tag+x} ]; then
|
if ! [ -z ${tag+x} ]; then
|
||||||
cd $srcdir
|
cd $srcdir
|
||||||
git checkout $tag
|
git checkout $tag
|
||||||
@ -68,12 +75,14 @@ case $format in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if ! [ "$set_cc_variables" = "no" ]; then
|
||||||
export CC=x86_64-luna-gcc
|
export CC=x86_64-luna-gcc
|
||||||
export CXX=x86_64-luna-g++
|
export CXX=x86_64-luna-g++
|
||||||
export PKG_CONFIG=luna-pkg-config
|
export PKG_CONFIG=luna-pkg-config
|
||||||
export CC_FOR_BUILD=gcc
|
export CC_FOR_BUILD=gcc
|
||||||
export CXX_FOR_BUILD=g++
|
export CXX_FOR_BUILD=g++
|
||||||
export PKG_CONFIG_FOR_BUILD=pkg-config
|
export PKG_CONFIG_FOR_BUILD=pkg-config
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p $builddir
|
mkdir -p $builddir
|
||||||
cd $builddir
|
cd $builddir
|
||||||
|
Loading…
Reference in New Issue
Block a user