pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x11/wxGTK32, wip/golly and MesaLib [with patch to cmake]



On Sun 02 Oct 2022 at 14:05:00 +0200, Olaf Seibert wrote:
> I am trying to update wip/golly to the latest version, and it seems it
> needs to be updated to use x11/wxGTK32. I fixed 2 build errors I
> encountered in wxGTK32 (see below). But I still see a problem with golly
> where symbols from (I think) MesaLib are not found. Since these are
> reported for wx libraries, I think the problem is in there somehow. But
> adding graphics/MesaLib/buildlink3.mk like for the other cases doesn't
> seem to help.
> 
> Anybody has an idea?

I opened an issue with wxwidgets at
https://github.com/wxWidgets/wxWidgets/issues/22841 and while tracing
this back through cmake files (oh I hate those so) it seems that cmake
thinks that libEGL only exists/is usable if you have libOpenGL, not if
you have libGL. Guess which one we have?

A patch to our cmake install like this seems to fix it (I'm still in
progress to check it).

--- /usr/pkg/share/cmake-3.23/Modules/FindOpenGL.cmake	2022-05-25 15:42:51.000000000 +0200
+++ /tmp/FindOpenGL.cmake	2022-10-03 16:48:39.590200453 +0200
@@ -515,12 +515,7 @@
                           "${OPENGL_INCLUDE_DIR}")
   endif()
 
-  # ::EGL is a GLVND library, and thus Linux-only: we don't bother checking
-  # for a framework version of this library.
-  # Note we test for OpenGL::OpenGL as a target.  When this module is updated to
-  # support GLES, we would additionally want to check for the hypothetical GLES
-  # target and enable EGL if either ::GLES or ::OpenGL is created.
-  if(TARGET OpenGL::OpenGL AND OpenGL_EGL_FOUND AND NOT TARGET OpenGL::EGL)
+  if(TARGET OpenGL::GL AND OpenGL_EGL_FOUND AND NOT TARGET OpenGL::EGL)
     if(IS_ABSOLUTE "${OPENGL_egl_LIBRARY}")
       add_library(OpenGL::EGL UNKNOWN IMPORTED)
       set_target_properties(OpenGL::EGL PROPERTIES IMPORTED_LOCATION
@@ -531,7 +526,7 @@
                             "${OPENGL_egl_LIBRARY}")
     endif()
     set_target_properties(OpenGL::EGL PROPERTIES INTERFACE_LINK_LIBRARIES
-                          OpenGL::OpenGL)
+                          OpenGL::GL)
     # Note that EGL's include directory is different from OpenGL/GLX's!
     set_target_properties(OpenGL::EGL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
                           "${OPENGL_EGL_INCLUDE_DIR}")

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index