1
0
mirror of https://github.com/MysticRyuujin/guac-install.git synced 2023-10-10 13:36:56 +02:00

Remove GCC7 Hack

This commit is contained in:
Chase D. Wright 2019-01-23 16:15:59 -06:00
parent 21b84b1cb1
commit 660764723a
3 changed files with 41 additions and 93 deletions

View File

@ -60,24 +60,9 @@ mkdir /etc/guacamole
# Install guacd # Install guacd
cd guacamole-server-${GUACVERSION} cd guacamole-server-${GUACVERSION}
./configure --with-init-dir=/etc/init.d
# Hack for gcc7 make
if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]] make install
then
apt-get -y install gcc-6
if [ $? -ne 0 ]
then
echo "apt-get failed to install gcc-6"
exit
fi
CC="gcc-6" ./configure --with-init-dir=/etc/init.d
CC="gcc-6" make
CC="gcc-6" make install
else
./configure --with-init-dir=/etc/init.d
make
make install
fi
ldconfig ldconfig
cd .. cd ..

View File

@ -116,16 +116,17 @@ fi
# Install features # Install features
echo -e "${BLUE}Installing dependencies${NC}" echo -e "${BLUE}Installing dependencies${NC}"
apt-get -qq -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \ apt-get -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \
libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \ libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \
libvorbis-dev libwebp-dev mysql-server mysql-client mysql-common mysql-utilities libmysql-java ${TOMCAT} freerdp-x11 \ libvorbis-dev libwebp-dev mysql-server mysql-client mysql-common mysql-utilities libmysql-java ${TOMCAT} freerdp-x11 \
ghostscript wget dpkg-dev ghostscript wget dpkg-dev &>> ${LOG}
if [ $? -ne 0 ]; then
echo -e "${RED}Failed${NC}" if [ $? -ne 0 ]; then
exit 1 echo -e "${RED}Failed${NC}"
else exit 1
echo -e "${GREEN}OK${NC}" else
fi echo -e "${GREEN}OK${NC}"
fi
# Set SERVER to be the preferred download server from the Apache CDN # Set SERVER to be the preferred download server from the Apache CDN
SERVER="http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUACVERSION}" SERVER="http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUACVERSION}"
@ -171,58 +172,35 @@ mkdir -p /etc/guacamole/extensions
# Install guacd # Install guacd
cd guacamole-server-${GUACVERSION} cd guacamole-server-${GUACVERSION}
# Patch leftover for Guacamole Server 0.9.14 echo -e "${BLUE}Building Guacamole with GCC $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}') ${NC}"
#wget -q --show-progress -O ./src/terminal/cd0e48234a079813664052b56c501e854753303a.patch https://github.com/apache/guacamole-server/commit/cd0e48234a079813664052b56c501e854753303a.patch
#if [ $? -ne 0 ]; then
# echo -e "${RED}Failed to download cd0e48234a079813664052b56c501e854753303a.patch"
# echo -e "https://github.com/apache/guacamole-server/commit/cd0e48234a079813664052b56c501e854753303a.patch"
# echo -e "Attempting to proceed without patch...${NC}"
#else
# patch ./src/terminal/typescript.c ./src/terminal/cd0e48234a079813664052b56c501e854753303a.patch
#fi
# Hack for gcc7
if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]]
then
echo -e "${BLUE}Building Guacamole with GCC6...${NC}"
apt-get -qq -y install gcc-6
if [ $? -ne 0 ]; then
echo -e "${RED}apt-get failed to install gcc-6${NC}"
exit 1
else
echo -e "${GREEN}GCC6 Installed${NC}"
fi
CC="gcc-6"
echo -e "${BLUE}Configuring...${NC}"
./configure --with-init-dir=/etc/init.d &>> ${LOG}
if [ $? -ne 0 ]; then
echo -e "${RED}Failed${NC}"
exit 1
else else
echo -e "${BLUE}Building Guacamole with GCC7...${NC}" echo -e "${GREEN}OK${NC}"
CC="gcc-7"
fi fi
echo -e "${BLUE}Configuring...${NC}"
./configure --with-init-dir=/etc/init.d &>> ${LOG} echo -e "${BLUE}Running Make...${NC}"
if [ $? -ne 0 ]; then make &>> ${LOG}
echo -e "${RED}Failed${NC}" if [ $? -ne 0 ]; then
exit 1 echo -e "${RED}Failed${NC}"
else exit 1
echo -e "${GREEN}OK${NC}" else
fi echo -e "${GREEN}OK${NC}"
echo -e "${BLUE}Running Make...${NC}" fi
make &>> ${LOG}
if [ $? -ne 0 ]; then echo -e "${BLUE}Running Make Install...${NC}"
echo -e "${RED}Failed${NC}" make install &>> ${LOG}
exit 1 if [ $? -ne 0 ]; then
else echo -e "${RED}Failed${NC}"
echo -e "${GREEN}OK${NC}" exit 1
fi else
echo -e "${BLUE}Running Make Install...${NC}" echo -e "${GREEN}OK${NC}"
make install &>> ${LOG} fi
if [ $? -ne 0 ]; then
echo -e "${RED}Failed${NC}"
exit 1
else
echo -e "${GREEN}OK${NC}"
fi
ldconfig ldconfig
systemctl enable guacd systemctl enable guacd
cd .. cd ..

View File

@ -78,24 +78,9 @@ fi
# Upgrade Guacamole Server # Upgrade Guacamole Server
tar -xzf guacamole-server-${GUACVERSION}.tar.gz tar -xzf guacamole-server-${GUACVERSION}.tar.gz
cd guacamole-server-${GUACVERSION} cd guacamole-server-${GUACVERSION}
./configure --with-init-dir=/etc/init.d
# Hack for gcc-7 make
if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]] make install
then
apt-get -y install gcc-6
if [ $? -ne 0 ]
then
echo "apt-get failed to install gcc-6"
exit
fi
CC="gcc-6" ./configure --with-init-dir=/etc/init.d
CC="gcc-6" make
CC="gcc-6" make install
else
./configure --with-init-dir=/etc/init.d
make
make install
fi
ldconfig ldconfig
systemctl enable guacd systemctl enable guacd