ahodesuka / ahoviewer

A GTK image viewer, manga reader, and booru browser
MIT License
479 stars 30 forks source link

libnsgif-1.0.0 release renamed the header file #153

Open juippis opened 7 months ago

juippis commented 7 months ago

Hey,

upstream https://www.netsurf-browser.org/projects/libnsgif/ 1.0.0 renamed the header file from libnsgif.h to nsgif.h causing a breakage in ahoviewer.

fatal error: libnsgif.h: No such file or directory
    8 | #include <libnsgif.h>
      |          ^~~~~~~~~~~~
Tuerai commented 6 months ago

I am not sure how to do pull requests, but I got it to build doing this:

git clone https://github.com/ahodesuka/ahoviewer
cd ahoviewer/
sudo find ./ -type f -exec sed -i 's/libnsgif/nsgif/g' {} \;
mv ./ext/libnsgif/libnsgif.c ./ext/libnsgif/nsgif.c
mv ./ext/libnsgif/libnsgif.h ./ext/libnsgif/nsgif.h
mv ./ext/libnsgif ./ext/nsgif
meson setup build
cd build
sudo find ./ -type f -exec sed -i 's/libnsgif/nsgif/g' {} \;
ninja
sudo ninja install
Irets commented 4 months ago

I can confirm. Gentoo Linux stabilized libnsgif-1.0.0-r1 on 2024-03-04 and for now I've masked the upgrade as the support is missing from Ahoviewer.

Fri Jul 5 06:59:37 PM EEST 2024 update: After giving up waiting for an upstream fix, I can confirm @Tuerai's solution works for the time being. It is unnecessary to execute the find commands with elevated privileges.