Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

unrecognized options in graphicsmagick #22919

Closed
chdiza opened this issue Sep 29, 2013 · 16 comments
Closed

unrecognized options in graphicsmagick #22919

chdiza opened this issue Sep 29, 2013 · 16 comments

Comments

@chdiza
Copy link
Contributor

chdiza commented Sep 29, 2013

Recently all the option-names and such from the imagemagick formula were put into the graphicsmagick formula.

At least two of those options don't exist for graphicsmagick.

Both --with-rsvg and --with-webp are rejected by the ./configure script as unrecognized, and neither is mentioned in ./configure --help.

@MikeMcQuaid
Copy link
Member

Weird, I'm sure I tested all these options. Thanks, will fix.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Though graphicsmagick is called a "drop-in replacement" for imagemagick, that just means it offers nearly the same functionality as imagemagick. It doesn't mean that it takes all the same build options, still less that its options have the same names as the corresponding ones in imagemagick.

In the graphcismagick formula, the flag --with-freetype=yes is passed explicitly but conditionally. The problem is that graphicsmagick's configure script doesn't recognzie that flag, nor is it mentioned in ./configure --help.

Moreover, at the top of the formula there are a bunch of :optional ones. I'm focusing right now on little-cms and little-cms2. I take it that this means that IF the user passes --with-little-cms{2}, then that flag is also passed to the configure script. But --with-little-cms{2} is unrecognized by graphicsmagick's configure script, and isn't mentioned in ./configure --help. OK fine, no big deal, at least that part of the formula will get little-cms{2} installed if it wasn't already, and hopefully brew will ensure that its presence is detected by the configure script.

There ARE in ./configure --help the corresponding flags --without-lcms and --without-lcms2. But as far as I can tell, these will never be passed to the configure script by brew. (The user could type --without-little-cms{2}, but those aren't graphicsmagick options). Does this mean there is no way in the formula to turn off little-cms{2}? If not, it's misleading to call cms{2} "optional".

@MikeMcQuaid
Copy link
Member

The little-cms2 dependency is optional, if not a configure option. I'll fix this up at some point but if you could submit a PR that would be fantastic (and get this resolved sooner)

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Working on a PR. I'm not a programmer, but looking at the configure script it appears that the option for using freetype is --with-ttf. By default it appears to be on, so the formula needs nothing to turn it on (in theory). But for turning it off, the formula needs --without-ttf.

Does this mean that we can't use :optional? I thought doing so, as in depends_on 'freetype' => :optional, forces the option-name to be --without-freetype, which won't work.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

If freetype is going to be optional, then the goal is to (a) be able to build gm without freetype support, and (b) to not be forced to brew freetype if a freetype-less build is requested.

I don't know how to do this without wrecking the :optional/:recommended.

@mistydemeo
Copy link
Member

I thought doing so, as in depends_on 'freetype' => :optional, forces the option-name to be --without-freetype, which won't work.

It selects the user-facing option in Homebrew, but the option that's actually passed to configure can be anything fortunately. args << '--without-ttf' if build.without? 'freetype' is valid.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

@mistydemeo Thanks.

Re svg support: from the package's readme:

* GraphicsMagick requires libxml2 available from

     http://xmlsoft.org/

  to read the SVG image format and to retrieve files from over a
  network via FTP and HTTP.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Also not recognized by the package: liblqr.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Also not recognizded: openexr and ---disable-opencl.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Also not recognized: enable-hdri.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

The package apparently will use libxml2 for svg support by default.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

The cms stuff isn't really :optional, at least not as I understand how that works. As I understand it, brew should not build gm with cms support unless one does --with-little-cms{2}.

However, if you happen to already have cms{2} on your system, then you brew gm, it will be brewed with cms support even if you don't ask for it.

That's because (I think) gm has both cms's turned on by default (probably it picks one of them if both are present).

@MikeMcQuaid
Copy link
Member

:optional just means a dependency defaults to being unneeded but may be needed on request. We'll fix the option though, thanks.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Playing around with this, I found I could not forcibly deactive cms support when little-cms2 is already brewed.

Not even commenting out the depends_on in the formula and manually passing the flags --without-lcms{2} (which should be recognized by configure) would cause the brew to not be linked to lcms2.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

Playing around with this, I found I could not forcibly deactive cms support when little-cms2 is already brewed.

This is a brew bug, as doing it outside of homebrew results in deactivation of little-cms2.

@chdiza
Copy link
Contributor Author

chdiza commented Sep 29, 2013

This is a brew bug, as doing it outside of homebrew results in deactivation of little-cms2.

Never mind, fixed in latest commit of PR.

handyman5 pushed a commit to handyman5/homebrew that referenced this issue Oct 7, 2013
Closes Homebrew#22919.
Closes Homebrew#22929.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants