Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not let TKernel depend on X11 on Unix #12

Closed
dbarbier opened this issue May 20, 2011 · 6 comments
Closed

Do not let TKernel depend on X11 on Unix #12

dbarbier opened this issue May 20, 2011 · 6 comments
Milestone

Comments

@dbarbier
Copy link
Collaborator

OCC 6.5.0 introduced a dependency between TKernel and X11 on Unix. With previous versions, one can use many features (for instance modeling) without X11, which is very convenient.
See http://www.opencascade.org/org/forum/thread_20042/

@tpaviot
Copy link
Owner

tpaviot commented May 20, 2011

Is the patch you provided enough to solve and close this issue?

@dbarbier
Copy link
Collaborator Author

Yes, it is used in Debian. But this is a hack, and it does not work as is with CMake. IMO we have to cleanly move OSD_FontMgr into another package, this is why I targeted this issue to OCE 0.5.

@galleon
Copy link

galleon commented Jun 3, 2011

OpenGl might not be the best package for that. There are (should be) few dependencies on X11. I would propose to move it to Xw and have specific implementation for WNT and OSX in their specific directories (same names).

@dbarbier
Copy link
Collaborator Author

dbarbier commented Aug 8, 2011

A better alternative can be found at http://www.opencascade.org/org/forum/thread_21351/

We can leave OSD_FontMgr.cxx in the OSD package, and replace X11 calls by reading font directories from compile-time option and environment variable. Fortunately this one is pretty straightforward.

@tpaviot
Copy link
Owner

tpaviot commented Aug 9, 2011

It sounds to be a good solution. I agree with this idea.

@dbarbier
Copy link
Collaborator Author

Fixed in db/TKService-drop-X11-dependency branch, but not yet fully tested

dbarbier added a commit that referenced this issue Aug 18, 2011
This class uses X11 calls to get the list of available fonts,
which is then used by OpenGl_FontMgr.cxx; see
  http://www.opencascade.org/org/forum/thread_21351/
for details about why this is a bad idea.

Here we use an environment variable to get the list of directories
where fonts have to be looked for.  If it is unset, default paths
are set when compiling:
 * On Darwin, /usr/X11/lib/X11/fonts:/Library/Fonts:/System/Library/Fonts
 * On other Unix, /usr/share/X11/fonts:/usr/share/fonts/X11

Closes issue #12.

Tkernel indirectly depends on libdl through libX11, so this commit
must be applied after ca78eea, otherwise applications may have
unresolved symbols when linking against TKernel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants