1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
SUMMARY = "ImageMagick is an image conversion toolkit"
SECTION = "console/utils"
HOMEPAGE = "https://www.imagemagick.org/"
DESCRIPTION = "ImageMagick is a collection of tools for displaying, converting, and \
editing raster and vector image files. It can read and write over 200 image file formats."
LICENSE = "ImageMagick"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b97c12a9213df1499565d69b92c73dd7 \
file://NOTICE;md5=d8b9d2ccf273687ad12ebd06e5d8478f"
# FIXME: There are many more checked libraries. All should be added or explicitly disabled to get consistent results.
DEPENDS = "lcms bzip2 jpeg libpng tiff zlib fftw freetype libtool"
BASE_PV := "${PV}"
PV .= "-62"
SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=https \
file://run-ptest \
file://imagemagick-ptest.sh \
file://CVE-2021-20309.patch \
file://CVE-2021-20310.patch \
file://CVE-2021-3610.patch \
file://CVE-2022-0284.patch \
file://fix-cipher-leak.patch \
file://CVE-2022-2719.patch \
file://CVE-2022-1114.patch \
file://CVE-2023-1289-1.patch \
file://CVE-2023-1289.patch \
file://CVE-2023-34474.patch \
file://CVE-2023-5341.patch \
file://CVE-2022-28463.patch \
file://0001-ImageMagick-Fix-CVE-2025-53014.patch \
file://0002-ImageMagick-Fix-CVE-2025-53101.patch \
file://0003-ImageMagick-Fix-CVE-2025-55160.patch \
file://0004-ImageMagick-Fix-CVE-2025-55005.patch \
file://0005-ImageMagick-Fix-CVE-2025-53019.patch \
file://0006-ImageMagick-Fix-CVE-2025-55004.patch \
file://0007-ImageMagick-Add-support-patch-to-fix-CVE-2025-57803.patch \
file://0007-ImageMagick-Fix-CVE-2025-57803.patch \
file://0008-ImageMagick-Fix-CVE-2025-57807.patch \
"
SRCREV = "35b4991eb0939a327f3489988c366e21068b0178"
S = "${WORKDIR}/git"
# current version is not affected by the CVE which affects versions at least earlier than 6.9.4-0
CVE_CHECK_IGNORE += "CVE-2014-9826"
# current version is not affected by the CVE which affects versions at least earlier than 6.9.4-0
CVE_CHECK_IGNORE += "CVE-2016-7538"
# current version is not affected by the CVE which affects versions at least earlier than 7.0.4-4
CVE_CHECK_IGNORE += "CVE-2017-5506"
inherit autotools pkgconfig update-alternatives ptest
do_install_ptest() {
install -m 0755 ${WORKDIR}/imagemagick-ptest.sh ${D}${PTEST_PATH}/
}
# xml disabled because it's using xml2-config --prefix to determine prefix which returns just /usr with our libxml2
# if someone needs xml support then fix it first
EXTRA_OECONF = "--program-prefix= --program-suffix=.im7 --without-perl --disable-openmp --without-xml --disable-opencl"
CACHED_CONFIGUREVARS = "ac_cv_sys_file_offset_bits=yes"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[graphviz] = "--with-gvc,--without-gvc,graphviz"
PACKAGECONFIG[jp2] = "--with-jp2,,jasper"
PACKAGECONFIG[lzma] = "--with-lzma,--without-lzma,xz"
PACKAGECONFIG[openjpeg] = "--with-openjp2,--without-openjp2,openjpeg"
PACKAGECONFIG[pango] = "--with-pango,--without-pango,pango cairo"
PACKAGECONFIG[rsvg] = "--with-rsvg,--without-rsvg,librsvg"
PACKAGECONFIG[tcmalloc] = "--with-tcmalloc=yes,--with-tcmalloc=no,gperftools"
PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
PACKAGECONFIG[wmf] = "--with-wmf,--without-wmf,libwmf"
PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxt"
FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \
${datadir}/ImageMagick-7"
FILES:${PN}-dev += "${libdir}/ImageMagick-${BASE_PV}/modules-Q16/*/*.a"
FILES:${PN}-dbg += "${libdir}/ImageMagick-${BASE_PV}/modules-Q16/*/.debug/*"
BBCLASSEXTEND = "native"
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE:${PN} = "animate compare composite conjure convert display \
identify import magick-script mogrify montage stream"
ALTERNATIVE_TARGET[animate] = "${bindir}/animate.im7"
ALTERNATIVE_TARGET[compare] = "${bindir}/compare.im7"
ALTERNATIVE_TARGET[composite] = "${bindir}/composite.im7"
ALTERNATIVE_TARGET[conjure] = "${bindir}/conjure.im7"
ALTERNATIVE_TARGET[convert] = "${bindir}/convert.im7"
ALTERNATIVE_TARGET[display] = "${bindir}/display.im7"
ALTERNATIVE_TARGET[identify] = "${bindir}/identify.im7"
ALTERNATIVE_TARGET[import] = "${bindir}/import.im7"
ALTERNATIVE_TARGET[magick-script] = "${bindir}/magick-script.im7"
ALTERNATIVE_TARGET[mogrify] = "${bindir}/mogrify.im7"
ALTERNATIVE_TARGET[montage] = "${bindir}/montage.im7"
ALTERNATIVE_TARGET[stream] = "${bindir}/stream.im7"
ALTERNATIVE:${PN}-doc = "animate.1 compare.1 composite.1 conjure.1 \
convert.1 display.1 identify.1 import.1 magick-script.1 mogrify.1 montage.1 stream.1"
ALTERNATIVE_LINK_NAME[animate.1] = "${mandir}/man1/animate.1"
ALTERNATIVE_TARGET[animate.1] = "${mandir}/man1/animate.im7.1"
ALTERNATIVE_LINK_NAME[compare.1] = "${mandir}/man1/compare.1"
ALTERNATIVE_TARGET[compare.1] = "${mandir}/man1/compare.im7.1"
ALTERNATIVE_LINK_NAME[composite.1] = "${mandir}/man1/composite.1"
ALTERNATIVE_TARGET[composite.1] = "${mandir}/man1/composite.im7.1"
ALTERNATIVE_LINK_NAME[conjure.1] = "${mandir}/man1/conjure.1"
ALTERNATIVE_TARGET[conjure.1] = "${mandir}/man1/conjure.im7.1"
ALTERNATIVE_LINK_NAME[convert.1] = "${mandir}/man1/convert.1"
ALTERNATIVE_TARGET[convert.1] = "${mandir}/man1/convert.im7.1"
ALTERNATIVE_LINK_NAME[display.1] = "${mandir}/man1/display.1"
ALTERNATIVE_TARGET[display.1] = "${mandir}/man1/display.im7.1"
ALTERNATIVE_LINK_NAME[identify.1] = "${mandir}/man1/identify.1"
ALTERNATIVE_TARGET[identify.1] = "${mandir}/man1/identify.im7.1"
ALTERNATIVE_LINK_NAME[import.1] = "${mandir}/man1/import.1"
ALTERNATIVE_TARGET[import.1] = "${mandir}/man1/import.im7.1"
ALTERNATIVE_LINK_NAME[magick-script.1] = "${mandir}/man1/magick-script.1"
ALTERNATIVE_TARGET[magick-script.1] = "${mandir}/man1/magick-script.im7.1"
ALTERNATIVE_LINK_NAME[mogrify.1] = "${mandir}/man1/mogrify.1"
ALTERNATIVE_TARGET[mogrify.1] = "${mandir}/man1/mogrify.im7.1"
ALTERNATIVE_LINK_NAME[montage.1] = "${mandir}/man1/montage.1"
ALTERNATIVE_TARGET[montage.1] = "${mandir}/man1/montage.im7.1"
ALTERNATIVE_LINK_NAME[stream.1] = "${mandir}/man1/stream.1"
ALTERNATIVE_TARGET[stream.1] = "${mandir}/man1/stream.im7.1"
|