summaryrefslogtreecommitdiff
path: root/extra/inkscape
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-04-23 03:27:46 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-04-23 03:27:46 +0000
commit0459e6459ee534bf22ab8a5381cd485e6035e9e2 (patch)
tree605a15ed18dc37695caaeb02271fdd06320a00f3 /extra/inkscape
parentd4b7ceefdfb9c828799749419e8f8f7a36c2d7b8 (diff)
Wed Apr 23 03:24:08 UTC 2014
Diffstat (limited to 'extra/inkscape')
-rw-r--r--extra/inkscape/PKGBUILD30
-rw-r--r--extra/inkscape/freetype.patch (renamed from extra/inkscape/build_fix.diff)0
-rw-r--r--extra/inkscape/gc74.patch54
-rw-r--r--extra/inkscape/ime-placement.patch62
4 files changed, 134 insertions, 12 deletions
diff --git a/extra/inkscape/PKGBUILD b/extra/inkscape/PKGBUILD
index 571c7f9fe..0cac6f681 100644
--- a/extra/inkscape/PKGBUILD
+++ b/extra/inkscape/PKGBUILD
@@ -1,47 +1,53 @@
-# $Id: PKGBUILD 200656 2013-12-01 09:50:21Z andyrtr $
+# $Id: PKGBUILD 211635 2014-04-22 02:11:15Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
# Contributor: tobias <tobias@archlinux.org>
pkgname=inkscape
pkgver=0.48.4
-pkgrel=13
+pkgrel=14
pkgdesc='Vector graphics editor using the SVG file format'
url='http://inkscape.sourceforge.net/'
license=('GPL' 'LGPL')
arch=('i686' 'x86_64')
makedepends=('boost' 'intltool')
-depends=('gc' 'gsl' 'gtkmm' 'gtkspell' 'imagemagick' 'libxslt' 'poppler-glib>=0.24.4' 'popt'
+depends=('gc' 'gsl' 'gtkmm' 'gtkspell' 'imagemagick' 'libxslt' 'poppler-glib' 'popt'
'python2' 'desktop-file-utils' 'hicolor-icon-theme')
optdepends=('pstoedit: latex formulas'
'texlive-core: latex formulas'
'python2-numpy: some extensions'
'python2-lxml: some extensions and filters'
'uniconvertor: reading/writing to some proprietary formats')
-source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2
- spuriouscomma.patch
- build_fix.diff)
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
+ 'spuriouscomma.patch'
+ 'ime-placement.patch'
+ 'freetype.patch'
+ 'gc74.patch')
sha1sums=('5f26f6ad191d1e7c2a9fb69a438722beb172224c'
'7d1d5a6d1d2b0926721a994d5889c52890fc57c1'
- 'aba4d98bebae088c3401fd9259ea3cf70b96fbbf')
+ 'b12b948ca5ee7e02703a13aa8b8bccdf67947f12'
+ 'aba4d98bebae088c3401fd9259ea3cf70b96fbbf'
+ '3e1b5b6852d668388a857bc7a73fb7731fb262b8')
install=install
prepare() {
- cd ${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../gc74.patch # FS#39106
+ patch -p0 -i ../freetype.patch # FS#37956
+ patch -p1 -i ../ime-placement.patch # FS#39898
patch -p0 -i ../spuriouscomma.patch
- # fix build with freetype 2.5.1
- patch -Np0 -i ../build_fix.diff
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 's|"python"|"python2"|g' src/main.cpp
sed -i '/^#include <g.kmm/i #include <glibmm.h>' src/*{,/*{,/*{,/*}}}.{h,cpp}
+ sed -i '/extern unsigned GC_version;/c unsigned GC_version=GC_VERSION_MAJOR<<16+GC_VERSION_MINOR<<8+GC_VERSION_MICRO;' configure
}
build() {
- cd ${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--with-python \
@@ -53,6 +59,6 @@ build() {
}
package() {
- cd ${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}
diff --git a/extra/inkscape/build_fix.diff b/extra/inkscape/freetype.patch
index 84cdc1ca6..84cdc1ca6 100644
--- a/extra/inkscape/build_fix.diff
+++ b/extra/inkscape/freetype.patch
diff --git a/extra/inkscape/gc74.patch b/extra/inkscape/gc74.patch
new file mode 100644
index 000000000..41615ac49
--- /dev/null
+++ b/extra/inkscape/gc74.patch
@@ -0,0 +1,54 @@
+--- inkscape-0.48.4/src/gc-core.h.old 2013-12-31 01:22:38.976653890 +0400
++++ inkscape-0.48.4/src/gc-core.h 2013-12-31 01:22:48.525653608 +0400
+@@ -57,7 +57,7 @@
+ CleanupFunc *old_func,
+ void **old_data);
+ int (*general_register_disappearing_link)(void **p_ptr,
+- void *base);
++ const void *base);
+ int (*unregister_disappearing_link)(void **p_ptr);
+ std::size_t (*get_heap_size)();
+ std::size_t (*get_free_bytes)();
+--- inkscape-0.48.4/src/gc.cpp.old 2013-12-31 01:23:50.462651778 +0400
++++ inkscape-0.48.4/src/gc.cpp 2013-12-31 01:40:37.718622017 +0400
+@@ -70,8 +70,8 @@
+ return base + debug_base_fixup();
+ }
+
+-int debug_general_register_disappearing_link(void **p_ptr, void *base) {
+- char *real_base=reinterpret_cast<char *>(base) - debug_base_fixup();
++int debug_general_register_disappearing_link(void **p_ptr, const void *base) {
++ char *real_base=const_cast<char *>(reinterpret_cast<const char *>(base)) - debug_base_fixup();
+ return GC_general_register_disappearing_link(p_ptr, real_base);
+ }
+
+@@ -90,7 +90,7 @@
+ }
+ }
+
+-int dummy_general_register_disappearing_link(void **, void *) { return false; }
++int dummy_general_register_disappearing_link(void **, const void *) { return false; }
+
+ int dummy_unregister_disappearing_link(void **/*link*/) { return false; }
+
+@@ -112,7 +112,11 @@
+ &GC_malloc_atomic_uncollectable,
+ &GC_base,
+ &GC_register_finalizer_ignore_self,
++#if (GC_MAJOR_VERSION >= 7 && GC_MINOR_VERSION >= 4)
+ &GC_general_register_disappearing_link,
++#else
++ (int (*)(void**, const void*))(&GC_general_register_disappearing_link),
++#endif
+ &GC_unregister_disappearing_link,
+ &GC_get_heap_size,
+ &GC_get_free_bytes,
+@@ -202,7 +206,7 @@
+ die_because_not_initialized();
+ }
+
+-int stub_general_register_disappearing_link(void **, void *) {
++int stub_general_register_disappearing_link(void **, const void *) {
+ die_because_not_initialized();
+ return 0;
+ }
diff --git a/extra/inkscape/ime-placement.patch b/extra/inkscape/ime-placement.patch
new file mode 100644
index 000000000..7f2e13a5e
--- /dev/null
+++ b/extra/inkscape/ime-placement.patch
@@ -0,0 +1,62 @@
+diff -aur old/src/text-context.cpp new/src/text-context.cpp
+--- old/src/text-context.cpp 2011-07-08 08:25:09.468790000 -1000
++++ new/src/text-context.cpp 2014-04-21 14:48:22.668759004 -1000
+@@ -684,6 +684,17 @@
+ // articifically here, for the text object does not exist yet:
+ double cursor_height = sp_desktop_get_font_size_tool(desktop);
+ sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), dtp, dtp + Geom::Point(0, cursor_height));
++ if (tc->imc) {
++ GdkRectangle im_cursor;
++ Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3);
++ Geom::Point const cursor_size(0, cursor_height);
++ Geom::Point const im_position = SP_EVENT_CONTEXT(tc)->desktop->d2w(dtp + cursor_size - top_left);
++ im_cursor.x = (int) floor(im_position[Geom::X]);
++ im_cursor.y = (int) floor(im_position[Geom::Y]);
++ im_cursor.width = 0;
++ im_cursor.height = (int) -floor(SP_EVENT_CONTEXT(tc)->desktop->d2w(cursor_size)[Geom::Y]);
++ gtk_im_context_set_cursor_location(tc->imc, &im_cursor);
++ }
+ event_context->_message_context->set(Inkscape::NORMAL_MESSAGE, _("Type text; <b>Enter</b> to start new line.")); // FIXME:: this is a copy of a string from _update_cursor below, do not desync
+
+ event_context->within_tolerance = false;
+@@ -1560,8 +1571,6 @@
+ static void
+ sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see)
+ {
+- GdkRectangle im_cursor = { 0, 0, 1, 1 };
+-
+ // due to interruptible display, tc may already be destroyed during a display update before
+ // the cursor update (can't do both atomically, alas)
+ if (!tc->desktop) return;
+@@ -1586,10 +1595,17 @@
+ sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), d0, d1);
+
+ /* fixme: ... need another transformation to get canvas widget coordinate space? */
+- im_cursor.x = (int) floor(d0[Geom::X]);
+- im_cursor.y = (int) floor(d0[Geom::Y]);
+- im_cursor.width = (int) floor(d1[Geom::X]) - im_cursor.x;
+- im_cursor.height = (int) floor(d1[Geom::Y]) - im_cursor.y;
++ if (tc->imc) {
++ GdkRectangle im_cursor = { 0, 0, 1, 1 };
++ Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3);
++ Geom::Point const im_d0 = SP_EVENT_CONTEXT(tc)->desktop->d2w(d0 - top_left);
++ Geom::Point const im_d1 = SP_EVENT_CONTEXT(tc)->desktop->d2w(d1 - top_left);
++ im_cursor.x = (int) floor(im_d0[Geom::X]);
++ im_cursor.y = (int) floor(im_d1[Geom::Y]);
++ im_cursor.width = (int) floor(im_d1[Geom::X]) - im_cursor.x;
++ im_cursor.height = (int) floor(im_d0[Geom::Y]) - im_cursor.y;
++ gtk_im_context_set_cursor_location(tc->imc, &im_cursor);
++ }
+
+ tc->show = TRUE;
+ tc->phase = 1;
+@@ -1631,9 +1647,6 @@
+ }
+ }
+
+- if (tc->imc) {
+- gtk_im_context_set_cursor_location(tc->imc, &im_cursor);
+- }
+ SP_EVENT_CONTEXT(tc)->desktop->emitToolSubselectionChanged((gpointer)tc);
+ }
+