summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-03-19 02:50:35 +0000
committerSam James <sam@gentoo.org>2023-03-19 02:50:35 +0000
commitf3b5822bf70361e15208f95f832357fe7317e45b (patch)
tree0c68f3519804509eece5dc5eca9272feae8c167a /media-gfx
parentnet-analyzer/zmap: fix config file installation (diff)
downloadgentoo-f3b5822bf70361e15208f95f832357fe7317e45b.tar.gz
gentoo-f3b5822bf70361e15208f95f832357fe7317e45b.tar.bz2
gentoo-f3b5822bf70361e15208f95f832357fe7317e45b.zip
media-gfx/xsane: fix configure w/ clang 16
Closes: https://bugs.gentoo.org/885311 Closes: https://bugs.gentoo.org/899806 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/xsane/files/xsane-0.999-configure-clang16.patch12
-rw-r--r--media-gfx/xsane/xsane-0.999-r5.ebuild (renamed from media-gfx/xsane/xsane-0.999-r4.ebuild)28
2 files changed, 29 insertions, 11 deletions
diff --git a/media-gfx/xsane/files/xsane-0.999-configure-clang16.patch b/media-gfx/xsane/files/xsane-0.999-configure-clang16.patch
new file mode 100644
index 000000000000..0e0ee342a3de
--- /dev/null
+++ b/media-gfx/xsane/files/xsane-0.999-configure-clang16.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/885311
+https://bugs.gentoo.org/899806
+--- a/m4/sane.m4
++++ b/m4/sane.m4
+@@ -44,6 +44,7 @@ dnl
+ AC_TRY_RUN([
+ #include <sane/sane.h>
+ #include <stdio.h>
++#include <stdlib.h>
+
+ int
+ main ()
diff --git a/media-gfx/xsane/xsane-0.999-r4.ebuild b/media-gfx/xsane/xsane-0.999-r5.ebuild
index 78d35099cfd2..351830dee66a 100644
--- a/media-gfx/xsane/xsane-0.999-r4.ebuild
+++ b/media-gfx/xsane/xsane-0.999-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -18,8 +18,10 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
IUSE="nls jpeg png tiff gimp lcms ocr"
-RDEPEND="
+DEPEND="
+ dev-libs/glib:2
media-gfx/sane-backends
+ sys-libs/zlib
x11-libs/gtk+:2
x11-misc/xdg-utils
jpeg? ( media-libs/libjpeg-turbo:= )
@@ -28,27 +30,31 @@ RDEPEND="
gimp? ( media-gfx/gimp:0/2 )
lcms? ( media-libs/lcms:2 )
"
+RDEPEND="${DEPEND}"
PDEPEND="ocr? ( app-text/gocr )"
-DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ # Apply multiple fixes from different distributions
+ "${WORKDIR}"/${PN}-0.998-patches-3
+ # Add support for lcms-2 (from Fedora)
+ "${FILESDIR}"/${PN}-0.999-lcms2.patch
+ # See bug #885311 and bug #899806
+ "${FILESDIR}"/${PN}-0.999-configure-clang16.patch
+)
+
src_prepare() {
default
- strip-linguas -i po/ #609672
+ # bug #609672
+ strip-linguas -i po/
- # Apply multiple fixes from different distributions
- eapply "${WORKDIR}/${PN}-0.998-patches-3"/
-
- # Fix compability with libpng15 wrt #377363
+ # Fix compability with libpng15 (bug #377363)
sed -i -e 's:png_ptr->jmpbuf:png_jmpbuf(png_ptr):' src/xsane-save.c || die
# Fix AR calling directly (bug #442606)
sed -i -e 's:ar r:$(AR) r:' lib/Makefile.in || die
- # Add support for lcms-2 (from Fedora)
- eapply "${FILESDIR}/${PN}-0.999-lcms2.patch"
-
AT_M4DIR="m4" eautoreconf
}