Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/imagemagick/
Date: Tue, 11 Dec 2018 13:44:52
Message-Id: 1544535880.87d093398b37fadad0b3c2c5b62c8a7a7a0033cb.whissi@gentoo
1 commit: 87d093398b37fadad0b3c2c5b62c8a7a7a0033cb
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 11 13:44:24 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 11 13:44:40 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87d09339
7
8 media-gfx/imagemagick: check version in test phase
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild | 14 ++++++++++----
14 media-gfx/imagemagick/imagemagick-9999.ebuild | 14 ++++++++++----
15 2 files changed, 20 insertions(+), 8 deletions(-)
16
17 diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
18 index adf47c49a56..91e101eeefc 100644
19 --- a/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
20 +++ b/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
21 @@ -10,7 +10,8 @@ if [[ ${PV} == "9999" ]] ; then
22 inherit git-r3
23 MY_P="imagemagick-9999"
24 else
25 - MY_P=ImageMagick-$(ver_rs 3 '-')
26 + MY_PV="$(ver_rs 3 '-')"
27 + MY_P="ImageMagick-${MY_PV}"
28 SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
29 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
30 fi
31 @@ -177,13 +178,18 @@ src_test() {
32 die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
33
34 local im_command= IM_COMMANDS=()
35 - IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
36 + if [[ ${PV} == "9999" ]] ; then
37 + IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild
38 + else
39 + IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built
40 + fi
41 IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
42 IM_COMMANDS+=( "emake check" ) # Run tests
43
44 for im_command in "${IM_COMMANDS[@]}"; do
45 - "${S}"/magick.sh \
46 - ${im_command} || die
47 + eval "${S}"/magick.sh \
48 + ${im_command} || \
49 + die "Failed to run \"${im_command}\""
50 done
51 }
52
53
54 diff --git a/media-gfx/imagemagick/imagemagick-9999.ebuild b/media-gfx/imagemagick/imagemagick-9999.ebuild
55 index adf47c49a56..91e101eeefc 100644
56 --- a/media-gfx/imagemagick/imagemagick-9999.ebuild
57 +++ b/media-gfx/imagemagick/imagemagick-9999.ebuild
58 @@ -10,7 +10,8 @@ if [[ ${PV} == "9999" ]] ; then
59 inherit git-r3
60 MY_P="imagemagick-9999"
61 else
62 - MY_P=ImageMagick-$(ver_rs 3 '-')
63 + MY_PV="$(ver_rs 3 '-')"
64 + MY_P="ImageMagick-${MY_PV}"
65 SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
66 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
67 fi
68 @@ -177,13 +178,18 @@ src_test() {
69 die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
70
71 local im_command= IM_COMMANDS=()
72 - IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
73 + if [[ ${PV} == "9999" ]] ; then
74 + IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild
75 + else
76 + IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built
77 + fi
78 IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
79 IM_COMMANDS+=( "emake check" ) # Run tests
80
81 for im_command in "${IM_COMMANDS[@]}"; do
82 - "${S}"/magick.sh \
83 - ${im_command} || die
84 + eval "${S}"/magick.sh \
85 + ${im_command} || \
86 + die "Failed to run \"${im_command}\""
87 done
88 }