libbpg depends on version 1.6 of the PNG library, which you cannot install with
apt-get on Linux Mint 17. This library is incompatible with
libpng12 and needs to be installed from source (I used version 1.6.16)
The additional complication is that if you install PNG 1.6 the
libbpg still uses
libpng12-dev even if you configure PNG 1.6 with
configure --prefix=/usr. And you cannot just deinstall
libsdl1.2-dev depend on it, and those are needed for compiling
libbpg as well.
You could probably also download and compile the
libsdl1 sources and not install their
-dev packages. I did not follow that route, I just temporarily removed the files (not the package) from
libpng12-dev and reinstalled them after I was done (you should be able to copy and paste this on Linux Mint 17):¹
# install dev packages needed
sudo apt-get install -y libsdl-image1.2-dev libsdl1.2-dev libjpeg8-dev
#### temporarily remove the files from the libpng12 package
# this gives error messages on the directories (that cannot be removed this
# way, which can be ignored.
sudo rm $(dpkg -L libpng12-dev)
# download, configure, make and make install PNG 1.6
wget -O libpng-1.6.16.tar.xz 'http://downloads.sourceforge.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibpng%2Ffiles%2Flibpng16%2F1.6.16%2F&ts=1424607004&use_mirror=garr'
tar xf libpng-1.6.16.tar.xz
sudo make install
# download, make and make install BPG
tar xf libbpg-0.9.5.tar.gz
sudo make install
# reinstall libpng12-dev
sudo apt-get install --reinstall libpng12-dev
Of course it would be more appropriate to install PNG 1.6 in parallel to
libpng12-dev and adapt the sources of
libbpg, but since you don't recompile the BPG library on a regular basis, IMO this kludge is acceptable.
¹ You could also try and build libpng16-dev, but installing that might just remove the
-dev packages depending on
libpng12-dev, I did not try that.