summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/Manifest.gzbin37995 -> 37998 bytes
-rw-r--r--media-gfx/gimp/Manifest4
-rw-r--r--media-gfx/gimp/gimp-2.99.18.ebuild266
-rw-r--r--media-gfx/gimp/gimp-9999.ebuild15
-rw-r--r--media-gfx/sane-airscan/Manifest2
-rw-r--r--media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch61
-rw-r--r--media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild43
7 files changed, 386 insertions, 5 deletions
diff --git a/media-gfx/Manifest.gz b/media-gfx/Manifest.gz
index 095d68cb0ff4..87c87f78e63f 100644
--- a/media-gfx/Manifest.gz
+++ b/media-gfx/Manifest.gz
Binary files differ
diff --git a/media-gfx/gimp/Manifest b/media-gfx/gimp/Manifest
index 7ab31cad3979..2b48d480c5a7 100644
--- a/media-gfx/gimp/Manifest
+++ b/media-gfx/gimp/Manifest
@@ -7,11 +7,13 @@ AUX gimp-2.10_fix_test-appdata.patch 902 BLAKE2B 2b1a131d874d65422d8bdd44732b984
DIST gimp-2.10.34.tar.bz2 31405329 BLAKE2B 0b2d3a81abf89684bb90e2101896db3479a25c5da76738543dba8d0378e64608eee9aeb24888e15f5e347f72fa1df3e9b82aa27e503ee61d1c4d45d44fa7bddc SHA512 4802ce3758daba868570f1ac97a3f1cb41e1130fcc6376f9bf4c999441f8fd25937aa71b6f726d82d7c780f4153b11d2595bb76bc2356a42266909fbcc0bd34a
DIST gimp-2.10.36.tar.bz2 31532334 BLAKE2B d033cd1407df3399b5968b7e3f7838d288143080b516476a5dd46599b6a84ac2efca591521368cef7a1c3d9935b45ed3262fb469e1ae36ccf60a1199f5cfa44d SHA512 dbe6152ea6ff99cca59bbf2c88a64fb4ff6b529d98ace7723eadf5dfb0e10d9cbaf2de1e0d5251e9ecf9abca73da9ae1a501f229997802fd4077fb9594f4ba66
DIST gimp-2.99.16.tar.xz 24969172 BLAKE2B 45050c0e45e7c9e64ee92ac9b3985c05f528205f74f442979dee8b326f41b35de403a2de93edad090dd87987ef446531e01a67ca857ef03403414fc9ac1464dd SHA512 b0da0529b000a7309c9d601977518cd19a7bf50ab41952fa36b83c027042d6901c39d0a6870c16e8a8ad3318207c93d34ee3d50d0e5f35bcabeaa17d91e060ee
+DIST gimp-2.99.18.tar.xz 25418968 BLAKE2B ccb76bb5c375925d4d71505f3e1546f05ba0e20533859b1b6250a4d9054efb6bec4927a5e0c525272fa24d5a6bdf4fb7881d60a1d34b1210ee38b90e661ef707 SHA512 151ccd0322601e76ed0198b40832ab0b6c138428f2e75806dd558e29c9b3437d9226a243142bf4a86113fa5ea4f5965b99cf7cd0ab0ecb7bdfc48036de35a9c6
EBUILD gimp-2.10.34-r1.ebuild 5717 BLAKE2B b313b4c9dd5e2cd06e4e2602866908ebd7aecb58081044e0cba5a5bf13ee4cd402fe970c95f661c0d603aa2de2cd45c7d9fa6b4167beb36a4f14dc25148439b9 SHA512 2d6a0f89adca5a8549a8d07a8f569ee0609d26c1cc3bce7e770493dca826be4df21523042252a7ed09069f20399abb4ad823d69964bafae34e50deebdad9d379
EBUILD gimp-2.10.34-r2.ebuild 5882 BLAKE2B 67a9b4c0707f3027f34ba6276b8ac6fd2709e09f7416be0b05b9cc56ec58e27bfea86d4bf726588db9d927ede4b5549c2068e8a30c8d95c34ba269aad0f665bf SHA512 f058ba4ddaeebb02a4bb8cef3e8f5ac867df776f8750e2470c8695647538520984f072e9b5f9a0f3bbce6c3695098e0028c2ead31dd188df3b8221fc6be8b51f
EBUILD gimp-2.10.36-r1.ebuild 5911 BLAKE2B aaee8055ae7f99cbfdd2709bd6a97fda6ebc2303c385dc5925225feb93d94353c8a2d4170c3c84f34f382a5c7457d7beb16efc0771c120e3df9b6a32ec4baf9e SHA512 686586c0a6da79ff54ef0a2ac80fb2fb310985215aeff93b8fdb0da3ce195ff9868c04627501ca1b23dc1546be49bddecd001bc7e95cb655c407753ae5939a54
EBUILD gimp-2.10.36-r2.ebuild 6001 BLAKE2B e2b78361ae0d4703479e8b9c1a62e99f7099b80a9267ad6b056a15f30a0bba79da7b697af38d76e736ecc01aca6b0a331b90fc7f20060e6872c1854ac56d9ec1 SHA512 cdc970e8766da37a2103010214313a6dd54ce1acfb9bc390aad47474914801884dbff8900ae62107d1c1780a9ccae3803abea10a72827816dff9b72572aab97d
EBUILD gimp-2.10.36.ebuild 5854 BLAKE2B 811d0ea7218ec368006864732bf94c6f07c7cdb2eeffc1df5deda811bc8cecd76ffa4f17230dd91313fe59ae803a35dc20c6be7e53e2b2143db24ba7dbf57dc8 SHA512 8ad6430138b98b4d384f3657f45733a5e1bd59db25b9619a4593d51af35bcd7b5cfbbe54587cb4f72b54fa1dfeac32a31d4727d0ddb666154810261806188040
EBUILD gimp-2.99.16.ebuild 7006 BLAKE2B af6434ed590cfe951ee993507a1f06c906d1ac6c43ada9bbc6bbc0feb61af79fbadeb061c403935979ea198fc5d872b20084f0216bb5ed1eeb035baec4bf9e11 SHA512 bf5f13e1dde99226e4bd84142498781c4410ae994487290acbbe0e2fdbfc88bbe97993044604664078f46df5342625e85d19a132851196bd6100ee6ed88795a8
-EBUILD gimp-9999.ebuild 6905 BLAKE2B 7de5cc7e370a0d1e8be4f44d39333001eb966e8179bf08f8b1b24b45bf8207064a9ef1288e2f1ac3c4dcda2d4b234a0c809ee76dc5ea1c8ebf69a898399e8d1d SHA512 de55375766b9f653f68bbd68e1e07e3abebbf9f768dac989b4598091368a24ae7845a83bf32adab503dc830b343e9c72dee7a77f2efe19694da6a8057e2a22e0
+EBUILD gimp-2.99.18.ebuild 7178 BLAKE2B cd687b1c62034e9f96541634ef822c3d7cd7e40bb0246f58bbec678d4147b6fc674fedb2241ff91771238b56eb465d1ecfc213f6c3f90718961e3883a6d17587 SHA512 993430221b063c1ea303e66b7c7f3cc1b9101a1dbef2ceb408c0d14c32cf68046d86228c8d993bd5e109aec26576c1ddc7591a43608116cd07ecc087fb18bbb8
+EBUILD gimp-9999.ebuild 7102 BLAKE2B 4c916fe83dc67aa535e25676fb7413a04eef046ec0fe0eff634f5fe4d081008ac722bde016472d54be0193bce04121a65c07fa0239cadaf7b191409fcf4a27db SHA512 d457f75d02efb7096867d8952303364bb91e31a28c8a25464cb2de5587ed19e8501322b6af30fc4e64f762b3355ea239cdb599fad80314371f8e6f0ccba22045
MISC metadata.xml 579 BLAKE2B 7766f3da8488794ee014731965efd289e9e95d07631cd7f08ce9469fb33ed1ada31b646f337afcbb3a540d4de83fa5764fc2aa18c4b132341520d4717c7b251d SHA512 9bf1c5c4442af756e6ce40a7399f096ed1732c095eafdb4ff580e4122154e2549d9e8c36a7cc0391f0bd49c07422c5c59123278d62645330aeefdc9130aef182
diff --git a/media-gfx/gimp/gimp-2.99.18.ebuild b/media-gfx/gimp/gimp-2.99.18.ebuild
new file mode 100644
index 000000000000..9ac105ac99cb
--- /dev/null
+++ b/media-gfx/gimp/gimp-2.99.18.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( luajit )
+PYTHON_COMPAT=( python3_{10..11} )
+VALA_USE_DEPEND=vapigen
+
+inherit lua-single meson python-single-r1 toolchain-funcs vala xdg
+
+DESCRIPTION="GNU Image Manipulation Program"
+HOMEPAGE="https://www.gimp.org/"
+SRC_URI="mirror://gimp/v$(ver_cut 1-2)/${P}.tar.xz"
+
+LICENSE="GPL-3+ LGPL-3+"
+SLOT="0/3"
+
+IUSE="X aalib alsa doc gnome heif javascript jpeg2k jpegxl lua mng openexr openmp postscript python test udev unwind vala vector-icons webp wmf xpm"
+REQUIRED_USE="
+ lua? ( ${LUA_REQUIRED_USE} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RESTRICT="!test? ( test )"
+
+# media-libs/{babl,gegl} are required to be built with USE="introspection"
+# to fix the compilation checking of /usr/share/gir-1.0/{Babl-0.1gir,Gegl-0.4.gir}
+COMMON_DEPEND="
+ >=app-accessibility/at-spi2-core-2.46.0
+ >=app-text/poppler-0.90.1[cairo]
+ >=app-text/poppler-data-0.4.9
+ >=dev-libs/appstream-glib-0.7.16
+ >=dev-libs/glib-2.70.0:2
+ >=dev-libs/json-glib-1.4.4
+ dev-libs/libxml2:2
+ dev-libs/libxslt
+ >=gnome-base/librsvg-2.46.0:2
+ >=media-gfx/mypaint-brushes-2.0.2:=
+ >=media-libs/babl-0.1.98[introspection,lcms,vala?]
+ >=media-libs/fontconfig-2.12.6
+ >=media-libs/freetype-2.10.2
+ >=media-libs/gegl-0.4.48:0.4[cairo,introspection,lcms,vala?]
+ >=media-libs/gexiv2-0.14.0
+ >=media-libs/harfbuzz-2.6.5:=
+ >=media-libs/lcms-2.13.1:2
+ media-libs/libjpeg-turbo:=
+ >=media-libs/libmypaint-1.6.1:=
+ >=media-libs/libpng-1.6.37:0=
+ >=media-libs/tiff-4.1.0:=
+ net-libs/glib-networking[ssl]
+ sys-libs/zlib
+ >=x11-libs/cairo-1.16.0
+ >=x11-libs/gdk-pixbuf-2.40.0:2[introspection]
+ >=x11-libs/gtk+-3.24.16:3[introspection]
+ >=x11-libs/pango-1.50.0
+ >=x11-libs/libXmu-1.1.4
+ aalib? ( media-libs/aalib )
+ alsa? ( >=media-libs/alsa-lib-1.0.0 )
+ heif? ( >=media-libs/libheif-1.13.0:= )
+ javascript? ( dev-libs/gjs )
+ jpeg2k? ( >=media-libs/openjpeg-2.3.1:2= )
+ jpegxl? ( >=media-libs/libjxl-0.6.1:= )
+ lua? (
+ ${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/lgi[${LUA_USEDEP}]
+ ')
+ )
+ mng? ( media-libs/libmng:= )
+ openexr? ( >=media-libs/openexr-2.3.0:= )
+ postscript? ( app-text/ghostscript-gpl:= )
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ >=dev-python/pygobject-3.0:3[${PYTHON_USEDEP}]
+ ')
+ )
+ udev? ( >=dev-libs/libgudev-167:= )
+ unwind? ( >=sys-libs/libunwind-1.1.0:= )
+ webp? ( >=media-libs/libwebp-0.6.0:= )
+ wmf? ( >=media-libs/libwmf-0.2.8 )
+ X? ( x11-libs/libXcursor )
+ xpm? ( x11-libs/libXpm )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ x11-themes/hicolor-icon-theme
+ gnome? ( gnome-base/gvfs )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( x11-misc/xvfb-run )
+ vala? ( $(vala_depend) )
+"
+
+# TODO: there are probably more atoms in DEPEND which should be in BDEPEND now
+BDEPEND="
+ >=dev-lang/perl-5.30.3
+ dev-util/gdbus-codegen
+ >=sys-devel/gettext-0.21
+ doc? (
+ app-text/yelp-tools
+ dev-libs/gobject-introspection[doctool]
+ dev-util/gi-docgen
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( "AUTHORS" "NEWS" "README" "README.i18n" )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.10_fix_musl_backtrace_backend_switch.patch" #900148
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+ use lua && lua-single_pkg_setup
+
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -i -e 's/mypaint-brushes-1.0/mypaint-brushes-2.0/' meson.build || die #737794
+
+ # Fix Gimp and GimpUI devel doc installation paths
+ sed -i -e "s/'doc'/'gtk-doc'/" devel-docs/reference/gimp/meson.build || die
+ sed -i -e "s/'doc'/'gtk-doc'/" devel-docs/reference/gimp-ui/meson.build || die
+
+ # Fix pygimp.interp python implementation path.
+ # Meson @PYTHON_PATH@ use sandbox path e.g.:
+ # '/var/tmp/portage/media-gfx/gimp-2.99.12/temp/python3.10/bin/python3'
+ sed -i -e 's/@PYTHON_PATH@/'${EPYTHON}'/' plug-ins/python/pygimp.interp.in || die
+
+ # Set proper intallation path of documentation logo
+ sed -i -e "s/'gimp-@0@'.format(gimp_app_version)/'gimp-${PVR}'/" data/images/meson.build || die
+}
+
+_adjust_sandbox() {
+ # Bugs #569738 and #591214
+ local nv
+ for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
+ # We do not check for existence as they may show up later
+ # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
+ addwrite "${nv}"
+ done
+
+ addwrite /dev/dri/ # bugs #574038 and #684886
+ addwrite /dev/ati/ # bug #589198
+ addwrite /proc/mtrr # bug #589198
+}
+
+src_configure() {
+ _adjust_sandbox
+
+ use vala && vala_setup
+
+ local emesonargs=(
+ -Denable-default-bin=enabled
+
+ -Dcheck-update=no
+ -Denable-multiproc=true
+ -Dappdata-test=disabled
+ -Dbug-report-url=https://bugs.gentoo.org/
+ -Dlibbacktrace=false
+ -Dwebkit-unmaintained=false
+ $(meson_feature aalib aa)
+ $(meson_feature alsa)
+ $(meson_feature doc gi-docgen)
+ $(meson_feature heif)
+ $(meson_feature javascript)
+ $(meson_feature jpeg2k jpeg2000)
+ $(meson_feature jpegxl jpeg-xl)
+ $(meson_feature lua)
+ $(meson_feature mng)
+ $(meson_feature openexr)
+ $(meson_feature openmp)
+ $(meson_feature postscript ghostscript)
+ $(meson_feature python)
+ $(meson_feature test headless-tests)
+ $(meson_feature udev gudev)
+ $(meson_feature vala)
+ $(meson_feature webp)
+ $(meson_feature wmf)
+ $(meson_feature X xcursor)
+ $(meson_feature xpm)
+ $(meson_use doc g-ir-doc)
+ $(meson_use unwind libunwind)
+ $(meson_use vector-icons)
+ )
+
+ meson_src_configure
+}
+
+src_compile() {
+ export XDG_DATA_DIRS="${EPREFIX}"/usr/share # bug 587004
+ meson_src_compile
+}
+
+# for https://bugs.gentoo.org/664938
+_rename_plugins() {
+ einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...'
+ local prename=gimp-org-
+ (
+ cd "${ED}"/usr/$(get_libdir)/gimp/2.99/plug-ins || exit 1
+ for plugin_slash in $(ls -d1 */); do
+ plugin=${plugin_slash%/}
+ if [[ -f ${plugin}/${plugin} ]]; then
+ # NOTE: Folder and file name need to match for Gimp to load that plug-in
+ # so "file-svg/file-svg" becomes "${prename}file-svg/${prename}file-svg"
+ mv ${plugin}/{,${prename}}${plugin} || exit 1
+ mv {,${prename}}${plugin} || exit 1
+ fi
+ done
+ )
+}
+
+src_test() {
+ local -x LD_LIBRARY_PATH="${BUILD_DIR}/libgimp:${LD_LIBRARY_PATH}"
+ meson_src_test
+}
+
+src_install() {
+ meson_src_install
+
+ if use python; then
+ python_optimize
+ fi
+
+ # Workaround for bug #321111 to give GIMP the least
+ # precedence on PDF documents by default
+ mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
+
+ find "${D}" -name '*.la' -type f -delete || die
+
+ # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
+ mv "${ED}"/usr/share/man/man1/gimp-console{-*,}.1 || die
+
+ # Create symlinks for Gimp exec in /usr/bin
+ dosym "${ESYSROOT}"/usr/bin/gimp-2.99 /usr/bin/gimp
+ dosym "${ESYSROOT}"/usr/bin/gimp-console-2.99 /usr/bin/gimp-console
+ dosym "${ESYSROOT}"/usr/bin/gimp-script-fu-interpreter-3.0 /usr/bin/gimp-script-fu-interpreter
+ dosym "${ESYSROOT}"/usr/bin/gimp-test-clipboard-2.99 /usr/bin/gimp-test-clipboard
+ dosym "${ESYSROOT}"/usr/bin/gimptool-2.99 /usr/bin/gimptool
+
+ _rename_plugins || die
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+}
diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild
index 63d81b476781..c07ce3787a40 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-9999.ebuild
@@ -7,7 +7,7 @@ LUA_COMPAT=( luajit )
PYTHON_COMPAT=( python3_{10..11} )
VALA_USE_DEPEND=vapigen
-inherit git-r3 lua-single meson python-single-r1 vala xdg
+inherit git-r3 lua-single meson python-single-r1 toolchain-funcs vala xdg
DESCRIPTION="GNU Image Manipulation Program"
HOMEPAGE="https://www.gimp.org/"
@@ -15,7 +15,7 @@ EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gimp.git"
LICENSE="GPL-3+ LGPL-3+"
SLOT="0/3"
-IUSE="X aalib alsa doc gnome heif javascript jpeg2k jpegxl lua mng openexr postscript python test udev unwind vala vector-icons webp wmf xpm"
+IUSE="X aalib alsa doc gnome heif javascript jpeg2k jpegxl lua mng openexr openmp postscript python test udev unwind vala vector-icons webp wmf xpm"
REQUIRED_USE="
lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
@@ -39,7 +39,7 @@ COMMON_DEPEND="
>=media-libs/babl-0.1.98[introspection,lcms,vala?]
>=media-libs/fontconfig-2.12.6
>=media-libs/freetype-2.10.2
- >=media-libs/gegl-0.4.46:0.4[cairo,introspection,lcms,vala?]
+ >=media-libs/gegl-0.4.48:0.4[cairo,introspection,lcms,vala?]
>=media-libs/gexiv2-0.14.0
>=media-libs/harfbuzz-2.6.5:=
>=media-libs/lcms-2.13.1:2
@@ -52,7 +52,7 @@ COMMON_DEPEND="
>=x11-libs/cairo-1.16.0
>=x11-libs/gdk-pixbuf-2.40.0:2[introspection]
>=x11-libs/gtk+-3.24.16:3[introspection]
- >=x11-libs/pango-1.44.7
+ >=x11-libs/pango-1.50.0
>=x11-libs/libXmu-1.1.4
aalib? ( media-libs/aalib )
alsa? ( >=media-libs/alsa-lib-1.0.0 )
@@ -110,7 +110,13 @@ BDEPEND="
DOCS=( "AUTHORS" "NEWS" "README" "README.i18n" )
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
use lua && lua-single_pkg_setup
if use python; then
@@ -174,6 +180,7 @@ src_configure() {
$(meson_feature lua)
$(meson_feature mng)
$(meson_feature openexr)
+ $(meson_feature openmp)
$(meson_feature postscript ghostscript)
$(meson_feature python)
$(meson_feature test headless-tests)
diff --git a/media-gfx/sane-airscan/Manifest b/media-gfx/sane-airscan/Manifest
index d9b81a529f08..bbd5065f32e6 100644
--- a/media-gfx/sane-airscan/Manifest
+++ b/media-gfx/sane-airscan/Manifest
@@ -1,4 +1,6 @@
+AUX sane-airscan-0.99.27-c99-fixes.patch 1834 BLAKE2B d0012e462e0fb04158e0705fd3d43cb645e7061df2e24a557d2f97c38509635248d235ee7eb67d8945c4a8a66da81019c86901fab010b3b2fac8275360d86a74 SHA512 45e2c8797301bc96b1d7736795dc7a4e7ea4fa72bbfd38ba787c7dfa0051dba353d722d801a6bfcc8e9d93141dde87cfcea601234d2286f157a61d8252496481
AUX sane-airscan-0.99.27-makefile-fixes.patch 1913 BLAKE2B 1fe9fc148e3ac4f9928cb46a9ef35d2b94104dca39ffec09617d6143ce619c8739afad2811d7c5455ce4c0f190a88c68069a800607926009d2121c90aa8bca8b SHA512 8ed38a9debaf0520d7576f1874dd05b634a43825fb258fa3a0df0f3a93ebac6391d5a7e30ba460221d4174b7865f0372e91ff88f430baeca567dd4f633c0099a
DIST sane-airscan-0.99.27.tar.gz 198418 BLAKE2B bcf2aff08feb90a65c10a4abaca67939874ad7c9376745b572f18ebfdaf7bff3e344d1379b00c73904a6892731a75f4632a90ea7c20f7cb4e30eab43413b829d SHA512 a35a92e26a4e3831f127e59bc520248abde8a7b304eb63ecf1d68092f51a8bc49bbc7503bead47ac84d0333d59ae0045d6d7a9f7b89d95f3ddfa2458f3781256
+EBUILD sane-airscan-0.99.27-r1.ebuild 867 BLAKE2B 566b78aa7268725f71aed1ac8a6de2186dfd2870273ed1494c547410368060f63fd6c677ec948d8fb37dafa31bb9577d83d8c270afc3fbbdcda09b926d6ede64 SHA512 e722adf97b989f50a2b1034e4d6689a04b240a616d69a602f5bf96f6e42171a19addea91ff00e591593aaa26d50cafa3ad70c6400f362bc0217c1d8bbfe2b834
EBUILD sane-airscan-0.99.27.ebuild 808 BLAKE2B a079180be74226fe5f3b535943b29f249552931a0a48bec2061ebc750997382988d79d43317095fe4bc2ae0f7c9556cfe08d909d601237be8989049e0abf37d0 SHA512 53cfcc46cbc2d9eef3a5f2161df7e0cd9b8aa5b3c22dd08664df3bf9dc1949eaa9ea6d760f0c298331fd6b84ff01393dbc479c86b2addb7430c19e111cbad721
MISC metadata.xml 340 BLAKE2B c9c2c847ab7adb2109f7fee5346019acfbdbac25394c052ecef5dd263de2991388c272b37c46bd405078f93a0fdaa4a47ddbd976f468d1acb37fc6b8c9014e99 SHA512 92ba711173b57be840567bf539ad1c6a99698a267994dfbedb8067e25edeed38a87bb142e1a34dc16752afb65a134ce6af338cbbc5a69cdd652d5dc96fd234c7
diff --git a/media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch b/media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch
new file mode 100644
index 000000000000..6b4b07d4a9ac
--- /dev/null
+++ b/media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch
@@ -0,0 +1,61 @@
+From c042a6895fe6f663d4bcb8c27d1c7b34fbd68b48 Mon Sep 17 00:00:00 2001
+From: Alexander Pevzner <pzz@apevzner.com>
+Date: Sat, 2 Dec 2023 21:49:40 +0300
+Subject: [PATCH 1/2] Fixed missed #include <stdlib.h> (see #305)
+
+This code used to compile on everywhere, but explicit #include <stdlib.h>
+was actually missed. Seems that sometimes it can cause problems.
+---
+ airscan-xml.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/airscan-xml.c b/airscan-xml.c
+index f376f31..5071ca9 100644
+--- a/airscan-xml.c
++++ b/airscan-xml.c
+@@ -9,6 +9,7 @@
+ #include "airscan.h"
+
+ #include <fnmatch.h>
++#include <stdlib.h>
+
+ #include <libxml/parser.h>
+ #include <libxml/tree.h>
+--
+2.43.0
+
+From 144e7d4187c73566ffc2780ac91ab7e1826826e0 Mon Sep 17 00:00:00 2001
+From: Alexander Pevzner <pzz@apevzner.com>
+Date: Sat, 2 Dec 2023 22:29:55 +0300
+Subject: [PATCH 2/2] Fixed build with recent versions of libxml2 (fixes #305)
+
+libxml2 recently changed a prototype of the xmlStructuredErrorFunc callback,
+adding const modifier to the second parameter.
+
+Adding an explicit cast seems to fix the problem (but I will not be surprised, if
+this fix will not work equally well on all distros).
+
+Found for a first time and fixed on Arch linux on about 2 Dec 2023 (Arch is rolling
+release, so there is no explicit release number)
+---
+ airscan-xml.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/airscan-xml.c b/airscan-xml.c
+index 5071ca9..10f290c 100644
+--- a/airscan-xml.c
++++ b/airscan-xml.c
+@@ -124,7 +124,7 @@ xml_rd_parse (xmlDoc **doc, const char *xml_text, size_t xml_len)
+ goto DONE;
+ }
+
+- ctxt->sax->serror = xml_rd_error_callback;
++ ctxt->sax->serror = (xmlStructuredErrorFunc) xml_rd_error_callback;
+
+ /* Parse the document */
+ if (xmlCtxtResetPush(ctxt, xml_text, xml_len, NULL, NULL)) {
+--
+2.43.0
+
+
+
diff --git a/media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild b/media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild
new file mode 100644
index 000000000000..1b8168dae0cd
--- /dev/null
+++ b/media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="SANE backend for AirScan (eSCL) and WSD document scanners"
+HOMEPAGE="https://github.com/alexpevzner/sane-airscan"
+SRC_URI="https://github.com/alexpevzner/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ net-dns/avahi
+ net-libs/gnutls
+ dev-libs/libxml2
+ media-libs/libjpeg-turbo
+ media-libs/libpng
+"
+RDEPEND="${DEPEND}
+ media-gfx/sane-backends
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.27-makefile-fixes.patch"
+ "${FILESDIR}/${PN}-0.99.27-c99-fixes.patch"
+)
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" COMPRESS= STRIP= install
+}