~inkscape.dev/inkscape/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# This script installs all dependecies 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
#ARCH=mingw-w64-i686
#ARCH=mingw-w64-x86_64
ARCH={mingw-w64-i686,mingw-w64-x86_64}

# sync package databases
pacman -Sy

# install basic development system, compiler toolchain and build tools
eval pacman -S --needed --noconfirm \
bzr \
intltool \
base-devel \
$ARCH-toolchain \
$ARCH-cmake \
$ARCH-ninja

# install Inkscape dependecies (required)
eval pacman -S --needed --noconfirm \
$ARCH-gc \
$ARCH-gsl \
$ARCH-popt \
$ARCH-libxslt \
$ARCH-boost \
$ARCH-gtk2 \
$ARCH-gtkmm \
$ARCH-gtk3 \
$ARCH-gtkmm3 \
$ARCH-gdl

# install Inkscape dependecies (optional)
eval pacman -S --needed --noconfirm \
$ARCH-poppler \
$ARCH-potrace \
$ARCH-libcdr \
$ARCH-libvisio \
$ARCH-libwpg \
$ARCH-aspell \
$ARCH-aspell-en \
$ARCH-gtkspell \
$ARCH-gtkspell3 \
$ARCH-libyaml

# 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
  case ${arch} in
    mingw-w64-i686)
      pacman -U --needed --noconfirm https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686/mingw-w64-i686-imagemagick-6.9.3.7-1-any.pkg.tar.xz
      ;;
    mingw-w64-x86_64)
      pacman -U --needed --noconfirm https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64/mingw-w64-x86_64-imagemagick-6.9.3.7-1-any.pkg.tar.xz
      ;;
  esac
done


# install Python and modules used by Inkscape
eval pacman -S --needed --noconfirm \
$ARCH-python2 \
$ARCH-python2-pip \
$ARCH-python2-lxml \
$ARCH-python2-numpy \
$ARCH-python2-pillow
for arch in $(eval echo $ARCH); do
  case ${arch} in
    mingw-w64-i686)
      /mingw32/bin/pip install coverage pyserial scour
      ;;
    mingw-w64-x86_64)
      /mingw64/bin/pip install coverage pyserial scour
      ;;
  esac
done