Package Details: swftools 0.9.2-7

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.000114
First Submitted: 2017-04-25 19:15 (UTC)
Last Updated: 2024-06-18 10:26 (UTC)

Latest Comments

1 2 Next › Last »

akovia commented on 2024-06-18 11:22 (UTC)

@IngoMeyer Perfection! Thank you for such a quick fix. Much appreciated.

IngoMeyer commented on 2024-06-18 10:26 (UTC)

@akovia: Compile errors with GCC 14 are fixed. Could you please try again?

IngoMeyer commented on 2024-06-17 15:15 (UTC) (edited on 2024-06-18 10:10 (UTC) by IngoMeyer)

@akovia: Thanks for the error messages. This seems to be related to the GCC 14 update. I will look into this.

akovia commented on 2024-06-17 12:12 (UTC)

So sorry @IngoMeyer, posted in the wrong tab. Will post it there now. Started with this package and had so many errors that I tried the git version next. Too much output to post here, but these are some of the errors. Happy to post it all somewhere if you like.

as3/pool.c: In function ‘pool_find_namespace’:
as3/pool.c:969:84: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  969 |         fprintf(stderr, "Couldn't find namespace \"%s\" %p in constant pool\n", s, (int)ns);
      |                                                                                    ^
as3/pool.c:969:58: warning: format ‘%p’ expects argument of type ‘void *’, but argument 4 has type ‘int’ [-Wformat=]
  969 |         fprintf(stderr, "Couldn't find namespace \"%s\" %p in constant pool\n", s, (int)ns);

as3/builtin.c:4032:64: error: initialization of ‘string_t *’ {aka ‘struct _string_t *’} from incompatible pointer type ‘namespace_t *’ {aka ‘struct _namespace *’} [-Wincompatible-pointer-types]
 4032 | static constant_t flash_utils_flash_proxy_constant = {type: 8, &flash_utils_flash_proxy_constant_ns};

as3/builtin.c:5469:45: error: initialization of ‘string_t *’ {aka ‘struct _string_t *’} from incompatible pointer type ‘namespace_t *’ {aka ‘struct _namespace *’} [-Wincompatible-pointer-types]
 5469 | static constant_t _AS3_constant = {type: 8, &_AS3_constant_ns};

make[1]: *** [Makefile:36: as3/builtin.o] Error 1
make[1]: *** Waiting for unfinished jobs....

make: *** [Makefile:10: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: swftools-exit status 4
 -> Failed to install the following packages. Manual intervention is required:

IngoMeyer commented on 2024-06-17 11:43 (UTC)

@akovia Your comment is probably on the wrong package. This is the stable swftools package, not the version control package swftools-git. swftools-git is not maintained by me.

akovia commented on 2024-06-14 20:18 (UTC) (edited on 2024-06-17 12:14 (UTC) by akovia)

Edit: Posted in wrong aur.

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.