prepare installer for multiabi bundles
This commit is contained in:
parent
3647d47b6d
commit
73c0f9e529
|
@ -31,6 +31,7 @@ USER_NAME=$(logname)
|
|||
|
||||
#### Global Variables ####
|
||||
HAS_XDG="T"
|
||||
MULTABI_BUNDLE=""
|
||||
|
||||
########################
|
||||
# Function Definitions
|
||||
|
@ -229,6 +230,20 @@ case `uname -m` in
|
|||
;;
|
||||
esac
|
||||
|
||||
###################
|
||||
# Determine gcc ABI
|
||||
###################
|
||||
|
||||
if -n "$MULTABI_BUNDLE"; then
|
||||
if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc5 > /dev/null"; then
|
||||
ABI=-gcc4
|
||||
else
|
||||
ABI=-gcc5
|
||||
fi
|
||||
else
|
||||
ABI=
|
||||
fi
|
||||
|
||||
####################
|
||||
# Check disk space
|
||||
####################
|
||||
|
@ -237,15 +252,15 @@ esac
|
|||
# in case they are on different devices
|
||||
echo "Checking for required disk space"
|
||||
|
||||
if [ ! -e .${PGM_NAME}_${ARCH}-*.size ]; then
|
||||
if [ ! -e .${PGM_NAME}_${ARCH}${ABI}-*.size ]; then
|
||||
echo ""
|
||||
echo "!!! ERROR !!! Can't locate .size file for ${ARCH} bundle."
|
||||
echo "This package is broken or does not support ${ARCH}."
|
||||
echo "!!! ERROR !!! Can't locate .size file for ${ARCH}${ABI} bundle."
|
||||
echo "This package is broken or does not support ${ARCH}${ABI}."
|
||||
echo ""
|
||||
read -p "Press ENTER to exit installer:" BLAH
|
||||
exit 1
|
||||
else
|
||||
REQUIRED_BYTES=$(cat .${PGM_NAME}_${ARCH}-*.size)
|
||||
REQUIRED_BYTES=$(cat .${PGM_NAME}_${ARCH}${ABI}-*.size)
|
||||
|
||||
#Installer needs 2x the space since the bundle is unpacked locally and then copied
|
||||
REQUIRED_BYTES=$(($REQUIRED_BYTES + $REQUIRED_BYTES))
|
||||
|
@ -281,7 +296,8 @@ fi
|
|||
# Determine C11 stdlibc++ ABI
|
||||
#############################
|
||||
|
||||
if %REPLACE_GCC5%; then
|
||||
if -z "$ABI"; then
|
||||
if %REPLACE_GCC5%; then
|
||||
# Ardour was compiled with gcc5, warn on gcc4 systems
|
||||
if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc5 > /dev/null"; then
|
||||
echo ""
|
||||
|
@ -296,7 +312,7 @@ if %REPLACE_GCC5%; then
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
else
|
||||
# Ardour was compiled with gcc4, warn on gcc5 systems
|
||||
if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc4 > /dev/null"; then
|
||||
echo ""
|
||||
|
@ -311,6 +327,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if %REPLACE_WINE%; then
|
||||
|
@ -334,19 +351,19 @@ FILESYSTEM_TYPE=$(df -P -T "${PKG_PATH}" | grep / | awk '{print $2}')
|
|||
echo "Bundle is on ${FILESYSTEM_TYPE} filesystem"
|
||||
|
||||
# untar the correct bundle for us to install
|
||||
echo "Unpacking bundle for $ARCH"
|
||||
echo "Unpacking bundle for $ARCH${ABI}"
|
||||
|
||||
if [ ! -e ${PGM_NAME}_${ARCH}-*.tar ]; then
|
||||
if [ ! -e ${PGM_NAME}_${ARCH}${ABI}-*.tar ]; then
|
||||
echo ""
|
||||
echo "!!! ERROR !!! Can't locate ${ARCH} bundle file."
|
||||
echo "!!! ERROR !!! Can't locate ${ARCH}${ABI} bundle file."
|
||||
echo ""
|
||||
read -p "Press ENTER to exit installer:" BLAH
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! tar -xf ${PGM_NAME}_${ARCH}-*.tar; then
|
||||
if ! tar -xf ${PGM_NAME}_${ARCH}${ABI}-*.tar; then
|
||||
echo ""
|
||||
echo "!!! ERROR !!! Can't unpack ${ARCH} bundle file."
|
||||
echo "!!! ERROR !!! Can't unpack ${ARCH}${ABI} bundle file."
|
||||
echo ""
|
||||
read -p "Press ENTER to exit installer:" BLAH
|
||||
exit 1
|
||||
|
@ -354,7 +371,7 @@ else
|
|||
echo "Bundle unpacked"
|
||||
fi
|
||||
|
||||
BUNDLE_DIR=$(basename `find -maxdepth 1 -type d -name "${PGM_NAME}_${ARCH}-*"`)
|
||||
BUNDLE_DIR=$(basename `find -maxdepth 1 -type d -name "${PGM_NAME}_${ARCH}${ABI}-*"`)
|
||||
|
||||
|
||||
#######################
|
||||
|
|
Loading…
Reference in New Issue
Block a user