On Sat, Nov 11, 2023 at 11:06:19AM +0100, Landry Breuil wrote:
> Hi,
> 
> not meant for commit for now but at least the diffs are on the list for
> the ones to play with it and break their machine.
> 
> - a diff to enable the wayland backend in gtk+3 & gtk+4, once more
>   wayland bits are linked to the build
> - two ports for https://github.com/wmww/gtk-layer-shell and its gtk4
>   counterpart https://github.com/wmww/gtk4-layer-shell - the
> gtk-layer-demo and gtk4-layer-demo examples run fine here.
> 
> gtk-layer-shell is a dependency for an upcoming port of
> https://wayfire.org/, and is probably going to be used in other gtk+3
> apps moving towards wayland, cf 'required by' in
> https://archlinux.org/packages/extra/x86_64/gtk-layer-shell/ and
> https://www.freshports.org/x11-toolkits/gtk-layer-shell
> 
> Landry

I have similar diffs for gtk3 et gtk4.


> diff --git a/x11/gtk+3/Makefile b/x11/gtk+3/Makefile
> index 6d23845c695..96e089685c2 100644
> --- a/x11/gtk+3/Makefile
> +++ b/x11/gtk+3/Makefile
> @@ -10,6 +10,7 @@ GNOME_VERSION=              3.24.38
>  
>  PKGNAME-main=                gtk+3-${GNOME_VERSION}
>  PKGNAME-cups=                gtk+3-cups-${GNOME_VERSION}
> +REVISION-main=               0
>  
>  CATEGORIES=          x11 devel
>  
> @@ -37,9 +38,14 @@ COMPILER_LANGS=            c
>  
>  DEBUG_PACKAGES=              ${BUILD_PACKAGES}
>  
> +BUILD_DEPENDS+=              wayland/wayland-protocols
> +BUILD_DEPENDS+=              wayland/libinput-openbsd
> +
>  LIB_DEPENDS-main=    ${LIB_DEPENDS} \
>                       devel/pango \
>                       graphics/gdk-pixbuf2 \
> +                     wayland/wayland \
> +                     x11/xkbcommon \
>                       x11/gnome/at-spi2-core
>  RUN_DEPENDS-main=    ${RUN_DEPENDS} \
>                       x11/hicolor-icon-theme
> @@ -54,6 +60,7 @@ WANTLIB-main += X11 Xcomposite Xcursor Xdamage Xext Xfixes 
> Xi Xinerama
>  WANTLIB-main += Xrandr atk-1.0 atk-bridge-2.0 c cairo cairo-gobject
>  WANTLIB-main += epoxy fontconfig fribidi gdk_pixbuf-2.0 gio-2.0 glib-2.0
>  WANTLIB-main += gmodule-2.0 gobject-2.0 harfbuzz intl m pango-1.0 
> pangocairo-1.0
> +WANTLIB-main += wayland-client wayland-cursor wayland-egl xkbcommon
>  WANTLIB-main += pangoft2-1.0
>  
>  LIB_DEPENDS-cups=    ${LIB_DEPENDS} \
> @@ -72,7 +79,7 @@ CONFIGURE_ARGS=             
> -Dprint_backends="cups,file,lpr" \
>                       -Dman=true
>  
>  # explicitly decativate wayland
> -CONFIGURE_ARGS +=    -Dwayland_backend=false
> +CONFIGURE_ARGS +=    -Dwayland_backend=true
>  
>  # !!! Disable colord until proven useful
>  CONFIGURE_ARGS +=    -Dcolord=no
> diff --git a/x11/gtk+3/pkg/PLIST-main b/x11/gtk+3/pkg/PLIST-main
> index 76b228c8623..383ebf2d457 100644
> --- a/x11/gtk+3/pkg/PLIST-main
> +++ b/x11/gtk+3/pkg/PLIST-main
> @@ -62,8 +62,16 @@ include/gtk-3.0/gdk/gdkthreads.h
>  include/gtk-3.0/gdk/gdktypes.h
>  include/gtk-3.0/gdk/gdkversionmacros.h
>  include/gtk-3.0/gdk/gdkvisual.h
> +include/gtk-3.0/gdk/gdkwayland.h
>  include/gtk-3.0/gdk/gdkwindow.h
>  include/gtk-3.0/gdk/gdkx.h
> +include/gtk-3.0/gdk/wayland/
> +include/gtk-3.0/gdk/wayland/gdkwaylanddevice.h
> +include/gtk-3.0/gdk/wayland/gdkwaylanddisplay.h
> +include/gtk-3.0/gdk/wayland/gdkwaylandglcontext.h
> +include/gtk-3.0/gdk/wayland/gdkwaylandmonitor.h
> +include/gtk-3.0/gdk/wayland/gdkwaylandselection.h
> +include/gtk-3.0/gdk/wayland/gdkwaylandwindow.h
>  include/gtk-3.0/gdk/x11/
>  include/gtk-3.0/gdk/x11/gdkx-autocleanups.h
>  include/gtk-3.0/gdk/x11/gdkx11applaunchcontext.h
> @@ -437,6 +445,7 @@ lib/gtk-3.0/3.0.0/immodules/
>  @so lib/gtk-3.0/3.0.0/immodules/im-ti-er.so
>  @so lib/gtk-3.0/3.0.0/immodules/im-ti-et.so
>  @so lib/gtk-3.0/3.0.0/immodules/im-viqr.so
> +@so lib/gtk-3.0/3.0.0/immodules/im-wayland.so
>  @so lib/gtk-3.0/3.0.0/immodules/im-xim.so
>  lib/gtk-3.0/3.0.0/printbackends/
>  @so lib/gtk-3.0/3.0.0/printbackends/libprintbackend-file.so
> @@ -447,9 +456,11 @@ lib/gtk-3.0/modules/
>  @lib lib/libgtk-3.so.${LIBgtk-3_VERSION}
>  lib/pkgconfig/gail-3.0.pc
>  lib/pkgconfig/gdk-3.0.pc
> +lib/pkgconfig/gdk-wayland-3.0.pc
>  lib/pkgconfig/gdk-x11-3.0.pc
>  lib/pkgconfig/gtk+-3.0.pc
>  lib/pkgconfig/gtk+-unix-print-3.0.pc
> +lib/pkgconfig/gtk+-wayland-3.0.pc
>  lib/pkgconfig/gtk+-x11-3.0.pc
>  @man man/man1/gtk-builder-tool.1
>  @man man/man1/gtk-encode-symbolic-svg.1
> diff --git a/x11/gtk+4/Makefile b/x11/gtk+4/Makefile
> index 2b0b794552f..7ef07e4aa4a 100644
> --- a/x11/gtk+4/Makefile
> +++ b/x11/gtk+4/Makefile
> @@ -7,6 +7,7 @@ COMMENT-cups=         gtk+4 CUPS print backend
>  COMMENT-demos=               gtk+4 demo programs
>  COMMENT-guic=                gtk+ icon theme caching utility
>  COMMENT-media=               gtk+ media engine
> +REVISION-main=               0
>  
>  GNOME_PROJECT=               gtk
>  GNOME_VERSION=               4.12.3
> @@ -49,7 +50,12 @@ BUILD_DEPENDS=             
> devel/py-gobject3${MODPY_FLAVOR} \
>                       textproc/py-docutils${MODPY_FLAVOR} \
>                       www/sassc
>  
> +BUILD_DEPENDS+=              wayland/wayland-protocols
> +BUILD_DEPENDS+=              wayland/libinput-openbsd
> +
>  LIB_DEPENDS-main=    devel/pango \
> +                     wayland/wayland \
> +                     x11/xkbcommon \
>                       graphics/gdk-pixbuf2 \
>                       graphics/graphene
>  RUN_DEPENDS-main=    ${RUN_DEPENDS}
> @@ -65,6 +71,8 @@ WANTLIB-main += c cairo cairo-gobject 
> cairo-script-interpreter epoxy
>  WANTLIB-main += fontconfig fribidi gdk_pixbuf-2.0 gio-2.0 glib-2.0
>  WANTLIB-main += gmodule-2.0 gobject-2.0 graphene-1.0 harfbuzz intl
>  WANTLIB-main += jpeg m pango-1.0 pangocairo-1.0 pangoft2-1.0 png tiff
> +WANTLIB-main += wayland-client wayland-egl xkbcommon
> +
>  
>  LIB_DEPENDS-cups=    print/cups,-libs \
>                       ${BASE_PKGPATH},-main=${GNOME_VERSION}
> @@ -98,7 +106,7 @@ TEST_DEPENDS=              multimedia/pipewire/pipewire
>  CONFIGURE_ARGS=              -Dman-pages=true
>  
>  # disable wayland for now
> -CONFIGURE_ARGS +=    -Dwayland-backend=false
> +CONFIGURE_ARGS +=    -Dwayland-backend=true
>  #LIB_DEPENDS +=              x11/xkbcommon
>  
>  # preference for media-gstreamer
> diff --git a/x11/gtk+4/pkg/PLIST-main b/x11/gtk+4/pkg/PLIST-main
> index 1255f9db88c..83e59a589d2 100644
> --- a/x11/gtk+4/pkg/PLIST-main
> +++ b/x11/gtk+4/pkg/PLIST-main
> @@ -62,6 +62,16 @@ include/gtk-4.0/gdk/gdkvulkancontext.h
>  include/gtk-4.0/gdk/version/
>  include/gtk-4.0/gdk/version/gdk-visibility.h
>  include/gtk-4.0/gdk/version/gdkversionmacros.h
> +include/gtk-4.0/gdk/wayland/
> +include/gtk-4.0/gdk/wayland/gdkwayland.h
> +include/gtk-4.0/gdk/wayland/gdkwaylanddevice.h
> +include/gtk-4.0/gdk/wayland/gdkwaylanddisplay.h
> +include/gtk-4.0/gdk/wayland/gdkwaylandglcontext.h
> +include/gtk-4.0/gdk/wayland/gdkwaylandmonitor.h
> +include/gtk-4.0/gdk/wayland/gdkwaylandpopup.h
> +include/gtk-4.0/gdk/wayland/gdkwaylandseat.h
> +include/gtk-4.0/gdk/wayland/gdkwaylandsurface.h
> +include/gtk-4.0/gdk/wayland/gdkwaylandtoplevel.h
>  include/gtk-4.0/gdk/x11/
>  include/gtk-4.0/gdk/x11/gdkx-autocleanups.h
>  include/gtk-4.0/gdk/x11/gdkx.h
> @@ -385,6 +395,7 @@ include/gtk-4.0/unix-print/gtk/print/gtkprinter.h
>  include/gtk-4.0/unix-print/gtk/print/gtkprintjob.h
>  include/gtk-4.0/unix-print/gtk/print/gtkprintunixdialog.h
>  lib/girepository-1.0/Gdk-4.0.typelib
> +lib/girepository-1.0/GdkWayland-4.0.typelib
>  lib/girepository-1.0/GdkX11-4.0.typelib
>  lib/girepository-1.0/Gsk-4.0.typelib
>  lib/girepository-1.0/Gtk-4.0.typelib
> @@ -395,6 +406,7 @@ lib/gtk-4.0/4.0.0/printbackends/
>  @so lib/gtk-4.0/4.0.0/printbackends/libprintbackend-file.so
>  @lib lib/libgtk-4.so.${LIBgtk-4_VERSION}
>  lib/pkgconfig/gtk4-unix-print.pc
> +lib/pkgconfig/gtk4-wayland.pc
>  lib/pkgconfig/gtk4-x11.pc
>  lib/pkgconfig/gtk4.pc
>  @man man/man1/gtk4-broadwayd.1
> @@ -407,6 +419,7 @@ share/doc/pkg-readmes/${PKGSTEM}
>  share/gettext/its/gtk4builder.its
>  share/gettext/its/gtk4builder.loc
>  share/gir-1.0/Gdk-4.0.gir
> +share/gir-1.0/GdkWayland-4.0.gir
>  share/gir-1.0/GdkX11-4.0.gir
>  share/gir-1.0/Gsk-4.0.gir
>  share/gir-1.0/Gtk-4.0.gir




-- 
Antoine

Reply via email to