diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-03-04 20:39:01 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-03-04 20:39:01 +0000 |
| commit | e0cfcecca077b96759bc3709195a93d8ea0c48d6 (patch) | |
| tree | 4d05c6372903cc2ea14c1ebcbad9a4856a91d6a6 | |
| parent | re-commit rev 15003. (Bug 1668853) (diff) | |
| download | inkscape-e0cfcecca077b96759bc3709195a93d8ea0c48d6.tar.gz inkscape-e0cfcecca077b96759bc3709195a93d8ea0c48d6.zip | |
Support for building with MSYS2
See Wiki for build instructions:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_with_MSYS2
(bzr r15564)
| -rw-r--r-- | CMakeLists.txt | 6 | ||||
| -rw-r--r-- | CMakeScripts/ConfigEnv.cmake | 6 | ||||
| -rw-r--r-- | CMakeScripts/InstallMSYS2.cmake | 228 | ||||
| -rw-r--r-- | mingwenv.cmake | 115 | ||||
| -rw-r--r-- | msys2installdeps.sh | 87 |
5 files changed, 385 insertions, 57 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df17342ee..0f6921ed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,11 @@ endif() # ----------------------------------------------------------------------------- add_subdirectory(share) -include(CMakeScripts/Install.cmake) +if(HAVE_MSYS2) + include(CMakeScripts/InstallMSYS2.cmake) +else() + include(CMakeScripts/Install.cmake) +endif() # ----------------------------------------------------------------------------- # Clean diff --git a/CMakeScripts/ConfigEnv.cmake b/CMakeScripts/ConfigEnv.cmake index ebd005cb3..dc4c70ba3 100644 --- a/CMakeScripts/ConfigEnv.cmake +++ b/CMakeScripts/ConfigEnv.cmake @@ -6,8 +6,10 @@ if(WIN32) include(mingwenv.cmake)
- list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${DEVLIBS_PATH})
- list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${DEVLIBS_PATH})
+ if(NOT HAVE_MSYS2)
+ list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${DEVLIBS_PATH})
+ list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${DEVLIBS_PATH})
+ endif()
set(CMAKE_C_COMPILER "${MINGW_BIN}/gcc.exe")
set(CMAKE_C_LINK_EXECUTABLE "${MINGW_BIN}/gcc.exe")
diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake new file mode 100644 index 000000000..72069033c --- /dev/null +++ b/CMakeScripts/InstallMSYS2.cmake @@ -0,0 +1,228 @@ +if(WIN32)
+ install(PROGRAMS
+ ${EXECUTABLE_OUTPUT_PATH}/inkscape.exe
+ ${EXECUTABLE_OUTPUT_PATH}/inkview.exe
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
+ )
+
+ install(PROGRAMS
+ ${EXECUTABLE_OUTPUT_PATH}/inkscape_com.exe
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
+ RENAME inkscape.com
+ )
+
+ install(FILES
+ ${LIBRARY_OUTPUT_PATH}/libinkscape_base.dll
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
+ )
+
+ install(FILES
+ AUTHORS
+ COPYING
+ NEWS
+ README
+ TRANSLATORS
+ GPL2.txt
+ GPL3.txt
+ LGPL2.1.txt
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+
+ # mingw dlls
+ install(FILES
+ ${MINGW_BIN}/LIBEAY32.dll
+ ${MINGW_BIN}/SSLEAY32.dll
+ ${MINGW_BIN}/libMagick++-6.Q16HDRI-6.dll
+ ${MINGW_BIN}/libMagickCore-6.Q16HDRI-2.dll
+ ${MINGW_BIN}/libMagickWand-6.Q16HDRI-2.dll
+ ${MINGW_BIN}/libaspell-15.dll
+ ${MINGW_BIN}/libatk-1.0-0.dll
+ ${MINGW_BIN}/libatkmm-1.6-1.dll
+ ${MINGW_BIN}/libbz2-1.dll
+ ${MINGW_BIN}/libcairo-2.dll
+ ${MINGW_BIN}/libcairo-gobject-2.dll
+ ${MINGW_BIN}/libcairomm-1.0-1.dll
+ ${MINGW_BIN}/libcdr-0.1.dll
+ ${MINGW_BIN}/libcurl-4.dll
+ ${MINGW_BIN}/libenchant.dll
+ ${MINGW_BIN}/libepoxy-0.dll
+ ${MINGW_BIN}/libexpat-1.dll
+ ${MINGW_BIN}/libffi-6.dll
+ ${MINGW_BIN}/libfftw3-3.dll
+ ${MINGW_BIN}/libfontconfig-1.dll
+ ${MINGW_BIN}/libfreetype-6.dll
+ ${MINGW_BIN}/libgc-1.dll
+ ${MINGW_BIN}/libgdk-3-0.dll
+ ${MINGW_BIN}/libgdk_pixbuf-2.0-0.dll
+ ${MINGW_BIN}/libgdkmm-3.0-1.dll
+ ${MINGW_BIN}/libgdl-3-5.dll
+ ${MINGW_BIN}/libgio-2.0-0.dll
+ ${MINGW_BIN}/libgiomm-2.4-1.dll
+ ${MINGW_BIN}/libglib-2.0-0.dll
+ ${MINGW_BIN}/libglibmm-2.4-1.dll
+ ${MINGW_BIN}/libgmodule-2.0-0.dll
+ ${MINGW_BIN}/libgmp-10.dll
+ ${MINGW_BIN}/libgnutls-30.dll
+ ${MINGW_BIN}/libgobject-2.0-0.dll
+ ${MINGW_BIN}/libgomp-1.dll
+ ${MINGW_BIN}/libgraphite2.dll
+ ${MINGW_BIN}/libgsl-19.dll
+ ${MINGW_BIN}/libgslcblas-0.dll
+ ${MINGW_BIN}/libgtk-3-0.dll
+ ${MINGW_BIN}/libgtkmm-3.0-1.dll
+ ${MINGW_BIN}/libgtkspell3-3-0.dll
+ ${MINGW_BIN}/libharfbuzz-0.dll
+ ${MINGW_BIN}/libhogweed-4.dll
+ ${MINGW_BIN}/libiconv-2.dll
+ ${MINGW_BIN}/libicudt57.dll
+ ${MINGW_BIN}/libicuin57.dll
+ ${MINGW_BIN}/libicuuc57.dll
+ ${MINGW_BIN}/libidn-11.dll
+ ${MINGW_BIN}/libintl-8.dll
+ ${MINGW_BIN}/libjpeg-8.dll
+ ${MINGW_BIN}/liblcms2-2.dll
+ ${MINGW_BIN}/liblqr-1-0.dll
+ ${MINGW_BIN}/libltdl-7.dll
+ ${MINGW_BIN}/liblzma-5.dll
+ ${MINGW_BIN}/libnettle-6.dll
+ ${MINGW_BIN}/libnghttp2-14.dll
+ ${MINGW_BIN}/libnspr4.dll
+ ${MINGW_BIN}/libopenjp2-7.dll
+ ${MINGW_BIN}/libp11-kit-0.dll
+ ${MINGW_BIN}/libpango-1.0-0.dll
+ ${MINGW_BIN}/libpangocairo-1.0-0.dll
+ ${MINGW_BIN}/libpangoft2-1.0-0.dll
+ ${MINGW_BIN}/libpangomm-1.4-1.dll
+ ${MINGW_BIN}/libpangowin32-1.0-0.dll
+ ${MINGW_BIN}/libpcre-1.dll
+ ${MINGW_BIN}/libpixman-1-0.dll
+ ${MINGW_BIN}/libplc4.dll
+ ${MINGW_BIN}/libplds4.dll
+ ${MINGW_BIN}/libpng16-16.dll
+ ${MINGW_BIN}/libpoppler-66.dll
+ ${MINGW_BIN}/libpoppler-glib-8.dll
+ ${MINGW_BIN}/libpopt-0.dll
+ ${MINGW_BIN}/libpotrace-0.dll
+ ${MINGW_BIN}/librevenge-0.0.dll
+ ${MINGW_BIN}/librevenge-stream-0.0.dll
+ ${MINGW_BIN}/librtmp-1.dll
+ ${MINGW_BIN}/libsigc-2.0-0.dll
+ ${MINGW_BIN}/libssh2-1.dll
+ ${MINGW_BIN}/libstdc++-6.dll
+ ${MINGW_BIN}/libtasn1-6.dll
+ ${MINGW_BIN}/libtiff-5.dll
+ ${MINGW_BIN}/libunistring-2.dll
+ ${MINGW_BIN}/libvisio-0.1.dll
+ ${MINGW_BIN}/libwinpthread-1.dll
+ ${MINGW_BIN}/libwpd-0.10.dll
+ ${MINGW_BIN}/libwpg-0.3.dll
+ ${MINGW_BIN}/libxml2-2.dll
+ ${MINGW_BIN}/libxslt-1.dll
+ ${MINGW_BIN}/nss3.dll
+ ${MINGW_BIN}/nssutil3.dll
+ ${MINGW_BIN}/smime3.dll
+ ${MINGW_BIN}/zlib1.dll
+ # these are not picked up by 'ldd' but are required for SVG support in gdk-pixbuf-2.0
+ ${MINGW_BIN}/libcroco-0.6-3.dll
+ ${MINGW_BIN}/librsvg-2-2.dll
+ # required by lxml
+ ${MINGW_BIN}/libexslt-0.dll
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ # There are differences for 64-Bit and 32-Bit build environments.
+ if(HAVE_MINGW64)
+ install(FILES
+ ${MINGW_BIN}/libgcc_s_seh-1.dll
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ else()
+ install(FILES
+ ${MINGW_BIN}/libgcc_s_dw2-1.dll
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ endif()
+
+ # Setup application data directories, poppler files, locales, icons and themes
+ file(MAKE_DIRECTORY
+ data
+ doc
+ modules
+ plugins)
+
+ install(DIRECTORY
+ data
+ doc
+ modules
+ plugins
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
+ PATTERN hicolor/index.theme EXCLUDE # NOTE: Empty index.theme in hicolor icon theme causes SIGSEGV.
+ PATTERN CMakeLists.txt EXCLUDE
+ PATTERN *.am EXCLUDE)
+
+ # Generate a dummy file in hicolor/index.theme to avoid bug 1635207
+ file(GENERATE OUTPUT ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/index.theme
+ CONTENT "[Icon Theme]\nName=hicolor\nDirectories=")
+
+ install(DIRECTORY ${MINGW_PATH}/share/icons/Adwaita
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons)
+
+ install(DIRECTORY ${MINGW_PATH}/share/themes
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share)
+
+ install(DIRECTORY ${MINGW_PATH}/share/locale
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share
+ PATTERN "*gtk20.mo" EXCLUDE)
+
+ install(DIRECTORY ${MINGW_PATH}/share/poppler
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share)
+
+ install(DIRECTORY ${MINGW_PATH}/share/glib-2.0/schemas
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/glib-2.0)
+
+ install(DIRECTORY ${MINGW_PATH}/etc/fonts
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/etc)
+
+ # GTK 3.0
+ install(DIRECTORY ${MINGW_LIB}/gtk-3.0
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ FILES_MATCHING
+ PATTERN "*.dll"
+ PATTERN "*.cache")
+
+ install(DIRECTORY ${MINGW_PATH}/etc/gtk-3.0
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/etc)
+
+ install(DIRECTORY ${MINGW_LIB}/gdk-pixbuf-2.0
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ FILES_MATCHING
+ PATTERN "*.dll"
+ PATTERN "*.cache")
+
+ # Aspell dictionaries
+ install(DIRECTORY ${MINGW_LIB}/aspell-0.60
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+
+ # Necessary to run extensions on windows if it is not in the path
+ if (HAVE_MINGW64)
+ install(FILES
+ ${MINGW_BIN}/gspawn-win64-helper.exe
+ ${MINGW_BIN}/gspawn-win64-helper-console.exe
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ else()
+ install(FILES
+ ${MINGW_BIN}/gspawn-win32-helper.exe
+ ${MINGW_BIN}/gspawn-win32-helper-console.exe
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ endif()
+
+ # Python (a bit hacky for backwards compatibility with devlibs at this point)
+ install(FILES
+ ${MINGW_BIN}/python2.exe
+ RENAME python.exe
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ install(FILES
+ ${MINGW_BIN}/python2w.exe
+ RENAME pythonw.exe
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ install(FILES
+ ${MINGW_BIN}/libpython2.7.dll
+ DESTINATION ${CMAKE_INSTALL_PREFIX})
+ install(DIRECTORY ${MINGW_LIB}/python2.7
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+endif()
\ No newline at end of file diff --git a/mingwenv.cmake b/mingwenv.cmake index 64766a60c..6ccdd21d7 100644 --- a/mingwenv.cmake +++ b/mingwenv.cmake @@ -1,5 +1,5 @@ # -----------------------------------------------------------------------------
-# Set the paths in this file if you want to build Inkscape from a shell other than the
+# Set the paths in this file if you want to build Inkscape from a shell other than the
# Windows built-in command line (i.e. MSYS) or IDEs such as CodeLite. These variables
# will be used as default if no environment variables are set.
# -----------------------------------------------------------------------------
@@ -14,69 +14,76 @@ set(ENV_MINGW_PATH C:/mingw64) # MinGW Configuration
# -----------------------------------------------------------------------------
message(STATUS "Configuring MinGW environment:")
-
-if("$ENV{DEVLIBS_PATH}" STREQUAL "")
- message(STATUS " Setting path to development libraries from mingwenv.cmake: ${ENV_DEVLIBS_PATH}")
- set(DEVLIBS_PATH ${ENV_DEVLIBS_PATH})
-else()
- message(STATUS " Setting path to development libraries from environment: $ENV{DEVLIBS_PATH}")
- set(DEVLIBS_PATH $ENV{DEVLIBS_PATH})
-endif()
-if("$ENV{MINGW_PATH}" STREQUAL "")
- message(STATUS " Setting path to MinGW from mingwenv.cmake: ${ENV_MINGW_PATH}")
- set(MINGW_PATH ${ENV_MINGW_PATH})
+if($MSYSTEM_CHOST STREQUAL "")
+ if("$ENV{DEVLIBS_PATH}" STREQUAL "")
+ message(STATUS " Setting path to development libraries from mingwenv.cmake: ${ENV_DEVLIBS_PATH}")
+ set(DEVLIBS_PATH ${ENV_DEVLIBS_PATH})
+ else()
+ message(STATUS " Setting path to development libraries from environment: $ENV{DEVLIBS_PATH}")
+ set(DEVLIBS_PATH $ENV{DEVLIBS_PATH})
+ endif()
+
+ if("$ENV{MINGW_PATH}" STREQUAL "")
+ message(STATUS " Setting path to MinGW from mingwenv.cmake: ${ENV_MINGW_PATH}")
+ set(MINGW_PATH ${ENV_MINGW_PATH})
+ else()
+ message(STATUS " Setting path to MinGW from environment: $ENV{MINGW_PATH}")
+ set(MINGW_PATH $ENV{MINGW_PATH})
+ endif()
+
+ # Normalize directory separator slashes.
+ string(REGEX REPLACE "\\\\" "/" DEVLIBS_PATH ${DEVLIBS_PATH})
+ string(REGEX REPLACE "\\\\" "/" MINGW_PATH ${MINGW_PATH})
else()
- message(STATUS " Setting path to MinGW from environment: $ENV{MINGW_PATH}")
- set(MINGW_PATH $ENV{MINGW_PATH})
+ set(HAVE_MSYS2 ON)
+ message(STATUS " Detected MinGW environment provided by MSYS2")
+ set(MINGW_PATH $ENV{MINGW_PREFIX})
endif()
-
-# Normalize directory separator slashes.
-string(REGEX REPLACE "\\\\" "/" DEVLIBS_PATH ${DEVLIBS_PATH})
-string(REGEX REPLACE "\\\\" "/" MINGW_PATH ${MINGW_PATH})
# -----------------------------------------------------------------------------
# DEVLIBS CHECKS
# -----------------------------------------------------------------------------
+if(NOT HAVE_MSYS2)
+ # Directory containing the compile time .dll.a and .a files.
+ set(DEVLIBS_LIB "${DEVLIBS_PATH}/lib")
-# Directory containing the compile time .dll.a and .a files.
-set(DEVLIBS_LIB "${DEVLIBS_PATH}/lib")
-
-if(NOT EXISTS "${DEVLIBS_LIB}")
- message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_LIB}")
-endif()
+ if(NOT EXISTS "${DEVLIBS_LIB}")
+ message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_LIB}")
+ endif()
-# Add devlibs libraries to linker path.
-link_directories(${DEVLIBS_LIB})
+ # Add devlibs libraries to linker path.
+ link_directories(${DEVLIBS_LIB})
-set(DEVLIBS_INCLUDE ${DEVLIBS_PATH}/include)
+ set(DEVLIBS_INCLUDE ${DEVLIBS_PATH}/include)
-if(NOT EXISTS ${DEVLIBS_INCLUDE})
- message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_INCLUDE}")
-endif()
+ if(NOT EXISTS ${DEVLIBS_INCLUDE})
+ message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_INCLUDE}")
+ endif()
-# Add general MinGW headers to compiler include path.
-#include_directories(${DEVLIBS_INCLUDE})
+ # Add general MinGW headers to compiler include path.
+ #include_directories(${DEVLIBS_INCLUDE})
-# Directory containing the precompiled .dll files.
-set(DEVLIBS_BIN ${DEVLIBS_PATH}/bin)
+ # Directory containing the precompiled .dll files.
+ set(DEVLIBS_BIN ${DEVLIBS_PATH}/bin)
-if(NOT EXISTS ${DEVLIBS_BIN})
- message(FATAL_ERROR "Inkscape development binaries directory does not exist: ${DEVLIBS_BIN}")
-endif()
+ if(NOT EXISTS ${DEVLIBS_BIN})
+ message(FATAL_ERROR "Inkscape development binaries directory does not exist: ${DEVLIBS_BIN}")
+ endif()
-# Directory containing the pkgconfig .pc files.
-set(PKG_CONFIG_PATH "${DEVLIBS_PATH}/lib/pkgconfig")
+ # Directory containing the pkgconfig .pc files.
+ set(PKG_CONFIG_PATH "${DEVLIBS_PATH}/lib/pkgconfig")
-if(NOT EXISTS "${PKG_CONFIG_PATH}")
- message(FATAL_ERROR "pkgconfig directory does not exist: ${PKG_CONFIG_PATH}")
-endif()
+ if(NOT EXISTS "${PKG_CONFIG_PATH}")
+ message(FATAL_ERROR "pkgconfig directory does not exist: ${PKG_CONFIG_PATH}")
+ endif()
-# Add the devlibs directories to the paths used to find libraries and programs.
-list(APPEND CMAKE_PREFIX_PATH ${DEVLIBS_PATH})
+ # Add the devlibs directories to the paths used to find libraries and programs.
+ list(APPEND CMAKE_PREFIX_PATH ${DEVLIBS_PATH})
-# Eliminate error messages when not having mingw in the environment path variable.
-list(APPEND CMAKE_PROGRAM_PATH ${DEVLIBS_BIN})
+ # Eliminate error messages when not having mingw in the environment path variable.
+ list(APPEND CMAKE_PROGRAM_PATH ${DEVLIBS_BIN})
+endif()
# -----------------------------------------------------------------------------
# MINGW CHECKS
@@ -84,13 +91,13 @@ list(APPEND CMAKE_PROGRAM_PATH ${DEVLIBS_BIN}) # We are in a MinGW environment.
set(HAVE_MINGW ON)
-
+
# Try to determine the MinGW processor architecture.
if(EXISTS "${MINGW_PATH}/mingw32")
set(HAVE_MINGW64 OFF)
set(MINGW_ARCH mingw32)
elseif(EXISTS "${MINGW_PATH}/i686-w64-mingw32")
- set(HAVE_MINGW64 OFF)
+ set(HAVE_MINGW64 ON)
set(MINGW_ARCH i686-w64-mingw32)
elseif(EXISTS "${MINGW_PATH}/x86_64-w64-mingw32")
set(HAVE_MINGW64 ON)
@@ -131,16 +138,16 @@ include_directories(SYSTEM ${MINGW_INCLUDE}) if(HAVE_MINGW64)
set(MINGW64_LIB "${MINGW_ARCH_PATH}/lib")
-
+
if(NOT EXISTS ${MINGW64_LIB})
message(FATAL_ERROR "MinGW 64-Bit libraries directory does not exist: ${MINGW64_LIB}")
endif()
# Add 64-Bit libraries to linker path.
link_directories(${MINGW64_LIB})
-
+
set(MINGW64_INCLUDE "${MINGW_ARCH_PATH}/include")
-
+
if(NOT EXISTS ${MINGW64_INCLUDE})
message(FATAL_ERROR "MinGW 64-Bit include directory does not exist: ${MINGW64_INCLUDE}")
endif()
@@ -163,16 +170,16 @@ endif() # Set the path to the 'ar' utility for the MSYS shell as it fails to detect it properly.
if(HAVE_MSYS)
message(STATUS "Configuring MSYS environment:")
-
+
if(NOT EXISTS ${CMAKE_AR})
set(MINGW_AR ${MINGW_BIN}/ar.exe)
-
+
if(EXISTS ${MINGW_AR})
set(CMAKE_AR ${MINGW_AR} CACHE FILEPATH "Archive Utility")
else()
message(FATAL_ERROR "ar.exe not found.")
endif()
-
+
message(STATUS " Setting path to ar.exe: ${CMAKE_AR}")
endif()
endif()
diff --git a/msys2installdeps.sh b/msys2installdeps.sh new file mode 100644 index 000000000..da3751971 --- /dev/null +++ b/msys2installdeps.sh @@ -0,0 +1,87 @@ +#!/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} + +# install basic development system, compiler toolchain and build tools +eval pacman -Sy --needed --noconfirm \ +bzr \ +intltool \ +base-devel \ +$ARCH-toolchain \ +$ARCH-cmake \ +$ARCH-ninja + +# install Inkscape dependecies (required) +eval pacman -Sy --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 -Sy --needed --noconfirm \ +$ARCH-poppler \ +$ARCH-potrace \ +$ARCH-libcdr \ +$ARCH-libvisio \ +$ARCH-libwpg \ +$ARCH-aspell \ +$ARCH-aspell-en \ +$ARCH-gtkspell \ +$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 ${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 -Sy --needed --noconfirm \ +$ARCH-python2 \ +$ARCH-python2-pip \ +$ARCH-python2-lxml \ +$ARCH-python2-numpy +for arch in ${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 |
