1 |
commit: 82e18f2bee1f7ac48b24a78838bed12856b0bcbf |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 2 20:28:36 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 2 20:29:01 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e18f2b |
7 |
|
8 |
dev-ruby/rmagick: fix most test failures (on PPC, anyway) |
9 |
|
10 |
- Require TIFF support in ImageMagick |
11 |
- Use a custom ImageMagick policy file |
12 |
|
13 |
Bug: https://bugs.gentoo.org/815856 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
dev-ruby/rmagick/rmagick-4.2.2.ebuild | 20 ++++++++++++++++++-- |
17 |
1 file changed, 18 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/dev-ruby/rmagick/rmagick-4.2.2.ebuild b/dev-ruby/rmagick/rmagick-4.2.2.ebuild |
20 |
index 3cb79596f21..5513ee23236 100644 |
21 |
--- a/dev-ruby/rmagick/rmagick-4.2.2.ebuild |
22 |
+++ b/dev-ruby/rmagick/rmagick-4.2.2.ebuild |
23 |
@@ -29,7 +29,7 @@ KEYWORDS="amd64 ~hppa ~ppc ~ppc64 ~x86" |
24 |
IUSE="doc" |
25 |
|
26 |
RDEPEND+=" >=media-gfx/imagemagick-6.9.0:=" |
27 |
-DEPEND+=" test? ( >=media-gfx/imagemagick-7.1.0:=[jpeg,lqr,webp] )" |
28 |
+DEPEND+=" test? ( >=media-gfx/imagemagick-7.1.0:=[jpeg,lqr,tiff,webp] )" |
29 |
|
30 |
all_ruby_prepare() { |
31 |
# Avoid unused dependency on rake-compiler. This also avoids an |
32 |
@@ -44,7 +44,7 @@ all_ruby_prepare() { |
33 |
sed -i -e '/prefix/ s:ImageMagick:ImageMagick-6:' ext/RMagick/extconf.rb || die |
34 |
|
35 |
# Reading PDFs is not allowed by the default Gentoo security policy for imagemagick |
36 |
- sed -i -e '/can read PDF file/askip "Not allowed by Gentoo security policy"' spec/rmagick/image/read_spec.rb || die |
37 |
+ #sed -i -e '/can read PDF file/askip "Not allowed by Gentoo security policy"' spec/rmagick/image/read_spec.rb || die |
38 |
|
39 |
# Update version number hardcoded in tests |
40 |
sed -i -e 's/"7.0"/"7.1"/' spec/rmagick/image/channel_mean_spec.rb || die |
41 |
@@ -53,6 +53,22 @@ all_ruby_prepare() { |
42 |
mkdir tmp |
43 |
} |
44 |
|
45 |
+each_ruby_test() { |
46 |
+ # Borrowed from media-gfx/gscan2pdf |
47 |
+ # Needed to avoid test failures on e.g. ppc, bug #815856 |
48 |
+ # (Unclear why it doesn't manifest on amd64 here at least) |
49 |
+ local confdir="${HOME}/.config/ImageMagick" |
50 |
+ mkdir -p "${confdir}" || die |
51 |
+ cat > "${confdir}/policy.xml" <<-EOT || die |
52 |
+ <policymap> |
53 |
+ <policy domain="coder" rights="read|write" pattern="PDF" /> |
54 |
+ <policy domain="coder" rights="read" pattern="PS" /> |
55 |
+ </policymap> |
56 |
+ EOT |
57 |
+ |
58 |
+ RSPEC_VERSION="3" ruby-ng_rspec |
59 |
+} |
60 |
+ |
61 |
all_ruby_install() { |
62 |
all_fakegem_install |