Skip to content

Commit

Permalink
x11-toolkits/wlroots: fork 0.15 into a pinned port
Browse files Browse the repository at this point in the history
Some consumers are ready for 0.16 API but many are not. For smooth
transition use non-default PREFIX, so both can be installed together.
  • Loading branch information
jbeich committed Nov 11, 2022
1 parent 53bab89 commit c717faa
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 0 deletions.
1 change: 1 addition & 0 deletions x11-toolkits/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
SUBDIR += vte3
SUBDIR += wlroots
SUBDIR += wlroots-devel
SUBDIR += wlroots015
SUBDIR += wmapp
SUBDIR += wxgtk28
SUBDIR += wxgtk28-common
Expand Down
84 changes: 84 additions & 0 deletions x11-toolkits/wlroots015/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
PORTNAME= wlroots
DISTVERSION= 0.15.1
DISTVERSIONSUFFIX= -g${GL_COMMIT:C/(.{12}).*/\1/}
CATEGORIES= x11-toolkits
PKGNAMESUFFIX= 015

PATCH_SITES+= https://github.com/swaywm/${GL_PROJECT}/commit/:github
PATCHFILES+= 7c0e2a271a4c.patch:-p1:github # https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2064
PATCHFILES+= 55a8d225cf8c.patch:-p1:github # https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2064
PATCH_SITES+= ${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/commit/
PATCHFILES+= 347b32642fb6.patch:-p1 # https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3318

MAINTAINER= [email protected]
COMMENT= Modular Wayland compositor library (deprecated 0.15.* series)
WWW= https://gitlab.freedesktop.org/wlroots/wlroots

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= wayland-protocols>=1.24:graphics/wayland-protocols
LIB_DEPENDS= libudev.so:devel/libudev-devd \
libdrm.so:graphics/libdrm \
libwayland-server.so:graphics/wayland \
libseat.so:sysutils/seatd \
libxkbcommon.so:x11/libxkbcommon

USES= compiler:c11 gl meson pkgconfig xorg
USE_GITLAB= yes
USE_GL= gbm
USE_XORG= pixman
USE_LDCONFIG= yes
GL_SITE= https://gitlab.freedesktop.org
GL_COMMIT= 29938b74251e826f3778f6bf9c54974a30488cc1
MESON_ARGS= -Dexamples=false -Dbackends=${BACKENDS:ts,} -Drenderers=${RENDERERS:ts,}

.ifdef PKGNAMESUFFIX
PORTSCOUT= limit:^0\.15\.
PREFIX= ${LOCALBASE}/${PKGBASE} # avoid conflict with the default
MESON_ARGS+= -Ddatadir="${LOCALBASE}/share"
.endif

OPTIONS_DEFINE= DRM NVIDIA OPENGL VULKAN X11
OPTIONS_DEFAULT=DRM OPENGL VULKAN X11
OPTIONS_SUB= yes

DRM_DESC= KMS console support
DRM_LIB_DEPENDS= libinput.so:x11/libinput
DRM_VARS= BACKENDS+="drm libinput"

NVIDIA_DESC= EGLStreams support for DRM backend (experimental)
NVIDIA_PATCH_SITES= https://github.com/danvd/${GL_PROJECT}-eglstreams/commit/:nvidia
NVIDIA_PATCHFILES= c0fc017207f0.patch:-p1:nvidia # https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2769
NVIDIA_IMPLIES= DRM OPENGL X11
.if make(makesum)
.MAKEFLAGS: WITH+=NVIDIA
.endif

OPENGL_RUN_DEPENDS= mesa-dri>0:graphics/mesa-dri
OPENGL_USE= GL=egl,glesv2
OPENGL_VARS= RENDERERS+=gles2

VULKAN_DESC= Vulkan renderer
VULKAN_BUILD_DEPENDS= glslangValidator:graphics/glslang \
vulkan-headers>0:graphics/vulkan-headers
VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader
VULKAN_RUN_DEPENDS= mesa-dri>0:graphics/mesa-dri
VULKAN_VARS= RENDERERS+=vulkan

X11_LIB_DEPENDS= libxcb-errors.so:x11/xcb-util-errors \
libxcb-render-util.so:x11/xcb-util-renderutil \
libxcb-icccm.so:x11/xcb-util-wm
X11_BUILD_DEPENDS= evdev-proto>0:devel/evdev-proto \
xwayland-devel>0:x11-servers/xwayland-devel
X11_RUN_DEPENDS= xwayland-devel>0:x11-servers/xwayland-devel
X11_USE= XORG=xcb
X11_MESON_ENABLED= xwayland
X11_VARS= BACKENDS+=x11

post-patch:
# Extract (snapshot) version from the port instead of meson.build
@${REINPLACE_CMD} "/STR/s/meson.project_version()/'${DISTVERSIONFULL}'/" \
${WRKSRC}/include/wlr/meson.build

.include <bsd.port.mk>
11 changes: 11 additions & 0 deletions x11-toolkits/wlroots015/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TIMESTAMP = 1643923194
SHA256 (wlroots-wlroots-29938b74251e826f3778f6bf9c54974a30488cc1_GL0.tar.gz) = 7d3bc1ee9851354a76632de5d0428a3b9583f43ee3e3194f7be616f404f8eae1
SIZE (wlroots-wlroots-29938b74251e826f3778f6bf9c54974a30488cc1_GL0.tar.gz) = 566013
SHA256 (7c0e2a271a4c.patch) = 2b92d3dde7640061ed85ab1690031f7627bebc2366e8c4da217017188ba7195e
SIZE (7c0e2a271a4c.patch) = 5729
SHA256 (55a8d225cf8c.patch) = f9df98540fdabe35c61ed828f6d64633aab72edf0ba1c7ad0849594f10383ce7
SIZE (55a8d225cf8c.patch) = 4209
SHA256 (347b32642fb6.patch) = 56804ce34cd02cb3b2b11a0dbf27c2820c2c0d112f351cdaed5d160e0536d418
SIZE (347b32642fb6.patch) = 3810
SHA256 (c0fc017207f0.patch) = bdafef91a067cc95d9b47f5a837e400b641d9479393136818c34f5eb6b846d71
SIZE (c0fc017207f0.patch) = 108229
8 changes: 8 additions & 0 deletions x11-toolkits/wlroots015/override.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
WLR_SUFFIX= 015

BUILD_DEPENDS:= ${BUILD_DEPENDS:S/wlroots/&${WLR_SUFFIX}/g}
LIB_DEPENDS:= ${LIB_DEPENDS:S/wlroots$/&${WLR_SUFFIX}/}

USES+= localbase # -isystem
CONFIGURE_ENV+= PKG_CONFIG_PATH="${LOCALBASE}/wlroots${WLR_SUFFIX}/libdata/pkgconfig"
MAKE_ENV+= PKG_CONFIG_PATH="${LOCALBASE}/wlroots${WLR_SUFFIX}/libdata/pkgconfig"
28 changes: 28 additions & 0 deletions x11-toolkits/wlroots015/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Pluggable, composable, unopinionated modules for building a Wayland
compositor; or about 60,000 lines of code you were going to write anyway.

- wlroots provides backends that abstract the underlying display and input
hardware, including KMS/DRM, libinput, Wayland, X11, and headless backends,
plus any custom backends you choose to write, which can all be created or
destroyed at runtime and used in concert with each other.
- wlroots provides unopinionated, mostly standalone implementations of many
Wayland interfaces, both from wayland.xml and various protocol extensions.
We also promote the standardization of portable extensions across
many compositors.
- wlroots provides several powerful, standalone, and optional tools that
implement components common to many compositors, such as the arrangement of
outputs in physical space.
- wlroots provides an Xwayland abstraction that allows you to have excellent
Xwayland support without worrying about writing your own X11 window manager
on top of writing your compositor.
- wlroots provides a renderer abstraction that simple compositors can use to
avoid writing GL code directly, but which steps out of the way when your
needs demand custom rendering code.

wlroots implements a huge variety of Wayland compositor features and implements
them *right*, so you can focus on the features that make your compositor
unique. By using wlroots, you get high performance, excellent hardware
compatibility, broad support for many wayland interfaces, and comfortable
development tools - or any subset of these features you like, because all of
them work independently of one another and freely compose with anything you want
to implement yourself.
9 changes: 9 additions & 0 deletions x11-toolkits/wlroots015/pkg-message
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{ type: install
message: <<EOM
Known issues:
- NVIDIA option (aka wlroots-eglstreams) requires nvidia-drm.ko from nvidia-driver,
see https://github.com/aritger/eglstreams-kms-example/issues/7
EOM
}
]
97 changes: 97 additions & 0 deletions x11-toolkits/wlroots015/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
include/wlr/backend.h
%%DRM%%include/wlr/backend/drm.h
include/wlr/backend/headless.h
include/wlr/backend/interface.h
%%DRM%%include/wlr/backend/libinput.h
include/wlr/backend/multi.h
include/wlr/backend/session.h
include/wlr/backend/wayland.h
%%X11%%include/wlr/backend/x11.h
include/wlr/config.h
include/wlr/interfaces/wlr_input_device.h
include/wlr/interfaces/wlr_keyboard.h
include/wlr/interfaces/wlr_output.h
include/wlr/interfaces/wlr_pointer.h
include/wlr/interfaces/wlr_switch.h
include/wlr/interfaces/wlr_tablet_pad.h
include/wlr/interfaces/wlr_tablet_tool.h
include/wlr/interfaces/wlr_touch.h
include/wlr/render/allocator.h
include/wlr/render/dmabuf.h
include/wlr/render/drm_format_set.h
%%OPENGL%%include/wlr/render/egl.h
%%OPENGL%%include/wlr/render/gles2.h
include/wlr/render/interface.h
include/wlr/render/pixman.h
%%VULKAN%%include/wlr/render/vulkan.h
include/wlr/render/wlr_renderer.h
include/wlr/render/wlr_texture.h
include/wlr/types/wlr_box.h
include/wlr/types/wlr_buffer.h
include/wlr/types/wlr_compositor.h
include/wlr/types/wlr_cursor.h
include/wlr/types/wlr_data_control_v1.h
include/wlr/types/wlr_data_device.h
include/wlr/types/wlr_drm.h
include/wlr/types/wlr_drm_lease_v1.h
include/wlr/types/wlr_export_dmabuf_v1.h
include/wlr/types/wlr_foreign_toplevel_management_v1.h
include/wlr/types/wlr_fullscreen_shell_v1.h
include/wlr/types/wlr_gamma_control_v1.h
include/wlr/types/wlr_idle.h
include/wlr/types/wlr_idle_inhibit_v1.h
include/wlr/types/wlr_input_device.h
include/wlr/types/wlr_input_inhibitor.h
include/wlr/types/wlr_input_method_v2.h
include/wlr/types/wlr_keyboard.h
include/wlr/types/wlr_keyboard_group.h
include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h
include/wlr/types/wlr_layer_shell_v1.h
include/wlr/types/wlr_linux_dmabuf_v1.h
include/wlr/types/wlr_matrix.h
include/wlr/types/wlr_output.h
include/wlr/types/wlr_output_damage.h
include/wlr/types/wlr_output_layout.h
include/wlr/types/wlr_output_management_v1.h
include/wlr/types/wlr_output_power_management_v1.h
include/wlr/types/wlr_pointer.h
include/wlr/types/wlr_pointer_constraints_v1.h
include/wlr/types/wlr_pointer_gestures_v1.h
include/wlr/types/wlr_presentation_time.h
include/wlr/types/wlr_primary_selection.h
include/wlr/types/wlr_primary_selection_v1.h
include/wlr/types/wlr_region.h
include/wlr/types/wlr_relative_pointer_v1.h
include/wlr/types/wlr_scene.h
include/wlr/types/wlr_screencopy_v1.h
include/wlr/types/wlr_seat.h
include/wlr/types/wlr_server_decoration.h
include/wlr/types/wlr_surface.h
include/wlr/types/wlr_switch.h
include/wlr/types/wlr_tablet_pad.h
include/wlr/types/wlr_tablet_tool.h
include/wlr/types/wlr_tablet_v2.h
include/wlr/types/wlr_text_input_v3.h
include/wlr/types/wlr_touch.h
include/wlr/types/wlr_viewporter.h
include/wlr/types/wlr_virtual_keyboard_v1.h
include/wlr/types/wlr_virtual_pointer_v1.h
include/wlr/types/wlr_xcursor_manager.h
include/wlr/types/wlr_xdg_activation_v1.h
include/wlr/types/wlr_xdg_decoration_v1.h
include/wlr/types/wlr_xdg_foreign_registry.h
include/wlr/types/wlr_xdg_foreign_v1.h
include/wlr/types/wlr_xdg_foreign_v2.h
include/wlr/types/wlr_xdg_output_v1.h
include/wlr/types/wlr_xdg_shell.h
include/wlr/util/addon.h
include/wlr/util/box.h
include/wlr/util/edges.h
include/wlr/util/log.h
include/wlr/util/region.h
include/wlr/version.h
include/wlr/xcursor.h
%%X11%%include/wlr/xwayland.h
lib/libwlroots.so
lib/libwlroots.so.10
libdata/pkgconfig/wlroots.pc

0 comments on commit c717faa

Please sign in to comment.