On Mon, Nov 04, 2024 at 03:53:02PM +0100, Jeremie Courreges-Anglas wrote:
>
> So Matthieu has requested a PGTK (Pure GTK) Emacs FLAVOR for some time
> already.
>
> Runtime has one obvious glitch: it doesn't fall back to tty if you're
> not running X/wayland, like other FLAVORS do, so you'll have to
> explicitely use emacs -nw in that case. Worth documenting?
>
> Side notes:
> - editors/Makefile diff left out but I do plan to hook this up
> - when this is in, I'll sync the emacs-30.0.92 pretest diff
>
> ok?
Tested on X and wayland. works for me with my configs.
Thanks.
>
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/editors/emacs/Makefile,v
> diff -u -p -r1.121 Makefile
> --- Makefile 29 Oct 2024 09:46:25 -0000 1.121
> +++ Makefile 4 Nov 2024 12:25:25 -0000
> @@ -4,7 +4,7 @@ COMMENT= GNU editor: extensible, custom
> # Zap post-extract when updating
> VERSION= 29.4
> DISTNAME= emacs-${VERSION}
> -REVISION= 1
> +REVISION= 2
>
> CATEGORIES= editors
>
> @@ -23,7 +23,7 @@ EXTRACT_SUFX= .tar.xz
>
> DEBUG_PACKAGES = ${BUILD_PACKAGES}
>
> -FLAVORS= athena gtk2 gtk3 no_x11
> +FLAVORS= athena gtk2 gtk3 no_x11 pgtk
> FLAVOR?= gtk3
>
> GCCARCH= ${MACHINE_ARCH}-unknown-openbsd
> @@ -69,7 +69,6 @@ LIB_DEPENDS+= devel/harfbuzz \
> graphics/giflib \
> graphics/lcms2 \
> graphics/libwebp \
> - misc/m17n/lib \
> x11/dbus \
> x11/gnome/librsvg
> RUN_DEPENDS+= devel/desktop-file-utils \
> @@ -78,6 +77,7 @@ RUN_DEPENDS+= devel/desktop-file-utils
> . if ${FLAVOR} == "athena"
> CONFIGURE_ARGS+= --with-x-toolkit=athena
> LIB_DEPENDS+= x11/Xaw3d
> +LIB_DEPENDS+= misc/m17n/lib
> WANTLIB += ICE SM X11 X11-xcb Xaw3d Xcomposite Xext Xfixes Xi
> WANTLIB += Xinerama Xmu Xpm Xrandr Xrender Xt cairo dbus-1 fontconfig
> WANTLIB += freetype gdk_pixbuf-2.0 gif gio-2.0 glib-2.0 gobject-2.0
> @@ -86,6 +86,7 @@ WANTLIB += rsvg-2 tiff webpdecoder webpd
> . elif ${FLAVOR} == "gtk2"
> CONFIGURE_ARGS+= --with-x-toolkit=gtk2
> LIB_DEPENDS+= x11/gtk+2
> +LIB_DEPENDS+= misc/m17n/lib
> WANTLIB += ICE SM X11 X11-xcb Xcomposite Xcursor Xdamage Xext
> WANTLIB += Xfixes Xi Xinerama Xpm Xrandr Xrender atk-1.0 cairo
> WANTLIB += dbus-1 fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
> @@ -96,12 +97,20 @@ WANTLIB += xcb xcb-shape xcb-util
> . elif ${FLAVOR} == "gtk3"
> CONFIGURE_ARGS+= --with-x-toolkit=gtk3
> LIB_DEPENDS+= x11/gtk+3
> +LIB_DEPENDS+= misc/m17n/lib
> WANTLIB += ICE SM X11 X11-xcb Xcomposite Xext Xfixes Xi Xinerama
> WANTLIB += Xpm Xrandr Xrender atk-1.0 cairo cairo-gobject dbus-1
> WANTLIB += fontconfig freetype gdk-3 gdk_pixbuf-2.0 gif gio-2.0
> WANTLIB += glib-2.0 gobject-2.0 gtk-3 harfbuzz intl jpeg lcms2
> WANTLIB += m17n-core m17n-flt otf pango-1.0 pangocairo-1.0 png
> WANTLIB += rsvg-2 tiff webpdecoder webpdemux xcb xcb-shape xcb-util
> +. elif ${FLAVOR} == "pgtk"
> +CONFIGURE_ARGS+= --with-pgtk
> +LIB_DEPENDS+= x11/gtk+3
> +WANTLIB += atk-1.0 cairo cairo-gobject dbus-1 fontconfig freetype
> +WANTLIB += gdk-3 gdk_pixbuf-2.0 gif gio-2.0 glib-2.0 gobject-2.0
> +WANTLIB += gtk-3 harfbuzz intl jpeg lcms2 otf pango-1.0 pangocairo-1.0
> +WANTLIB += png rsvg-2 tiff webpdecoder webpdemux
> . else
> ERRORS+= "Fatal: Conflicting flavor: ${FLAVOR}"
> . endif
> Index: pkg/DESCR
> ===================================================================
> RCS file: /home/cvs/ports/editors/emacs/pkg/DESCR,v
> diff -u -p -r1.4 DESCR
> --- pkg/DESCR 7 May 2013 07:06:42 -0000 1.4
> +++ pkg/DESCR 4 Nov 2024 12:25:55 -0000
> @@ -24,3 +24,4 @@ Flavors:
> athena - build with athena toolkit instead of gtk3
> gtk2 - build with gtk2 instead of gtk3
> gtk3 - build with gtk3 (default)
> + pgtk - build with gtk only, useful for wayland
> Index: pkg/PFRAG.pgtk
> ===================================================================
> RCS file: pkg/PFRAG.pgtk
> diff -N pkg/PFRAG.pgtk
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/PFRAG.pgtk 4 Nov 2024 12:27:23 -0000
> @@ -0,0 +1,3 @@
> +share/emacs/${VERSION}/etc/org.gnu.emacs.defaults.gschema.valid
> +share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
> +@tag glib-compile-schemas
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/editors/emacs/pkg/PLIST,v
> diff -u -p -r1.31 PLIST
> --- pkg/PLIST 6 Jul 2024 02:12:36 -0000 1.31
> +++ pkg/PLIST 4 Nov 2024 12:31:35 -0000
> @@ -10,6 +10,7 @@
> %%gtk2%%
> %%gtk3%%
> !%%no_x11%%
> +%%pgtk%%
> @bin bin/ctags
> @bin bin/ebrowse
> bin/emacs
>
> --
> jca
>
--
Matthieu Herrb
No comments:
Post a Comment