This is the new prepare() function which make xsane to build again:
prepare() {
cd "$srcdir/$pkgname-$pkgver"
# fix use "xdg-open" instead of "netscape" to launch help browser - taken from Fedora
patch -Np1 -i "${srcdir}/xsane-0.995-xdg-open.patch"
sed -i -e 's:png_ptr->jmpbuf:png_jmpbuf(png_ptr):' src/xsane-save.c
patch -Np1 -i "${srcdir}/0165-xsane-0.999-lcms2.patch"
patch -Np1 -i "${srcdir}/0001-lcms2_configure.patch"
patch -p1 -i ../xsane-preview-selection.patch # Fix selection preview
patch -p1 -i "${srcdir}/configure-add-stdlib-to-conftest.patch" # Fix failing build of conftest by adding stdlib.h to test program
# ==> FIXES FOR MODERN GCC 2025-06-12 <==
# Fix GTK+ timer callbacks that now require a pointer argument
sed -i 's/static gint xsane_batch_scan_gamma_event()/static gint xsane_batch_scan_gamma_event(gpointer data)/' src/xsane-gamma.c
sed -i 's/static gint xsane_slider_hold_event()/static gint xsane_slider_hold_event(gpointer data)/' src/xsane-gamma.c
# Fix conflicting function types between declaration (.h) and definition (.c)
sed -i 's/extern void xsane_cancel_save();/extern void xsane_cancel_save(int *cancel_save);/' src/xsane-save.h
}
Pinned Comments
Dreick commented on 2024-08-14 00:49 (UTC)
Added a patch to make it build again