Created attachment 247692 [details] Fix build of PDF Mix Tool by using CFLAGS from pkgconf. After the update to ImageMagick7 7.1.1, build would fail and complain about MAGICKCORE_HDRI_ENABLE not being defined. While pkgconf clearly propagates these additional CFLAGS, the CMakeLists.txt of pdfmixtool does not use them: # pkg-config --cflags --libs Magick++ -I/usr/local/include/ImageMagick-7 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -L/usr/local/lib -lMagick++-7 -lMagickWand-7 -lMagickCore-7 This patch makes CMake adopt the additional CFLAGS from pkgconf and fixes the build. Tested on 14.0-RELEASE amd64. I'll try to upstream this when I have time.
Comment on attachment 247692 [details] Fix build of PDF Mix Tool by using CFLAGS from pkgconf. I'm the maintainer, BTW.
Check this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276360 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276368
(In reply to Vladimir Druzenko from comment #2) These are unrelated, AFAICT. The issue here is actually something to be fixed in the print/pdfmixtool build, regardless of other problems.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=963ccdb8eb509e7fe171b63d6e1fd8ee4c664108 commit 963ccdb8eb509e7fe171b63d6e1fd8ee4c664108 Author: Florian Walpen <dev@submerge.ch> AuthorDate: 2024-01-17 08:30:10 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2024-01-17 08:52:25 +0000 print/pdfmixtool: Fix build after ImageMagick7 7.1.1 update. iAfter the update to ImageMagick7 7.1.1, build would fail and complain about MAGICKCORE_HDRI_ENABLE not being defined. While pkgconf clearly propagates these additional CFLAGS, the CMakeLists.txt of pdfmixtool does not use them. PR: 276362 Reported by: dev@submerge.ch (maintainer) print/pdfmixtool/Makefile | 2 +- print/pdfmixtool/files/patch-CMakeLists.txt (new) | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-)
Committed, Thanks! P.S: I confirmed despite the fix in ImageMagick7, the port does not build without this patch.