<commit_before>#!/bin/bash

fw_installed cutelyst && return 0

CUTELYST_VER=1.9.0
QT_VERSION_MM=59
QT_VERSION_FULL=591-trusty
CROOT=${IROOT}/cutelyst

sudo apt-add-repository --yes ppa:george-edison55/cmake-3.x
sudo apt-add-repository --yes ppa:beineri/opt-qt$QT_VERSION_FULL
sudo apt-get update -qq

sudo apt-get install -qqy \
cmake \
uwsgi \
uuid-dev \
libcap-dev \
libzmq3-dev \
clearsilver-dev \
libjemalloc-dev \
qt${QT_VERSION_MM}base \
qt${QT_VERSION_MM}script \
qt${QT_VERSION_MM}tools

export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM};

mkdir -p ${CROOT} || true
cd ${CROOT}

fw_get -O https://github.com/cutelyst/cutelyst/archive/v$CUTELYST_VER.tar.gz
fw_untar v$CUTELYST_VER.tar.gz

cd cutelyst-$CUTELYST_VER
mkdir build && cd build

cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CROOT \
-DUWSGI_PLUGINS_DIR=${CROOT}/lib/uwsgi/plugins \
-DUSE_JEMALLOC=on

make -j $CPU_COUNT && make install

echo "QT_VERSION_MM=${QT_VERSION_MM}" > $IROOT/cutelyst.installed

<commit_msg>Update Cutelyst to 1.12.0 (#3294)<commit_after>#!/bin/bash

fw_installed cutelyst && return 0

CUTELYST_VER=1.12.0
QT_VERSION_MM=59
QT_VERSION_FULL=591-trusty
CROOT=${IROOT}/cutelyst

sudo apt-add-repository --yes ppa:george-edison55/cmake-3.x
sudo apt-add-repository --yes ppa:beineri/opt-qt$QT_VERSION_FULL
sudo apt-get update -qq

sudo apt-get install -qqy \
cmake \
uwsgi \
uuid-dev \
libcap-dev \
libzmq3-dev \
clearsilver-dev \
libjemalloc-dev \
qt${QT_VERSION_MM}base \
qt${QT_VERSION_MM}script \
qt${QT_VERSION_MM}tools

export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM};

mkdir -p ${CROOT} || true
cd ${CROOT}

fw_get -O https://github.com/cutelyst/cutelyst/archive/v$CUTELYST_VER.tar.gz
fw_untar v$CUTELYST_VER.tar.gz

cd cutelyst-$CUTELYST_VER
mkdir build && cd build

cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CROOT \
-DUWSGI_PLUGINS_DIR=${CROOT}/lib/uwsgi/plugins \
-DPLUGIN_UWSGI=on \
-DUSE_JEMALLOC=on

make -j $CPU_COUNT && make install

echo "QT_VERSION_MM=${QT_VERSION_MM}" > $IROOT/cutelyst.installed


{'fraction_non_alphanumeric': 0.136074400391581, 'fraction_numerical': 0.017131669114047968, 'mean_word_length': 4.823361823361823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2968103', 'n_tokens_mistral': 945, 'n_tokens_neox': 872, 'n_words': 139}