Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphicsmagick/, media-gfx/graphicsmagick/files/
Date: Sat, 30 Jul 2022 08:19:48
Message-Id: 1659169121.362e9b8b81b47da9c015abf3af60a705609a0080.sam@gentoo
1 commit: 362e9b8b81b47da9c015abf3af60a705609a0080
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 30 08:18:35 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 30 08:18:41 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=362e9b8b
7
8 media-gfx/graphicsmagick: fix automagic deps; bashism in configure
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../graphicsmagick-1.3.38-configure-bashism.patch | 34 ++++++++++++++++++++++
13 ...9999.ebuild => graphicsmagick-1.3.38-r1.ebuild} | 19 ++++++++----
14 .../graphicsmagick/graphicsmagick-9999.ebuild | 18 ++++++++----
15 3 files changed, 61 insertions(+), 10 deletions(-)
16
17 diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.38-configure-bashism.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.38-configure-bashism.patch
18 new file mode 100644
19 index 000000000000..69d5fd50a1bf
20 --- /dev/null
21 +++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.38-configure-bashism.patch
22 @@ -0,0 +1,34 @@
23 +# HG changeset patch
24 +# User Sam James <sam@g.o>
25 +# Date 1659168362 -3600
26 +# Sat Jul 30 09:06:02 2022 +0100
27 +# Node ID aa77bc8461ee15501a0298dafd53c97447aa30d0
28 +# Parent 0a06f497d58839e4100b3be46bbdcd14d8147d75
29 +configure: fix bashism
30 +
31 +configure scripts need to be runnable with a POSIX-compliant /bin/sh.
32 +
33 +On many (but not all!) systems, /bin/sh is provided by Bash, so errors
34 +like this aren't spotted. Notably Debian defaults to /bin/sh provided
35 +by dash which doesn't tolerate such bashisms as '=='.
36 +
37 +This retains compatibility with bash.
38 +
39 +Fixes configure warnings/errors like:
40 +```
41 +checking for gs... /usr/sbin/gs
42 +./configure: 31719: test: #: unexpected operator
43 +checking for Windows fonts directory (location of arial.ttf)... /usr/share/fonts/corefonts/
44 +```
45 +
46 +--- a/configure.ac
47 ++++ b/configure.ac
48 +@@ -3148,7 +3148,7 @@ have_ralcgm='no' ; if test "$CGMDecodeD
49 + AM_CONDITIONAL([HasPSDelegate],[test "$have_gs" = 'yes'])
50 +
51 + # Tests for programs only used while in maintainer mode
52 +-if test "$MAINT" == '' ; then
53 ++if test "$MAINT" = '' ; then
54 + # Test for optional rst2html.py utility and define automake conditional HasRST2HTML if found.
55 + AC_CHECK_PROGS([RST2HTML],[rst2html.py rst2html])
56 +
57
58 diff --git a/media-gfx/graphicsmagick/graphicsmagick-9999.ebuild b/media-gfx/graphicsmagick/graphicsmagick-1.3.38-r1.ebuild
59 similarity index 89%
60 copy from media-gfx/graphicsmagick/graphicsmagick-9999.ebuild
61 copy to media-gfx/graphicsmagick/graphicsmagick-1.3.38-r1.ebuild
62 index ed7baccc45e1..f3cdeac277df 100644
63 --- a/media-gfx/graphicsmagick/graphicsmagick-9999.ebuild
64 +++ b/media-gfx/graphicsmagick/graphicsmagick-1.3.38-r1.ebuild
65 @@ -28,16 +28,17 @@ LICENSE="MIT"
66 SLOT="0/${PV%.*}"
67
68 IUSE="bzip2 +cxx debug dynamic-loading fpx heif imagemagick jbig jpeg jpegxl lcms lzma"
69 -IUSE+=" openmp perl png postscript q16 q32 static-libs svg threads tiff truetype"
70 -IUSE+=" webp wmf X zlib"
71 +IUSE+=" openmp perl png postscript q16 q32 static-libs svg tcmalloc threads tiff truetype"
72 +IUSE+=" webp wmf X zlib zstd"
73
74 -RDEPEND="dev-libs/libltdl
75 +RDEPEND="
76 + dev-libs/libltdl
77 bzip2? ( app-arch/bzip2 )
78 fpx? ( media-libs/libfpx )
79 heif? ( media-libs/libheif:= )
80 imagemagick? ( !media-gfx/imagemagick )
81 jbig? ( media-libs/jbigkit )
82 - jpeg? ( virtual/jpeg )
83 + jpeg? ( media-libs/libjpeg-turbo:= )
84 jpegxl? ( media-libs/libjxl:= )
85 lcms? ( media-libs/lcms:2 )
86 lzma? ( app-arch/xz-utils )
87 @@ -45,6 +46,7 @@ RDEPEND="dev-libs/libltdl
88 png? ( media-libs/libpng:= )
89 postscript? ( app-text/ghostscript-gpl )
90 svg? ( dev-libs/libxml2 )
91 + tcmalloc? ( dev-util/google-perftools:= )
92 tiff? ( media-libs/tiff )
93 truetype? (
94 media-fonts/urw-fonts
95 @@ -56,12 +58,15 @@ RDEPEND="dev-libs/libltdl
96 x11-libs/libSM
97 x11-libs/libXext
98 )
99 - zlib? ( sys-libs/zlib )"
100 + zlib? ( sys-libs/zlib )
101 + zstd? ( app-arch/zstd:= )
102 +"
103 DEPEND="${RDEPEND}"
104
105 PATCHES=(
106 "${FILESDIR}"/${PN}-1.3.36-flags.patch
107 "${FILESDIR}"/${PN}-1.3.19-perl.patch
108 + "${FILESDIR}"/${P}-configure-bashism.patch
109 )
110
111 pkg_pretend() {
112 @@ -107,11 +112,14 @@ src_configure() {
113 $(use_with jbig)
114 $(use_with webp)
115 $(use_with jpeg)
116 + # Needs last-rited/unpackaged jasper
117 --without-jp2
118 $(use_with lcms lcms2)
119 $(use_with lzma)
120 $(use_with png)
121 + $(use_with tcmalloc)
122 $(use_with tiff)
123 + --without-trio
124 $(use_with truetype ttf)
125 $(use_with wmf)
126 --with-fontpath="${EPREFIX}"/usr/share/fonts
127 @@ -119,6 +127,7 @@ src_configure() {
128 --with-windows-font-dir="${EPREFIX}"/usr/share/fonts/corefonts
129 $(use_with svg xml)
130 $(use_with zlib)
131 + $(use_with zstd)
132 $(use_with X x)
133 )
134
135
136 diff --git a/media-gfx/graphicsmagick/graphicsmagick-9999.ebuild b/media-gfx/graphicsmagick/graphicsmagick-9999.ebuild
137 index ed7baccc45e1..c3cfd69b4baf 100644
138 --- a/media-gfx/graphicsmagick/graphicsmagick-9999.ebuild
139 +++ b/media-gfx/graphicsmagick/graphicsmagick-9999.ebuild
140 @@ -28,16 +28,17 @@ LICENSE="MIT"
141 SLOT="0/${PV%.*}"
142
143 IUSE="bzip2 +cxx debug dynamic-loading fpx heif imagemagick jbig jpeg jpegxl lcms lzma"
144 -IUSE+=" openmp perl png postscript q16 q32 static-libs svg threads tiff truetype"
145 -IUSE+=" webp wmf X zlib"
146 +IUSE+=" openmp perl png postscript q16 q32 static-libs svg tcmalloc threads tiff truetype"
147 +IUSE+=" webp wmf X zlib zstd"
148
149 -RDEPEND="dev-libs/libltdl
150 +RDEPEND="
151 + dev-libs/libltdl
152 bzip2? ( app-arch/bzip2 )
153 fpx? ( media-libs/libfpx )
154 heif? ( media-libs/libheif:= )
155 imagemagick? ( !media-gfx/imagemagick )
156 jbig? ( media-libs/jbigkit )
157 - jpeg? ( virtual/jpeg )
158 + jpeg? ( media-libs/libjpeg-turbo:= )
159 jpegxl? ( media-libs/libjxl:= )
160 lcms? ( media-libs/lcms:2 )
161 lzma? ( app-arch/xz-utils )
162 @@ -45,6 +46,7 @@ RDEPEND="dev-libs/libltdl
163 png? ( media-libs/libpng:= )
164 postscript? ( app-text/ghostscript-gpl )
165 svg? ( dev-libs/libxml2 )
166 + tcmalloc? ( dev-util/google-perftools:= )
167 tiff? ( media-libs/tiff )
168 truetype? (
169 media-fonts/urw-fonts
170 @@ -56,7 +58,9 @@ RDEPEND="dev-libs/libltdl
171 x11-libs/libSM
172 x11-libs/libXext
173 )
174 - zlib? ( sys-libs/zlib )"
175 + zlib? ( sys-libs/zlib )
176 + zstd? ( app-arch/zstd:= )
177 +"
178 DEPEND="${RDEPEND}"
179
180 PATCHES=(
181 @@ -107,11 +111,14 @@ src_configure() {
182 $(use_with jbig)
183 $(use_with webp)
184 $(use_with jpeg)
185 + # Needs last-rited/unpackaged jasper
186 --without-jp2
187 $(use_with lcms lcms2)
188 $(use_with lzma)
189 $(use_with png)
190 + $(use_with tcmalloc)
191 $(use_with tiff)
192 + --without-trio
193 $(use_with truetype ttf)
194 $(use_with wmf)
195 --with-fontpath="${EPREFIX}"/usr/share/fonts
196 @@ -119,6 +126,7 @@ src_configure() {
197 --with-windows-font-dir="${EPREFIX}"/usr/share/fonts/corefonts
198 $(use_with svg xml)
199 $(use_with zlib)
200 + $(use_with zstd)
201 $(use_with X x)
202 )