From c4912bfcdbda55cef915d9d8bb2555d61419fbe4 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 3 Feb 2014 12:11:47 +0100 Subject: [PATCH] inkscape: add patches for gc-7.4 compat; sync patches with Arch. --- srcpkgs/inkscape/patches/freetype.patch | 14 +++++ .../patches/inkscape-0.48.4-gc74.patch | 54 +++++++++++++++++++ srcpkgs/inkscape/patches/spuriouscomma.patch | 11 ++++ srcpkgs/inkscape/template | 8 +-- 4 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/inkscape/patches/freetype.patch create mode 100644 srcpkgs/inkscape/patches/inkscape-0.48.4-gc74.patch create mode 100644 srcpkgs/inkscape/patches/spuriouscomma.patch diff --git a/srcpkgs/inkscape/patches/freetype.patch b/srcpkgs/inkscape/patches/freetype.patch new file mode 100644 index 0000000000..47a3f8a6b8 --- /dev/null +++ b/srcpkgs/inkscape/patches/freetype.patch @@ -0,0 +1,14 @@ +--- src/libnrtype/FontFactory.h 2010-04-15 19:00:11 +0000 ++++ src/libnrtype/FontFactory.h 2013-11-28 05:54:34 +0000 +@@ -31,7 +31,8 @@ + #include + #else + #include +-#include ++#include ++#include FT_FREETYPE_H + #endif + + namespace Glib + + diff --git a/srcpkgs/inkscape/patches/inkscape-0.48.4-gc74.patch b/srcpkgs/inkscape/patches/inkscape-0.48.4-gc74.patch new file mode 100644 index 0000000000..b610d09749 --- /dev/null +++ b/srcpkgs/inkscape/patches/inkscape-0.48.4-gc74.patch @@ -0,0 +1,54 @@ +--- src/gc-core.h.old 2013-12-31 01:22:38.976653890 +0400 ++++ 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)(); +--- src/gc.cpp.old 2013-12-31 01:23:50.462651778 +0400 ++++ 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(base) - debug_base_fixup(); ++int debug_general_register_disappearing_link(void **p_ptr, const void *base) { ++ char *real_base=const_cast(reinterpret_cast(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/srcpkgs/inkscape/patches/spuriouscomma.patch b/srcpkgs/inkscape/patches/spuriouscomma.patch new file mode 100644 index 0000000000..bc538068f9 --- /dev/null +++ b/srcpkgs/inkscape/patches/spuriouscomma.patch @@ -0,0 +1,11 @@ +--- src/widgets/desktop-widget.h~ 2011-07-08 13:25:09.000000000 -0500 ++++ src/widgets/desktop-widget.h 2013-02-15 16:04:45.806910365 -0600 +@@ -239,7 +239,7 @@ + private: + GtkWidget *tool_toolbox; + GtkWidget *aux_toolbox; +- GtkWidget *commands_toolbox,; ++ GtkWidget *commands_toolbox; + GtkWidget *snap_toolbox; + + static void init(SPDesktopWidget *widget); diff --git a/srcpkgs/inkscape/template b/srcpkgs/inkscape/template index 8ede77be3b..da8bf3f204 100644 --- a/srcpkgs/inkscape/template +++ b/srcpkgs/inkscape/template @@ -6,8 +6,8 @@ build_style=gnu-configure configure_args="--enable-lcms --enable-poppler-cairo" hostmakedepends="pkg-config intltool which" makedepends=" - popt-devel libpng-devel>=1.6 gsl-devel gc-devel gtkmm2-devel libxslt-devel - lcms2-devel poppler-glib-devel libxslt-devel boost-devel>=1.54 libmagick-devel" + popt-devel libpng-devel>=1.6 gsl-devel gc-devel>=7.4 gtkmm2-devel libxslt-devel + lcms2-devel poppler-glib-devel libxslt-devel boost-devel>=1.54 libmagick-devel>=6.8.8" depends="desktop-file-utils hicolor-icon-theme" short_desc="A vector-based drawing program" maintainer="Juan RP " @@ -15,7 +15,3 @@ homepage="http://inkscape.org/" license="GPL-2" distfiles="$SOURCEFORGE_SITE/$pkgname/$pkgname-$version.tar.bz2" checksum=8741ad8cbb5aa5cee4f234ebc45479cff2479b16d903870693174bdede8a519d - -pre_configure() { - sed -e 's,freetype/freetype.h,freetype.h,g' -i src/libnrtype/FontFactory.h -}