Bug 276362 - print/pdfmixtool: Fix build after ImageMagick7 7.1.1 update.
Summary: print/pdfmixtool: Fix build after ImageMagick7 7.1.1 update.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-16 01:57 UTC by Florian Walpen
Modified: 2024-01-17 08:56 UTC (History)
2 users (show)

See Also:


Attachments
Fix build of PDF Mix Tool by using CFLAGS from pkgconf. (1.66 KB, patch)
2024-01-16 01:57 UTC, Florian Walpen
dev: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Walpen 2024-01-16 01:57:34 UTC
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 1 Florian Walpen 2024-01-16 01:59:56 UTC
Comment on attachment 247692 [details]
Fix build of PDF Mix Tool by using CFLAGS from pkgconf.

I'm the maintainer, BTW.
Comment 3 Florian Walpen 2024-01-16 12:55:30 UTC
(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.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-01-17 08:53:21 UTC
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(-)
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2024-01-17 08:56:14 UTC
Committed,

Thanks!

P.S: I confirmed despite the fix in ImageMagick7, the port does not build without this patch.