media-gfx/imagemagick: use "identify" utility in test phase in IM 6
authorThomas Deutschmann <whissi@gentoo.org>
Tue, 11 Dec 2018 13:30:00 +0000 (14:30 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Tue, 11 Dec 2018 13:44:38 +0000 (14:44 +0100)
"magick" utility is IM 7+ only [Link 1].

Link 1: https://github.com/ImageMagick/ImageMagick/commit/fa1e43d6abadec9f10938d14052df38ed570f99f
Reported-by: Hans de Graaff <graaff@gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
media-gfx/imagemagick/imagemagick-6.9.10.14.ebuild
media-gfx/imagemagick/imagemagick-6.9.10.16.ebuild

index ba0ba14a935f8533a44b788fdc363094d42c9cdc..1cc2c6cf11a1e37858ec0d4ac8824bbb9d83125f 100644 (file)
@@ -5,7 +5,8 @@ EAPI="6"
 
 inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib
 
-MY_P=ImageMagick-$(ver_rs 3 '-')
+MY_PV="$(ver_rs 3 '-')"
+MY_P="ImageMagick-${MY_PV}"
 
 DESCRIPTION="A collection of tools and libraries for many image formats"
 HOMEPAGE="https://www.imagemagick.org/"
@@ -173,13 +174,14 @@ src_test() {
                die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
 
        local im_command= IM_COMMANDS=()
-       IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
-       IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
+       IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built
+       IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used
        IM_COMMANDS+=( "emake check" ) # Run tests
 
        for im_command in "${IM_COMMANDS[@]}"; do
-               "${S}"/magick.sh \
-               ${im_command} || die
+               eval "${S}"/magick.sh \
+                       ${im_command} || \
+                       die "Failed to run \"${im_command}\""
        done
 }
 
index 59b9a3439321171e1dfb9b4308f5b52d27aa57f7..51d1439ebc56c01e88ffd1b230e584e0ecb0c474 100644 (file)
@@ -5,7 +5,8 @@ EAPI="6"
 
 inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib
 
-MY_P=ImageMagick-$(ver_rs 3 '-')
+MY_PV="$(ver_rs 3 '-')"
+MY_P="ImageMagick-${MY_PV}"
 
 DESCRIPTION="A collection of tools and libraries for many image formats"
 HOMEPAGE="https://www.imagemagick.org/"
@@ -173,13 +174,14 @@ src_test() {
                die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
 
        local im_command= IM_COMMANDS=()
-       IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
-       IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
+       IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built
+       IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used
        IM_COMMANDS+=( "emake check" ) # Run tests
 
        for im_command in "${IM_COMMANDS[@]}"; do
-               "${S}"/magick.sh \
-               ${im_command} || die
+               eval "${S}"/magick.sh \
+                       ${im_command} || \
+                       die "Failed to run \"${im_command}\""
        done
 }