swftoolsをビルドする (swftools-0.9.2)

公開日時:2020-04-26 Sun. 06:47:40 JST
最終更新日時:2020-07-18 Sat. 04:59:15 JST
Ubuntu MATE 20.04 LTS
by kiyozzy

■ swftoolsビルド

Ubuntuの swfextract だけど、 Ubuntu 18.04 では swftools は apt でインストールできたが、 Ubuntu 20.04 では apt ではインストールできなくなった。仕方ないのでビルドする。

単に make するとエラーが出たので修正をした。 DGifOpenFileName関数の引数が追加されたのと、PrintGifError関数が無いとのこと。 多分修正は合ってると思う。 パッチを作成しました。mypatch_swftools-0.9.2.patch
事前にコンパイラとかはインストールしておく。 sudo apt install build-essential module-assistant pkg-config

sudo apt install libgif-dev libfreetype6 libfreetype6-dev libjpeg62 libjpeg8 libjpeg8-dev

wget http://www.swftools.org/swftools-0.9.2.tar.gz
tar xf swftools-0.9.2.tar.gz
wget https://www.yargry.com/notebook/mypatch_swftools-0.9.2.patch
patch -p0 < mypatch_swftools-0.9.2.patch

sudo mv swftools-0.9.2 /usr/local/src/
cd /usr/local/src/swftools-0.9.2

./configure
make -j4
sudo make install

swfextract を確認。

usr@host:/usr/local/bin$ ll
合計 13568
drwxr-xr-x  2 root root    4096  4月 26 06:32 ./
drwxr-xr-x 10 root root    4096  4月 23 16:33 ../
-rwxr-xr-x  1 root root 1061768  4月 26 06:32 as3compile*
-rwxr-xr-x  1 root root 1078328  4月 26 06:32 font2swf*
-rwxr-xr-x  1 root root  281280  4月 26 06:32 gif2swf*
-rwxr-xr-x  1 root root  165856  4月 26 06:32 jpeg2swf*
-rwxr-xr-x  1 root root 3787592  4月 26 06:32 pdf2swf*
-rwxr-xr-x  1 root root  154696  4月 26 06:32 png2swf*
-rwxr-xr-x  1 root root 1063568  4月 26 06:32 swfbbox*
-rwxr-xr-x  1 root root 1444760  4月 26 06:32 swfc*
-rwxr-xr-x  1 root root  136656  4月 26 06:32 swfcombine*
-rwxr-xr-x  1 root root 1080232  4月 26 06:32 swfdump*
-rwxr-xr-x  1 root root 1100568  4月 26 06:32 swfextract*
-rwxr-xr-x  1 root root 1211840  4月 26 06:32 swfrender*
-rwxr-xr-x  1 root root 1046008  4月 26 06:32 swfstrings*
-rwxr-xr-x  1 root root  249728  4月 26 06:32 wav2swf*

■ 参考にしたサイト

SWFTools - Community Help Wiki

The GIFLIB Library

CentOS 6.6 に rtmpdump と swftools をインストール - にせねこメモ