Package Details: xsane 0.999-7

Git Clone URL: https://aur.archlinux.org/xsane.git (read-only, click to copy)
Package Base: xsane
Description: A GTK-based X11 frontend for SANE and plugin for Gimp.
Upstream URL: https://gitlab.com/sane-project/frontend/xsane
Licenses: GPL2
Submitter: gromit
Maintainer: Dreick
Last Packager: Dreick
Votes: 29
Popularity: 1.67
First Submitted: 2024-08-13 11:22 (UTC)
Last Updated: 2024-08-14 00:54 (UTC)

Pinned Comments

Dreick commented on 2024-08-14 00:49 (UTC)

Added a patch to make it build again

Latest Comments

1 2 3 4 Next › Last »

moormaster commented on 2025-06-22 19:41 (UTC)

You are right - when I downgrade gimp to 2.10.38-5 the menu item for creating a new image from the scanner source appears again.

aboliveira commented on 2025-06-22 14:28 (UTC) (edited on 2025-06-23 00:30 (UTC) by aboliveira)

@simona, I would not wait for an update from the packager. He/she last AUR login is from 6 months ago. He/she is not even reading our posts. I recommend you move from xsane to simple-scan, which is in the exra Arch repo.

aboliveira commented on 2025-06-22 14:24 (UTC)

@moormaster, I suspect GIMP 3.0 is not compatible with this version of Xsane.

moormaster commented on 2025-06-13 16:04 (UTC)

It builds again - but gimp is still missing the file/create/from scanner entry in its menu.

simona commented on 2025-06-13 11:21 (UTC)

thanks for the reply. I think i'll wait until the package is installable without modifications. I don't like having different and specific installation procedures for each package.

aboliveira commented on 2025-06-13 11:18 (UTC)

@simona, the prepare() function I posted before should solve your build problem. If you modify the PKGBUILD and call yay/paru/etc to install xsane it will override your modified PKGBUILD and will give the same errors again. After modifying the PKGBUILD with the new prepare() you should call makepkg -si instead.

simona commented on 2025-06-13 08:44 (UTC)

it seems a gkt2 problem, but I have last gtk2 2.24.33-5 from extra repo. what is the problem?


xsane-gamma.c: In function ‘xsane_enhancement_by_gamma’:
xsane-gamma.c:1966:82: error: passing argument 2 of ‘gtk_timeout_add’ from incompatible pointer type [-Wincompatible-pointer-types]
1966 |   xsane.batch_scan_gamma_timer = gtk_timeout_add(XSANE_CONTINUOUS_HOLD_TIME * 4, xsane_batch_scan_gamma_event, 0);
|                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|                                                                                  |
|                                                                                  gint (*)(void) {aka int (*)(void)}
/usr/include/gtk-2.0/gtk/gtkmain.h:175:56: note: expected ‘GtkFunction’ {aka ‘int (*)(void *)’} but argument is of type ‘gint (*)(void)’ {aka ‘int (*)(void)’}
175 |                                     GtkFunction        function,
|                                     ~~~~~~~~~~~~~~~~~~~^~~~~~~~
xsane-gamma.c:556:13: note: ‘xsane_batch_scan_gamma_event’ declared here
556 | static gint xsane_batch_scan_gamma_event()
|             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-2.0/gtk/gtktypeutils.h:51:20: note: ‘GtkFunction’ declared here
51 | typedef gboolean (*GtkFunction)     (gpointer      data);
|                    ^~~~~~~~~~~

simona commented on 2025-06-13 06:46 (UTC)

same error

maderios commented on 2025-06-13 05:43 (UTC)

@aboliveira It builds now, thanks !

aboliveira commented on 2025-06-12 10:04 (UTC) (edited on 2025-06-12 10:09 (UTC) by aboliveira)

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
}