1 |
commit: 5a1d55a8b08d254bb337e8b0615cfcbf2d4eabbd |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 12 16:59:41 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 12 17:00:05 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a1d55a8 |
7 |
|
8 |
media-libs/lcms: fix configure tests with Clang 15 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../files/lcms-2.13.1-clang-15-configure.patch | 29 +++++++++++ |
13 |
media-libs/lcms/lcms-2.13.1-r1.ebuild | 58 ++++++++++++++++++++++ |
14 |
2 files changed, 87 insertions(+) |
15 |
|
16 |
diff --git a/media-libs/lcms/files/lcms-2.13.1-clang-15-configure.patch b/media-libs/lcms/files/lcms-2.13.1-clang-15-configure.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..e723d1f4b3c7 |
19 |
--- /dev/null |
20 |
+++ b/media-libs/lcms/files/lcms-2.13.1-clang-15-configure.patch |
21 |
@@ -0,0 +1,29 @@ |
22 |
+https://github.com/mm2/Little-CMS/pull/338 |
23 |
+ |
24 |
+From 61493b49b91740a84dea61b72a8ce7dc40afa766 Mon Sep 17 00:00:00 2001 |
25 |
+From: Sam James <sam@g.o> |
26 |
+Date: Mon, 12 Sep 2022 17:56:31 +0100 |
27 |
+Subject: [PATCH] configure.ac: fix configure tests broken with Clang 15 |
28 |
+ (-Wimplicit-int) |
29 |
+ |
30 |
+Clang 15 makes -Wimplicit-int an error by default. |
31 |
+ |
32 |
+Before this fix, configure would think SSE2 support is not present |
33 |
+when it is: |
34 |
+``` |
35 |
+checking whether compiler supports SSE2... no |
36 |
+``` |
37 |
+ |
38 |
+Signed-off-by: Sam James <sam@g.o> |
39 |
+--- a/configure.ac |
40 |
++++ b/configure.ac |
41 |
+@@ -212,7 +212,7 @@ AC_LANG_PUSH([C]) |
42 |
+ AC_MSG_CHECKING([whether compiler supports SSE2]) |
43 |
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
44 |
+ #include <emmintrin.h> |
45 |
+- main() { __m128i n = _mm_set1_epi8(42); }]])], |
46 |
++ int main() { __m128i n = _mm_set1_epi8(42); }]])], |
47 |
+ [ac_compiler_supports_sse2=yes], [ac_compiler_supports_sse2=no]) |
48 |
+ AC_MSG_RESULT([$ac_compiler_supports_sse2]) |
49 |
+ AS_IF([test "x$ac_compiler_supports_sse2" != "xyes"], |
50 |
+ |
51 |
|
52 |
diff --git a/media-libs/lcms/lcms-2.13.1-r1.ebuild b/media-libs/lcms/lcms-2.13.1-r1.ebuild |
53 |
new file mode 100644 |
54 |
index 000000000000..b75acfc8ad46 |
55 |
--- /dev/null |
56 |
+++ b/media-libs/lcms/lcms-2.13.1-r1.ebuild |
57 |
@@ -0,0 +1,58 @@ |
58 |
+# Copyright 1999-2022 Gentoo Authors |
59 |
+# Distributed under the terms of the GNU General Public License v2 |
60 |
+ |
61 |
+EAPI=8 |
62 |
+ |
63 |
+inherit autotools multilib-minimal |
64 |
+ |
65 |
+DESCRIPTION="A lightweight, speed optimized color management engine" |
66 |
+HOMEPAGE="http://www.littlecms.com/" |
67 |
+SRC_URI="https://github.com/mm2/Little-CMS/releases/download/lcms${PV}/${PN}2-${PV}.tar.gz" |
68 |
+S="${WORKDIR}/lcms2-${PV}" |
69 |
+ |
70 |
+LICENSE="MIT" |
71 |
+SLOT="2" |
72 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
73 |
+IUSE="doc jpeg static-libs test +threads tiff zlib" |
74 |
+REQUIRED_USE="tiff? ( zlib )" |
75 |
+ |
76 |
+RESTRICT="!test? ( test )" |
77 |
+ |
78 |
+RDEPEND=" |
79 |
+ jpeg? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] ) |
80 |
+ tiff? ( >=media-libs/tiff-4.0.3-r6:=[${MULTILIB_USEDEP}] ) |
81 |
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) |
82 |
+" |
83 |
+DEPEND="${RDEPEND}" |
84 |
+ |
85 |
+PATCHES=( |
86 |
+ "${FILESDIR}"/${PN}-2.13.1-fix-configure-bashisms.patch |
87 |
+ "${FILESDIR}"/${PN}-2.13.1-clang-15-configure.patch |
88 |
+) |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ |
93 |
+ # TODO: Swap back to elibtoolize once dropped eautoreconf (for bashism patch) |
94 |
+ # for Prefix/Solaris |
95 |
+ #elibtoolize |
96 |
+ eautoreconf |
97 |
+} |
98 |
+ |
99 |
+multilib_src_configure() { |
100 |
+ local myeconfargs=( |
101 |
+ $(use_with jpeg) |
102 |
+ $(use_enable static-libs static) |
103 |
+ $(use_with threads) |
104 |
+ $(use_with tiff) |
105 |
+ $(use_with zlib) |
106 |
+ ) |
107 |
+ |
108 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
109 |
+} |
110 |
+ |
111 |
+multilib_src_install_all() { |
112 |
+ find "${ED}" -type f -name "*.la" -delete || die |
113 |
+ |
114 |
+ use doc && dodoc doc/*.pdf |
115 |
+} |