Even after applying the patch it fails with: 86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"simple-scan\" -DPACKAGE_TARNAME=\"simple-scan\" -DPACKAGE_VERSION=\"3.18.1\" -DPACKAGE_STRING=\"simple-scan\ 3.18.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"simple-scan\" -DVERSION=\"3.18.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SANE_SANE_H=1 -DHAVE_SANE_SANEOPTS_H=1 -I. -w -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gusb-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -pthread -I/usr/include/colord-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DVERSION=\"3.18.1\" -DGETTEXT_PACKAGE=\"simple-scan\" -DLOCALE_DIR=\"/usr/share/locale\" -DUI_DIR=\"/usr/share/simple-scan/\" -DICON_DIR=\"/usr/share/simple-scan/icons\" -DGCONF_DIR=\"/apps/simple-scan\" -DSIMPLE_SCAN_BINARY=\"simple-scan\" -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -O2 -pipe -march=native -fno-stack-protector -c -o simple_scan-autosave-manager.o `test -f 'autosave-manager.c' || echo './'`autosave-manager.c x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"simple-scan\" -DPACKAGE_TARNAME=\"simple-scan\" -DPACKAGE_VERSION=\"3.18.1\" -DPACKAGE_STRING=\"simple-scan\ 3.18.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"simple-scan\" -DVERSION=\"3.18.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SANE_SANE_H=1 -DHAVE_SANE_SANEOPTS_H=1 -I. -w -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gusb-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -pthread -I/usr/include/colord-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DVERSION=\"3.18.1\" -DGETTEXT_PACKAGE=\"simple-scan\" -DLOCALE_DIR=\"/usr/share/locale\" -DUI_DIR=\"/usr/share/simple-scan/\" -DICON_DIR=\"/usr/share/simple-scan/icons\" -DGCONF_DIR=\"/apps/simple-scan\" -DSIMPLE_SCAN_BINARY=\"simple-scan\" -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -O2 -pipe -march=native -fno-stack-protector -c -o simple_scan-resources.o `test -f 'resources.c' || echo './'`resources.c ui.c:28:41: fatal error: packagekit-glib2/packagekit.h: No such file or directory #include "packagekit-glib2/packagekit.h" ^ compilation terminated. Makefile:558: recipe for target 'simple_scan-ui.o' failed make[1]: *** [simple_scan-ui.o] Error 1 make[1]: Leaving directory '/var/tmp/portage/media-gfx/simple-scan-3.18.1/work/simple-scan-3.18.1/src' Makefile:379: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 Probably the Makefile needs to be tweaked to not compile packagekit support when it's disabled from configure :/