#!/bin/bash set -e #set -o pipefail export V=1 VERBOSE=1 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig export ACLOCAL_PATH=/usr/local/share/aclocal # Arch Linux specific packages and environment pacman -Sy --needed git icu libxml2 autoconf automake flex gawk gcc libtool libxslt pcre pkgconfig python3 swig zlib libzip unzip zip make cmake perl boost readline bison libarchive xxhash sqlite python-lxml utf8cpp export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf ldconfig rm -rf /tmp/apertium-all-dev mkdir -pv /tmp/apertium-all-dev pushd /tmp/apertium-all-dev git clone --depth 1 https://github.com/TinoDidriksen/cg3 pushd cg3 cmake -DENABLE_PYTHON_BINDINGS=ON . make -j8 ./test/runall.pl make install ldconfig popd git clone --depth 1 https://github.com/TinoDidriksen/transfuse pushd transfuse cmake . make -j8 make test make install ldconfig popd git clone --depth 1 https://github.com/hfst/hfst pushd hfst autoreconf -fvi ./configure --disable-static --enable-all-tools --with-readline --with-unicode-handler=icu --enable-python-bindings make -j8 make check make install ldconfig popd git clone --depth 1 https://github.com/hfst/hfst-ospell pushd hfst-ospell autoreconf -fvi ./configure --disable-static --enable-zhfst --without-libxmlpp --without-tinyxml2 make -j8 make check make install ldconfig popd # Arch doesn't have termcap in base repo #git clone --depth 1 https://github.com/mhulden/foma #pushd foma/foma # make -j8 # make install # ldconfig #popd for PKG in lttoolbox apertium apertium-lex-tools apertium-anaphora apertium-separable apertium-recursive lexd do git clone --depth 1 https://github.com/apertium/$PKG pushd $PKG autoreconf -fvi ./configure --disable-static --enable-python-bindings make -j8 make test make install ldconfig popd done git clone --depth 1 https://github.com/apertium/apertium-get pushd apertium-get cmake . make -j8 make install popd git clone --depth 1 https://github.com/apertium/apertium-init pushd apertium-init make install popd echo "" echo "" echo "Remember to add to your ~/.profile or global environment:" echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig" echo "export ACLOCAL_PATH=/usr/local/share/aclocal" echo "" echo "Also remember you MUST use a UTF-8 locale (envvar LANG and LC_ALL) for all Apertium work."