Fix build with new Poppler and GC (Sandro Mani, #1097945)
This commit is contained in:
parent
4da0126271
commit
e1ffb850d6
68
inkscape-0.48.4-gc-7.4.patch
Normal file
68
inkscape-0.48.4-gc-7.4.patch
Normal file
@ -0,0 +1,68 @@
|
||||
diff -rupN inkscape-0.48.4/configure.ac inkscape-0.48.4-new/configure.ac
|
||||
--- inkscape-0.48.4/configure.ac 2012-12-15 17:50:19.205918190 +0100
|
||||
+++ inkscape-0.48.4-new/configure.ac 2014-05-15 00:29:24.076377009 +0200
|
||||
@@ -263,7 +263,7 @@ if test "x$gc_ok" = "xyes" && test "x$cr
|
||||
# include <gc.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
- extern unsigned GC_version;
|
||||
+ unsigned GC_version = GC_get_version();
|
||||
int main(void){
|
||||
unsigned min = ((6 << 16) | (4 << 8) | 0);
|
||||
printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
|
||||
diff -rupN inkscape-0.48.4/src/gc-core.h inkscape-0.48.4-new/src/gc-core.h
|
||||
--- inkscape-0.48.4/src/gc-core.h 2012-02-14 04:22:17.670697000 +0100
|
||||
+++ inkscape-0.48.4-new/src/gc-core.h 2014-05-15 00:28:40.838404308 +0200
|
||||
@@ -57,7 +57,7 @@ struct Ops {
|
||||
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)();
|
||||
diff -rupN inkscape-0.48.4/src/gc.cpp inkscape-0.48.4-new/src/gc.cpp
|
||||
--- inkscape-0.48.4/src/gc.cpp 2012-02-14 04:22:17.670697000 +0100
|
||||
+++ inkscape-0.48.4-new/src/gc.cpp 2014-05-15 00:28:40.839404331 +0200
|
||||
@@ -70,8 +70,8 @@ void *debug_base(void *ptr) {
|
||||
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 @@ void dummy_register_finalizer(void *, Cl
|
||||
}
|
||||
}
|
||||
|
||||
-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 @@ Ops enabled_ops = {
|
||||
&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 @@ void stub_register_finalizer_ignore_self
|
||||
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;
|
||||
}
|
90
inkscape-0.48.4-poppler-0.26.patch
Normal file
90
inkscape-0.48.4-poppler-0.26.patch
Normal file
@ -0,0 +1,90 @@
|
||||
diff -rupN inkscape-0.48.4/src/extension/internal/pdfinput/pdf-parser.cpp inkscape-0.48.4-new/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
--- inkscape-0.48.4/src/extension/internal/pdfinput/pdf-parser.cpp 2012-12-13 18:00:46.726633000 +0100
|
||||
+++ inkscape-0.48.4-new/src/extension/internal/pdfinput/pdf-parser.cpp 2014-05-15 00:06:39.247501345 +0200
|
||||
@@ -861,7 +861,7 @@ void PdfParser::opSetExtGState(Object ar
|
||||
isolated = knockout = gFalse;
|
||||
if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
- blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
|
||||
+ blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL);
|
||||
#else
|
||||
blendingColorSpace = GfxColorSpace::parse(&obj5);
|
||||
#endif
|
||||
@@ -1085,9 +1085,9 @@ void PdfParser::opSetFillColorSpace(Obje
|
||||
res->lookupColorSpace(args[0].getName(), &obj);
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
if (obj.isNull()) {
|
||||
- colorSpace = GfxColorSpace::parse(&args[0], NULL);
|
||||
+ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
|
||||
} else {
|
||||
- colorSpace = GfxColorSpace::parse(&obj, NULL);
|
||||
+ colorSpace = GfxColorSpace::parse(&obj, NULL, NULL);
|
||||
}
|
||||
#else
|
||||
if (obj.isNull()) {
|
||||
@@ -1120,9 +1120,9 @@ void PdfParser::opSetStrokeColorSpace(Ob
|
||||
res->lookupColorSpace(args[0].getName(), &obj);
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
if (obj.isNull()) {
|
||||
- colorSpace = GfxColorSpace::parse(&args[0], NULL);
|
||||
+ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
|
||||
} else {
|
||||
- colorSpace = GfxColorSpace::parse(&obj, NULL);
|
||||
+ colorSpace = GfxColorSpace::parse(&obj, NULL, NULL);
|
||||
}
|
||||
#else
|
||||
if (obj.isNull()) {
|
||||
@@ -1213,7 +1213,7 @@ void PdfParser::opSetFillColorN(Object a
|
||||
}
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
if (args[numArgs-1].isName() &&
|
||||
- (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
|
||||
+ (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL, NULL))) {
|
||||
state->setFillPattern(pattern);
|
||||
builder->updateStyle(state);
|
||||
}
|
||||
@@ -1273,7 +1273,7 @@ void PdfParser::opSetStrokeColorN(Object
|
||||
}
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
if (args[numArgs-1].isName() &&
|
||||
- (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
|
||||
+ (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL, NULL))) {
|
||||
state->setStrokePattern(pattern);
|
||||
builder->updateStyle(state);
|
||||
}
|
||||
@@ -1711,7 +1711,7 @@ void PdfParser::opShFill(Object args[],
|
||||
GBool savedState = gFalse;
|
||||
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
- if (!(shading = res->lookupShading(args[0].getName(), NULL))) {
|
||||
+ if (!(shading = res->lookupShading(args[0].getName(), NULL, NULL))) {
|
||||
return;
|
||||
}
|
||||
#else
|
||||
@@ -2727,7 +2727,7 @@ void PdfParser::doImage(Object *ref, Str
|
||||
}
|
||||
if (!obj1.isNull()) {
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
- colorSpace = GfxColorSpace::parse(&obj1, NULL);
|
||||
+ colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
|
||||
#else
|
||||
colorSpace = GfxColorSpace::parse(&obj1);
|
||||
#endif
|
||||
@@ -2816,7 +2816,7 @@ void PdfParser::doImage(Object *ref, Str
|
||||
}
|
||||
}
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
- maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
|
||||
+ maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
|
||||
#else
|
||||
maskColorSpace = GfxColorSpace::parse(&obj1);
|
||||
#endif
|
||||
@@ -3007,7 +3007,7 @@ void PdfParser::doForm(Object *str) {
|
||||
transpGroup = gTrue;
|
||||
if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
|
||||
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
||||
- blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
|
||||
+ blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL);
|
||||
#else
|
||||
blendingColorSpace = GfxColorSpace::parse(&obj3);
|
||||
#endif
|
@ -1,6 +1,6 @@
|
||||
Name: inkscape
|
||||
Version: 0.48.4
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Summary: Vector-based drawing program using SVG
|
||||
|
||||
Group: Applications/Productivity
|
||||
@ -16,6 +16,9 @@ Patch0: inkscape-0.48.2-types.patch
|
||||
#Patch9: inkscape-0.48.3.1-hugexml.patch
|
||||
Patch10: inkscape-0.48.4-spuriouscomma.h
|
||||
Patch11: inkscape-0.48.4-freetype.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1097945
|
||||
Patch12: inkscape-0.48.4-poppler-0.26.patch
|
||||
Patch13: inkscape-0.48.4-gc-7.4.patch
|
||||
|
||||
%if 0%{?fedora} && 0%{?fedora} < 18
|
||||
%define desktop_vendor fedora
|
||||
@ -134,6 +137,8 @@ graphics in W3C standard Scalable Vector Graphics (SVG) file format.
|
||||
#%patch9 -p0 -b .hugexml
|
||||
%patch10 -p0 -b .spuriouscomma
|
||||
%patch11 -p0 -b .freetype
|
||||
%patch12 -p1 -b .poppler
|
||||
%patch13 -p1 -b .gc
|
||||
|
||||
# https://bugs.launchpad.net/inkscape/+bug/314381
|
||||
# A couple of files have executable bits set,
|
||||
@ -237,6 +242,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 15 2014 Lubomir Rintel <lkundrak@v3.sk> - 0.48.4-14
|
||||
- Fix build with new Poppler and GC (Sandro Mani, #1097945)
|
||||
|
||||
* Wed May 14 2014 Jon Ciesla <limburgher@gmail.com> - 0.48.4-13
|
||||
- poppler rebuild.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user