[Bug 276362] print/pdfmixtool: Fix build after ImageMagick7 7.1.1 update.

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 16 Jan 2024 01:57:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276362

            Bug ID: 276362
           Summary: print/pdfmixtool: Fix build after ImageMagick7 7.1.1
                    update.
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: dev@submerge.ch

Created attachment 247692
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247692&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.