HomeFreeBSD

graphics/jasper: Add missing OPENGL dependencies, use CMAKE_BOOL

Description

graphics/jasper: Add missing OPENGL dependencies, use CMAKE_BOOL

Reported by: danfe
Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D22936

Event Timeline

This change (portrevision 1) re-breaks the no-opengl build. It might not be the only way, but I had to add
-DJAS_ENABLE_OPENGL=false \
to CMAKE_ARGS to stop CMAKE from erroring-out when it went to look for opengl.
That might not be the only way to fix this (it seems as though the JAS_ENABLE_OPENGL thing is meant to do this, but I don't know enough about the make/CMAKE magic to know why it isn't.

Sorry for the delay. I'm not able to reproduce any problems. I've built with poudriere, then inside the jail installed various gl and xorg related packages, but the jasper install always succeeds. I also see the build output is the same with all of
OPENGL_CMAKE_OFF= -DJAS_ENABLE_OPENGL=false, OPENGL_CMAKE_BOOL=JAS_ENABLE_OPENGL, or even just CMAKE_ARGS=-DJAS_ENABLE_OPENGL=false.

JAS_ENABLE_OPENGL: ON
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR) 
OpenGL library found: FALSE
JAS_HAVE_OPENGL: 0`

Could you provide more information? Do you have any idea what is going on with your environment to cause the problem?

I'm afraid that I can't reproduce the failure now. Perhaps CMAKE itself has been upgraded in the intervening time, and now understands the tricky boolean logic better.
When I build it I switch the "OPENGL" option off, because I'm building for a headless server, so I don't want to install xorg or mesa. Jasper is being brought in as a dependency of Samba, possibly through Tracker.
The fault that I was seeing before was an error from CMAKE about not being able to find gl in the system. That's correct in that my system has no OpenGL related libraries, but IMO it should not have been looking for them in the first place.
In any event, with the current (521300 2019-12-29 12:53:01Z sunpoet) version of the Makefile, the build completes cleanly. Yay!