1 |
commit: f3b5822bf70361e15208f95f832357fe7317e45b |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 19 02:50:35 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 19 02:50:35 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3b5822b |
7 |
|
8 |
media-gfx/xsane: fix configure w/ clang 16 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/885311 |
11 |
Closes: https://bugs.gentoo.org/899806 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
.../files/xsane-0.999-configure-clang16.patch | 12 ++++++++++ |
15 |
...xsane-0.999-r4.ebuild => xsane-0.999-r5.ebuild} | 28 +++++++++++++--------- |
16 |
2 files changed, 29 insertions(+), 11 deletions(-) |
17 |
|
18 |
diff --git a/media-gfx/xsane/files/xsane-0.999-configure-clang16.patch b/media-gfx/xsane/files/xsane-0.999-configure-clang16.patch |
19 |
new file mode 100644 |
20 |
index 000000000000..0e0ee342a3de |
21 |
--- /dev/null |
22 |
+++ b/media-gfx/xsane/files/xsane-0.999-configure-clang16.patch |
23 |
@@ -0,0 +1,12 @@ |
24 |
+https://bugs.gentoo.org/885311 |
25 |
+https://bugs.gentoo.org/899806 |
26 |
+--- a/m4/sane.m4 |
27 |
++++ b/m4/sane.m4 |
28 |
+@@ -44,6 +44,7 @@ dnl |
29 |
+ AC_TRY_RUN([ |
30 |
+ #include <sane/sane.h> |
31 |
+ #include <stdio.h> |
32 |
++#include <stdlib.h> |
33 |
+ |
34 |
+ int |
35 |
+ main () |
36 |
|
37 |
diff --git a/media-gfx/xsane/xsane-0.999-r4.ebuild b/media-gfx/xsane/xsane-0.999-r5.ebuild |
38 |
similarity index 83% |
39 |
rename from media-gfx/xsane/xsane-0.999-r4.ebuild |
40 |
rename to media-gfx/xsane/xsane-0.999-r5.ebuild |
41 |
index 78d35099cfd2..351830dee66a 100644 |
42 |
--- a/media-gfx/xsane/xsane-0.999-r4.ebuild |
43 |
+++ b/media-gfx/xsane/xsane-0.999-r5.ebuild |
44 |
@@ -1,4 +1,4 @@ |
45 |
-# Copyright 1999-2022 Gentoo Authors |
46 |
+# Copyright 1999-2023 Gentoo Authors |
47 |
# Distributed under the terms of the GNU General Public License v2 |
48 |
|
49 |
EAPI=8 |
50 |
@@ -18,8 +18,10 @@ SLOT="0" |
51 |
KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" |
52 |
IUSE="nls jpeg png tiff gimp lcms ocr" |
53 |
|
54 |
-RDEPEND=" |
55 |
+DEPEND=" |
56 |
+ dev-libs/glib:2 |
57 |
media-gfx/sane-backends |
58 |
+ sys-libs/zlib |
59 |
x11-libs/gtk+:2 |
60 |
x11-misc/xdg-utils |
61 |
jpeg? ( media-libs/libjpeg-turbo:= ) |
62 |
@@ -28,27 +30,31 @@ RDEPEND=" |
63 |
gimp? ( media-gfx/gimp:0/2 ) |
64 |
lcms? ( media-libs/lcms:2 ) |
65 |
" |
66 |
+RDEPEND="${DEPEND}" |
67 |
PDEPEND="ocr? ( app-text/gocr )" |
68 |
-DEPEND="${RDEPEND}" |
69 |
BDEPEND="virtual/pkgconfig" |
70 |
|
71 |
+PATCHES=( |
72 |
+ # Apply multiple fixes from different distributions |
73 |
+ "${WORKDIR}"/${PN}-0.998-patches-3 |
74 |
+ # Add support for lcms-2 (from Fedora) |
75 |
+ "${FILESDIR}"/${PN}-0.999-lcms2.patch |
76 |
+ # See bug #885311 and bug #899806 |
77 |
+ "${FILESDIR}"/${PN}-0.999-configure-clang16.patch |
78 |
+) |
79 |
+ |
80 |
src_prepare() { |
81 |
default |
82 |
|
83 |
- strip-linguas -i po/ #609672 |
84 |
+ # bug #609672 |
85 |
+ strip-linguas -i po/ |
86 |
|
87 |
- # Apply multiple fixes from different distributions |
88 |
- eapply "${WORKDIR}/${PN}-0.998-patches-3"/ |
89 |
- |
90 |
- # Fix compability with libpng15 wrt #377363 |
91 |
+ # Fix compability with libpng15 (bug #377363) |
92 |
sed -i -e 's:png_ptr->jmpbuf:png_jmpbuf(png_ptr):' src/xsane-save.c || die |
93 |
|
94 |
# Fix AR calling directly (bug #442606) |
95 |
sed -i -e 's:ar r:$(AR) r:' lib/Makefile.in || die |
96 |
|
97 |
- # Add support for lcms-2 (from Fedora) |
98 |
- eapply "${FILESDIR}/${PN}-0.999-lcms2.patch" |
99 |
- |
100 |
AT_M4DIR="m4" eautoreconf |
101 |
} |