Package Details: swftools 0.9.2-6

Git Clone URL: https://aur.archlinux.org/swftools.git (read-only, click to copy)
Package Base: swftools
Description: A collection of SWF manipulation and creation utilities
Upstream URL: http://www.swftools.org/
Keywords: flash swf
Licenses: GPL
Submitter: Dragonlord
Maintainer: IngoMeyer (chaoren)
Last Packager: IngoMeyer
Votes: 10
Popularity: 0.003082
First Submitted: 2017-04-25 19:15 (UTC)
Last Updated: 2023-01-02 13:50 (UTC)

Latest Comments

IngoMeyer commented on 2023-01-02 13:51 (UTC)

Compilation problems should be fixed (tested with GCC 12.2.0).

IngoMeyer commented on 2021-12-07 13:28 (UTC)

Building on top of @chaoren's patch I had to change two pointer comparisons to get the compilation step to work with GCC 11.1.0. That is the modified patch:

diff --git a/PKGBUILD b/PKGBUILD
index 1331842..7243d7c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,16 +13,21 @@ makedepends=('bison' 'flex' 'zlib' 'patch')
 changelog=$pkgname.changelog
 source=(http://www.swftools.org/$pkgname-$pkgver.tar.gz
         $pkgname-$pkgver.patch
-        giflib-5.1.patch)
+        giflib-5.1.patch
+        extern.patch
+        pointer_compare.patch)
 sha256sums=('bf6891bfc6bf535a1a99a485478f7896ebacbe3bbf545ba551298080a26f01f1'
             '80f69c86ed06b315f576a733fd1e24145b88aef9934085f3790179a119b7923d'
-            '6a995dfd674c5954f5b967e3d45d6845a186872fcaa4223d725902fd4d679f1b')
+            '6a995dfd674c5954f5b967e3d45d6845a186872fcaa4223d725902fd4d679f1b'
+            'bcdd407240b2d5ad214317a75f1d75583a537c344771f7fbc38fbd212d22ec9f'
+            '9d383c37e7b7633efedd320d9c46dec5242b6bfa5b02aedc6e40b0e638b9b41b')

 prepare() {
   cd ${srcdir}/$pkgname-$pkgver

   patch -Np0 -i ../giflib-5.1.patch
-  sed -i 's#PrintGifError()#fprintf(stderr, "%s\\n", GifErrorString())#g' src/gif2swf.c
+  patch -Np0 -i ../extern.patch
+  patch -Np0 -i ../pointer_compare.patch
 }

 build() {
diff --git a/extern.patch b/extern.patch
new file mode 100644
index 0000000..012ebc5
--- /dev/null
+++ b/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/pointer_compare.patch b/pointer_compare.patch
new file mode 100644
index 0000000..74336d8
--- /dev/null
+++ b/pointer_compare.patch
@@ -0,0 +1,15 @@
+--- 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
+

chaoren commented on 2021-03-21 18:27 (UTC) (edited on 2021-03-21 18:40 (UTC) by chaoren)

Here's a fix. Please apply.

diff --git a/PKGBUILD b/PKGBUILD
index 1331842..6c1a107 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,16 +13,18 @@ makedepends=('bison' 'flex' 'zlib' 'patch')
 changelog=$pkgname.changelog
 source=(http://www.swftools.org/$pkgname-$pkgver.tar.gz
         $pkgname-$pkgver.patch
-        giflib-5.1.patch)
+        giflib-5.1.patch
+        extern.patch)
 sha256sums=('bf6891bfc6bf535a1a99a485478f7896ebacbe3bbf545ba551298080a26f01f1'
             '80f69c86ed06b315f576a733fd1e24145b88aef9934085f3790179a119b7923d'
-            '6a995dfd674c5954f5b967e3d45d6845a186872fcaa4223d725902fd4d679f1b')
+            '6a995dfd674c5954f5b967e3d45d6845a186872fcaa4223d725902fd4d679f1b'
+            'bcdd407240b2d5ad214317a75f1d75583a537c344771f7fbc38fbd212d22ec9f')

 prepare() {
   cd ${srcdir}/$pkgname-$pkgver

   patch -Np0 -i ../giflib-5.1.patch
-  sed -i 's#PrintGifError()#fprintf(stderr, "%s\\n", GifErrorString())#g' src/gif2swf.c
+  patch -Np0 -i ../extern.patch
 }

 build() {
diff --git a/extern.patch b/extern.patch
new file mode 100644
index 0000000..012ebc5
--- /dev/null
+++ b/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
+ {

HisDudeness commented on 2020-11-14 17:45 (UTC) (edited on 2020-11-14 17:46 (UTC) by HisDudeness)

Sadly I have to add myself to the list of those unable to build this package.

Output is the same as @lae's.

je-vv commented on 2020-09-19 00:42 (UTC)

I can confirm what @lae indicated, swftools no longer builds, :(

lae commented on 2020-08-20 06:46 (UTC)

This isn't compiling for me and I don't see an issue on the issue tracker about this. Thoughts?

gcc -DHAVE_CONFIG_H -g -shared gfx.o -o gfx.so ../libgfxpdf.a ../libgfxswf.a  ../librfxswf.a ../libgfx.a ../libocr.a ../libbase.a  -lpython2.7 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -L/usr/lib -lmp3lame -lzzip -lgif -ljpeg -lpdf -lz -lm  -lfontconfig -lfreetype -lstdc++
/usr/bin/ld: ../librfxswf.a(assets.o):(.bss+0x0): multiple definition of `voidclass'; ../librfxswf.a(abc.o):(.bss+0x800): first defined here
/usr/bin/ld: ../libgfx.a(poly.o):(.data.rel.local+0x0): multiple definition of `point_type'; ../libgfx.a(convert.o):(.bss+0x0): first defined here
/usr/bin/ld: ../libgfx.a(stroke.o):(.bss+0x0): multiple definition of `point_type'; ../libgfx.a(convert.o):(.bss+0x0): first defined here
/usr/bin/ld: ../libgfx.a(wind.o):(.bss+0x20): multiple definition of `point_type'; ../libgfx.a(convert.o):(.bss+0x0): first defined here
/usr/bin/ld: ../libgfx.a(xrow.o):(.bss+0x0): multiple definition of `point_type'; ../libgfx.a(convert.o):(.bss+0x0): first defined here
/usr/bin/ld: ../libgfx.a(moments.o):(.bss+0x0): multiple definition of `point_type'; ../libgfx.a(convert.o):(.bss+0x0): first defined here
/usr/bin/ld: ../libgfx.a(active.o):(.bss+0x0): multiple definition of `point_type'; ../libgfx.a(convert.o):(.bss+0x0): first defined here
collect2: エラー: ld はステータス 1 で終了しました
make[1]: *** [Makefile:42: gfx.so] エラー 1
make[1]: ディレクトリ '/home/lae/.cache/yay/swftools/src/swftools-0.9.2/lib/python' から出ます
make: *** [Makefile:16: all] エラー 2

radioxoma commented on 2019-08-21 11:55 (UTC)

Appears like swfrender from 'swftools 0.9.2' doesn't support '-r' key, but 'swftools-git' does.

aspirogrammer commented on 2017-08-04 15:31 (UTC)

thanks! note that it's the cumulative effort of the maintainers from before as well ;)

fuan_k commented on 2017-08-04 07:35 (UTC)

Just a quick comment to thank you for maintaining this package and for the small patch to fix compilation. You're awesome! :)