Bug 239156 - graphics/ImageMagick6-nox11 pulls in a lot of x11 stuff via graphics/cairo
Summary: graphics/ImageMagick6-nox11 pulls in a lot of x11 stuff via graphics/cairo
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
Depends on:
Reported: 2019-07-12 08:06 UTC by Martin Waschbüsch
Modified: 2019-07-14 13:09 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Waschbüsch 2019-07-12 08:06:41 UTC
I just upgraded packages on a system and a number of additional libraries were needed, among them:


I did not immediately understand where that came from (how the heck did I end up having wayland installed on a webserver?) as I have no need for x11 stuff.

It turns out that the graphics/ImageMagick6-nox11 (deliberately chosen for excluding x11 stuff) by default depends on graphics/cairo which in turn has its X11 option enabled by default.

I do not know what the right solution is here. Maybe there needs to be a cairo-nox11 package, but at any rate, the current situation seems like a contradiction to me and certainly does not result in what you would expect when installing a -nox11 package (e.g. no x11 stuff pulled in).

PS: Same applies to ImageMagick7-nox11.
Comment 1 Ting-Wei Lan 2019-07-12 08:38:07 UTC
(In reply to Martin Waschbüsch from comment #0)
I think you will have to disable OPENGL, X11, XCB options on cairo. Wayland is likely to be pulled in by mesa-libs with USES=gl.
Comment 2 Martin Waschbüsch 2019-07-13 23:43:06 UTC
(In reply to Ting-Wei Lan from comment #1)
Thank you for the suggestion. I do know how to work around it when building the package myself. My point was about expectations:

Someone installing  a -nox11 package will expect it to do just that. Instead, x11 + wayland gets installed. That just seems wrong to me.

Also, someone using pkg (official packages, not poudriere) instead of ports does not have much of a choice.

Thus, as I see it, there are three options to solve this:

1) Can the -nox11 ImageMagick packages as they pull in x11 stuff anyway. That way at least no false expectations are raised.

2) Disable OPENGL, X11 and XCB per default for graphics/cairo since they result in these dependencies. However, hoping that these options are set by default for a reason, that might break other packages depending on graphics/cairo providing these features.

3) Create a graphics/cairo-nox11 port with appropriate options unset so that the -nox11 ImageMagick packages can depend on that instead of graphics/cairo. That way other packages are left untouched while being able to provide -nox11 ImageMagic packages that actually behave as advertised. 

My preference would be for 3).

One could leave it as is, however I tend to finding that unacceptable seeing as you do not get what you expected when installing one of the -nox11 ImageMagic packages.
Comment 3 Ting-Wei Lan 2019-07-14 06:17:24 UTC
(In reply to Martin Waschbüsch from comment #2)

(1) I don't know what is the policy of nox11 packages, but I agree that it doesn't look right for nox11 packages to end up pulling in X11 libraries.

(2) This isn't possible because GTK requires X11 and WebKitGTK requires OPENGL. I am not sure what is the status of XCB, but I think it makes sense to enable it by default because libX11 itself already depends on XCB.

(3) I agree that this is the best solution as long as you don't have other packages depending on cairo.
Comment 4 Gary 2019-07-14 13:09:17 UTC
Note that a recent update to graphics/ImageMagick6 and graphics/ImageMagick6-nox11 to add RAQM support seemed to pull in a bunch of X11 libraries also.  RAQM appears to be on by default.