diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2022-02-11 11:54:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 09:54:53 -0800 |
commit | 61528c0b0ad9de8eea101c298f1e78187d93d3c6 (patch) | |
tree | 15e54e6f7887d6199a24f40b6702676c4ec2d061 /var | |
parent | e8838109d85fb6966f08083dc7e114bbb35119ad (diff) | |
download | spack-61528c0b0ad9de8eea101c298f1e78187d93d3c6.tar.gz spack-61528c0b0ad9de8eea101c298f1e78187d93d3c6.tar.bz2 spack-61528c0b0ad9de8eea101c298f1e78187d93d3c6.tar.xz spack-61528c0b0ad9de8eea101c298f1e78187d93d3c6.zip |
swftools package: patches for GCC@10: (#28296)
Diffstat (limited to 'var')
3 files changed, 106 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/swftools/extern.patch b/var/spack/repos/builtin/packages/swftools/extern.patch new file mode 100644 index 0000000000..012ebc573d --- /dev/null +++ b/var/spack/repos/builtin/packages/swftools/extern.patch @@ -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 + { diff --git a/var/spack/repos/builtin/packages/swftools/package.py b/var/spack/repos/builtin/packages/swftools/package.py index 1fe30de3f8..dcb12e58e3 100644 --- a/var/spack/repos/builtin/packages/swftools/package.py +++ b/var/spack/repos/builtin/packages/swftools/package.py @@ -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') diff --git a/var/spack/repos/builtin/packages/swftools/pointer_compare.patch b/var/spack/repos/builtin/packages/swftools/pointer_compare.patch new file mode 100644 index 0000000000..4110e66198 --- /dev/null +++ b/var/spack/repos/builtin/packages/swftools/pointer_compare.patch @@ -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 |