0.93: adding more plugins on Linux

Bugs which have been reproduced by a second user or the developer, or features to do

Moderator: Dreamer

Post Reply
Posts: 55
Joined: Wed Jan 08, 2014 3:37 pm

0.93: adding more plugins on Linux

Post by djcj » Sat Feb 23, 2019 4:11 pm

I see that several plugins available on Windows are missing from the Linux build.
But many of them can be build for Linux:

Code: Select all

sudo apt install libjpeg-dev libpng16-dev cmake yasm pkg-config autoconf git

git clone https://github.com/packjpg/packJPG
# fix security issue
sed -i 's|sprintf(errormessage, e.what());|sprintf(errormessage, "%s", e.what());|g' packJPG/source/packjpg.cpp
make -j4 -C packJPG/source LDFLAGS="-s -lstdc++fs"

# inofficial Linux port
git clone https://github.com/panzi/VTFLib
mkdir -p VTFLib/build
cd VTFLib/build
make -j4
strip src/libVTFLib*.so
cd -

git clone https://github.com/google/guetzli
# link dependencies static
make -j4 -C guetzli verbose=1 LDFLAGS="-s -Wl,-Bstatic -lpng -lz -Wl,-Bdynamic"

git clone https://github.com/dropbox/lepton
cd lepton
# don't use -march=native: https://github.com/marian-nmt/marian-dev/issues/278#issuecomment-413930881
sed -i 's|-march=native|-mavx|g' configure.ac
./configure --disable-debug
make -j4 2>/dev/null
strip lepton
cd -

git clone https://github.com/mirrorer/libbpg
cd libbpg
# link dependencies static
sed -i 's|-lpng|-Wl,-Bstatic -lpng -lz -Wl,-Bdynamic|g;  s|-ljpeg|-Wl,-Bstatic -ljpeg -Wl,-Bdynamic|g' Makefile
# optimize for speed, not size
sed -i 's|-Os|-O3|g' Makefile
# disable x265 (smaller binary)
sed -i 's|^USE_X265=y|#USE_X265=y|' Makefile
make -j4 bpgenc bpgdec
strip bpgenc bpgdec

User avatar
Author of XnView
Posts: 33617
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.93: adding more plugins on Linux

Post by xnview » Tue Feb 26, 2019 4:44 pm

ok, thanks i'll check

Post Reply