summaryrefslogtreecommitdiffstats
path: root/buildtools/msys2installdeps.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:01 +0000
commit35a96bde514a8897f6f0fcc41c5833bf63df2e2a (patch)
tree657d15a03cc46bd099fc2c6546a7a4ad43815d9f /buildtools/msys2installdeps.sh
parentInitial commit. (diff)
downloadinkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.tar.xz
inkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.zip
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--buildtools/msys2installdeps.sh101
1 files changed, 101 insertions, 0 deletions
diff --git a/buildtools/msys2installdeps.sh b/buildtools/msys2installdeps.sh
new file mode 100644
index 0000000..139b102
--- /dev/null
+++ b/buildtools/msys2installdeps.sh
@@ -0,0 +1,101 @@
+#!/usr/bin/env bash
+# -------------------------------------------------------------------------------
+# This script installs all dependencies required for building Inkscape with MSYS2
+# execute it once on an MSYS shell, i.e.
+# - use the "MSYS2 MSYS" shortcut in the start menu or
+# - run "msys2.exe" in MSYS2's installation folder
+#
+# MSYS2 and installed libraries can be updated later by executing
+# pacman -Syu --ignore=mingw-w64-*-imagemagick
+# in an MSYS shell
+# -------------------------------------------------------------------------------
+
+# select if you want to build 32-bit (i686), 64-bit (x86_64), or both
+case "$MSYSTEM" in
+ MINGW32)
+ ARCH=mingw-w64-i686
+ ;;
+ MINGW64)
+ ARCH=mingw-w64-x86_64
+ ;;
+ *)
+ ARCH={mingw-w64-i686,mingw-w64-x86_64}
+ ;;
+esac
+
+# set default options for invoking pacman (in CI this variable is already set globally)
+if [ -z $CI ]; then
+ PACMAN_OPTIONS="--needed --noconfirm"
+fi
+
+# sync package databases
+pacman -Sy
+
+# install basic development system, compiler toolchain and build tools
+eval pacman -S $PACMAN_OPTIONS \
+git \
+intltool \
+base-devel \
+$ARCH-toolchain \
+$ARCH-cmake \
+$ARCH-ninja
+
+# install Inkscape dependencies (required)
+eval pacman -S $PACMAN_OPTIONS \
+$ARCH-double-conversion \
+$ARCH-gc \
+$ARCH-gsl \
+$ARCH-libxslt \
+$ARCH-boost \
+$ARCH-gtk3 \
+$ARCH-gtkmm3 \
+$ARCH-gdl \
+$ARCH-libsoup
+
+# install Inkscape dependencies (optional)
+eval pacman -S $PACMAN_OPTIONS \
+$ARCH-poppler \
+$ARCH-potrace \
+$ARCH-libcdr \
+$ARCH-libvisio \
+$ARCH-libwpg \
+$ARCH-aspell \
+$ARCH-aspell-en \
+$ARCH-gtkspell3
+
+# install ImageMagick (as Inkscape requires old version ImageMagick 6 we have to specify it explicitly)
+# to prevent future updates:
+# add the line
+# "IgnorePkg = mingw-w64-*-imagemagick"
+# to
+# "C:\msys64\etc\pacman.conf"
+# or (always!) run pacman with the additional command line switch
+# --ignore=mingw-w64-*-imagemagick
+for arch in $(eval echo $ARCH); do
+ wget -nv https://gitlab.com/ede123/bintray/-/raw/master/${arch}-imagemagick-6.9.10.69-1-any.pkg.tar.xz \
+ && pacman -U $PACMAN_OPTIONS ${arch}-imagemagick-6.9.10.69-1-any.pkg.tar.xz \
+ && rm ${arch}-imagemagick-6.9.10.69-1-any.pkg.tar.xz
+done
+
+
+# install Python and modules used by Inkscape
+eval pacman -S $PACMAN_OPTIONS \
+$ARCH-python \
+$ARCH-python-pip \
+$ARCH-python-lxml \
+$ARCH-python-numpy \
+$ARCH-python-pillow \
+$ARCH-python-six \
+$ARCH-python-gobject
+
+PACKAGES="coverage pyserial scour"
+for arch in $(eval echo $ARCH); do
+ case ${arch} in
+ mingw-w64-i686)
+ /mingw32/bin/pip3 install --upgrade ${PACKAGES}
+ ;;
+ mingw-w64-x86_64)
+ /mingw64/bin/pip3 install --upgrade ${PACKAGES}
+ ;;
+ esac
+done