inkscape: Update to 0.92.5. Switch to cmake build

This commit is contained in:
Alexey Pavlov
2020-04-14 17:01:10 +03:00
parent 53cfbd2175
commit 6774f34ac1
8 changed files with 90 additions and 104 deletions

View File

@@ -11,8 +11,8 @@ fi
_realname=inkscape
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.92.4
pkgrel=5
pkgver=0.92.5
pkgrel=1
pkgdesc="Vector graphics editor using the SVG file format (mingw-w64)"
arch=('any')
url="https://inkscape.sourceforge.io/"
@@ -41,15 +41,15 @@ depends=(
"${MINGW_PACKAGE_PREFIX}-poppler"
"${MINGW_PACKAGE_PREFIX}-popt"
"${MINGW_PACKAGE_PREFIX}-potrace"
"${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python"
$([[ "${_use_gtk3}" == "yes" ]] && echo \
"${MINGW_PACKAGE_PREFIX}-gdl" ) \
)
optdepends=(#"${MINGW_PACKAGE_PREFIX}-pstoedit: latex formulas"
#"${MINGW_PACKAGE_PREFIX}-texlive-core: latex formulas"
"${MINGW_PACKAGE_PREFIX}-python2-numpy: some extensions"
"${MINGW_PACKAGE_PREFIX}-python2-lxml: some extensions and filters"
#"${MINGW_PACKAGE_PREFIX}-python2-scour: optimized SVG output"
"${MINGW_PACKAGE_PREFIX}-python-numpy: some extensions"
"${MINGW_PACKAGE_PREFIX}-python-lxml: some extensions and filters"
#"${MINGW_PACKAGE_PREFIX}-python-scour: optimized SVG output"
#"${MINGW_PACKAGE_PREFIX}-uniconvertor: reading/writing to some proprietary formats"
)
options=('staticlibs' 'strip')
@@ -60,17 +60,17 @@ source=(https://media.inkscape.org/dl/resources/file/${_realname}-${pkgver}.tar.
inkscape-0.48.4-python-extensions-location.patch
inkscape-0.91-simulaneous-intltool-gettext.patch
inkscape-0.92.3-abs-overloaded.patch
inkscape-0.92.2-fix-imagemagick-detect.patch
inkscape-0.92.4-poppler-0_76.patch)
sha256sums=('57ec2da8177b36614a513e2822efd73af721e690f7ddc6bd0a5fbb1525b4515e'
inkscape-0.92.5-skip-install-mingw.patch
inkscape-0.92.5-fix-warning.patch)
sha256sums=('81ee7f69e2bd64a97343d8395a4a7a7905b21b861566ed5e5d9179178d519a0b'
'e578fbef476704a42522ec5298f0202d2e600c2e03a98dba2c62d4ee1e53b6b5'
'ee948c90126407285b262cbea3d5a182e8fc166fddce09ea33d689fde3101a49'
'38a880a5475dd0ad99707c18a35e716f6cd677ecb7982612f2f699002f7113bf'
'55b0922f98c98ac5df8ba0869c46ff9eeeee9aaceef9afbaad9c4763dd3923ba'
'c676771eec2fe4249c4b483d94fd09955547e04656b2e10a60e06ae40bc2d805'
'e9daa7b7e77cfbc59a56a19e8315414d6861875f6274fd48ac61da1411290b74'
'12cc284239caa6bed2474afc7ea7fecefad55fb7d5679b124220ebbd6f276ee1'
'ea625d1d7260d32866e4e61946fa02793b1762f66dc223364dbcc5e628bb5bfe'
'833980a8bd2c67be66a8d7c211c7996984728372a2c55ec71e1f93e2fb2343c5'
'aa118059aee51702af6131d95de05c4cee4e5ddfaaba5a43783c3c537c943458'
'4becae86497871076d4b790123eb0624687e3d8509845b0d5c750a5145e8fa1f')
'71c5b0c08c88a20a7d7ce73771ff41e8f1d4a25b0ceeae359cbda22ab9aa1cfc'
'dc3c347919239e1eb1c5b256b8015b70639e6f9c2f8540b079b7609d26defdb8')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
@@ -81,39 +81,35 @@ prepare() {
#patch -p1 -i ${srcdir}/inkscape-0.91-simulaneous-intltool-gettext.patch
patch -p1 -i ${srcdir}/inkscape-0.92.3-abs-overloaded.patch
#patch -p1 -i ${srcdir}/inkscape-0.92.2-fix-imagemagick-detect.patch
patch -p1 -i ${srcdir}/inkscape-0.92.4-poppler-0_76.patch
./autogen.sh
sed -i 's|/usr/bin/python\>|/usr/bin/python2|g' cxxtest/*.py
sed -i 's|/usr/bin/env python\>|/usr/bin/env python2|g' share/*/{test/,}*.py
#sed -i 's|"python" },|"python2" },|g' src/extension/implementation/script.cpp
sed -i 's|python -c|python2 -c|g' configure share/extensions/uniconv*.py
sed -i '/^#include <g.kmm/i #include <glibmm.h>' src/*{,/*{,/*{,/*}}}.{h,cpp}
sed -e "s|export-dynamic|export-all-symbols|g" -i src/Makefile.am
patch -p1 -i ${srcdir}/inkscape-0.92.5-skip-install-mingw.patch
patch -p1 -i ${srcdir}/inkscape-0.92.5-fix-warning.patch
}
build() {
# export lt_cv_deplibs_check_method='pass_all'
[[ -d build-${CARCH} ]] && rm -rf build-${CARCH}
mkdir -p build-${CARCH} && cd build-${CARCH}
declare -a extra_config
if [ "${_use_gtk3}" = "yes" ]; then
extra_config+=(--enable-gtk3-experimental)
local -a extra_config
if check_option "debug" "y"; then
extra_config+=(-DCMAKE_BUILD_TYPE=Debug)
else
extra_config+=(-DCMAKE_BUILD_TYPE=Release)
fi
CXXFLAGS+=" -std=gnu++11"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--enable-lcms \
--enable-poppler-cairo \
--disable-dependency-tracking \
--disable-strict-build \
${extra_config[@]}
if [ "${_use_gtk3}" = "yes" ]; then
extra_config+=(-DWITH_GTK3_EXPERIMENTAL=ON)
fi
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
-G"MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
${extra_config[@]} \
-Wno-dev \
-DCMAKE_AR=${MINGW_PREFIX}/bin/ar \
-DWITH_IMAGE_MAGICK=OFF \
../${_realname}-${pkgver}
make
}

View File

@@ -175,18 +175,17 @@ diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_summary.py inkscape-0.4
diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_transitions.py inkscape-0.48.4/share/extensions/jessyInk_transitions.py
--- inkscape-0.48.4.orig/share/extensions/jessyInk_transitions.py 2014-03-06 00:48:27.938148600 +0000
+++ inkscape-0.48.4/share/extensions/jessyInk_transitions.py 2014-03-06 00:51:30.778606400 +0000
@@ -15,13 +15,8 @@
@@ -15,12 +15,8 @@
if sys.version_info[0] >= 3:
unicode = lambda s, enc: s
# These lines are only needed if you don't put the script directly into
# the installation directory
-import sys
-# Unix
-sys.path.append('/usr/share/inkscape/extensions')
-# OS X
-sys.path.append('/Applications/Inkscape.app/Contents/Resources/extensions')
-# Windows
-sys.path.append('C:\Program Files\Inkscape\share\extensions')
+import sys, os
+import os
+sys.path.append(sys.prefix+os.sep+'share'+os.sep+'inkscape'+os.sep+'extensions')
# We will use the inkex module with the predefined Effect base class.
@@ -251,16 +250,16 @@ diff -urN inkscape-0.48.4.orig/share/extensions/jessyInk_view.py inkscape-0.48.4
diff -urN inkscape-0.48.4.orig/share/extensions/pixelsnap.py inkscape-0.48.4/share/extensions/pixelsnap.py
--- inkscape-0.48.4.orig/share/extensions/pixelsnap.py 2014-03-06 00:48:27.952149400 +0000
+++ inkscape-0.48.4/share/extensions/pixelsnap.py 2014-03-06 00:51:59.986277000 +0000
@@ -60,7 +60,7 @@
@@ -61,7 +61,7 @@
from __future__ import division
from __future__ import print_function
-import sys
+import sys, os
# *** numpy causes issue #4 on Mac OS 10.6.2. I use it for
# matrix inverse -- my linear algebra's a bit rusty, but I could implement my
# own matrix inverse function if necessary, I guess.
@@ -74,6 +74,7 @@
@@ -75,6 +76,7 @@
#sys.path += ['/usr/share/inkscape/extensions'] # If you're using a standard Linux installation
#sys.path += ['/usr/local/share/inkscape/extensions'] # If you're using a custom Linux installation
#sys.path += ['C:\\Program Files\\Inkscape\\share\\extensions'] # If you're using a standard Windows installation

View File

@@ -2,10 +2,10 @@
+++ inkscape-0.48.4-orig/src/extension/implementation/script.cpp 2014-03-02 10:36:07.191200000 +0400
@@ -87,7 +87,7 @@
Script::interpreter_t const Script::interpreterTab[] = {
{"perl", "perl-interpreter", "perl" },
#ifdef WIN32
{"perl", "perl-interpreter", "wperl" },
- {"python", "python-interpreter", "pythonw" },
+ {"python", "python-interpreter", "python2w" },
+ {"python", "python-interpreter", "python3w" },
#else
{"perl", "perl-interpreter", "perl" },
{"python", "python-interpreter", "python" },
#endif

View File

@@ -190,3 +190,24 @@
//CREATE V0.1 WIN32 support
# define CREATE_GRADIENTSDIR WIN32_DATADIR("create\\gradients\\gimp")
# define CREATE_PALETTESDIR WIN32_DATADIR("create\\swatches")
--- inkscape-0.92.5/CMakeScripts/ConfigPaths.cmake.orig 2020-04-14 13:29:38.793243100 +0300
+++ inkscape-0.92.5/CMakeScripts/ConfigPaths.cmake 2020-04-14 13:29:45.185521300 +0300
@@ -1,6 +1,6 @@
message(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}")
-if(WIN32)
+if(MSVC)
if(${CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT})
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/inkscape"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
--- inkscape-0.92.5/src/CMakeLists.txt.orig 2020-04-14 15:47:57.624002000 +0300
+++ inkscape-0.92.5/src/CMakeLists.txt 2020-04-14 15:48:02.898475900 +0300
@@ -570,7 +570,7 @@
#Define the installation
-if(NOT WIN32)
+if(NOT MSVC)
install(TARGETS
inkscape_base
inkscape

View File

@@ -1,11 +0,0 @@
--- inkscape-0.92.2/configure.ac.orig 2018-01-11 15:42:08.781397200 +0300
+++ inkscape-0.92.2/configure.ac 2018-01-11 15:42:12.303085300 +0300
@@ -619,7 +619,7 @@
dnl Check for ImageMagick Magick++
dnl ******************************
-PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
+PKG_CHECK_MODULES(IMAGEMAGICK, Magick++, magick_ok=yes, magick_ok=no)
if test "x$magick_ok" = "xyes"; then
AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
fi

View File

@@ -1,43 +0,0 @@
From e831b034746f8dc3c3c1b88372751f6dcb974831 Mon Sep 17 00:00:00 2001
From: Marc Jeanmougin <marc@jeanmougin.fr>
Date: Wed, 24 Apr 2019 14:11:26 +0200
Subject: [PATCH] Tentative fix for poppler 0.76
---
src/extension/internal/pdfinput/pdf-parser.cpp | 2 +-
src/extension/internal/pdfinput/poppler-transition-api.h | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
index 8484984bdf..4f798e35bf 100644
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
@@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) {
error(errInternal, -1, "Weird page contents");
return;
}
- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
+ parser = new _POPPLER_NEW_PARSER(xref, obj);
go(topLevel);
delete parser;
parser = nullptr;
diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
index 61a15083a0..5e8bc4ae90 100644
--- a/src/extension/internal/pdfinput/poppler-transition-api.h
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
@@ -14,6 +14,13 @@
#include <glib/poppler-features.h>
+#if POPPLER_CHECK_VERSION(0, 76, 0)
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
+#else
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
+#endif
+
+
#if POPPLER_CHECK_VERSION(0, 72, 0)
#define getCString c_str
#endif
--
2.21.0

View File

@@ -0,0 +1,9 @@
--- inkscape-0.92.5/src/helper/sp-marshal.list.orig 2020-04-14 14:33:17.964759300 +0300
+++ inkscape-0.92.5/src/helper/sp-marshal.list 2020-04-14 14:33:41.412566900 +0300
@@ -1,5 +1,5 @@
# marshallers for sodipodi
-NONE:POINTER,UINT
+VOID:POINTER,UINT
BOOLEAN:POINTER
BOOLEAN:POINTER,UINT
BOOLEAN:POINTER,POINTER

View File

@@ -0,0 +1,15 @@
--- inkscape-0.92.5/CMakeLists.txt.orig 2020-04-14 13:21:31.007506500 +0300
+++ inkscape-0.92.5/CMakeLists.txt 2020-04-14 13:21:51.179495500 +0300
@@ -207,12 +207,6 @@
# -----------------------------------------------------------------------------
add_subdirectory(share)
-if(HAVE_MSYS2)
- include(CMakeScripts/InstallMSYS2.cmake)
-else()
- include(CMakeScripts/Install.cmake)
-endif()
-
# -----------------------------------------------------------------------------
# Clean
# -----------------------------------------------------------------------------