Created attachment 245786 [details] Exclude X11-related options in nox11 flavor The latest version of this port builds a lot of X11 dependencies even with its nox11 flavor. The problem was fixed in #239156, and this patch applies the same fix.
I could be reading it wrong, but the current port doesn't even include PANGO, RAQM or SVG unless the x11 flavor is defined. They're not in the default list of defined options nor are they enabled. That being said, my ImageMagick7@nox11 poudriere build started pulling in X11 dependencies, so there is something going on.
For me at least disabling the HEIF support stopped pulling in X11. Looking at the libheif options the defaults definitely cascade to a lot of ports that have X requirements, but I didn't look super close. I would think removing HEIF from the main OPTIONS_DEFINE and OPTIONS_DEFAULTS and adding it to the x11 section and the 2 additional OPTIONS_DEFINE and OPTIONS_DEFAULTS would be good.
Created attachment 246193 [details] configure output (In reply to Henrik Hudson from comment #2) Thanks Henrik, I just tried again: I did a "rmconfig" and disabled the HEIF option, but that didn't prevent the X11 dependencies. I'm compiling on FreeBSD releng/12.4, following Ports branch 2023Q4 (commit d9fea2b9cb23). I also attached the output of the "configure" step. Here you can read that, for example, PANGO is still listed as dependency (I do not know why).
What config options do you have set? What's your Makefile?
Created attachment 246219 [details] ImageMagick7 Makefile (In reply to Henrik Hudson from comment #4) Here is the Makefile (not modified by the patch)
Created attachment 246220 [details] ImageMagick7 showconfig (In reply to Henrik Hudson from comment #4) And here are the port's options I selected. Thank for your help.
The same problem persist for me with 2024Q4 on releng/13.4. I still need the proposed patch to avoid adding the following list of unnecessary Ports. New packages to be INSTALLED: cairo: 1.17.4_2,3 fribidi: 1.0.15 graphite2: 1.3.14 harfbuzz: 10.0.1 libXau: 1.0.11 libXdmcp: 1.1.5 libdatrie: 0.2.13_2 libraqm: 0.10.1 libthai: 0.1.29_1 libxcb: 1.17.0 pango: 1.52.2_1 pixman: 0.42.2 xorgproto: 2024.1
Dear Andrew, the patch keyword is deprecated. Your patch is visible to the community though the patch flag that is set for your patch file. Thank you.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282080#c5
Is the problem simply that the -nox11 variant still pulls ffmpeg, rather than ffmpeg-nox11 ?
(In reply to Poul-Henning Kamp from comment #10) I just built the nox11 flavor from the 2026Q1 branch on releng/14.4 with default options and it didn't bring any X11 related port anymore, thus I think it's OK to close this PR.didn't bring any X11 related port anymore, thus I think it's OK to close this PR.
That's not what I see: root@fbsd:~ # freebsd-version 15.0-RELEASE-p5 root@fbsd:~ # pkg install ImageMagick7-nox11 [...] The following 147 package(s) will be affected (of 0 checked): New packages to be INSTALLED: ImageMagick7-nox11: 7.1.2.16 [FreeBSD-ports] [...] ffmpeg: 8.1,1 [FreeBSD-ports] [...] libX11: 1.8.13,1 [FreeBSD-ports] libXScrnSaver: 1.2.4_1 [FreeBSD-ports] libXau: 1.0.12 [FreeBSD-ports] libXcursor: 1.2.3 [FreeBSD-ports] libXdamage: 1.1.6 [FreeBSD-ports] libXdmcp: 1.1.5 [FreeBSD-ports] libXext: 1.3.6,1 [FreeBSD-ports] libXfixes: 6.0.1 [FreeBSD-ports] libXft: 2.3.8 [FreeBSD-ports] libXi: 1.8.2,1 [FreeBSD-ports] libXrandr: 1.5.4 [FreeBSD-ports] libXrender: 0.9.12 [FreeBSD-ports] libXt: 1.3.0,1 [FreeBSD-ports] libXv: 1.0.13,1 [FreeBSD-ports] libXxf86vm: 1.1.6 [FreeBSD-ports] [...] xorgproto: 2024.1 [FreeBSD-ports] [...] I am pretty sure that ffmpeg is the culprit, I think it should be ffmpeg-nox11
Created attachment 269491 [details] Makefile with ffmpeg-nox11 support (In reply to Poul-Henning Kamp from comment #12) You're right but, since the FFMPEG option is not listed in OPTIONS_DEFAULT, I do not know why the package in the official FreeBSD repository has those dependencies. In fact in my custom built repo does not make you install them: # freebsd-version 14.4-RELEASE-p1 # pkg install -r myrepo -n ImageMagick7-nox11 | grep -E 'lib|Number' giflib: 5.2.2 [myrepo] glib: 2.84.4,2 [myrepo] libdeflate: 1.25 [myrepo] libffi: 3.5.1 [myrepo] libfontenc: 1.1.8 [myrepo] libgd: 2.3.3_13,1 [myrepo] libheif: 1.19.8_6 [myrepo] libidn: 1.43 [myrepo] libinotify: 20240724_3 [myrepo] libjxl: 0.11.1_2 [myrepo] liblqr-1: 0.4.2 [myrepo] libltdl: 2.5.4 [myrepo] libpaper: 1.1.28_1 [myrepo] libraw: 0.21.5 [myrepo] libwmf-nox11: 0.2.13_2 [myrepo] libxml2: 2.14.6 [myrepo] libzip: 1.11.4 [myrepo] Number of packages to be installed: 52 However the attached patch should fix the problem.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3f200d1cfd37b63cd5f20d1a74cecc4221f855be commit 3f200d1cfd37b63cd5f20d1a74cecc4221f855be Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2026-04-10 19:26:45 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2026-04-10 19:28:48 +0000 graphics/ImageMagick7: Depend on ffmpeg-nox11 if FLAVOR==nox11 PR: 274634 graphics/ImageMagick7/Makefile | 5 +++++ 1 file changed, 5 insertions(+)