I am in the same boat as you. I recommend compiling from scratch given the source code in the PPA. Basically, this should do what you want it to do. It installs essential packages to build, makes a source folder, gets the source, extracts the source, configures the build environment, builds the library, installs the library and set up the necessary symlinks in /usr/lib.
sudo apt install build-essential zlib1g-dev
cd
mkdir src
wget https://ppa.launchpadcontent.net/linuxuprising/libpng12/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz
tar Jxfv libpng_1.2.54.orig.tar.xz
cd libpng-1.2.54
./configure
make
sudo make install
sudo ln -s /usr/local/lib/libpng12.so.0.54.0 /usr/lib/libpng12.so
sudo ln -s /usr/local/lib/libpng12.so.0.54.0 /usr/lib/libpng12.so.0
Hopefully this helps you get that legacy app running. Good luck!
libpng-dev
not work for you? Why do you specifically needlibpng12-dev
? – Archisman Panigrahi Apr 24 '22 at 14:10