summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-10-02 21:28:36 +0100
committerSam James <sam@gentoo.org>2021-10-02 21:29:01 +0100
commit82e18f2bee1f7ac48b24a78838bed12856b0bcbf (patch)
tree7e32df3dd90916c3c68681ccf65d9131680b6f09 /dev-ruby/rmagick
parentapp-cdr/brasero: drop eautoreconf, other tweaks (diff)
downloadgentoo-82e18f2bee1f7ac48b24a78838bed12856b0bcbf.tar.gz
gentoo-82e18f2bee1f7ac48b24a78838bed12856b0bcbf.tar.bz2
gentoo-82e18f2bee1f7ac48b24a78838bed12856b0bcbf.zip
dev-ruby/rmagick: fix most test failures (on PPC, anyway)
- Require TIFF support in ImageMagick - Use a custom ImageMagick policy file Bug: https://bugs.gentoo.org/815856 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ruby/rmagick')
-rw-r--r--dev-ruby/rmagick/rmagick-4.2.2.ebuild20
1 files changed, 18 insertions, 2 deletions
diff --git a/dev-ruby/rmagick/rmagick-4.2.2.ebuild b/dev-ruby/rmagick/rmagick-4.2.2.ebuild
index 3cb79596f21d..5513ee23236c 100644
--- a/dev-ruby/rmagick/rmagick-4.2.2.ebuild
+++ b/dev-ruby/rmagick/rmagick-4.2.2.ebuild
@@ -29,7 +29,7 @@ KEYWORDS="amd64 ~hppa ~ppc ~ppc64 ~x86"
IUSE="doc"
RDEPEND+=" >=media-gfx/imagemagick-6.9.0:="
-DEPEND+=" test? ( >=media-gfx/imagemagick-7.1.0:=[jpeg,lqr,webp] )"
+DEPEND+=" test? ( >=media-gfx/imagemagick-7.1.0:=[jpeg,lqr,tiff,webp] )"
all_ruby_prepare() {
# Avoid unused dependency on rake-compiler. This also avoids an
@@ -44,7 +44,7 @@ all_ruby_prepare() {
sed -i -e '/prefix/ s:ImageMagick:ImageMagick-6:' ext/RMagick/extconf.rb || die
# Reading PDFs is not allowed by the default Gentoo security policy for imagemagick
- sed -i -e '/can read PDF file/askip "Not allowed by Gentoo security policy"' spec/rmagick/image/read_spec.rb || die
+ #sed -i -e '/can read PDF file/askip "Not allowed by Gentoo security policy"' spec/rmagick/image/read_spec.rb || die
# Update version number hardcoded in tests
sed -i -e 's/"7.0"/"7.1"/' spec/rmagick/image/channel_mean_spec.rb || die
@@ -53,6 +53,22 @@ all_ruby_prepare() {
mkdir tmp
}
+each_ruby_test() {
+ # Borrowed from media-gfx/gscan2pdf
+ # Needed to avoid test failures on e.g. ppc, bug #815856
+ # (Unclear why it doesn't manifest on amd64 here at least)
+ local confdir="${HOME}/.config/ImageMagick"
+ mkdir -p "${confdir}" || die
+ cat > "${confdir}/policy.xml" <<-EOT || die
+ <policymap>
+ <policy domain="coder" rights="read|write" pattern="PDF" />
+ <policy domain="coder" rights="read" pattern="PS" />
+ </policymap>
+ EOT
+
+ RSPEC_VERSION="3" ruby-ng_rspec
+}
+
all_ruby_install() {
all_fakegem_install