_raw_build()
{
    (
    set -e -x
    cd $HOME/Download/unpack/graphics/inkscape/raw/inkscape
    builddir="build"
    rm -fr "${builddir}"
    mkdir "${builddir}"
    cd "${builddir}"
    env | (LC_ALL=C sort) > "$HOME"/inkscape-raw-build.env.txt
    cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install-dir -G Ninja
    ninja -j6 tests
    )
}

_git_src_build()
{
    (
    set -e -x
    cd $HOME/Download/unpack/graphics/inkscape/inkscape
    builddir="build"
    rm -fr "${builddir}"
    mkdir "${builddir}"
    cd "${builddir}"
    export DEBUG=1 \
        EMSDK=/home/shlomif/Download/unpack/prog/llvm-to-js/emsdk
    env | (LC_ALL=C sort) > "$HOME"/inkscape-git-src-build.env.txt
    cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install-dir -G Ninja
    ninja -j6 tests
    )
}

if true
then
_git_src_build
exit
_raw_build
fi

_themebuild()
{
    (
    . ~/.bashrc
    Theme inkscape
    set -e -x
    cd $HOME/Download/unpack/graphics/inkscape/inkscape
    builddir="themebuild"
    rm -fr "${builddir}"
    mkdir "${builddir}"
    cd "${builddir}"
    env | (LC_ALL=C sort) > "$HOME"/inkscape-git-themebuild.env.txt
    cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install-dir -G Ninja
    ninja -j6 tests
    )
}

_themebuild
