<commit_before>#!/bin/bash

function prerequisite(){
#他スクリプト依存関係
if [ $((NO_DEPENDENCY)) == 0 ]; then
$SCRIPT_DIR/../qt/qt.sh
exitOnError
$SCRIPT_DIR/../qtspell/qtspell.sh
exitOnError
$SCRIPT_DIR/../tesseract/tesseract.sh
exitOnError
fi

#必要ライブラリ
pacman -S --needed --noconfirm \
$MINGW_PACKAGE_PREFIX-podofo \
$MINGW_PACKAGE_PREFIX-poppler

}

function build(){
if [ -e $PREFIX/bin/gImageReader-qt5 -a $((FORCE_INSTALL)) == 0 ]; then
echo "gImageReader is already installed."
exit 0
fi

GIMAGEREADER_VERSION=3.2.1
GIMAGEREADER_TAG=v$GIMAGEREADER_VERSION
GIMAGEREADER_ARCHIVE=gImageReader-$GIMAGEREADER_TAG.tar.gz
GIMAGEREADER_SRC_DIR=gImageReader-$GIMAGEREADER_VERSION
GIMAGEREADER_BUILD_DIR=$GIMAGEREADER_SRC_DIR-$MINGW_CHOST

wget -c https://github.com/manisandro/gImageReader/archive/$GIMAGEREADER_TAG/$GIMAGEREADER_ARCHIVE
rm -rf $GIMAGEREADER_SRC_DIR $GIMAGEREADER_BUILD_DIR 
tar xf $GIMAGEREADER_ARCHIVE
mv $GIMAGEREADER_SRC_DIR $GIMAGEREADER_BUILD_DIR
pushd $GIMAGEREADER_BUILD_DIR

mkdir build
pushd build
cmake .. \
-G"MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DINTERFACE_TYPE=qt5 \
-DCMAKE_EXE_LINKER_FLAGS="-static"

makeParallel && makeParallel install
exitOnError
popd
popd
}

#-----------------------------
SCRIPT_DIR=$(dirname $(readlink -f ${BASH_SOURCE:-$0}))
source $SCRIPT_DIR/../common/common.sh
commonSetup
prerequisite

cd $EXTLIB

build<commit_msg>gimagereaderを更新(WIP)<commit_after>#!/bin/bash

function prerequisite(){
#他スクリプト依存関係
if [ $((NO_DEPENDENCY)) == 0 ]; then
$SCRIPT_DIR/../qt/qt.sh
exitOnError
$SCRIPT_DIR/../qtspell/qtspell.sh
exitOnError
$SCRIPT_DIR/../twaindsm/twaindsm.sh
exitOnError
$SCRIPT_DIR/../tesseract/tesseract.sh
exitOnError
fi

#必要ライブラリ
pacman -S --needed --noconfirm \
$MINGW_PACKAGE_PREFIX-podofo \
$MINGW_PACKAGE_PREFIX-poppler

}

function build(){
if [ -e $PREFIX/bin/gImageReader-qt5 -a $((FORCE_INSTALL)) == 0 ]; then
echo "gImageReader is already installed."
exit 0
fi

GIMAGEREADER_VERSION=3.2.1
GIMAGEREADER_TAG=v$GIMAGEREADER_VERSION
GIMAGEREADER_ARCHIVE=gImageReader-$GIMAGEREADER_TAG.tar.gz
GIMAGEREADER_SRC_DIR=gImageReader-$GIMAGEREADER_VERSION
GIMAGEREADER_BUILD_DIR=$GIMAGEREADER_SRC_DIR-$MINGW_CHOST

wget -c https://github.com/manisandro/gImageReader/archive/$GIMAGEREADER_TAG/$GIMAGEREADER_ARCHIVE
rm -rf $GIMAGEREADER_SRC_DIR $GIMAGEREADER_BUILD_DIR 
tar xf $GIMAGEREADER_ARCHIVE
mv $GIMAGEREADER_SRC_DIR $GIMAGEREADER_BUILD_DIR
pushd $GIMAGEREADER_BUILD_DIR

mkdir build
pushd build
cmake .. \
-G"MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_MODULE_PATH=$PREFIX \
-DCMAKE_CXX_FLAGS="-isystem $PREFIX/include" \
-DCMAKE_MODULE_LINKER_FLAGS="-L$PREFIX/lib" \
-DINTERFACE_TYPE=qt5 \
-DCMAKE_EXE_LINKER_FLAGS="-static"

makeParallel && makeParallel install
exitOnError
popd
popd
}

#-----------------------------
SCRIPT_DIR=$(dirname $(readlink -f ${BASH_SOURCE:-$0}))
source $SCRIPT_DIR/../common/common.sh
commonSetup
prerequisite

cd $EXTLIB

build
{'fraction_non_alphanumeric': 0.13698164513936098, 'fraction_numerical': 0.006118286879673691, 'mean_word_length': 5.4823788546255505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '897632', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1248, 'n_words': 177}