mesa-demos supports building for x11 or wayland (or both).
Add port options for both and adjust plist.
While here remove some x11 dependencies that aren't needed.
Details
The egl*_wayland programs currently segfault for me (upstream bug).
Not sure yet who's fault it is.
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
freeglut pulls X11 dependencies but upstream has Wayland support since 3.2.0. Maybe turn implit --enable-glut into an option e.g.,
$ make clean all WITHOUT="GLUT X11" $ pkg info -x libX libxml2-2.9.10 $ make makeplist | fgrep bin/ bin/eglgears_wayland bin/eglinfo bin/eglkms bin/egltri_wayland bin/es2gears_wayland bin/peglgears $ readelf -d $(make -V STAGEDIR)$(make -V PREFIX)/bin/eglgears_wayland | fgrep NEEDED 0x0000000000000001 NEEDED Shared library: [libGLEW-wayland.so.2] 0x0000000000000001 NEEDED Shared library: [libGLESv2.so.2] 0x0000000000000001 NEEDED Shared library: [libGLU.so.1] 0x0000000000000001 NEEDED Shared library: [libOpenGL.so.0] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libwayland-egl.so.1] 0x0000000000000001 NEEDED Shared library: [libwayland-client.so.0] 0x0000000000000001 NEEDED Shared library: [libEGL.so.1] 0x0000000000000001 NEEDED Shared library: [libc.so.7]
graphics/mesa-demos/Makefile | ||
---|---|---|
19 | glesv2 is not used when both WAYLAND and X11 are disabled. Maybe try WAYLAND_USE= GL=glesv2 X11_USE= GL=glesv2 | |
22 | Sort alphabetically to avoid confusion with make config and make showconfig which are sorted. | |
30 | Why add a newline here? | |
32 | Is it because USE_GL=glew injects -lX11? $ pkg-config --libs glew -L/usr/local/lib -lGLEW -lX11 -lGLU -lGL Maybe try X11_USE= gl=glew X11_VARS_OFF= SUFFIX=-wayland WAYLAND_LIB_DEPENDS= libGLEW${SUFFIX}.so:graphics/glew${SUFFIX} post-patch-X11-off: @${REINPLACE_CMD} '/PKG_CONFIG/s/glew/&-wayland/' ${WRKSRC}/configure | |
34 | Convert to LIB_DEPENDS e.g., WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland |
Does it make sense to build mesa-demos without both X11 and WAYLAND support? Perhaps they should be made into an "at least one must be selected" option?
Other than that, I have no further comments, just fix what @jbeich pointed out and it's good to go.
The egl*_wayland programs currently segfault for me
Can you re-try with mesa-demos-8.5.0? See eglut_wayland: switch from wl_shell to xdg_shell
mesa-demos-9.0.0 is available. It builds fine without patches or extra flags to disable features on FreeBSD.