blob: e59b511a72f45b2828bc06f926e0da6cc454748e [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "ImageMagick is an image conversion toolkit"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002SECTION = "console/utils"
Brad Bishop19323692019-04-05 15:28:33 -04003HOMEPAGE = "https://www.imagemagick.org/"
4DESCRIPTION = "ImageMagick is a collection of tools for displaying, converting, and \
5editing raster and vector image files. It can read and write over 200 image file formats."
Brad Bishopd7bf8c12018-02-25 22:55:05 -05006LICENSE = "ImageMagick"
Patrick Williams8e7b46e2023-05-01 14:19:06 -05007LIC_FILES_CHKSUM = "file://LICENSE;md5=ac58ac14f9d9d02cafd2d81ef38fb2cc \
8 file://NOTICE;md5=bcbf1f1897b40ec8df39700cb560e9ed"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05009# FIXME: There are many more checked libraries. All should be added or explicitly disabled to get consistent results.
Brad Bishop34ae6002019-04-08 15:21:03 -040010DEPENDS = "lcms bzip2 jpeg libpng tiff zlib fftw freetype libtool"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011
12BASE_PV := "${PV}"
Andrew Geissler3eeda902023-05-19 10:14:02 -050013PV .= "-8"
Patrick Williams8e7b46e2023-05-01 14:19:06 -050014SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=https \
15 file://0001-m4-Use-autconf-provided-AC_FUNC_FSEEKO.patch"
Andrew Geissler3eeda902023-05-19 10:14:02 -050016SRCREV = "920f79206ff59f30a4cff22c9c9c393508b82663"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017
18S = "${WORKDIR}/git"
19
20inherit autotools pkgconfig update-alternatives
Patrick Williams8e7b46e2023-05-01 14:19:06 -050021export ac_cv_sys_file_offset_bits="64"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022
Andrew Geissler3eeda902023-05-19 10:14:02 -050023EXTRA_OECONF = "--program-prefix= --program-suffix=.im7 --without-perl --enable-largefile"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024
Andrew Geissler3eeda902023-05-19 10:14:02 -050025PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} cxx webp xml"
Patrick Williams92b42cb2022-09-03 06:53:57 -050026PACKAGECONFIG[cxx] = "--with-magick-plus-plus,--without-magick-plus-plus"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027PACKAGECONFIG[graphviz] = "--with-gvc,--without-gvc,graphviz"
28PACKAGECONFIG[jp2] = "--with-jp2,,jasper"
29PACKAGECONFIG[lzma] = "--with-lzma,--without-lzma,xz"
30PACKAGECONFIG[openjpeg] = "--with-openjp2,--without-openjp2,openjpeg"
31PACKAGECONFIG[pango] = "--with-pango,--without-pango,pango cairo"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032PACKAGECONFIG[rsvg] = "--with-rsvg,--without-rsvg,librsvg"
Brad Bishope42b3e32020-01-15 22:08:42 -050033PACKAGECONFIG[tcmalloc] = "--with-tcmalloc=yes,--with-tcmalloc=no,gperftools"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
35PACKAGECONFIG[wmf] = "--with-wmf,--without-wmf,libwmf"
36PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxt"
Andrew Geissler3eeda902023-05-19 10:14:02 -050037PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2"
38
39do_install:append:class-target() {
40 for file in MagickCore-config.im7 MagickWand-config.im7 Magick++-config.im7; do
41 sed -i 's,${STAGING_DIR_NATIVE},,g' ${D}${bindir}/"$file"
42 done
43 sed -i 's,${S},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml
44 sed -i 's,${B},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml
45 sed -i 's,${RECIPE_SYSROOT},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml
46 sed -i 's,${HOSTTOOLS_DIR},${bindir},g' ${D}${sysconfdir}/ImageMagick-7/delegates.xml
47}
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048
Patrick Williams213cb262021-08-07 19:21:33 -050049FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050050 ${datadir}/ImageMagick-7"
51
Patrick Williams213cb262021-08-07 19:21:33 -050052FILES:${PN}-dev += "${libdir}/ImageMagick-${BASE_PV}/modules-Q16/*/*.a"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053
Patrick Williams213cb262021-08-07 19:21:33 -050054FILES:${PN}-dbg += "${libdir}/ImageMagick-${BASE_PV}/modules-Q16/*/.debug/*"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050055
56BBCLASSEXTEND = "native"
57
58ALTERNATIVE_PRIORITY = "100"
59
Patrick Williams213cb262021-08-07 19:21:33 -050060ALTERNATIVE:${PN} = "animate compare composite conjure convert display \
Andrew Geisslerd688a012020-09-18 13:36:00 -050061 identify import magick-script mogrify montage stream"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050062
63ALTERNATIVE_TARGET[animate] = "${bindir}/animate.im7"
64ALTERNATIVE_TARGET[compare] = "${bindir}/compare.im7"
65ALTERNATIVE_TARGET[composite] = "${bindir}/composite.im7"
66ALTERNATIVE_TARGET[conjure] = "${bindir}/conjure.im7"
67ALTERNATIVE_TARGET[convert] = "${bindir}/convert.im7"
68ALTERNATIVE_TARGET[display] = "${bindir}/display.im7"
69ALTERNATIVE_TARGET[identify] = "${bindir}/identify.im7"
70ALTERNATIVE_TARGET[import] = "${bindir}/import.im7"
Andrew Geisslerd688a012020-09-18 13:36:00 -050071ALTERNATIVE_TARGET[magick-script] = "${bindir}/magick-script.im7"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050072ALTERNATIVE_TARGET[mogrify] = "${bindir}/mogrify.im7"
73ALTERNATIVE_TARGET[montage] = "${bindir}/montage.im7"
74ALTERNATIVE_TARGET[stream] = "${bindir}/stream.im7"
75
Patrick Williams213cb262021-08-07 19:21:33 -050076ALTERNATIVE:${PN}-doc = "animate.1 compare.1 composite.1 conjure.1 \
Andrew Geisslerd688a012020-09-18 13:36:00 -050077 convert.1 display.1 identify.1 import.1 magick-script.1 mogrify.1 montage.1 stream.1"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050078
79ALTERNATIVE_LINK_NAME[animate.1] = "${mandir}/man1/animate.1"
80ALTERNATIVE_TARGET[animate.1] = "${mandir}/man1/animate.im7.1"
81ALTERNATIVE_LINK_NAME[compare.1] = "${mandir}/man1/compare.1"
82ALTERNATIVE_TARGET[compare.1] = "${mandir}/man1/compare.im7.1"
83ALTERNATIVE_LINK_NAME[composite.1] = "${mandir}/man1/composite.1"
84ALTERNATIVE_TARGET[composite.1] = "${mandir}/man1/composite.im7.1"
85ALTERNATIVE_LINK_NAME[conjure.1] = "${mandir}/man1/conjure.1"
86ALTERNATIVE_TARGET[conjure.1] = "${mandir}/man1/conjure.im7.1"
87ALTERNATIVE_LINK_NAME[convert.1] = "${mandir}/man1/convert.1"
88ALTERNATIVE_TARGET[convert.1] = "${mandir}/man1/convert.im7.1"
89ALTERNATIVE_LINK_NAME[display.1] = "${mandir}/man1/display.1"
90ALTERNATIVE_TARGET[display.1] = "${mandir}/man1/display.im7.1"
91ALTERNATIVE_LINK_NAME[identify.1] = "${mandir}/man1/identify.1"
92ALTERNATIVE_TARGET[identify.1] = "${mandir}/man1/identify.im7.1"
93ALTERNATIVE_LINK_NAME[import.1] = "${mandir}/man1/import.1"
94ALTERNATIVE_TARGET[import.1] = "${mandir}/man1/import.im7.1"
Andrew Geisslerd688a012020-09-18 13:36:00 -050095ALTERNATIVE_LINK_NAME[magick-script.1] = "${mandir}/man1/magick-script.1"
96ALTERNATIVE_TARGET[magick-script.1] = "${mandir}/man1/magick-script.im7.1"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050097ALTERNATIVE_LINK_NAME[mogrify.1] = "${mandir}/man1/mogrify.1"
98ALTERNATIVE_TARGET[mogrify.1] = "${mandir}/man1/mogrify.im7.1"
99ALTERNATIVE_LINK_NAME[montage.1] = "${mandir}/man1/montage.1"
100ALTERNATIVE_TARGET[montage.1] = "${mandir}/man1/montage.im7.1"
101ALTERNATIVE_LINK_NAME[stream.1] = "${mandir}/man1/stream.1"
102ALTERNATIVE_TARGET[stream.1] = "${mandir}/man1/stream.im7.1"