swftools package: patches for GCC@10: (#28296)
This commit is contained in:
parent
e8838109d8
commit
61528c0b0a
86
var/spack/repos/builtin/packages/swftools/extern.patch
Normal file
86
var/spack/repos/builtin/packages/swftools/extern.patch
Normal file
@ -0,0 +1,86 @@
|
||||
--- lib/as3/registry.h
|
||||
+++ lib/as3/registry.h
|
||||
@@ -153,7 +153,6 @@ void registry_use(slotinfo_t*s);
|
||||
asset_bundle_list_t*registry_getassets();
|
||||
|
||||
// static multinames
|
||||
-classinfo_t voidclass;
|
||||
classinfo_t* registry_getanytype();
|
||||
classinfo_t* registry_getarrayclass();
|
||||
classinfo_t* registry_getobjectclass();
|
||||
--- lib/gfxpoly/poly.h
|
||||
+++ lib/gfxpoly/poly.h
|
||||
@@ -18,7 +18,7 @@ typedef struct _point {
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
} point_t;
|
||||
-type_t point_type;
|
||||
+extern type_t point_type;
|
||||
|
||||
#define SEGNR(s) ((int)((s)?(s)->nr:-1))
|
||||
|
||||
--- src/swfc-feedback.c
|
||||
+++ src/swfc-feedback.c
|
||||
@@ -24,6 +24,11 @@
|
||||
#include <stdarg.h>
|
||||
#include "swfc-feedback.h"
|
||||
|
||||
+char* filename;
|
||||
+int line;
|
||||
+int column;
|
||||
+void (*cleanUp)();
|
||||
+
|
||||
void syntaxerror(char*format, ...)
|
||||
{
|
||||
char buf[1024];
|
||||
--- src/swfc-feedback.h
|
||||
+++ src/swfc-feedback.h
|
||||
@@ -22,10 +22,10 @@
|
||||
#ifndef __FEEDBACK_H
|
||||
#define __FEEDBACK_H
|
||||
|
||||
-char* filename;
|
||||
-int line;
|
||||
-int column;
|
||||
-void (*cleanUp)();
|
||||
+extern char* filename;
|
||||
+extern int line;
|
||||
+extern int column;
|
||||
+extern void (*cleanUp)();
|
||||
|
||||
void syntaxerror(char*format, ...);
|
||||
void warning(char*format, ...);
|
||||
--- src/swfc-history.c
|
||||
+++ src/swfc-history.c
|
||||
@@ -23,6 +23,12 @@
|
||||
#include <memory.h>
|
||||
#include "swfc-history.h"
|
||||
|
||||
+FILTER* noFilters;
|
||||
+FILTER_BLUR* noBlur;
|
||||
+FILTER_BEVEL* noBevel;
|
||||
+FILTER_DROPSHADOW* noDropshadow;
|
||||
+FILTER_GRADIENTGLOW* noGradientGlow;
|
||||
+
|
||||
enum
|
||||
{
|
||||
T_BEFORE,
|
||||
--- src/swfc-history.h
|
||||
+++ src/swfc-history.h
|
||||
@@ -55,11 +55,11 @@ enum
|
||||
|
||||
#define IF_FIXED_ALIGNMENT 0x0001
|
||||
|
||||
-FILTER* noFilters;
|
||||
-FILTER_BLUR* noBlur;
|
||||
-FILTER_BEVEL* noBevel;
|
||||
-FILTER_DROPSHADOW* noDropshadow;
|
||||
-FILTER_GRADIENTGLOW* noGradientGlow;
|
||||
+extern FILTER* noFilters;
|
||||
+extern FILTER_BLUR* noBlur;
|
||||
+extern FILTER_BEVEL* noBevel;
|
||||
+extern FILTER_DROPSHADOW* noDropshadow;
|
||||
+extern FILTER_GRADIENTGLOW* noGradientGlow;
|
||||
|
||||
typedef struct _spline
|
||||
{
|
@ -25,6 +25,12 @@ class Swftools(AutotoolsPackage):
|
||||
sha256='6a995dfd674c5954f5b967e3d45d6845a186872fcaa4223d725902fd4d679f1b',
|
||||
level=0)
|
||||
|
||||
# The patches below are needed for swftools to compile on newer GCC
|
||||
# versions. These are derived from:
|
||||
# https://aur.archlinux.org/packages/swftools/#comment-839523
|
||||
patch('extern.patch', level=0, when='%gcc@10:')
|
||||
patch('pointer_compare.patch', level=0, when='%gcc@11:')
|
||||
|
||||
depends_on('giflib')
|
||||
depends_on('lame')
|
||||
depends_on('poppler')
|
||||
|
@ -0,0 +1,14 @@
|
||||
--- lib/pdf/xpdf/GlobalParams.cc
|
||||
+++ lib/pdf/xpdf/GlobalParams.cc
|
||||
@@ -922,9 +922,9 @@ void GlobalParams::parseFile(GString *fileName, FILE *f) {
|
||||
char* p = pos1>pos2?pos1:pos2;
|
||||
int pos = p ? p-cfgFileName : -1;
|
||||
GString*path = new GString(new GString(cfgFileName), 0, (pos < 0 ? strlen(cfgFileName): pos));
|
||||
- if(pos1>=0)
|
||||
+ if(pos1==0)
|
||||
path->append('/');
|
||||
- else if(pos2>=0)
|
||||
+ else if(pos2==0)
|
||||
path->append('\\');
|
||||
else
|
||||
#ifdef WIN32
|
Loading…
Reference in New Issue
Block a user