summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorhaawda2017-06-10 22:09:20 +0200
committerhaawda2017-06-10 22:09:20 +0200
commit9bc0d28ede01b42f069e71b26b2beaddbb0ac392 (patch)
treed94df976c703f0752635fd9d1bdb75a4c30b74af
downloadaur-9bc0d28ede01b42f069e71b26b2beaddbb0ac392.tar.gz
initial upload
-rw-r--r--.SRCINFO49
-rw-r--r--PKGBUILD64
-rw-r--r--inkscape-0.92.1-gcc7-1.patch77
3 files changed, 190 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8e9b9cd33c3a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,49 @@
+# Generated by mksrcinfo v8
+# Sat Jun 10 20:09:10 UTC 2017
+pkgbase = inkscape-092-git
+ pkgdesc = An Open Source vector graphics editor, using Scalable Vector Graphics (SVG) file format, from git branch 0.92.x
+ pkgver = 20170607
+ pkgrel = 1
+ url = https://gitlab.com/inkscape/inkscape
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ makedepends = boost
+ makedepends = intltool
+ makedepends = git
+ makedepends = gettext
+ makedepends = pango
+ makedepends = fontconfig
+ makedepends = python
+ makedepends = cmake
+ depends = gtkspell
+ depends = gtkmm
+ depends = gc
+ depends = poppler-glib
+ depends = potrace
+ depends = libxslt
+ depends = gsl
+ depends = imagemagick
+ depends = python2
+ depends = popt
+ depends = libcdr
+ depends = libvisio
+ depends = popt
+ depends = dbus-glib
+ optdepends = python2-numpy: some extensions
+ optdepends = python2-lxml: some extensions and filters
+ optdepends = uniconvertor: reading/writing to some proprietary formats
+ optdepends = gtkspell3: for spelling
+ optdepends = ruby: for simplepath extension
+ provides = inkscape
+ conflicts = inkscape
+ options = !libtool
+ options = !makeflags
+ source = inkscape.git::git+https://gitlab.com/inkscape/inkscape#branch=0.92.x
+ source = inkscape-0.92.1-gcc7-1.patch
+ md5sums = SKIP
+ md5sums = a6b01372fa4a1882e72d6018beb55730
+
+pkgname = inkscape-092-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7eee663df010
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Contributor: Splex
+# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+
+pkgname=inkscape-092-git
+pkgver=20170607
+pkgrel=1
+pkgdesc="An Open Source vector graphics editor, using Scalable Vector Graphics (SVG) file format, from git branch 0.92.x"
+url="https://gitlab.com/inkscape/inkscape"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL')
+depends=('gtkspell' 'gtkmm' 'gc' 'poppler-glib' 'potrace' 'libxslt' 'gsl' 'imagemagick'
+ 'python2' 'popt' 'libcdr' 'libvisio' 'popt' 'dbus-glib')
+optdepends=('python2-numpy: some extensions'
+ 'python2-lxml: some extensions and filters'
+ 'uniconvertor: reading/writing to some proprietary formats'
+ 'gtkspell3: for spelling'
+ 'ruby: for simplepath extension')
+makedepends=('boost' 'intltool' 'git' 'gettext' 'pango' 'fontconfig' 'python' 'cmake')
+provides=('inkscape')
+conflicts=('inkscape')
+options=('!libtool' '!makeflags')
+source=('inkscape.git::git+https://gitlab.com/inkscape/inkscape#branch=0.92.x' inkscape-0.92.1-gcc7-1.patch)
+md5sums=('SKIP'
+ 'a6b01372fa4a1882e72d6018beb55730')
+_gitname="inkscape.git"
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+ git log -1 --format="%cd" --date=short|tr -d -
+}
+
+prepare() {
+ cd "$srcdir/$_gitname"
+ #fix for inkscape to use python2 with the python 3 package installed.
+ sed -i '1s|/usr/bin/python\>|/usr/bin/python2|' cxxtest/*.py
+ sed -i '1s|/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' share/extensions/uniconv*.py
+ sed -i 's|"python"|"python2"|g' src/main.cpp
+ sed -i '1s|/usr/bin/env python\>|/usr/bin/env python2|g' share/extensions/ink2canvas/svg.py
+ sed -i '1s|/usr/bin/env python\>|/usr/bin/env python2|g' share/extensions/ink2canvas/canvas.py
+ sed -i '1s|/usr/bin/env python3\>|/usr/bin/env python2|g' CMakeScripts/cmake_consistency_check.py
+ patch -Np1 < "$srcdir"/inkscape-0.92.1-gcc7-1.patch || true
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+ [[ -d build ]] || mkdir build
+ cd build
+
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=RELEASE \
+ -DWITH_GNOME_VFS=OFF \
+ -DWITH_DBUS=ON
+
+ sed -i 's|"python"|"python2"|g' ../share/filters/CMakeLists.txt
+ make
+}
+
+package() {
+ cd "$srcdir/$_gitname/build"
+ make DESTDIR=$pkgdir install
+}
diff --git a/inkscape-0.92.1-gcc7-1.patch b/inkscape-0.92.1-gcc7-1.patch
new file mode 100644
index 000000000000..455727d00229
--- /dev/null
+++ b/inkscape-0.92.1-gcc7-1.patch
@@ -0,0 +1,77 @@
+--- inkscape-0.92.1/src/ui/tools/flood-tool.cpp.orig 2017-05-16 20:45:31.374672304 +0100
++++ inkscape-0.92.1/src/ui/tools/flood-tool.cpp 2017-05-16 21:35:01.564359096 +0100
+@@ -196,6 +196,21 @@
+ }
+
+ /**
++ * \brief Check whether two unsigned integers are close to each other
++ *
++ * \param[in] a The 1st unsigned int
++ * \param[in] b The 2nd unsigned int
++ * \param[in] d The threshold for comparison
++ *
++ * \return true if |a-b| <= d; false otherwise
++ */
++static bool compare_guint32(guint32 const a, guint32 const b, guint32 const d)
++{
++ const int difference = std::abs(static_cast<int>(a) - static_cast<int>(b));
++ return difference <= d;
++}
++
++/**
+ * Compare a pixel in a pixel buffer with another pixel to determine if a point should be included in the fill operation.
+ * @param check The pixel in the pixel buffer to check.
+ * @param orig The original selected pixel to use as the fill target color.
+@@ -232,27 +247,35 @@
+
+ switch (method) {
+ case FLOOD_CHANNELS_ALPHA:
+- return abs(static_cast<int>(ac) - ao) <= threshold;
++ return compare_guint32(ac, ao, threshold);
+ case FLOOD_CHANNELS_R:
+- return abs(static_cast<int>(ac ? unpremul_alpha(rc, ac) : 0) - (ao ? unpremul_alpha(ro, ao) : 0)) <= threshold;
++ return compare_guint32(ac ? unpremul_alpha(rc, ac) : 0,
++ ao ? unpremul_alpha(ro, ao) : 0,
++ threshold);
+ case FLOOD_CHANNELS_G:
+- return abs(static_cast<int>(ac ? unpremul_alpha(gc, ac) : 0) - (ao ? unpremul_alpha(go, ao) : 0)) <= threshold;
++ return compare_guint32(ac ? unpremul_alpha(gc, ac) : 0,
++ ao ? unpremul_alpha(go, ao) : 0,
++ threshold);
+ case FLOOD_CHANNELS_B:
+- return abs(static_cast<int>(ac ? unpremul_alpha(bc, ac) : 0) - (ao ? unpremul_alpha(bo, ao) : 0)) <= threshold;
++ return compare_guint32(ac ? unpremul_alpha(bc, ac) : 0,
++ ao ? unpremul_alpha(bo, ao) : 0,
++ threshold);
+ case FLOOD_CHANNELS_RGB:
+- guint32 amc, rmc, bmc, gmc;
+- //amc = 255*255 - (255-ac)*(255-ad); amc = (amc + 127) / 255;
+- //amc = (255-ac)*ad + 255*ac; amc = (amc + 127) / 255;
+- amc = 255; // Why are we looking at desktop? Cairo version ignores destop alpha
+- rmc = (255-ac)*rd + 255*rc; rmc = (rmc + 127) / 255;
+- gmc = (255-ac)*gd + 255*gc; gmc = (gmc + 127) / 255;
+- bmc = (255-ac)*bd + 255*bc; bmc = (bmc + 127) / 255;
+-
+- diff += abs(static_cast<int>(amc ? unpremul_alpha(rmc, amc) : 0) - (amop ? unpremul_alpha(rmop, amop) : 0));
+- diff += abs(static_cast<int>(amc ? unpremul_alpha(gmc, amc) : 0) - (amop ? unpremul_alpha(gmop, amop) : 0));
+- diff += abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - (amop ? unpremul_alpha(bmop, amop) : 0));
+- return ((diff / 3) <= ((threshold * 3) / 4));
+-
++ {
++ guint32 amc, rmc, bmc, gmc;
++ //amc = 255*255 - (255-ac)*(255-ad); amc = (amc + 127) / 255;
++ //amc = (255-ac)*ad + 255*ac; amc = (amc + 127) / 255;
++ amc = 255; // Why are we looking at desktop? Cairo version ignores destop alpha
++ rmc = (255-ac)*rd + 255*rc; rmc = (rmc + 127) / 255;
++ gmc = (255-ac)*gd + 255*gc; gmc = (gmc + 127) / 255;
++ bmc = (255-ac)*bd + 255*bc; bmc = (bmc + 127) / 255;
++
++ int diff = 0; // The total difference between each of the 3 color components
++ diff += std::abs(static_cast<int>(amc ? unpremul_alpha(rmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(rmop, amop) : 0));
++ diff += std::abs(static_cast<int>(amc ? unpremul_alpha(gmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(gmop, amop) : 0));
++ diff += std::abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(bmop, amop) : 0));
++ return ((diff / 3) <= ((threshold * 3) / 4));
++ }
+ case FLOOD_CHANNELS_H:
+ return ((int)(fabs(hsl_check[0] - hsl_orig[0]) * 100.0) <= threshold);
+ case FLOOD_CHANNELS_S: