Debian Codegraph @

.github/workflows/scripts/setup_linux_deps.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -eo pipefail
4
5 PYTHON=python3
6
7 sudoscip-shell system . . sudo. apt-get remove python3-pip
8 sudoscip-shell system . . sudo. add-apt-repository -y ppa:deadsnakes/ppa && sudoscip-shell system . . sudo. apt-get update -y
9 sudoscip-shell system . . sudo. apt-get install -y autoconf automake libtool gcc g++ gettext \
10 libjpeg-dev libtiff5-dev libpng-dev libfreetype-dev libgif-dev \
11 libx11-dev libgtk-3-dev libxml2-dev libpango1.0-dev libcairo2-dev \
12 libgtkmm-3.0-dev \
13 libbrotli-dev libwoff-dev ninja-build cmake lcov $PYTHON-dev $PYTHON-venv
14 curlscip-shell system . . curl. https://bootstrap.pypa.io/get-pip.py | sudoscip-shell system . . sudo. $PYTHON
15
16 PREFIX=$GITHUB_WORKSPACE/target
17 DEPSPREFIX=$GITHUB_WORKSPACE/deps/install
18 echoscip-shell system . . echo. "PREFIX=$PREFIX" >> $GITHUB_ENV
19 echoscip-shell system . . echo. "DEPSPREFIX=$DEPSPREFIX" >> $GITHUB_ENV
20 echoscip-shell system . . echo. "PATH=$PATH:$DEPSPREFIX/bin:$PREFIX/bin:~/.local/bin" >> $GITHUB_ENV
21 echoscip-shell system . . echo. "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEPSPREFIX/lib:$PREFIX/lib" >> $GITHUB_ENV
22 echoscip-shell system . . echo. "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$DEPSPREFIX/lib/pkgconfig" >> $GITHUB_ENV
23 echoscip-shell system . . echo. "PYTHONPATH=$PYTHONPATH:$PREFIX/$($PYTHON "$GITHUB_WORKSPACE/repo/pyhook/get_pyhook_install_dir.py" "${DESTDIR}${PREFIX}")" >> $GITHUB_ENV
24
25 if [scip-shell system . . `[`. ! -d deps/install ]; then
26 echoscip-shell system . . echo. "Custom dependencies not present - will build them"
27 rmscip-shell system . . rm. -rf deps && mkdirscip-shell system . . mkdir. deps && cd deps
28
29 FTVER=`dpkgscip-shell system . . dpkg. -s libfreetype-dev | perlscip-shell system . . perl. -ne 'print $1 if /^Version: (\d+(?:\.\d+)+)/'`
30 SFFTVER=`echoscip-shell system . . echo. $FTVER | perlscip-shell system . . perl. -ne 'print $1 if /^(\d+(?:\.\d+){1,2})/'`
31
32 gitscip-shell system . . git. clone --depth 1 https://github.com/fontforge/libspiro
33 gitscip-shell system . . git. clone --depth 1 https://github.com/fontforge/libuninameslist
34 gitscip-shell system . . git. clone --depth 1 --branch v1.0.2 https://github.com/google/woff2
35 wget --tries 1 "http://download.savannah.gnu.org/releases/freetype/freetype-$FTVER.tar.gz" || \
36 wget "https://sourceforge.net/projects/freetype/files/freetype2/$SFFTVER/freetype-$FTVER.tar.gz"
37 wget https://github.com/crowdin/crowdin-cli/releases/latest/download/crowdin-cli.zip
38
39 pushd libspiro && autoreconfscip-shell system . . autoreconf. -fiv && ./configure --prefix=$DEPSPREFIX && makescip-shell system . . make. -j4 && makescip-shell system . . make. install && popd
40 pushd libuninameslist && autoreconfscip-shell system . . autoreconf. -fiv && ./configure --enable-pscript --prefix=$DEPSPREFIX && makescip-shell system . . make. -j4 && makescip-shell system . . make. install && popd
41 pushd woff2 && mkdirscip-shell system . . mkdir. build && cd build && cmakescip-shell system . . cmake. -GNinja .. -DCMAKE_INSTALL_PREFIX=$DEPSPREFIX -DCMAKE_INSTALL_LIBDIR=lib && ninjascip-shell system . . ninja. install && popd
42 tarscip-shell system . . tar. -zxf freetype-$FTVER.tar.gz && mvscip-shell system . . mv. freetype-$FTVER $DEPSPREFIX/freetype
43 mkdirscip-shell system . . mkdir. crowdin && pushd crowdin && unzip ../crowdin-cli.zip && mvscip-shell system . . mv. */* . && mvscip-shell system . . mv. crowdin-cli.jar $DEPSPREFIX && popd
44 fi